decap-cms-backend-github 3.8.1 → 3.9.0-beta.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.
@@ -1,9 +1,9 @@
1
1
  /*! For license information please see decap-cms-backend-github.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("decap-cms-lib-util"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendGithub",["decap-cms-lib-util","@emotion/react","react","prop-types","decap-cms-lib-auth","decap-cms-ui-default"],t):"object"==typeof exports?exports.DecapCmsBackendGithub=t(require("decap-cms-lib-util"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):e.DecapCmsBackendGithub=t(e.DecapCmsLibUtil,e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsLibAuth,e.DecapCmsUiDefault)}(window,(e,t,r,n,i,o)=>(()=>{var a={95:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},128:(e,t,r)=>{var n=r(8506);e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},166:e=>{e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},310:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},330:(e,t,r)=>{var n=r(5874),i=r(759),o=r(9505),a=r(983);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},462:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},476:(e,t,r)=>{var n=r(1200);e.exports=function(e){return n(this,e).get(e)}},481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=void 0,c=Array.isArray(e),l=[e],h=-1,f=[],p=void 0,d=void 0,m=void 0,y=[],v=[],g=e;do{var b=++h===l.length,w=b&&0!==f.length;if(b){if(d=0===v.length?void 0:y[y.length-1],p=m,m=v.pop(),w){if(c)p=p.slice();else{for(var E={},R=0,S=Object.keys(p);R<S.length;R++){var k=S[R];E[k]=p[k]}p=E}for(var x=0,O=0;O<f.length;O++){var T=f[O][0],I=f[O][1];c&&(T-=x),c&&null===I?(p.splice(T,1),x++):p[T]=I}}h=n.index,l=n.keys,f=n.edits,c=n.inArray,n=n.prev}else{if(d=m?c?h:l[h]:void 0,null==(p=m?m[d]:g))continue;m&&y.push(d)}var _,A=void 0;if(!Array.isArray(p)){if(!(0,o.isNode)(p))throw new Error("Invalid AST Node: ".concat((0,i.default)(p),"."));var P=u(t,p.kind,b);if(P){if((A=P.call(t,p,d,m,y,v))===s)break;if(!1===A){if(!b){y.pop();continue}}else if(void 0!==A&&(f.push([d,A]),!b)){if(!(0,o.isNode)(A)){y.pop();continue}p=A}}}void 0===A&&w&&f.push([d,p]),b?y.pop():(n={inArray:c,index:h,keys:l,edits:f,prev:n},l=(c=Array.isArray(p))?p:null!==(_=r[p.kind])&&void 0!==_?_:[],h=-1,f=[],m&&v.push(m),m=p)}while(void 0!==n);return 0!==f.length&&(g=f[f.length-1][1]),g},t.visitInParallel=function(e){var t=new Array(e.length);return{enter:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!1);if(i){var o=i.apply(e[n],arguments);if(!1===o)t[n]=r;else if(o===s)t[n]=s;else if(void 0!==o)return o}}},leave:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!0);if(i){var o=i.apply(e[n],arguments);if(o===s)t[n]=s;else if(void 0!==o&&!1!==o)return o}}else t[n]===r&&(t[n]=null)}}},t.getVisitFn=u,t.BREAK=t.QueryDocumentKeys=void 0;var n,i=(n=r(9859))&&n.__esModule?n:{default:n},o=r(4679),a={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"]};t.QueryDocumentKeys=a;var s=Object.freeze({});function u(e,t,r){var n=e[t];if(n){if(!r&&"function"==typeof n)return n;var i=r?n.leave:n.enter;if("function"==typeof i)return i}else{var o=r?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}t.BREAK=s},552:(e,t,r)=>{var n=r(9438);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},638:e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}},656:(e,t,r)=>{var n=r(4757),i=r(6695),o=r(4153),a="__lodash_placeholder__",s=Math.min;e.exports=function(e,t){var r=e[1],u=t[1],c=r|u,l=c<131,h=128==u&&8==r||128==u&&256==r&&e[7].length<=t[8]||384==u&&t[7].length<=t[8]&&8==r;if(!l&&!h)return e;1&u&&(e[2]=t[2],c|=1&r?0:4);var f=t[3];if(f){var p=e[3];e[3]=p?n(p,f,t[4]):f,e[4]=p?o(e[3],a):t[4]}return(f=t[5])&&(p=e[5],e[5]=p?i(p,f,t[6]):f,e[6]=p?o(e[5],a):t[6]),(f=t[7])&&(e[7]=f),128&u&&(e[8]=null==e[8]?t[8]:s(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},714:(e,t,r)=>{var n=r(1603),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},759:(e,t,r)=>{var n=r(5874),i=r(975),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},809:(e,t,r)=>{var n=r(7156),i=r(3256),o=r(714);e.exports=function(e,t,r,a){var s=1&t,u=i(e);return function t(){for(var i=-1,c=arguments.length,l=-1,h=a.length,f=Array(h+c),p=this&&this!==o&&this instanceof t?u:e;++l<h;)f[l]=a[l];for(;c--;)f[l++]=arguments[++i];return n(p,s?r:this,f)}}},975:(e,t,r)=>{var n=r(5271),i=r(7583);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},983:(e,t,r)=>{var n=r(8071);e.exports=function(e){return null==e?"":n(e)}},984:(e,t,r)=>{var n=r(1200);e.exports=function(e){return n(this,e).has(e)}},1022:(e,t,r)=>{var n=r(6821),i=r(7221),o=r(1596),a=r(1992),s=r(552);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},1095:(e,t,r)=>{var n=r(9400),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},1200:(e,t,r)=>{var n=r(95);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},1400:e=>{e.exports={}},1467:(e,t,r)=>{var n=r(8071),i=r(6311),o=r(4821),a=r(8337),s=r(983),u=/^\s+/;e.exports=function(e,t,r){if((e=s(e))&&(r||void 0===t))return e.replace(u,"");if(!e||!(t=n(t)))return e;var c=a(e),l=o(c,a(t));return i(c,l).join("")}},1596:(e,t,r)=>{var n=r(9438);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},1603:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},1683:(e,t,r)=>{var n=r(9169),i=r(3821),o=i?function(e,t){return i.set(e,t),e}:n;e.exports=o},1824:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},1908:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},1911:(e,t,r)=>{"use strict";t.y=function(e){return(0,n.visit)(e,{leave:o})};var n=r(481),i=r(8023),o={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=c("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),o=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+c(" = ",n)+c(" ",s(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,o=e.selectionSet,a=c("",t,": ")+r,u=a+c("(",s(n,", "),")");return u.length>80&&(u=a+c("(\n",l(s(n,"\n")),"\n)")),s([u,s(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+c(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",c("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(c("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(c("",s(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+c("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a(function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),u(r)]," ")}),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a(function(e){return s(["scalar",e.name,s(e.directives," ")]," ")}),ObjectTypeDefinition:a(function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")}),FieldDefinition:a(function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(f(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+": "+n+c(" ",s(i," "))}),InputValueDefinition:a(function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,c("= ",n),s(i," ")]," ")}),InterfaceTypeDefinition:a(function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")}),UnionTypeDefinition:a(function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")}),EnumTypeDefinition:a(function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),u(n)]," ")}),EnumValueDefinition:a(function(e){return s([e.name,s(e.directives," ")]," ")}),InputObjectTypeDefinition:a(function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),u(n)]," ")}),DirectiveDefinition:a(function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(f(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")}),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),u(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),u(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),u(n)]," ")}};function a(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(r))&&void 0!==t?t:""}function u(e){return c("{\n",l(s(e,"\n")),"\n}")}function c(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function l(e){return c(" ",e.replace(/\n/g,"\n "))}function h(e){return-1!==e.indexOf("\n")}function f(e){return null!=e&&e.some(h)}},1992:(e,t,r)=>{var n=r(9438);e.exports=function(e){return n(this.__data__,e)>-1}},2121:(e,t,r)=>{var n=r(8487);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},2176:(e,t,r)=>{var n=r(3821),i=r(3883),o=n?function(e){return n.get(e)}:i;e.exports=o},2275:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},2405:(e,t,r)=>{var n=r(8637);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},2409:e=>{e.exports=function(e){return e.split("")}},2532:(e,t,r)=>{var n=r(8255),i=r(2176),o=r(8581),a=r(8973);e.exports=function(e){var t=o(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var s=i(r);return!!s&&e===s[0]}},2750:e=>{e.exports=function(){}},2972:(e,t,r)=>{var n=r(2532),i=r(4676),o=r(2992);e.exports=function(e,t,r,a,s,u,c,l,h,f){var p=8&t;t|=p?32:64,4&(t&=~(p?64:32))||(t&=-4);var d=[e,t,s,p?u:void 0,p?c:void 0,p?void 0:u,p?void 0:c,l,h,f],m=r.apply(void 0,d);return n(e)&&i(m,d),m.placeholder=a,o(m,e,t)}},2992:(e,t,r)=>{var n=r(8136),i=r(5585),o=r(3232),a=r(9893);e.exports=function(e,t,r){var s=t+"";return o(e,i(s,a(n(s),r)))}},3078:(e,t,r)=>{"use strict";var n=r(5409);function i(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function o(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var a={resolve:function(){for(var e,t="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=n.cwd()),s=e),i(s),0!==s.length&&(t=s+"/"+t,r=47===s.charCodeAt(0))}return t=o(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(i(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=o(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return i(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];i(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":a.normalize(e)},relative:function(e,t){if(i(e),i(t),e===t)return"";if((e=a.resolve(e))===(t=a.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,o=n-r,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,c=o<u?o:u,l=-1,h=0;h<=c;++h){if(h===c){if(u>c){if(47===t.charCodeAt(s+h))return t.slice(s+h+1);if(0===h)return t.slice(s+h)}else o>c&&(47===e.charCodeAt(r+h)?l=h:0===h&&(l=0));break}var f=e.charCodeAt(r+h);if(f!==t.charCodeAt(s+h))break;47===f&&(l=h)}var p="";for(h=r+l+1;h<=n;++h)h!==n&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(i(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!o){n=a;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');i(e);var r,n=0,o=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!a){n=r+1;break}}else-1===u&&(a=!1,u=r+1),s>=0&&(c===t.charCodeAt(s)?-1===--s&&(o=r):(s=-1,o=u))}return n===o?o=u:-1===o&&(o=e.length),e.slice(n,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){n=r+1;break}}else-1===o&&(a=!1,o=r+1);return-1===o?"":e.slice(n,o)},extname:function(e){i(e);for(var t=-1,r=0,n=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===n&&(o=!1,n=s+1),46===u?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!o){r=s+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){i(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),o=47===n;o?(t.root="/",r=1):r=0;for(var a=-1,s=0,u=-1,c=!0,l=e.length-1,h=0;l>=r;--l)if(47!==(n=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===n?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!c){s=l+1;break}return-1===a||-1===u||0===h||1===h&&a===u-1&&a===s+1?-1!==u&&(t.base=t.name=0===s&&o?e.slice(1,u):e.slice(s,u)):(0===s&&o?(t.name=e.slice(1,a),t.base=e.slice(1,u)):(t.name=e.slice(s,a),t.base=e.slice(s,u)),t.ext=e.slice(a,u)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},3135:t=>{"use strict";t.exports=e},3232:(e,t,r)=>{var n=r(3431),i=r(1824)(n);e.exports=i},3256:(e,t,r)=>{var n=r(1095),i=r(9400);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=n(e.prototype),o=e.apply(r,t);return i(o)?o:r}}},3328:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+e[t+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*m}},3431:(e,t,r)=>{var n=r(8295),i=r(4856),o=r(9169),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=a},3493:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3510:e=>{e.exports=function(e){return e.placeholder}},3743:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},3758:(e,t,r)=>{var n=r(8265);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},3784:(e,t,r)=>{var n=r(8637),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},3821:(e,t,r)=>{var n=r(8154),i=n&&new n;e.exports=i},3883:e=>{e.exports=function(){}},4069:(e,t,r)=>{var n=r(6766),i=r(1022),o=r(5870);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},4119:e=>{"use strict";e.exports=r},4136:(e,t,r)=>{var n=r(1200);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},4153:e=>{var t="__lodash_placeholder__";e.exports=function(e,r){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var s=e[n];s!==r&&s!==t||(e[n]=t,a[o++]=n)}return a}},4228:(e,t,r)=>{var n=r(7787),i=r(7827),o=r(9400),a=r(462),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:s).test(a(e))}},4276:function(e,t,r){var n=r(5409);!function(){"use strict";var t=function(e){setTimeout(e,0)};void 0!==n&&n&&"function"==typeof n.nextTick&&(t=n.nextTick),e.exports=function(e){var r={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===r.firstHere){r.current++,r.firstHere=!0;var e=1}else e=0;var t={n:1};"function"==typeof arguments[0]?t.task=arguments[0]:t.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?t.task=arguments[1]:t.n=arguments[1]);var n=t.task;if(t.task=function(){n(r.leave)},r.current+t.n-e>r.capacity)return 1===e&&(r.current--,r.firstHere=!1),r.queue.push(t);r.current+=t.n-e,t.task(r.leave),1===e&&(r.firstHere=!1)},leave:function(e){if(e=e||1,r.current-=e,r.queue.length){var n=r.queue[0];n.n+r.current>r.capacity||(r.queue.shift(),r.current+=n.n,t(n.task))}else if(r.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,r.current+e<=r.capacity}};return r}}()},4361:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")?",c="[\\ufe0e\\ufe0f]?",l=c+u+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+u+")*",h="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+h+l,"g");e.exports=function(e){return e.match(f)||[]}},4378:(e,t,r)=>{e.exports=r(6637).Observable},4671:(e,t,r)=>{var n=r(4228),i=r(7559);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},4674:(e,t,r)=>{"use strict";var n=r(7020),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(d){var i=p(r);i&&i!==d&&e(t,i,n)}var a=l(r);h&&(a=a.concat(h(r)));for(var s=u(t),m=u(r),y=0;y<a.length;++y){var v=a[y];if(!(o[v]||n&&n[v]||m&&m[v]||s&&s[v])){var g=f(r,v);try{c(t,v,g)}catch(e){}}}}return t}},4676:(e,t,r)=>{var n=r(1683),i=r(1824)(n);e.exports=i},4679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(7798))&&n.__esModule?n:{default:n},o=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=o,(0,i.default)(o);var a=function(){function e(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,i.default)(a)},4742:e=>{e.exports={__schema:{types:[{kind:"INTERFACE",name:"Node",possibleTypes:[{name:"AddedToProjectEvent"},{name:"App"},{name:"AssignedEvent"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"Blob"},{name:"Bot"},{name:"BranchProtectionRule"},{name:"ClosedEvent"},{name:"CodeOfConduct"},{name:"CommentDeletedEvent"},{name:"Commit"},{name:"CommitComment"},{name:"CommitCommentThread"},{name:"ConvertedNoteToIssueEvent"},{name:"CrossReferencedEvent"},{name:"DemilestonedEvent"},{name:"DeployKey"},{name:"DeployedEvent"},{name:"Deployment"},{name:"DeploymentEnvironmentChangedEvent"},{name:"DeploymentStatus"},{name:"ExternalIdentity"},{name:"Gist"},{name:"GistComment"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"Issue"},{name:"IssueComment"},{name:"Label"},{name:"LabeledEvent"},{name:"Language"},{name:"License"},{name:"LockedEvent"},{name:"Mannequin"},{name:"MarketplaceCategory"},{name:"MarketplaceListing"},{name:"MentionedEvent"},{name:"MergedEvent"},{name:"Milestone"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"Organization"},{name:"OrganizationIdentityProvider"},{name:"OrganizationInvitation"},{name:"PinnedEvent"},{name:"Project"},{name:"ProjectCard"},{name:"ProjectColumn"},{name:"PublicKey"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"},{name:"PullRequestReviewThread"},{name:"PushAllowance"},{name:"Reaction"},{name:"ReadyForReviewEvent"},{name:"Ref"},{name:"ReferencedEvent"},{name:"RegistryPackage"},{name:"RegistryPackageDependency"},{name:"RegistryPackageFile"},{name:"RegistryPackageTag"},{name:"RegistryPackageVersion"},{name:"Release"},{name:"ReleaseAsset"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"Repository"},{name:"RepositoryInvitation"},{name:"RepositoryTopic"},{name:"ReviewDismissalAllowance"},{name:"ReviewDismissedEvent"},{name:"ReviewRequest"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewRequestedEvent"},{name:"SavedReply"},{name:"SecurityAdvisory"},{name:"SponsorsListing"},{name:"Sponsorship"},{name:"Status"},{name:"StatusContext"},{name:"SubscribedEvent"},{name:"Tag"},{name:"Team"},{name:"Topic"},{name:"TransferredEvent"},{name:"Tree"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"},{name:"User"},{name:"UserBlockedEvent"},{name:"UserContentEdit"},{name:"UserStatus"}]},{kind:"INTERFACE",name:"UniformResourceLocatable",possibleTypes:[{name:"Bot"},{name:"ClosedEvent"},{name:"Commit"},{name:"CrossReferencedEvent"},{name:"Gist"},{name:"Issue"},{name:"Mannequin"},{name:"MergedEvent"},{name:"Milestone"},{name:"Organization"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"ReadyForReviewEvent"},{name:"Release"},{name:"Repository"},{name:"RepositoryTopic"},{name:"ReviewDismissedEvent"},{name:"User"}]},{kind:"INTERFACE",name:"Actor",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RegistryPackageOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"ProjectOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"Closable",possibleTypes:[{name:"Issue"},{name:"Milestone"},{name:"Project"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Updatable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"Project"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"UNION",name:"ProjectCardItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Assignable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Comment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"UpdatableComment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Labelable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Lockable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"RegistryPackageSearch",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RepositoryOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"MemberStatusable",possibleTypes:[{name:"Organization"},{name:"Team"}]},{kind:"INTERFACE",name:"ProfileOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"PinnableItem",possibleTypes:[{name:"Gist"},{name:"Repository"}]},{kind:"INTERFACE",name:"Starrable",possibleTypes:[{name:"Gist"},{name:"Repository"},{name:"Topic"}]},{kind:"INTERFACE",name:"RepositoryInfo",possibleTypes:[{name:"Repository"}]},{kind:"INTERFACE",name:"GitObject",possibleTypes:[{name:"Blob"},{name:"Commit"},{name:"Tag"},{name:"Tree"}]},{kind:"INTERFACE",name:"RepositoryNode",possibleTypes:[{name:"CommitComment"},{name:"CommitCommentThread"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Subscribable",possibleTypes:[{name:"Commit"},{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Deletable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"IssueComment"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Reactable",possibleTypes:[{name:"CommitComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"GitSignature",possibleTypes:[{name:"GpgSignature"},{name:"SmimeSignature"},{name:"UnknownSignature"}]},{kind:"UNION",name:"RequestedReviewer",possibleTypes:[{name:"User"},{name:"Team"},{name:"Mannequin"}]},{kind:"UNION",name:"PullRequestTimelineItem",possibleTypes:[{name:"Commit"},{name:"CommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestReviewComment"},{name:"IssueComment"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"MergedEvent"},{name:"ReferencedEvent"},{name:"CrossReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefRestoredEvent"},{name:"HeadRefForcePushedEvent"},{name:"BaseRefForcePushedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewDismissedEvent"},{name:"UserBlockedEvent"}]},{kind:"UNION",name:"Closer",possibleTypes:[{name:"Commit"},{name:"PullRequest"}]},{kind:"UNION",name:"ReferencedSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"Assignee",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"MilestoneItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"RenamedTitleSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"PullRequestTimelineItems",possibleTypes:[{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestRevisionMarker"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"MergedEvent"},{name:"ReviewDismissedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReadyForReviewEvent"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"IssueOrPullRequest",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"IssueTimelineItem",possibleTypes:[{name:"Commit"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"ReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"UserBlockedEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"TransferredEvent"}]},{kind:"UNION",name:"IssueTimelineItems",possibleTypes:[{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"ReviewDismissalAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PushAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PermissionGranter",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Sponsorable",possibleTypes:[{name:"User"}]},{kind:"INTERFACE",name:"Contribution",possibleTypes:[{name:"CreatedCommitContribution"},{name:"CreatedIssueContribution"},{name:"CreatedPullRequestContribution"},{name:"CreatedPullRequestReviewContribution"},{name:"CreatedRepositoryContribution"},{name:"JoinedGitHubContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedRepositoryOrRestrictedContribution",possibleTypes:[{name:"CreatedRepositoryContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedIssueOrRestrictedContribution",possibleTypes:[{name:"CreatedIssueContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedPullRequestOrRestrictedContribution",possibleTypes:[{name:"CreatedPullRequestContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"SearchResultItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"User"},{name:"Organization"},{name:"MarketplaceListing"},{name:"App"}]},{kind:"UNION",name:"CollectionItemContent",possibleTypes:[{name:"Repository"},{name:"Organization"},{name:"User"}]}]}}},4757:e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,c=r.length,l=t(a-s,0),h=Array(c+l),f=!i;++u<c;)h[u]=r[u];for(;++o<s;)(f||o<a)&&(h[n[o]]=e[o]);for(;l--;)h[u++]=e[o++];return h}},4821:(e,t,r)=>{var n=r(8506);e.exports=function(e,t){for(var r=-1,i=e.length;++r<i&&n(t,e[r],0)>-1;);return r}},4822:(e,t,r)=>{var n=r(8255),i=r(8820),o=r(310);e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},4856:(e,t,r)=>{var n=r(4671),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},4933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,h=u>0?a-4:a;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(e,s,s+a>u?u:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4963:(e,t,r)=>{"use strict";r.d(t,{A:()=>n}),e=r.hmd(e);const n=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:e)},4997:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},5095:(e,t,r)=>{var n=r(7201);e.exports=function(e){return null!=e&&e.length?n(e,0,-1):[]}},5097:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5103:(e,t,r)=>{var n=r(4997),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},5179:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5270:(e,t,r)=>{"use strict";e.exports=r(5460)},5271:(e,t,r)=>{var n=r(9006),i=r(9650),o=r(6881),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},5360:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case l:case h:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case y:case m:case u:return e;default:return t}}case i:return t}}}function R(e){return E(e)===h}t.AsyncMode=l,t.ConcurrentMode=h,t.ContextConsumer=c,t.ContextProvider=u,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return R(e)||E(e)===l},t.isConcurrentMode=R,t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===y},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===s},t.isStrictMode=function(e){return E(e)===a},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===s||e===a||e===p||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===g||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=E},5390:(e,t,r)=>{var n=r(7156),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=r(u),n(e,this,c)}}},5409:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,u=[],c=!1,l=-1;function h(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&f())}function f(){if(!c){var e=a(h);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function d(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},5460:(e,t)=>{"use strict";var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(e,t,n){var i=null;if(void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),"key"in t)for(var o in n={},t)"key"!==o&&(n[o]=t[o]);else n=t;return t=n.ref,{$$typeof:r,type:e,key:i,ref:void 0!==t?t:null,props:n}}t.Fragment=n,t.jsx=i,t.jsxs=i},5585:e=>{var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,r){var n=r.length;if(!n)return e;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),e.replace(t,"{\n/* [wrapped with "+r+"] */\n")}},5639:(e,t,r)=>{var n=r(7156),i=r(3256),o=r(7524),a=r(2972),s=r(3510),u=r(4153),c=r(714);e.exports=function(e,t,r){var l=i(e);return function i(){for(var h=arguments.length,f=Array(h),p=h,d=s(i);p--;)f[p]=arguments[p];var m=h<3&&f[0]!==d&&f[h-1]!==d?[]:u(f,d);return(h-=m.length)<r?a(e,t,o,i.placeholder,void 0,f,m,void 0,void 0,r-h):n(this&&this!==c&&this instanceof i?l:e,this,f)}}},5733:(e,t,r)=>{var n=r(3256),i=r(714);e.exports=function(e,t,r){var o=1&t,a=n(e);return function t(){return(this&&this!==i&&this instanceof t?a:e).apply(o?r:this,arguments)}}},5870:(e,t,r)=>{var n=r(4671)(r(714),"Map");e.exports=n},5874:e=>{var t=Array.isArray;e.exports=t},6039:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r<t.length;r++)r&&(a+=","),a+=e(t[r])||"null";return a+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(t)-1,u=Object.keys(t).sort(i&&i(t));for(a="",r=0;r<u.length;r++){var c=u[r],l=e(t[c]);l&&(a&&(a+=","),a+=JSON.stringify(c)+":"+l)}return o.splice(s,1),"{"+a+"}"}}(e)}},6171:e=>{"use strict";e.exports=o},6172:e=>{e.exports=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}},6264:(e,t,r)=>{var n=r(8637);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},6270:(e,t,r)=>{var n=r(6965),i=r(9298),o=r(3510),a=r(4153),s=n(function(e,t){var r=a(t,o(s));return i(e,32,void 0,t,r)});s.placeholder={},e.exports=s},6311:(e,t,r)=>{var n=r(7201);e.exports=function(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}},6450:(e,t,r)=>{var n=r(714)["__core-js_shared__"];e.exports=n},6533:(e,t,r)=>{"use strict";const n=r(4933),i=r(3328),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=u,t.IS=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(H(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(H(e,SharedArrayBuffer)||e&&H(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),s(e<0?0:0|d(e))}function f(e){const t=e.length<0?0:0|d(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function E(e,t,r,n){return W(K(t,e.length-r),e,r,n)}function R(e,t,r,n){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return W(G(t),e,r,n)}function k(e,t,r,n){return W(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return h(e)},u.allocUnsafeSlow=function(e){return h(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(H(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(c[e]!==l[e]){o=c[e],a=l[e];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return R(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function A(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function P(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function q(e,t,r,n,i){j(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function F(e,t,r,n,i){j(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X(function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=X(function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X(function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=X(function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X(function(e,t=0){return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=X(function(e,t=0){return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X(function(e,t=0){return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=X(function(e,t=0){return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const B={};function U(e,t,r){B[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function M(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function j(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function Q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),U("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=M(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=M(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const z=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},6559:(e,t,r)=>{var n=r(8071),i=r(5103),o=r(6311),a=r(8402),s=r(4821),u=r(8337),c=r(983);e.exports=function(e,t,r){if((e=c(e))&&(r||void 0===t))return i(e);if(!e||!(t=n(t)))return e;var l=u(e),h=u(t),f=s(l,h),p=a(l,h)+1;return o(l,f,p).join("")}},6619:(e,t,r)=>{var n=r(310),i=r(1908),o=Math.min;e.exports=function(e,t){for(var r=e.length,a=o(t.length,r),s=n(e);a--;){var u=t[a];e[a]=i(u,r)?s[u]:void 0}return e}},6637:(e,t)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}t.Observable=void 0;var o=function(){return"function"==typeof Symbol},a=function(e){return o()&&Boolean(Symbol[e])},s=function(e){return a(e)?Symbol[e]:"@@"+e};o()&&!a("observable")&&(Symbol.observable=Symbol("observable"));var u=s("iterator"),c=s("observable"),l=s("species");function h(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function f(e){var t=e.constructor;return void 0!==t&&null===(t=t[l])&&(t=void 0),void 0!==t?t:R}function p(e){return e instanceof R}function d(e){d.log?d.log(e):setTimeout(function(){throw e})}function m(e){Promise.resolve().then(function(){try{e()}catch(e){d(e)}})}function y(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=h(t,"unsubscribe");r&&r.call(t)}}catch(e){d(e)}}function v(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function g(e,t,r){e._state="running";var n=e._observer;try{var i=h(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(v(e),!i)throw r;i.call(n,r);break;case"complete":v(e),i&&i.call(n)}}catch(e){d(e)}"closed"===e._state?y(e):"running"===e._state&&(e._state="ready")}function b(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void m(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(g(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)})):void g(e,t,r);e._queue.push({type:t,value:r})}}var w=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new E(this);try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return i(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(v(this),y(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),E=function(){function e(t){r(this,e),this._subscription=t}return i(e,[{key:"next",value:function(e){b(this._subscription,"next",e)}},{key:"error",value:function(e){b(this._subscription,"error",e)}},{key:"complete",value:function(){b(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),R=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return i(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new w(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise(function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}})}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(f(this))(function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(f(this))(function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=f(this),n=arguments.length>1,i=!1,o=arguments[1];return new r(function(r){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||n)try{o=e(o,t)}catch(e){return r.error(e)}else o=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(o),r.complete()}})})}},{key:"concat",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=f(this);return new i(function(t){var n,o=0;return function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}})}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=f(this);return new r(function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})}},{key:c,value:function(){return this}}],[{key:"from",value:function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=h(t,c);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return p(i)&&i.constructor===r?i:new r(function(e){return i.subscribe(e)})}if(a("iterator")&&(n=h(t,u)))return new r(function(e){m(function(){if(!e.closed){var r=!0,i=!1,o=void 0;try{for(var a,s=n.call(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}e.complete()}})});if(Array.isArray(t))return new r(function(e){m(function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}})});throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)(function(e){m(function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}})})}},{key:l,get:function(){return this}}]),e}();t.Observable=R,o()&&Object.defineProperty(R,Symbol("extensions"),{value:{symbol:c,hostReportError:d},configurable:!0})},6695:e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,c=-1,l=r.length,h=t(a-u,0),f=Array(h+l),p=!i;++o<h;)f[o]=e[o];for(var d=o;++c<l;)f[d+c]=r[c];for(;++s<u;)(p||o<a)&&(f[d+n[s]]=e[o++]);return f}},6766:(e,t,r)=>{var n=r(2405),i=r(8341),o=r(9644),a=r(3784),s=r(6264);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},6821:e=>{e.exports=function(){this.__data__=[],this.size=0}},6881:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},6965:(e,t,r)=>{var n=r(9169),i=r(5390),o=r(3232);e.exports=function(e,t){return o(i(e,t,n),e+"")}},7012:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},7020:(e,t,r)=>{"use strict";e.exports=r(5360)},7125:e=>{"use strict";e.exports=i},7156:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},7201:e=>{e.exports=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}},7221:(e,t,r)=>{var n=r(9438),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},7434:e=>{"use strict";e.exports=n},7477:(e,t,r)=>{var n=r(1200);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},7524:(e,t,r)=>{var n=r(4757),i=r(6695),o=r(6172),a=r(3256),s=r(2972),u=r(3510),c=r(6619),l=r(4153),h=r(714);e.exports=function e(t,r,f,p,d,m,y,v,g,b){var w=128&r,E=1&r,R=2&r,S=24&r,k=512&r,x=R?void 0:a(t);return function O(){for(var T=arguments.length,I=Array(T),_=T;_--;)I[_]=arguments[_];if(S)var A=u(O),P=o(I,A);if(p&&(I=n(I,p,d,S)),m&&(I=i(I,m,y,S)),T-=P,S&&T<b){var C=l(I,A);return s(t,r,e,O.placeholder,f,I,C,v,g,b-T)}var N=E?f:this,q=R?N[t]:t;return T=I.length,v?I=c(I,v):k&&T>1&&I.reverse(),w&&g<T&&(I.length=g),this&&this!==h&&this instanceof O&&(q=x||a(q)),q.apply(N,I)}}},7559:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},7583:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},7639:(e,t,r)=>{var n=r(5103),i=r(9400),o=r(975),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},7787:(e,t,r)=>{var n=r(5271),i=r(9400);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},7798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=o(r(3743)),i=o(r(9263));function o(e){return e&&e.__esModule?e:{default:e}}},7827:(e,t,r)=>{var n,i=r(6450),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},8023:(e,t)=>{"use strict";function r(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function n(e){for(var t,r=!0,n=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:r=!1,n=!0,i=0;break;case 9:case 32:++i;break;default:n&&!r&&(null===o||i<o)&&(o=i),n=!1}return null!==(t=o)&&void 0!==t?t:0}Object.defineProperty(t,"__esModule",{value:!0}),t.dedentBlockStringValue=function(e){var t=e.split(/\r\n|[\n\r]/g),i=n(e);if(0!==i)for(var o=1;o<t.length;o++)t[o]=t[o].slice(i);for(var a=0;a<t.length&&r(t[a]);)++a;for(var s=t.length;s>a&&r(t[s-1]);)--s;return t.slice(a,s).join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!n||o||a||r,u="";return!s||n&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}},8071:(e,t,r)=>{var n=r(9006),i=r(2275),o=r(5874),a=r(975),s=n?n.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},8110:e=>{"use strict";e.exports=t},8136:e=>{var t=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var n=e.match(t);return n?n[1].split(r):[]}},8154:(e,t,r)=>{var n=r(4671)(r(714),"WeakMap");e.exports=n},8255:(e,t,r)=>{var n=r(1095),i=r(2750);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},8265:(e,t,r)=>{var n=r(7639),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8295:e=>{e.exports=function(e){return function(){return e}}},8306:e=>{e.exports=function(e){return e!=e}},8337:(e,t,r)=>{var n=r(2409),i=r(3493),o=r(4361);e.exports=function(e){return i(e)?o(e):n(e)}},8341:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},8402:(e,t,r)=>{var n=r(8506);e.exports=function(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}},8487:(e,t,r)=>{var n=r(8910);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},8506:(e,t,r)=>{var n=r(166),i=r(8306),o=r(638);e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},8581:(e,t,r)=>{var n=r(1400),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],o=i.call(n,t)?r.length:0;o--;){var a=r[o],s=a.func;if(null==s||s==e)return a.name}return t}},8637:(e,t,r)=>{var n=r(4671)(Object,"create");e.exports=n},8820:(e,t,r)=>{var n=r(1095),i=r(2750);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},8910:(e,t,r)=>{var n=r(4069),i=r(7477),o=r(476),a=r(984),s=r(4136);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},8973:(e,t,r)=>{var n=r(8255),i=r(8820),o=r(2750),a=r(5874),s=r(7583),u=r(4822),c=Object.prototype.hasOwnProperty;function l(e){if(s(e)&&!a(e)&&!(e instanceof n)){if(e instanceof i)return e;if(c.call(e,"__wrapped__"))return u(e)}return new i(e)}l.prototype=o.prototype,l.prototype.constructor=l,e.exports=l},9006:(e,t,r)=>{var n=r(714).Symbol;e.exports=n},9169:e=>{e.exports=function(e){return e}},9182:(e,t,r)=>{var n=r(330),i=r(7787),o=r(9628);e.exports=function(e,t,r){var a=-1,s=(t=n(t,e)).length;for(s||(s=1,e=void 0);++a<s;){var u=null==e?void 0:e[o(t[a])];void 0===u&&(a=s,u=r),e=i(u)?u.call(e):u}return e}},9263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},9298:(e,t,r)=>{var n=r(1683),i=r(5733),o=r(5639),a=r(7524),s=r(809),u=r(2176),c=r(656),l=r(4676),h=r(2992),f=r(3758),p=Math.max;e.exports=function(e,t,r,d,m,y,v,g){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var w=d?d.length:0;if(w||(t&=-97,d=m=void 0),v=void 0===v?v:p(f(v),0),g=void 0===g?g:f(g),w-=m?m.length:0,64&t){var E=d,R=m;d=m=void 0}var S=b?void 0:u(e),k=[e,t,r,d,m,E,R,y,v,g];if(S&&c(k,S),e=k[0],t=k[1],r=k[2],d=k[3],m=k[4],!(g=k[9]=void 0===k[9]?b?0:e.length:p(k[9]-w,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?o(e,t,g):32!=t&&33!=t||m.length?a.apply(void 0,k):s(e,t,r,d);else var x=i(e,t,r);return h((S?n:l)(x,k),e,t)}},9400:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},9438:(e,t,r)=>{var n=r(5097);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},9505:(e,t,r)=>{var n=r(2121),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)}),t});e.exports=a},9628:(e,t,r)=>{var n=r(975);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},9644:(e,t,r)=>{var n=r(8637),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},9650:(e,t,r)=>{var n=r(9006),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},9859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return u(e,[])};var n,i=(n=r(9263))&&n.__esModule?n:{default:n};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a=10,s=2;function u(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:u(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var r=Math.min(a,e.length),n=e.length-r,i=[],o=0;o<r;++o)i.push(u(e[o],t));return 1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>s?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map(function(r){return r+": "+u(e[r],t)}).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},9893:(e,t,r)=>{var n=r(7012),i=r(128),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return n(o,function(r){var n="_."+r[0];t&r[1]&&!i(e,n)&&e.push(n)}),e.sort()}}},s={};function u(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(r.exports,r,r.exports,u),r.loaded=!0,r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};return(()=>{"use strict";u.d(c,{DecapCmsBackendGithub:()=>Es});var e,t,r=u(4276),n=u.n(r),i=u(1467),o=u.n(i),a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=(e=["",""],t=["",""],Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),l=function(){function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return"function"==typeof e?t.interimTag.bind(t,e):"string"==typeof e?t.transformEndResult(e):(e=e.map(t.transformString.bind(t)),t.transformEndResult(e.reduce(t.processSubstitutions.bind(t,n))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map(function(e){return"function"==typeof e?e():e}),this.tag}return a(e,[{key:"interimTag",value:function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return this.tag(s,e.apply(void 0,[t].concat(n)))}},{key:"processSubstitutions",value:function(e,t,r){var n=this.transformSubstitution(e.shift(),t);return"".concat(t,n,r)}},{key:"transformString",value:function(e){return this.transformers.reduce(function(e,t){return t.onString?t.onString(e):e},e)}},{key:"transformSubstitution",value:function(e,t){return this.transformers.reduce(function(e,r){return r.onSubstitution?r.onSubstitution(e,t):e},e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce(function(e,t){return t.onEndResult?t.onEndResult(e):e},e)}}]),e}();const h=l;var f={separator:"",conjunction:"",serial:!1};const p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;return{onSubstitution:function(t,r){if(Array.isArray(t)){var n=t.length,i=e.separator,o=e.conjunction,a=e.serial,s=r.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(i+s[1]):t.join(i+" "),o&&n>1){var u=t.lastIndexOf(i);t=t.slice(0,u)+(a?i:"")+" "+o+t.slice(u+1)}}return t}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var r=t.match(/^[^\S\n]*(?=\S)/gm),n=r&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r.map(function(e){return e.length})));if(n){var i=new RegExp("^.{"+n+"}","gm");return t.replace(i,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};new h(p({separator:","}),d,m),new h(p({separator:",",conjunction:"and"}),d,m),new h(p({separator:",",conjunction:"or"}),d,m);const y=function(e){return{onSubstitution:function(t,r){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}};var v=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new h(y("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(v):v(e)?e:""}}},p,d,m);const g=function(e,t){return{onSubstitution:function(r,n){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==r?r:r.toString().replace(e,t)}}};new h(y("\n"),p,d,m,g(/&/g,"&amp;"),g(/</g,"&lt;"),g(/>/g,"&gt;"),g(/"/g,"&quot;"),g(/'/g,"&#x27;"),g(/`/g,"&#x60;"));const b=function(e,t){return{onEndResult:function(r){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return r.replace(e,t)}}},w=new h(b(/(?:\n(?:\s*))+/g," "),m);new h(b(/(?:\n\s*)/g,""),m),new h(p({separator:","}),b(/(?:\s+)/g," "),m),new h(p({separator:",",conjunction:"or"}),b(/(?:\s+)/g," "),m),new h(p({separator:",",conjunction:"and"}),b(/(?:\s+)/g," "),m),new h(p,d,m),new h(p,b(/(?:\s+)/g," "),m);const E=new h(d,m);new h(d("all"),m);var R=u(3135);function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(null,arguments)}var k=u(8110),x={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function O(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var T=/[A-Z]|^ms/g,I=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_=function(e){return 45===e.charCodeAt(1)},A=function(e){return null!=e&&"boolean"!=typeof e},P=O(function(e){return _(e)?e:e.replace(T,"-$&").toLowerCase()}),C=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(I,function(e,t,r){return q={name:t,styles:r,next:q},t})}return 1===x[e]||_(e)||"number"!=typeof t||0===t?t:t+"px"};function N(e,t,r){if(null==r)return"";var n=r;if(void 0!==n.__emotion_styles)return n;switch(typeof r){case"boolean":return"";case"object":var i=r;if(1===i.anim)return q={name:i.name,styles:i.styles,next:q},i.name;var o=r;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)q={name:a.name,styles:a.styles,next:q},a=a.next;return o.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=N(e,t,r[i])+";";else for(var o in r){var a=r[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?n+=o+"{"+t[s]+"}":A(s)&&(n+=P(o)+":"+C(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var u=N(e,t,a);switch(o){case"animation":case"animationName":n+=P(o)+":"+u+";";break;default:n+=o+"{"+u+"}"}}else for(var c=0;c<a.length;c++)A(a[c])&&(n+=P(o)+":"+C(o,a[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var s=q,u=r(e);return q=s,N(e,t,u)}}var c=r;if(null==t)return c;var l=t[c];return void 0!==l?l:c}var q,F=/label:\s*([^\s;{]+)\s*(;|$)/g;function D(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,i="";q=void 0;var o=e[0];null==o||void 0===o.raw?(n=!1,i+=N(r,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=N(r,t,e[a]),n&&(i+=o[a]);F.lastIndex=0;for(var s,u="";null!==(s=F.exec(i));)u+="-"+s[1];var c=function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+u;return{name:c,styles:i,next:q}}var L=u(4119),$=!!L.useInsertionEffect&&L.useInsertionEffect,B=$||function(e){return e()};function U(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]+";"):r&&(n+=r+" ")}),n}$||L.useLayoutEffect;var M=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},j=function(e,t,r){M(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}},Q=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,V=O(function(e){return Q.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),z=function(e){return"theme"!==e},K=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?V:z},G=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},W=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return M(t,r,n),B(function(){return j(t,r,n)}),null},H=function e(t,r){var n,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==r&&(n=r.label,i=r.target);var s=G(t,r,o),u=s||K(a),c=!u("as");return function(){var l=arguments,h=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&h.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)h.push.apply(h,l);else{var f=l[0];h.push(f[0]);for(var p=l.length,d=1;d<p;d++)h.push(l[d],f[d])}var m=(0,k.withEmotionCache)(function(e,t,r){var n=c&&e.as||a,o="",l=[],f=e;if(null==e.theme){for(var p in f={},e)f[p]=e[p];f.theme=L.useContext(k.ThemeContext)}"string"==typeof e.className?o=U(t.registered,l,e.className):null!=e.className&&(o=e.className+" ");var d=D(h.concat(l),t.registered,f);o+=t.key+"-"+d.name,void 0!==i&&(o+=" "+i);var m=c&&void 0===s?K(n):u,y={};for(var v in e)c&&"as"===v||m(v)&&(y[v]=e[v]);return y.className=o,r&&(y.ref=r),L.createElement(L.Fragment,null,L.createElement(W,{cache:t,serialized:d,isStringTag:"string"==typeof n}),L.createElement(n,y))});return m.displayName=void 0!==n?n:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=h,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,n){return e(t,S({},r,n,{shouldForwardProp:G(m,n,!0)})).apply(void 0,h)},m}},J=u(7434),Y=u.n(J),X=u(7125),Z=u(6171),ee=u(5270),te=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),re=Math.abs,ne=String.fromCharCode,ie=Object.assign;function oe(e){return e.trim()}function ae(e,t,r){return e.replace(t,r)}function se(e,t){return e.indexOf(t)}function ue(e,t){return 0|e.charCodeAt(t)}function ce(e,t,r){return e.slice(t,r)}function le(e){return e.length}function he(e){return e.length}function fe(e,t){return t.push(e),e}var pe=1,de=1,me=0,ye=0,ve=0,ge="";function be(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:pe,column:de,length:a,return:""}}function we(e,t){return ie(be("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ee(){return ve=ye>0?ue(ge,--ye):0,de--,10===ve&&(de=1,pe--),ve}function Re(){return ve=ye<me?ue(ge,ye++):0,de++,10===ve&&(de=1,pe++),ve}function Se(){return ue(ge,ye)}function ke(){return ye}function xe(e,t){return ce(ge,e,t)}function Oe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Te(e){return pe=de=1,me=le(ge=e),ye=0,[]}function Ie(e){return ge="",e}function _e(e){return oe(xe(ye-1,Ce(91===e?e+2:40===e?e+1:e)))}function Ae(e){for(;(ve=Se())&&ve<33;)Re();return Oe(e)>2||Oe(ve)>3?"":" "}function Pe(e,t){for(;--t&&Re()&&!(ve<48||ve>102||ve>57&&ve<65||ve>70&&ve<97););return xe(e,ke()+(t<6&&32==Se()&&32==Re()))}function Ce(e){for(;Re();)switch(ve){case e:return ye;case 34:case 39:34!==e&&39!==e&&Ce(ve);break;case 40:41===e&&Ce(e);break;case 92:Re()}return ye}function Ne(e,t){for(;Re()&&e+ve!==57&&(e+ve!==84||47!==Se()););return"/*"+xe(t,ye-1)+"*"+ne(47===e?e:Re())}function qe(e){for(;!Oe(Se());)Re();return xe(e,ye)}var Fe="-ms-",De="-moz-",Le="-webkit-",$e="comm",Be="rule",Ue="decl",Me="@keyframes";function je(e,t){for(var r="",n=he(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function Qe(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Ue:return e.return=e.return||e.value;case $e:return"";case Me:return e.return=e.value+"{"+je(e.children,n)+"}";case Be:e.value=e.props.join(",")}return le(r=je(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ve(e){return Ie(ze("",null,null,null,[""],e=Te(e),0,[0],e))}function ze(e,t,r,n,i,o,a,s,u){for(var c=0,l=0,h=a,f=0,p=0,d=0,m=1,y=1,v=1,g=0,b="",w=i,E=o,R=n,S=b;y;)switch(d=g,g=Re()){case 40:if(108!=d&&58==ue(S,h-1)){-1!=se(S+=ae(_e(g),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=_e(g);break;case 9:case 10:case 13:case 32:S+=Ae(d);break;case 92:S+=Pe(ke()-1,7);continue;case 47:switch(Se()){case 42:case 47:fe(Ge(Ne(Re(),ke()),t,r),u);break;default:S+="/"}break;case 123*m:s[c++]=le(S)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+l:-1==v&&(S=ae(S,/\f/g,"")),p>0&&le(S)-h&&fe(p>32?We(S+";",n,r,h-1):We(ae(S," ","")+";",n,r,h-2),u);break;case 59:S+=";";default:if(fe(R=Ke(S,t,r,c,l,i,s,b,w=[],E=[],h),o),123===g)if(0===l)ze(S,t,R,R,w,o,h,s,E);else switch(99===f&&110===ue(S,3)?100:f){case 100:case 108:case 109:case 115:ze(e,R,R,n&&fe(Ke(e,R,R,0,0,i,s,b,i,w=[],h),E),i,E,h,s,n?w:E);break;default:ze(S,R,R,R,[""],E,0,s,E)}}c=l=p=0,m=v=1,b=S="",h=a;break;case 58:h=1+le(S),p=d;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==Ee())continue;switch(S+=ne(g),g*m){case 38:v=l>0?1:(S+="\f",-1);break;case 44:s[c++]=(le(S)-1)*v,v=1;break;case 64:45===Se()&&(S+=_e(Re())),f=Se(),l=h=le(b=S+=qe(ke())),g++;break;case 45:45===d&&2==le(S)&&(m=0)}}return o}function Ke(e,t,r,n,i,o,a,s,u,c,l){for(var h=i-1,f=0===i?o:[""],p=he(f),d=0,m=0,y=0;d<n;++d)for(var v=0,g=ce(e,h+1,h=re(m=a[d])),b=e;v<p;++v)(b=oe(m>0?f[v]+" "+g:ae(g,/&\f/g,f[v])))&&(u[y++]=b);return be(e,t,r,0===i?Be:s,u,c,l)}function Ge(e,t,r){return be(e,t,r,$e,ne(ve),ce(e,2,-2),0)}function We(e,t,r,n){return be(e,t,r,Ue,ce(e,0,n),ce(e,n+1,-1),n)}var He=function(e,t,r){for(var n=0,i=0;n=i,i=Se(),38===n&&12===i&&(t[r]=1),!Oe(i);)Re();return xe(e,ye)},Je=new WeakMap,Ye=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Je.get(r))&&!n){Je.set(e,!0);for(var i=[],o=function(e,t){return Ie(function(e,t){var r=-1,n=44;do{switch(Oe(n)){case 0:38===n&&12===Se()&&(t[r]=1),e[r]+=He(ye-1,t,r);break;case 2:e[r]+=_e(n);break;case 4:if(44===n){e[++r]=58===Se()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=ne(n)}}while(n=Re());return e}(Te(e),t))}(t,i),a=r.props,s=0,u=0;s<o.length;s++)for(var c=0;c<a.length;c++,u++)e.props[u]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},Xe=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Ze(e,t){switch(function(e,t){return 45^ue(e,0)?(((t<<2^ue(e,0))<<2^ue(e,1))<<2^ue(e,2))<<2^ue(e,3):0}(e,t)){case 5103:return Le+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Le+e+De+e+Fe+e+e;case 6828:case 4268:return Le+e+Fe+e+e;case 6165:return Le+e+Fe+"flex-"+e+e;case 5187:return Le+e+ae(e,/(\w+).+(:[^]+)/,Le+"box-$1$2"+Fe+"flex-$1$2")+e;case 5443:return Le+e+Fe+"flex-item-"+ae(e,/flex-|-self/,"")+e;case 4675:return Le+e+Fe+"flex-line-pack"+ae(e,/align-content|flex-|-self/,"")+e;case 5548:return Le+e+Fe+ae(e,"shrink","negative")+e;case 5292:return Le+e+Fe+ae(e,"basis","preferred-size")+e;case 6060:return Le+"box-"+ae(e,"-grow","")+Le+e+Fe+ae(e,"grow","positive")+e;case 4554:return Le+ae(e,/([^-])(transform)/g,"$1"+Le+"$2")+e;case 6187:return ae(ae(ae(e,/(zoom-|grab)/,Le+"$1"),/(image-set)/,Le+"$1"),e,"")+e;case 5495:case 3959:return ae(e,/(image-set\([^]*)/,Le+"$1$`$1");case 4968:return ae(ae(e,/(.+:)(flex-)?(.*)/,Le+"box-pack:$3"+Fe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Le+e+e;case 4095:case 3583:case 4068:case 2532:return ae(e,/(.+)-inline(.+)/,Le+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(le(e)-1-t>6)switch(ue(e,t+1)){case 109:if(45!==ue(e,t+4))break;case 102:return ae(e,/(.+:)(.+)-([^]+)/,"$1"+Le+"$2-$3$1"+De+(108==ue(e,t+3)?"$3":"$2-$3"))+e;case 115:return~se(e,"stretch")?Ze(ae(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ue(e,t+1))break;case 6444:switch(ue(e,le(e)-3-(~se(e,"!important")&&10))){case 107:return ae(e,":",":"+Le)+e;case 101:return ae(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Le+(45===ue(e,14)?"inline-":"")+"box$3$1"+Le+"$2$3$1"+Fe+"$2box$3")+e}break;case 5936:switch(ue(e,t+11)){case 114:return Le+e+Fe+ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Le+e+Fe+ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Le+e+Fe+ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Le+e+Fe+e+e}return e}var et=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Ue:e.return=Ze(e.value,e.length);break;case Me:return je([we(e,{value:ae(e.value,"@","@"+Le)})],n);case Be:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return je([we(e,{props:[ae(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return je([we(e,{props:[ae(t,/:(plac\w+)/,":"+Le+"input-$1")]}),we(e,{props:[ae(t,/:(plac\w+)/,":-moz-$1")]}),we(e,{props:[ae(t,/:(plac\w+)/,Fe+"input-$1")]})],n)}return""})}}],tt=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var n,i,o=e.stylisPlugins||et,a={},s=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)a[t[r]]=!0;s.push(e)});var u,c,l,h,f=[Qe,(h=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&h(e)})],p=(c=[Ye,Xe].concat(o,f),l=he(c),function(e,t,r,n){for(var i="",o=0;o<l;o++)i+=c[o](e,t,r,n)||"";return i});i=function(e,t,r,n){u=r,je(Ve(e?e+"{"+t.styles+"}":t.styles),p),n&&(d.inserted[t.name]=!0)};var d={key:t,sheet:new te({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return d.sheet.hydrate(s),d},rt=L.createContext("undefined"!=typeof HTMLElement?tt({key:"css"}):null),nt=(rt.Provider,function(e){return(0,L.forwardRef)(function(t,r){var n=(0,L.useContext)(rt);return e(t,n,r)})}),it=L.createContext({}),ot={}.hasOwnProperty,at="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",st=function(e,t){var r={};for(var n in t)ot.call(t,n)&&(r[n]=t[n]);return r[at]=e,r},ut=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return M(t,r,n),B(function(){return j(t,r,n)}),null},ct=nt(function(e,t,r){var n=e.css;"string"==typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var i=e[at],o=[n],a="";"string"==typeof e.className?a=U(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=D(o,void 0,L.useContext(it));a+=t.key+"-"+s.name;var u={};for(var c in e)ot.call(e,c)&&"css"!==c&&c!==at&&(u[c]=e[c]);return u.className=a,r&&(u.ref=r),L.createElement(L.Fragment,null,L.createElement(ut,{cache:t,serialized:s,isStringTag:"string"==typeof i}),L.createElement(i,u))}),lt=(u(4674),ee.Fragment,function(e,t,r){return ot.call(t,"css")?ee.jsx(ct,st(e,t),r):ee.jsx(e,t,r)}),ht=function(e,t,r){return ot.call(t,"css")?ee.jsxs(ct,st(e,t),r):ee.jsxs(e,t,r)};const ft=H(Z.Icon,{target:"e1ko648l2",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"}),pt=H("div",{target:"e1ko648l1",label:"ForkApprovalContainer"})({name:"13alw87",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;flex-grow:0.2"}),dt=H("div",{target:"e1ko648l0",label:"ForkButtonsContainer"})({name:"125bg8c",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;align-items:center"});class mt extends L.Component{static propTypes={onLogin:Y().func.isRequired,inProgress:Y().bool,base_url:Y().string,siteId:Y().string,authEndpoint:Y().string,config:Y().object.isRequired,clearHash:Y().func,t:Y().func.isRequired};state={};componentDidMount(){Y().checkPropTypes(mt.propTypes,this.props,"prop","GitHubAuthenticationPage")}getPermissionToFork=()=>new Promise((e,t)=>{this.setState({requestingFork:!0,approveFork:()=>{this.setState({requestingFork:!1}),e()},refuseFork:()=>{this.setState({requestingFork:!1}),t()}})});loginWithOpenAuthoring(e){const{backend:t}=this.props;return this.setState({findingFork:!0}),t.authenticateWithFork({userData:e,getPermissionToFork:this.getPermissionToFork}).catch(e=>{throw this.setState({findingFork:!1}),console.error(e),e})}handleLogin=e=>{e.preventDefault();const t={base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"demo.decapcms.org":this.props.siteId,auth_endpoint:this.props.authEndpoint},r=new X.NetlifyAuthenticator(t),{open_authoring:n=!1,auth_scope:i=""}=this.props.config.backend,o=i||(n?"public_repo":"repo");r.authenticate({provider:"github",scope:o},(e,t)=>{if(!e)return n?this.loginWithOpenAuthoring(t).then(()=>this.props.onLogin(t)):void this.props.onLogin(t);this.setState({loginError:e.toString()})})};renderLoginButton=()=>{const{inProgress:e,t}=this.props;return e||this.state.findingFork?t("auth.loggingIn"):ht(L.Fragment,{children:[lt(ft,{type:"github"}),t("auth.loginWithGitHub")]})};getAuthenticationPageRenderArgs(){const{requestingFork:e}=this.state;if(e){const{approveFork:e,refuseFork:t}=this.state;return{renderPageContent:({LoginButton:r,TextButton:n,showAbortButton:i})=>ht(pt,{children:[lt("p",{children:"Open Authoring is enabled: we need to use a fork on your github account. (If a fork already exists, we'll use that.)"}),ht(dt,{children:[lt(r,{onClick:e,children:"Fork the repo"}),i&&lt(n,{onClick:t,children:"Don't fork the repo"})]})]})}}return{renderButtonContent:this.renderLoginButton}}render(){const{inProgress:e,config:t,t:r}=this.props,{loginError:n,requestingFork:i,findingFork:o}=this.state;return lt(Z.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e||o||i,loginErrorMessage:n,logoUrl:t.logo_url,logo:t.logo,siteUrl:t.site_url,...this.getAuthenticationPageRenderArgs(),t:r})}}var yt=u(6533).hp;const vt="3.7.5",gt=vt,bt="function"==typeof atob,wt="function"==typeof btoa,Et="function"==typeof yt,Rt="function"==typeof TextDecoder?new TextDecoder:void 0,St="function"==typeof TextEncoder?new TextEncoder:void 0,kt=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),xt=(e=>{let t={};return e.forEach((e,r)=>t[e]=r),t})(kt),Ot=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Tt=String.fromCharCode.bind(String),It="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),_t=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),At=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Pt=e=>{let t,r,n,i,o="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=kt[t>>18&63]+kt[t>>12&63]+kt[t>>6&63]+kt[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},Ct=wt?e=>btoa(e):Et?e=>yt.from(e,"binary").toString("base64"):Pt,Nt=Et?e=>yt.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(Tt.apply(null,e.subarray(r,r+4096)));return Ct(t.join(""))},qt=(e,t=!1)=>t?_t(Nt(e)):Nt(e),Ft=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Tt(192|t>>>6)+Tt(128|63&t):Tt(224|t>>>12&15)+Tt(128|t>>>6&63)+Tt(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Tt(240|t>>>18&7)+Tt(128|t>>>12&63)+Tt(128|t>>>6&63)+Tt(128|63&t)},Dt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Lt=e=>e.replace(Dt,Ft),$t=Et?e=>yt.from(e,"utf8").toString("base64"):St?e=>Nt(St.encode(e)):e=>Ct(Lt(e)),Bt=(e,t=!1)=>t?_t($t(e)):$t(e),Ut=e=>Bt(e,!0),Mt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,jt=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Tt((t>>>10)+55296)+Tt(56320+(1023&t));case 3:return Tt((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Tt((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Qt=e=>e.replace(Mt,jt),Vt=e=>{if(e=e.replace(/\s+/g,""),!Ot.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,i="";for(let o=0;o<e.length;)t=xt[e.charAt(o++)]<<18|xt[e.charAt(o++)]<<12|(r=xt[e.charAt(o++)])<<6|(n=xt[e.charAt(o++)]),i+=64===r?Tt(t>>16&255):64===n?Tt(t>>16&255,t>>8&255):Tt(t>>16&255,t>>8&255,255&t);return i},zt=bt?e=>atob(At(e)):Et?e=>yt.from(e,"base64").toString("binary"):Vt,Kt=Et?e=>It(yt.from(e,"base64")):e=>It(zt(e).split("").map(e=>e.charCodeAt(0))),Gt=e=>Kt(Ht(e)),Wt=Et?e=>yt.from(e,"base64").toString("utf8"):Rt?e=>Rt.decode(Kt(e)):e=>Qt(zt(e)),Ht=e=>At(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),Jt=e=>Wt(Ht(e)),Yt=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Xt=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Yt(t));e("fromBase64",function(){return Jt(this)}),e("toBase64",function(e){return Bt(this,e)}),e("toBase64URI",function(){return Bt(this,!0)}),e("toBase64URL",function(){return Bt(this,!0)}),e("toUint8Array",function(){return Gt(this)})},Zt=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Yt(t));e("toBase64",function(e){return qt(this,e)}),e("toBase64URI",function(){return qt(this,!0)}),e("toBase64URL",function(){return qt(this,!0)})},er={version:vt,VERSION:gt,atob:zt,atobPolyfill:Vt,btoa:Ct,btoaPolyfill:Pt,fromBase64:Jt,toBase64:Bt,encode:Bt,encodeURI:Ut,encodeURL:Ut,utob:Lt,btou:Qt,decode:Jt,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:qt,toUint8Array:Gt,extendString:Xt,extendUint8Array:Zt,extendBuiltins:()=>{Xt(),Zt()}};var tr=u(5095),rr=u.n(tr),nr=u(5179),ir=u.n(nr),or=u(6270),ar=u.n(or),sr=u(9182),ur=u.n(sr),cr=u(6559),lr=u.n(cr),hr=u(3078);const fr="GitHub",{fetchWithTimeout:pr}=R.unsentRequest,dr=-1;var mr=function(e){return e.Error="error",e.Failure="failure",e.Pending="pending",e.Success="success",e}(mr||{});let yr=function(e){return e.Open="open",e.Closed="closed",e.All="all",e}({});function vr(e,t){return e.labels.some(e=>(0,R.isCMSLabel)(e.name,t))}function gr(e){return e.reduce((e,t)=>("removed"===t.status?e.push({sha:null,path:t.filename}):"renamed"===t.status?(e.push({sha:null,path:t.previous_filename}),e.push({sha:t.sha,path:t.filename})):e.push({sha:t.sha,path:t.filename}),e),[])}let br=!1;class wr{constructor(e){this.apiRoot=e.apiRoot||"https://api.github.com",this.token=e.token||"",this.tokenKeyword=e.tokenKeyword||"token",this.branch=e.branch||"master",this.useOpenAuthoring=e.useOpenAuthoring,this.repo=e.repo||"",this.originRepo=e.originRepo||this.repo,this.repoURL=`/repos/${this.repo}`,this.originRepoURL=`/repos/${this.originRepo}`;const[t,r]=[this.repo.split("/"),this.originRepo.split("/")];this.repoOwner=t[0],this.repoName=t[1],this.originRepoOwner=r[0],this.originRepoName=r[1],this.mergeMethod=e.squashMerges?"squash":"merge",this.cmsLabelPrefix=e.cmsLabelPrefix,this.initialWorkflowStatus=e.initialWorkflowStatus,this.baseUrl=e.baseUrl,this.getUser=e.getUser}static DEFAULT_COMMIT_MESSAGE="Automatically generated by Decap CMS";user(){return this._userPromise||(this._userPromise=this.getUser({token:this.token})),this._userPromise.then(e=>({name:e.name||"Unknown",login:e.login,email:e.email??void 0}))}async hasWriteAccess(){try{const e=await this.request(this.repoURL);return this.repoOwner=e.owner.login,e.permissions?.push??!1}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}reset(){}requestHeaders(e={}){const t={"Content-Type":"application/json; charset=utf-8",...e};return this.token?(t.Authorization=`${this.tokenKeyword} ${this.token}`,Promise.resolve(t)):Promise.resolve(t)}parseJsonResponse(e){return e.json().then(t=>e.ok?t:Promise.reject(t))}urlFor(e,t){const r=[];if(t.params)for(const e in t.params)r.push(`${e}=${encodeURIComponent(t.params[e])}`);return r.length&&(e+=`?${r.join("&")}`),this.apiRoot+e}parseResponse(e){const t=e.headers.get("Content-Type");return t&&t.match(/json/)?this.parseJsonResponse(e):e.text().then(t=>e.ok?t:Promise.reject(t))}handleRequestError(e,t){throw new R.APIError(e.message,t,fr)}buildRequest(e){return e}async request(e,t={},r=e=>this.parseResponse(e)){t={cache:"no-cache",...t};const n=await this.requestHeaders(t.headers||{}),i=this.urlFor(e,t);let o=500;try{const e=R.unsentRequest.fromFetchArguments(i,{...t,headers:n}),a=await(0,R.requestWithBackoff)(this,e);return o=a.status,await r(a)}catch(e){return this.handleRequestError(e,o)}}nextUrlProcessor(){return e=>e}async requestAllPages(e,t={}){t={cache:"no-cache",...t};const r=await this.requestHeaders(t.headers||{}),n=this.urlFor(e,t),i=await(0,R.getAllResponses)(n,{...t,headers:r},"next",this.nextUrlProcessor()),o=await Promise.all(i.map(e=>this.parseResponse(e)));return[].concat(...o)}generateContentKey(e,t){const r=(0,R.generateContentKey)(e,t);return this.useOpenAuthoring?`${this.repo}/${r}`:r}parseContentKey(e){return this.useOpenAuthoring?(0,R.parseContentKey)(e.slice(this.repo.length+1)):(0,R.parseContentKey)(e)}checkMetadataRef(){return this.request(`${this.repoURL}/git/refs/meta/_decap_cms`).then(e=>e.object).catch(()=>this.uploadBlob({raw:"# Decap CMS\n\nThis tree is used by the Decap CMS to store metadata information for specific files and branches."}).then(e=>this.request(`${this.repoURL}/git/trees`,{method:"POST",body:JSON.stringify({tree:[{path:"README.md",mode:"100644",type:"blob",sha:e.sha}]})})).then(e=>this.commit("First Commit",e)).then(e=>this.createRef("meta","_decap_cms",e.sha)).then(e=>e.object))}async storeMetadata(e,t){return this._metadataSemaphore||(this._metadataSemaphore=n()(1)),new Promise((r,n)=>this._metadataSemaphore?.take(async()=>{try{const n=await this.checkMetadataRef(),i={path:`${e}.json`,raw:JSON.stringify(t)};await this.uploadBlob(i);const o=await this.updateTree(n.sha,[i]),{sha:a}=await this.commit(`Updating “${e}” metadata`,o);await this.patchRef("meta","_decap_cms",a),await R.localForage.setItem(`gh.meta.${e}`,{expires:Date.now()+3e5,data:t}),this._metadataSemaphore?.leave(),r()}catch(e){n(e)}}))}deleteMetadata(e){return this._metadataSemaphore||(this._metadataSemaphore=n()(1)),new Promise(t=>this._metadataSemaphore?.take(async()=>{try{const r=await this.checkMetadataRef(),n={path:`${e}.json`,sha:null},i=await this.updateTree(r.sha,[n]),{sha:o}=await this.commit(`Deleting “${e}” metadata`,i);await this.patchRef("meta","_decap_cms",o),this._metadataSemaphore?.leave(),t()}catch(e){this._metadataSemaphore?.leave(),t()}}))}async retrieveMetadataOld(e){console.log("%c Checking for MetaData files","line-height: 30px;text-align: center;font-weight: bold");const t={params:{ref:"refs/meta/_decap_cms"},headers:{Accept:"application/vnd.github.v3.raw"}};function r(t){throw"Not Found"===t.message&&console.log("%c %s does not have metadata","line-height: 30px;text-align: center;font-weight: bold",e),t}if(!this.useOpenAuthoring)return await this.request(`${this.repoURL}/contents/${e}.json`,t).then(e=>JSON.parse(e)).catch(r);const[n,i]=e.split("/");return this.request(`/repos/${n}/${i}/contents/${e}.json`,t).then(e=>JSON.parse(e)).catch(r)}async getPullRequests(e,t,r){return(await this.requestAllPages(`${this.originRepoURL}/pulls`,{params:{...e?{head:await this.getHeadReference(e)}:{},base:this.branch,state:t,per_page:100}})).filter(e=>e.head.ref.startsWith(`${R.CMS_BRANCH_PREFIX}/`)&&r(e))}async getOpenAuthoringPullRequest(e,t){const r=await this.getBranch(e).catch(()=>{throw new R.EditorialWorkflowError("content is not under editorial workflow",!0)}),n=t.filter(e=>e.head.sha===r.commit.sha)[0];if(n){n.labels=n.labels.filter(e=>!(0,R.isCMSLabel)(e.name,this.cmsLabelPrefix));const e=n.state===yr.Closed?{name:(0,R.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}:{name:(0,R.statusToLabel)("pending_review",this.cmsLabelPrefix)};return n.labels.push(e),n}try{return{head:{sha:r.commit.sha},number:dr,labels:[{name:(0,R.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}],state:yr.Open}}catch(e){throw new R.EditorialWorkflowError("content is not under editorial workflow",!0)}}async getBranchPullRequest(e){if(this.useOpenAuthoring){const t=await this.getPullRequests(e,yr.All,()=>!0);return this.getOpenAuthoringPullRequest(e,t)}{const t=await this.getPullRequests(e,yr.Open,e=>vr(e,this.cmsLabelPrefix));if(t.length<=0)throw new R.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}}async getPullRequestCommits(e){if(e===dr)return[];try{return await this.request(`${this.originRepoURL}/pulls/${e}/commits`)}catch(e){return console.log(e),[]}}async getPullRequestAuthor(e){if(e.user?.login)try{const t=await this.request(`/users/${e.user.login}`);return t.name||t.login}catch{return}}async retrieveUnpublishedEntryData(e){const{collection:t,slug:r}=this.parseContentKey(e),n=(0,R.branchFromContentKey)(e),i=await this.getBranchPullRequest(n),[{files:o},a]=await Promise.all([this.getDifferences(this.branch,i.head.sha),this.getPullRequestAuthor(i)]),s=await Promise.all((o||[]).map(e=>this.diffFromFile(e))),u=i.labels.find(e=>(0,R.isCMSLabel)(e.name,this.cmsLabelPrefix)),c=(0,R.labelToStatus)(u.name,this.cmsLabelPrefix),l=i.updated_at;return{collection:t,slug:r,status:c,diffs:s.map(e=>({path:e.path,newFile:e.newFile,id:e.sha})),updatedAt:l,pullRequestAuthor:a}}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await this.fetchBlobContent({sha:t,repoURL:n,parseText:i})}async readFileMetadata(e,t){const r=await(0,R.readFileMetadata)(t,async()=>{try{const t=await this.request(`${this.originRepoURL}/commits`,{params:{path:e,sha:this.branch}}),{commit:r}=t[0];return{author:r.author?.name||r.author?.email||"",updatedOn:r.author?.date||""}}catch(e){return{author:"",updatedOn:""}}},R.localForage);return r}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){const n=await this.request(`${t}/git/blobs/${e}`,{cache:"force-cache"});if(r)return er.decode(n.content);{const e=er.atob(n.content),t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new Blob([t])}}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={}){const i=lr()(e,"/");try{return(await this.request(`${t}/git/trees/${r}:${i}`,{params:n>1?{recursive:1}:{}})).tree.filter(e=>"blob"===e.type&&e.path&&e.path.split("/").length<=n).map(e=>({type:e.type,id:e.sha,name:(0,R.basename)(e.path),path:`${i}/${e.path}`,size:e.size||0}))}catch(e){if(e&&404===e.status)return console.log("This 404 was expected and handled appropriately."),[];throw e}}filterOpenAuthoringBranches=async e=>{try{const t=await this.getBranchPullRequest(e),{state:r,merged_at:n}=t;return t.number!==dr&&r===yr.Closed&&n?(await this.deleteBranch(e),{branch:e,filter:!1}):{branch:e,filter:!0}}catch(t){return{branch:e,filter:!1}}};async migrateToVersion1(e,t){const r=e.head.ref.slice(4),n=`${t.collection}/${r}`,i=`cms/${n}`;await this.getBranch(i).catch(()=>{})||await this.createBranch(i,e.head.sha);const o=(await this.getPullRequests(i,yr.All,()=>!0))[0]||await this.createPR(e.title,i),a={...t,pr:{number:o.number,head:o.head.sha},branch:i,version:"1"};return await this.storeMetadata(n,a),await this.closePR(e.number),await this.deleteBranch(e.head.ref),await this.deleteMetadata(r),{metadata:a,pullRequest:o}}async migrateToPullRequestLabels(e,t){await this.setPullRequestStatus(e,t.status);const r=e.head.ref.slice(4);await this.deleteMetadata(r)}async migratePullRequest(e,t){const{number:r}=e;console.log(`Migrating Pull Request '${r}' (${t})`);const n=(0,R.contentKeyFromBranch)(e.head.ref);let i=await this.retrieveMetadataOld(n).catch(()=>{});if(!i)return void console.log(`Skipped migrating Pull Request '${r}' (${t})`);let o=r;if(!i.version){console.log(`Migrating Pull Request '${r}' to version 1`);try{({metadata:i,pullRequest:e}=await this.migrateToVersion1(e,i))}catch(e){return console.log(`Failed to migrate Pull Request '${r}' to version 1. See error below.`),void console.error(e)}o=e.number,console.log(`Done migrating Pull Request '${r}' to version 1. New pull request '${o}' created.`)}"1"===i.version&&(console.log(`Migrating Pull Request '${o}' to labels`),await this.migrateToPullRequestLabels(e,i),console.log(`Done migrating Pull Request '${o}' to labels`)),console.log(`Done migrating Pull Request '${r===o?o:`${r} => ${o}`}'`)}async getOpenAuthoringBranches(){return await this.requestAllPages(`${this.repoURL}/git/refs/heads/cms/${this.repo}`).catch(()=>[])}async listUnpublishedBranches(){let e;if(console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),this.useOpenAuthoring){e=(await this.getOpenAuthoringBranches()).map(e=>e.ref.slice(11));const t=await Promise.all(e.map(e=>this.filterOpenAuthoringBranches(e)));e=t.filter(e=>e.filter).map(e=>e.branch)}else{const t=await this.getPullRequests(void 0,yr.Open,e=>!e.head.repo.fork&&function(e,t){return e.labels.every(e=>!(0,R.isCMSLabel)(e.name,t))}(e,this.cmsLabelPrefix));let r=0;for(const e of t)br||(br=!0,alert(w`
3
- Decap CMS is adding labels to ${t.length} of your Editorial Workflow
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("decap-cms-lib-util"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendGithub",["decap-cms-lib-util","@emotion/react","react","prop-types","decap-cms-lib-auth","decap-cms-ui-default"],t):"object"==typeof exports?exports.DecapCmsBackendGithub=t(require("decap-cms-lib-util"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):e.DecapCmsBackendGithub=t(e.DecapCmsLibUtil,e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsLibAuth,e.DecapCmsUiDefault)}(window,(e,t,r,n,i,o)=>(()=>{var a={95:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},128:(e,t,r)=>{var n=r(8506);e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},166:e=>{e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},310:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},330:(e,t,r)=>{var n=r(5874),i=r(759),o=r(9505),a=r(983);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},462:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},476:(e,t,r)=>{var n=r(1200);e.exports=function(e){return n(this,e).get(e)}},481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=void 0,c=Array.isArray(e),l=[e],h=-1,f=[],p=void 0,d=void 0,m=void 0,y=[],v=[],g=e;do{var b=++h===l.length,w=b&&0!==f.length;if(b){if(d=0===v.length?void 0:y[y.length-1],p=m,m=v.pop(),w){if(c)p=p.slice();else{for(var E={},R=0,S=Object.keys(p);R<S.length;R++){var k=S[R];E[k]=p[k]}p=E}for(var x=0,O=0;O<f.length;O++){var T=f[O][0],I=f[O][1];c&&(T-=x),c&&null===I?(p.splice(T,1),x++):p[T]=I}}h=n.index,l=n.keys,f=n.edits,c=n.inArray,n=n.prev}else{if(d=m?c?h:l[h]:void 0,null==(p=m?m[d]:g))continue;m&&y.push(d)}var _,A=void 0;if(!Array.isArray(p)){if(!(0,o.isNode)(p))throw new Error("Invalid AST Node: ".concat((0,i.default)(p),"."));var P=u(t,p.kind,b);if(P){if((A=P.call(t,p,d,m,y,v))===s)break;if(!1===A){if(!b){y.pop();continue}}else if(void 0!==A&&(f.push([d,A]),!b)){if(!(0,o.isNode)(A)){y.pop();continue}p=A}}}void 0===A&&w&&f.push([d,p]),b?y.pop():(n={inArray:c,index:h,keys:l,edits:f,prev:n},l=(c=Array.isArray(p))?p:null!==(_=r[p.kind])&&void 0!==_?_:[],h=-1,f=[],m&&v.push(m),m=p)}while(void 0!==n);return 0!==f.length&&(g=f[f.length-1][1]),g},t.visitInParallel=function(e){var t=new Array(e.length);return{enter:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!1);if(i){var o=i.apply(e[n],arguments);if(!1===o)t[n]=r;else if(o===s)t[n]=s;else if(void 0!==o)return o}}},leave:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!0);if(i){var o=i.apply(e[n],arguments);if(o===s)t[n]=s;else if(void 0!==o&&!1!==o)return o}}else t[n]===r&&(t[n]=null)}}},t.getVisitFn=u,t.BREAK=t.QueryDocumentKeys=void 0;var n,i=(n=r(9859))&&n.__esModule?n:{default:n},o=r(4679),a={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"]};t.QueryDocumentKeys=a;var s=Object.freeze({});function u(e,t,r){var n=e[t];if(n){if(!r&&"function"==typeof n)return n;var i=r?n.leave:n.enter;if("function"==typeof i)return i}else{var o=r?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}t.BREAK=s},552:(e,t,r)=>{var n=r(9438);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},638:e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}},656:(e,t,r)=>{var n=r(4757),i=r(6695),o=r(4153),a="__lodash_placeholder__",s=Math.min;e.exports=function(e,t){var r=e[1],u=t[1],c=r|u,l=c<131,h=128==u&&8==r||128==u&&256==r&&e[7].length<=t[8]||384==u&&t[7].length<=t[8]&&8==r;if(!l&&!h)return e;1&u&&(e[2]=t[2],c|=1&r?0:4);var f=t[3];if(f){var p=e[3];e[3]=p?n(p,f,t[4]):f,e[4]=p?o(e[3],a):t[4]}return(f=t[5])&&(p=e[5],e[5]=p?i(p,f,t[6]):f,e[6]=p?o(e[5],a):t[6]),(f=t[7])&&(e[7]=f),128&u&&(e[8]=null==e[8]?t[8]:s(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},714:(e,t,r)=>{var n=r(1603),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},759:(e,t,r)=>{var n=r(5874),i=r(975),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},809:(e,t,r)=>{var n=r(7156),i=r(3256),o=r(714);e.exports=function(e,t,r,a){var s=1&t,u=i(e);return function t(){for(var i=-1,c=arguments.length,l=-1,h=a.length,f=Array(h+c),p=this&&this!==o&&this instanceof t?u:e;++l<h;)f[l]=a[l];for(;c--;)f[l++]=arguments[++i];return n(p,s?r:this,f)}}},975:(e,t,r)=>{var n=r(5271),i=r(7583);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},983:(e,t,r)=>{var n=r(8071);e.exports=function(e){return null==e?"":n(e)}},984:(e,t,r)=>{var n=r(1200);e.exports=function(e){return n(this,e).has(e)}},1022:(e,t,r)=>{var n=r(6821),i=r(7221),o=r(1596),a=r(1992),s=r(552);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},1095:(e,t,r)=>{var n=r(9400),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},1200:(e,t,r)=>{var n=r(95);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},1400:e=>{e.exports={}},1467:(e,t,r)=>{var n=r(8071),i=r(6311),o=r(4821),a=r(8337),s=r(983),u=/^\s+/;e.exports=function(e,t,r){if((e=s(e))&&(r||void 0===t))return e.replace(u,"");if(!e||!(t=n(t)))return e;var c=a(e),l=o(c,a(t));return i(c,l).join("")}},1596:(e,t,r)=>{var n=r(9438);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},1603:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},1683:(e,t,r)=>{var n=r(9169),i=r(3821),o=i?function(e,t){return i.set(e,t),e}:n;e.exports=o},1824:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},1908:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},1911:(e,t,r)=>{"use strict";t.y=function(e){return(0,n.visit)(e,{leave:o})};var n=r(481),i=r(8023),o={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=c("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),o=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+c(" = ",n)+c(" ",s(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,o=e.selectionSet,a=c("",t,": ")+r,u=a+c("(",s(n,", "),")");return u.length>80&&(u=a+c("(\n",l(s(n,"\n")),"\n)")),s([u,s(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+c(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",c("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(c("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(c("",s(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+c("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a(function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),u(r)]," ")}),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a(function(e){return s(["scalar",e.name,s(e.directives," ")]," ")}),ObjectTypeDefinition:a(function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")}),FieldDefinition:a(function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(f(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+": "+n+c(" ",s(i," "))}),InputValueDefinition:a(function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,c("= ",n),s(i," ")]," ")}),InterfaceTypeDefinition:a(function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")}),UnionTypeDefinition:a(function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")}),EnumTypeDefinition:a(function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),u(n)]," ")}),EnumValueDefinition:a(function(e){return s([e.name,s(e.directives," ")]," ")}),InputObjectTypeDefinition:a(function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),u(n)]," ")}),DirectiveDefinition:a(function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(f(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")}),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),u(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),u(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),u(n)]," ")}};function a(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(r))&&void 0!==t?t:""}function u(e){return c("{\n",l(s(e,"\n")),"\n}")}function c(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function l(e){return c(" ",e.replace(/\n/g,"\n "))}function h(e){return-1!==e.indexOf("\n")}function f(e){return null!=e&&e.some(h)}},1992:(e,t,r)=>{var n=r(9438);e.exports=function(e){return n(this.__data__,e)>-1}},2121:(e,t,r)=>{var n=r(8487);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},2176:(e,t,r)=>{var n=r(3821),i=r(3883),o=n?function(e){return n.get(e)}:i;e.exports=o},2275:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},2405:(e,t,r)=>{var n=r(8637);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},2409:e=>{e.exports=function(e){return e.split("")}},2532:(e,t,r)=>{var n=r(8255),i=r(2176),o=r(8581),a=r(8973);e.exports=function(e){var t=o(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var s=i(r);return!!s&&e===s[0]}},2750:e=>{e.exports=function(){}},2972:(e,t,r)=>{var n=r(2532),i=r(4676),o=r(2992);e.exports=function(e,t,r,a,s,u,c,l,h,f){var p=8&t;t|=p?32:64,4&(t&=~(p?64:32))||(t&=-4);var d=[e,t,s,p?u:void 0,p?c:void 0,p?void 0:u,p?void 0:c,l,h,f],m=r.apply(void 0,d);return n(e)&&i(m,d),m.placeholder=a,o(m,e,t)}},2992:(e,t,r)=>{var n=r(8136),i=r(5585),o=r(3232),a=r(9893);e.exports=function(e,t,r){var s=t+"";return o(e,i(s,a(n(s),r)))}},3078:(e,t,r)=>{"use strict";var n=r(5409);function i(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function o(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var a={resolve:function(){for(var e,t="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=n.cwd()),s=e),i(s),0!==s.length&&(t=s+"/"+t,r=47===s.charCodeAt(0))}return t=o(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(i(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=o(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return i(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];i(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":a.normalize(e)},relative:function(e,t){if(i(e),i(t),e===t)return"";if((e=a.resolve(e))===(t=a.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,o=n-r,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var u=t.length-s,c=o<u?o:u,l=-1,h=0;h<=c;++h){if(h===c){if(u>c){if(47===t.charCodeAt(s+h))return t.slice(s+h+1);if(0===h)return t.slice(s+h)}else o>c&&(47===e.charCodeAt(r+h)?l=h:0===h&&(l=0));break}var f=e.charCodeAt(r+h);if(f!==t.charCodeAt(s+h))break;47===f&&(l=h)}var p="";for(h=r+l+1;h<=n;++h)h!==n&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+t.slice(s+l):(s+=l,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(i(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!o){n=a;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');i(e);var r,n=0,o=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,u=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!a){n=r+1;break}}else-1===u&&(a=!1,u=r+1),s>=0&&(c===t.charCodeAt(s)?-1===--s&&(o=r):(s=-1,o=u))}return n===o?o=u:-1===o&&(o=e.length),e.slice(n,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){n=r+1;break}}else-1===o&&(a=!1,o=r+1);return-1===o?"":e.slice(n,o)},extname:function(e){i(e);for(var t=-1,r=0,n=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===n&&(o=!1,n=s+1),46===u?-1===t?t=s:1!==a&&(a=1):-1!==t&&(a=-1);else if(!o){r=s+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){i(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),o=47===n;o?(t.root="/",r=1):r=0;for(var a=-1,s=0,u=-1,c=!0,l=e.length-1,h=0;l>=r;--l)if(47!==(n=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===n?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!c){s=l+1;break}return-1===a||-1===u||0===h||1===h&&a===u-1&&a===s+1?-1!==u&&(t.base=t.name=0===s&&o?e.slice(1,u):e.slice(s,u)):(0===s&&o?(t.name=e.slice(1,a),t.base=e.slice(1,u)):(t.name=e.slice(s,a),t.base=e.slice(s,u)),t.ext=e.slice(a,u)),s>0?t.dir=e.slice(0,s-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,e.exports=a},3135:t=>{"use strict";t.exports=e},3232:(e,t,r)=>{var n=r(3431),i=r(1824)(n);e.exports=i},3256:(e,t,r)=>{var n=r(1095),i=r(9400);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=n(e.prototype),o=e.apply(r,t);return i(o)?o:r}}},3328:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+e[t+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*m}},3431:(e,t,r)=>{var n=r(8295),i=r(4856),o=r(9169),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=a},3493:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3510:e=>{e.exports=function(e){return e.placeholder}},3743:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},3758:(e,t,r)=>{var n=r(8265);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},3784:(e,t,r)=>{var n=r(8637),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},3821:(e,t,r)=>{var n=r(8154),i=n&&new n;e.exports=i},3883:e=>{e.exports=function(){}},4069:(e,t,r)=>{var n=r(6766),i=r(1022),o=r(5870);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},4119:e=>{"use strict";e.exports=r},4136:(e,t,r)=>{var n=r(1200);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},4153:e=>{var t="__lodash_placeholder__";e.exports=function(e,r){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var s=e[n];s!==r&&s!==t||(e[n]=t,a[o++]=n)}return a}},4228:(e,t,r)=>{var n=r(7787),i=r(7827),o=r(9400),a=r(462),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:s).test(a(e))}},4276:function(e,t,r){var n=r(5409);!function(){"use strict";var t=function(e){setTimeout(e,0)};void 0!==n&&n&&"function"==typeof n.nextTick&&(t=n.nextTick),e.exports=function(e){var r={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===r.firstHere){r.current++,r.firstHere=!0;var e=1}else e=0;var t={n:1};"function"==typeof arguments[0]?t.task=arguments[0]:t.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?t.task=arguments[1]:t.n=arguments[1]);var n=t.task;if(t.task=function(){n(r.leave)},r.current+t.n-e>r.capacity)return 1===e&&(r.current--,r.firstHere=!1),r.queue.push(t);r.current+=t.n-e,t.task(r.leave),1===e&&(r.firstHere=!1)},leave:function(e){if(e=e||1,r.current-=e,r.queue.length){var n=r.queue[0];n.n+r.current>r.capacity||(r.queue.shift(),r.current+=n.n,t(n.task))}else if(r.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,r.current+e<=r.capacity}};return r}}()},4361:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")?",c="[\\ufe0e\\ufe0f]?",l=c+u+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+u+")*",h="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+h+l,"g");e.exports=function(e){return e.match(f)||[]}},4378:(e,t,r)=>{e.exports=r(6637).Observable},4671:(e,t,r)=>{var n=r(4228),i=r(7559);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},4674:(e,t,r)=>{"use strict";var n=r(7020),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(d){var i=p(r);i&&i!==d&&e(t,i,n)}var a=l(r);h&&(a=a.concat(h(r)));for(var s=u(t),m=u(r),y=0;y<a.length;++y){var v=a[y];if(!(o[v]||n&&n[v]||m&&m[v]||s&&s[v])){var g=f(r,v);try{c(t,v,g)}catch(e){}}}}return t}},4676:(e,t,r)=>{var n=r(1683),i=r(1824)(n);e.exports=i},4679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(7798))&&n.__esModule?n:{default:n},o=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=o,(0,i.default)(o);var a=function(){function e(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,i.default)(a)},4742:e=>{e.exports={__schema:{types:[{kind:"INTERFACE",name:"Node",possibleTypes:[{name:"AddedToProjectEvent"},{name:"App"},{name:"AssignedEvent"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"Blob"},{name:"Bot"},{name:"BranchProtectionRule"},{name:"ClosedEvent"},{name:"CodeOfConduct"},{name:"CommentDeletedEvent"},{name:"Commit"},{name:"CommitComment"},{name:"CommitCommentThread"},{name:"ConvertedNoteToIssueEvent"},{name:"CrossReferencedEvent"},{name:"DemilestonedEvent"},{name:"DeployKey"},{name:"DeployedEvent"},{name:"Deployment"},{name:"DeploymentEnvironmentChangedEvent"},{name:"DeploymentStatus"},{name:"ExternalIdentity"},{name:"Gist"},{name:"GistComment"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"Issue"},{name:"IssueComment"},{name:"Label"},{name:"LabeledEvent"},{name:"Language"},{name:"License"},{name:"LockedEvent"},{name:"Mannequin"},{name:"MarketplaceCategory"},{name:"MarketplaceListing"},{name:"MentionedEvent"},{name:"MergedEvent"},{name:"Milestone"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"Organization"},{name:"OrganizationIdentityProvider"},{name:"OrganizationInvitation"},{name:"PinnedEvent"},{name:"Project"},{name:"ProjectCard"},{name:"ProjectColumn"},{name:"PublicKey"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"},{name:"PullRequestReviewThread"},{name:"PushAllowance"},{name:"Reaction"},{name:"ReadyForReviewEvent"},{name:"Ref"},{name:"ReferencedEvent"},{name:"RegistryPackage"},{name:"RegistryPackageDependency"},{name:"RegistryPackageFile"},{name:"RegistryPackageTag"},{name:"RegistryPackageVersion"},{name:"Release"},{name:"ReleaseAsset"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"Repository"},{name:"RepositoryInvitation"},{name:"RepositoryTopic"},{name:"ReviewDismissalAllowance"},{name:"ReviewDismissedEvent"},{name:"ReviewRequest"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewRequestedEvent"},{name:"SavedReply"},{name:"SecurityAdvisory"},{name:"SponsorsListing"},{name:"Sponsorship"},{name:"Status"},{name:"StatusContext"},{name:"SubscribedEvent"},{name:"Tag"},{name:"Team"},{name:"Topic"},{name:"TransferredEvent"},{name:"Tree"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"},{name:"User"},{name:"UserBlockedEvent"},{name:"UserContentEdit"},{name:"UserStatus"}]},{kind:"INTERFACE",name:"UniformResourceLocatable",possibleTypes:[{name:"Bot"},{name:"ClosedEvent"},{name:"Commit"},{name:"CrossReferencedEvent"},{name:"Gist"},{name:"Issue"},{name:"Mannequin"},{name:"MergedEvent"},{name:"Milestone"},{name:"Organization"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"ReadyForReviewEvent"},{name:"Release"},{name:"Repository"},{name:"RepositoryTopic"},{name:"ReviewDismissedEvent"},{name:"User"}]},{kind:"INTERFACE",name:"Actor",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RegistryPackageOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"ProjectOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"Closable",possibleTypes:[{name:"Issue"},{name:"Milestone"},{name:"Project"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Updatable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"Project"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"UNION",name:"ProjectCardItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Assignable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Comment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"UpdatableComment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Labelable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Lockable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"RegistryPackageSearch",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RepositoryOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"MemberStatusable",possibleTypes:[{name:"Organization"},{name:"Team"}]},{kind:"INTERFACE",name:"ProfileOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"PinnableItem",possibleTypes:[{name:"Gist"},{name:"Repository"}]},{kind:"INTERFACE",name:"Starrable",possibleTypes:[{name:"Gist"},{name:"Repository"},{name:"Topic"}]},{kind:"INTERFACE",name:"RepositoryInfo",possibleTypes:[{name:"Repository"}]},{kind:"INTERFACE",name:"GitObject",possibleTypes:[{name:"Blob"},{name:"Commit"},{name:"Tag"},{name:"Tree"}]},{kind:"INTERFACE",name:"RepositoryNode",possibleTypes:[{name:"CommitComment"},{name:"CommitCommentThread"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Subscribable",possibleTypes:[{name:"Commit"},{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Deletable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"IssueComment"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Reactable",possibleTypes:[{name:"CommitComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"GitSignature",possibleTypes:[{name:"GpgSignature"},{name:"SmimeSignature"},{name:"UnknownSignature"}]},{kind:"UNION",name:"RequestedReviewer",possibleTypes:[{name:"User"},{name:"Team"},{name:"Mannequin"}]},{kind:"UNION",name:"PullRequestTimelineItem",possibleTypes:[{name:"Commit"},{name:"CommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestReviewComment"},{name:"IssueComment"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"MergedEvent"},{name:"ReferencedEvent"},{name:"CrossReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefRestoredEvent"},{name:"HeadRefForcePushedEvent"},{name:"BaseRefForcePushedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewDismissedEvent"},{name:"UserBlockedEvent"}]},{kind:"UNION",name:"Closer",possibleTypes:[{name:"Commit"},{name:"PullRequest"}]},{kind:"UNION",name:"ReferencedSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"Assignee",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"MilestoneItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"RenamedTitleSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"PullRequestTimelineItems",possibleTypes:[{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestRevisionMarker"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"MergedEvent"},{name:"ReviewDismissedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReadyForReviewEvent"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"IssueOrPullRequest",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"IssueTimelineItem",possibleTypes:[{name:"Commit"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"ReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"UserBlockedEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"TransferredEvent"}]},{kind:"UNION",name:"IssueTimelineItems",possibleTypes:[{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"ReviewDismissalAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PushAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PermissionGranter",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Sponsorable",possibleTypes:[{name:"User"}]},{kind:"INTERFACE",name:"Contribution",possibleTypes:[{name:"CreatedCommitContribution"},{name:"CreatedIssueContribution"},{name:"CreatedPullRequestContribution"},{name:"CreatedPullRequestReviewContribution"},{name:"CreatedRepositoryContribution"},{name:"JoinedGitHubContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedRepositoryOrRestrictedContribution",possibleTypes:[{name:"CreatedRepositoryContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedIssueOrRestrictedContribution",possibleTypes:[{name:"CreatedIssueContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedPullRequestOrRestrictedContribution",possibleTypes:[{name:"CreatedPullRequestContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"SearchResultItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"User"},{name:"Organization"},{name:"MarketplaceListing"},{name:"App"}]},{kind:"UNION",name:"CollectionItemContent",possibleTypes:[{name:"Repository"},{name:"Organization"},{name:"User"}]}]}}},4757:e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,c=r.length,l=t(a-s,0),h=Array(c+l),f=!i;++u<c;)h[u]=r[u];for(;++o<s;)(f||o<a)&&(h[n[o]]=e[o]);for(;l--;)h[u++]=e[o++];return h}},4821:(e,t,r)=>{var n=r(8506);e.exports=function(e,t){for(var r=-1,i=e.length;++r<i&&n(t,e[r],0)>-1;);return r}},4822:(e,t,r)=>{var n=r(8255),i=r(8820),o=r(310);e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},4856:(e,t,r)=>{var n=r(4671),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},4933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,h=u>0?a-4:a;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(e,s,s+a>u?u:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4963:(e,t,r)=>{"use strict";r.d(t,{A:()=>n}),e=r.hmd(e);const n=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:e)},4997:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},5095:(e,t,r)=>{var n=r(7201);e.exports=function(e){return null!=e&&e.length?n(e,0,-1):[]}},5097:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5103:(e,t,r)=>{var n=r(4997),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},5179:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5270:(e,t,r)=>{"use strict";e.exports=r(5460)},5271:(e,t,r)=>{var n=r(9006),i=r(9650),o=r(6881),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},5360:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case l:case h:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case y:case m:case u:return e;default:return t}}case i:return t}}}function R(e){return E(e)===h}t.AsyncMode=l,t.ConcurrentMode=h,t.ContextConsumer=c,t.ContextProvider=u,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return R(e)||E(e)===l},t.isConcurrentMode=R,t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===y},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===s},t.isStrictMode=function(e){return E(e)===a},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===s||e===a||e===p||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===g||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=E},5390:(e,t,r)=>{var n=r(7156),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=r(u),n(e,this,c)}}},5409:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,u=[],c=!1,l=-1;function h(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&f())}function f(){if(!c){var e=a(h);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function d(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||c||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},5460:(e,t)=>{"use strict";var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(e,t,n){var i=null;if(void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),"key"in t)for(var o in n={},t)"key"!==o&&(n[o]=t[o]);else n=t;return t=n.ref,{$$typeof:r,type:e,key:i,ref:void 0!==t?t:null,props:n}}t.Fragment=n,t.jsx=i,t.jsxs=i},5585:e=>{var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,r){var n=r.length;if(!n)return e;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),e.replace(t,"{\n/* [wrapped with "+r+"] */\n")}},5639:(e,t,r)=>{var n=r(7156),i=r(3256),o=r(7524),a=r(2972),s=r(3510),u=r(4153),c=r(714);e.exports=function(e,t,r){var l=i(e);return function i(){for(var h=arguments.length,f=Array(h),p=h,d=s(i);p--;)f[p]=arguments[p];var m=h<3&&f[0]!==d&&f[h-1]!==d?[]:u(f,d);return(h-=m.length)<r?a(e,t,o,i.placeholder,void 0,f,m,void 0,void 0,r-h):n(this&&this!==c&&this instanceof i?l:e,this,f)}}},5733:(e,t,r)=>{var n=r(3256),i=r(714);e.exports=function(e,t,r){var o=1&t,a=n(e);return function t(){return(this&&this!==i&&this instanceof t?a:e).apply(o?r:this,arguments)}}},5870:(e,t,r)=>{var n=r(4671)(r(714),"Map");e.exports=n},5874:e=>{var t=Array.isArray;e.exports=t},6039:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r<t.length;r++)r&&(a+=","),a+=e(t[r])||"null";return a+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(t)-1,u=Object.keys(t).sort(i&&i(t));for(a="",r=0;r<u.length;r++){var c=u[r],l=e(t[c]);l&&(a&&(a+=","),a+=JSON.stringify(c)+":"+l)}return o.splice(s,1),"{"+a+"}"}}(e)}},6171:e=>{"use strict";e.exports=o},6172:e=>{e.exports=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}},6264:(e,t,r)=>{var n=r(8637);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},6270:(e,t,r)=>{var n=r(6965),i=r(9298),o=r(3510),a=r(4153),s=n(function(e,t){var r=a(t,o(s));return i(e,32,void 0,t,r)});s.placeholder={},e.exports=s},6311:(e,t,r)=>{var n=r(7201);e.exports=function(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}},6450:(e,t,r)=>{var n=r(714)["__core-js_shared__"];e.exports=n},6533:(e,t,r)=>{"use strict";const n=r(4933),i=r(3328),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=u,t.IS=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(H(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(H(e,SharedArrayBuffer)||e&&H(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),s(e<0?0:0|d(e))}function f(e){const t=e.length<0?0:0|d(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function E(e,t,r,n){return W(K(t,e.length-r),e,r,n)}function R(e,t,r,n){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return W(G(t),e,r,n)}function k(e,t,r,n){return W(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return h(e)},u.allocUnsafeSlow=function(e){return h(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(H(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(c[e]!==l[e]){o=c[e],a=l[e];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return R(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function A(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function P(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function q(e,t,r,n,i){j(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function F(e,t,r,n,i){j(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X(function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=X(function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X(function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=X(function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X(function(e,t=0){return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=X(function(e,t=0){return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X(function(e,t=0){return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=X(function(e,t=0){return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const B={};function U(e,t,r){B[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function M(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function j(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function Q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),U("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=M(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=M(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const z=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},6559:(e,t,r)=>{var n=r(8071),i=r(5103),o=r(6311),a=r(8402),s=r(4821),u=r(8337),c=r(983);e.exports=function(e,t,r){if((e=c(e))&&(r||void 0===t))return i(e);if(!e||!(t=n(t)))return e;var l=u(e),h=u(t),f=s(l,h),p=a(l,h)+1;return o(l,f,p).join("")}},6619:(e,t,r)=>{var n=r(310),i=r(1908),o=Math.min;e.exports=function(e,t){for(var r=e.length,a=o(t.length,r),s=n(e);a--;){var u=t[a];e[a]=i(u,r)?s[u]:void 0}return e}},6637:(e,t)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}t.Observable=void 0;var o=function(){return"function"==typeof Symbol},a=function(e){return o()&&Boolean(Symbol[e])},s=function(e){return a(e)?Symbol[e]:"@@"+e};o()&&!a("observable")&&(Symbol.observable=Symbol("observable"));var u=s("iterator"),c=s("observable"),l=s("species");function h(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function f(e){var t=e.constructor;return void 0!==t&&null===(t=t[l])&&(t=void 0),void 0!==t?t:R}function p(e){return e instanceof R}function d(e){d.log?d.log(e):setTimeout(function(){throw e})}function m(e){Promise.resolve().then(function(){try{e()}catch(e){d(e)}})}function y(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=h(t,"unsubscribe");r&&r.call(t)}}catch(e){d(e)}}function v(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function g(e,t,r){e._state="running";var n=e._observer;try{var i=h(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(v(e),!i)throw r;i.call(n,r);break;case"complete":v(e),i&&i.call(n)}}catch(e){d(e)}"closed"===e._state?y(e):"running"===e._state&&(e._state="ready")}function b(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void m(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(g(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)})):void g(e,t,r);e._queue.push({type:t,value:r})}}var w=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new E(this);try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return i(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(v(this),y(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),E=function(){function e(t){r(this,e),this._subscription=t}return i(e,[{key:"next",value:function(e){b(this._subscription,"next",e)}},{key:"error",value:function(e){b(this._subscription,"error",e)}},{key:"complete",value:function(){b(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),R=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return i(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new w(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise(function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}})}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(f(this))(function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(f(this))(function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=f(this),n=arguments.length>1,i=!1,o=arguments[1];return new r(function(r){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||n)try{o=e(o,t)}catch(e){return r.error(e)}else o=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(o),r.complete()}})})}},{key:"concat",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=f(this);return new i(function(t){var n,o=0;return function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}})}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=f(this);return new r(function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})}},{key:c,value:function(){return this}}],[{key:"from",value:function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=h(t,c);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return p(i)&&i.constructor===r?i:new r(function(e){return i.subscribe(e)})}if(a("iterator")&&(n=h(t,u)))return new r(function(e){m(function(){if(!e.closed){var r=!0,i=!1,o=void 0;try{for(var a,s=n.call(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}e.complete()}})});if(Array.isArray(t))return new r(function(e){m(function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}})});throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)(function(e){m(function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}})})}},{key:l,get:function(){return this}}]),e}();t.Observable=R,o()&&Object.defineProperty(R,Symbol("extensions"),{value:{symbol:c,hostReportError:d},configurable:!0})},6695:e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,c=-1,l=r.length,h=t(a-u,0),f=Array(h+l),p=!i;++o<h;)f[o]=e[o];for(var d=o;++c<l;)f[d+c]=r[c];for(;++s<u;)(p||o<a)&&(f[d+n[s]]=e[o++]);return f}},6766:(e,t,r)=>{var n=r(2405),i=r(8341),o=r(9644),a=r(3784),s=r(6264);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},6821:e=>{e.exports=function(){this.__data__=[],this.size=0}},6881:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},6965:(e,t,r)=>{var n=r(9169),i=r(5390),o=r(3232);e.exports=function(e,t){return o(i(e,t,n),e+"")}},7012:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},7020:(e,t,r)=>{"use strict";e.exports=r(5360)},7125:e=>{"use strict";e.exports=i},7156:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},7201:e=>{e.exports=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}},7221:(e,t,r)=>{var n=r(9438),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},7434:e=>{"use strict";e.exports=n},7477:(e,t,r)=>{var n=r(1200);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},7524:(e,t,r)=>{var n=r(4757),i=r(6695),o=r(6172),a=r(3256),s=r(2972),u=r(3510),c=r(6619),l=r(4153),h=r(714);e.exports=function e(t,r,f,p,d,m,y,v,g,b){var w=128&r,E=1&r,R=2&r,S=24&r,k=512&r,x=R?void 0:a(t);return function O(){for(var T=arguments.length,I=Array(T),_=T;_--;)I[_]=arguments[_];if(S)var A=u(O),P=o(I,A);if(p&&(I=n(I,p,d,S)),m&&(I=i(I,m,y,S)),T-=P,S&&T<b){var C=l(I,A);return s(t,r,e,O.placeholder,f,I,C,v,g,b-T)}var N=E?f:this,q=R?N[t]:t;return T=I.length,v?I=c(I,v):k&&T>1&&I.reverse(),w&&g<T&&(I.length=g),this&&this!==h&&this instanceof O&&(q=x||a(q)),q.apply(N,I)}}},7559:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},7583:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},7639:(e,t,r)=>{var n=r(5103),i=r(9400),o=r(975),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},7787:(e,t,r)=>{var n=r(5271),i=r(9400);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},7798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=o(r(3743)),i=o(r(9263));function o(e){return e&&e.__esModule?e:{default:e}}},7827:(e,t,r)=>{var n,i=r(6450),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},8023:(e,t)=>{"use strict";function r(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function n(e){for(var t,r=!0,n=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:r=!1,n=!0,i=0;break;case 9:case 32:++i;break;default:n&&!r&&(null===o||i<o)&&(o=i),n=!1}return null!==(t=o)&&void 0!==t?t:0}Object.defineProperty(t,"__esModule",{value:!0}),t.dedentBlockStringValue=function(e){var t=e.split(/\r\n|[\n\r]/g),i=n(e);if(0!==i)for(var o=1;o<t.length;o++)t[o]=t[o].slice(i);for(var a=0;a<t.length&&r(t[a]);)++a;for(var s=t.length;s>a&&r(t[s-1]);)--s;return t.slice(a,s).join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!n||o||a||r,u="";return!s||n&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}},8071:(e,t,r)=>{var n=r(9006),i=r(2275),o=r(5874),a=r(975),s=n?n.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},8110:e=>{"use strict";e.exports=t},8136:e=>{var t=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var n=e.match(t);return n?n[1].split(r):[]}},8154:(e,t,r)=>{var n=r(4671)(r(714),"WeakMap");e.exports=n},8255:(e,t,r)=>{var n=r(1095),i=r(2750);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},8265:(e,t,r)=>{var n=r(7639),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8295:e=>{e.exports=function(e){return function(){return e}}},8306:e=>{e.exports=function(e){return e!=e}},8337:(e,t,r)=>{var n=r(2409),i=r(3493),o=r(4361);e.exports=function(e){return i(e)?o(e):n(e)}},8341:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},8402:(e,t,r)=>{var n=r(8506);e.exports=function(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}},8487:(e,t,r)=>{var n=r(8910);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},8506:(e,t,r)=>{var n=r(166),i=r(8306),o=r(638);e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},8581:(e,t,r)=>{var n=r(1400),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],o=i.call(n,t)?r.length:0;o--;){var a=r[o],s=a.func;if(null==s||s==e)return a.name}return t}},8637:(e,t,r)=>{var n=r(4671)(Object,"create");e.exports=n},8820:(e,t,r)=>{var n=r(1095),i=r(2750);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},8910:(e,t,r)=>{var n=r(4069),i=r(7477),o=r(476),a=r(984),s=r(4136);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},8973:(e,t,r)=>{var n=r(8255),i=r(8820),o=r(2750),a=r(5874),s=r(7583),u=r(4822),c=Object.prototype.hasOwnProperty;function l(e){if(s(e)&&!a(e)&&!(e instanceof n)){if(e instanceof i)return e;if(c.call(e,"__wrapped__"))return u(e)}return new i(e)}l.prototype=o.prototype,l.prototype.constructor=l,e.exports=l},9006:(e,t,r)=>{var n=r(714).Symbol;e.exports=n},9169:e=>{e.exports=function(e){return e}},9182:(e,t,r)=>{var n=r(330),i=r(7787),o=r(9628);e.exports=function(e,t,r){var a=-1,s=(t=n(t,e)).length;for(s||(s=1,e=void 0);++a<s;){var u=null==e?void 0:e[o(t[a])];void 0===u&&(a=s,u=r),e=i(u)?u.call(e):u}return e}},9263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},9298:(e,t,r)=>{var n=r(1683),i=r(5733),o=r(5639),a=r(7524),s=r(809),u=r(2176),c=r(656),l=r(4676),h=r(2992),f=r(3758),p=Math.max;e.exports=function(e,t,r,d,m,y,v,g){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var w=d?d.length:0;if(w||(t&=-97,d=m=void 0),v=void 0===v?v:p(f(v),0),g=void 0===g?g:f(g),w-=m?m.length:0,64&t){var E=d,R=m;d=m=void 0}var S=b?void 0:u(e),k=[e,t,r,d,m,E,R,y,v,g];if(S&&c(k,S),e=k[0],t=k[1],r=k[2],d=k[3],m=k[4],!(g=k[9]=void 0===k[9]?b?0:e.length:p(k[9]-w,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?o(e,t,g):32!=t&&33!=t||m.length?a.apply(void 0,k):s(e,t,r,d);else var x=i(e,t,r);return h((S?n:l)(x,k),e,t)}},9400:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},9438:(e,t,r)=>{var n=r(5097);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},9505:(e,t,r)=>{var n=r(2121),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)}),t});e.exports=a},9628:(e,t,r)=>{var n=r(975);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},9644:(e,t,r)=>{var n=r(8637),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},9650:(e,t,r)=>{var n=r(9006),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},9859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return u(e,[])};var n,i=(n=r(9263))&&n.__esModule?n:{default:n};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a=10,s=2;function u(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:u(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var r=Math.min(a,e.length),n=e.length-r,i=[],o=0;o<r;++o)i.push(u(e[o],t));return 1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>s?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map(function(r){return r+": "+u(e[r],t)}).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},9893:(e,t,r)=>{var n=r(7012),i=r(128),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return n(o,function(r){var n="_."+r[0];t&r[1]&&!i(e,n)&&e.push(n)}),e.sort()}}},s={};function u(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(r.exports,r,r.exports,u),r.loaded=!0,r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};return(()=>{"use strict";u.d(c,{DecapCmsBackendGithub:()=>Es});var e,t,r=u(4276),n=u.n(r),i=u(1467),o=u.n(i),a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=(e=["",""],t=["",""],Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),l=function(){function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return"function"==typeof e?t.interimTag.bind(t,e):"string"==typeof e?t.transformEndResult(e):(e=e.map(t.transformString.bind(t)),t.transformEndResult(e.reduce(t.processSubstitutions.bind(t,n))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map(function(e){return"function"==typeof e?e():e}),this.tag}return a(e,[{key:"interimTag",value:function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return this.tag(s,e.apply(void 0,[t].concat(n)))}},{key:"processSubstitutions",value:function(e,t,r){var n=this.transformSubstitution(e.shift(),t);return"".concat(t,n,r)}},{key:"transformString",value:function(e){return this.transformers.reduce(function(e,t){return t.onString?t.onString(e):e},e)}},{key:"transformSubstitution",value:function(e,t){return this.transformers.reduce(function(e,r){return r.onSubstitution?r.onSubstitution(e,t):e},e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce(function(e,t){return t.onEndResult?t.onEndResult(e):e},e)}}]),e}();const h=l;var f={separator:"",conjunction:"",serial:!1};const p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;return{onSubstitution:function(t,r){if(Array.isArray(t)){var n=t.length,i=e.separator,o=e.conjunction,a=e.serial,s=r.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(i+s[1]):t.join(i+" "),o&&n>1){var u=t.lastIndexOf(i);t=t.slice(0,u)+(a?i:"")+" "+o+t.slice(u+1)}}return t}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var r=t.match(/^[^\S\n]*(?=\S)/gm),n=r&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r.map(function(e){return e.length})));if(n){var i=new RegExp("^.{"+n+"}","gm");return t.replace(i,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};new h(p({separator:","}),d,m),new h(p({separator:",",conjunction:"and"}),d,m),new h(p({separator:",",conjunction:"or"}),d,m);const y=function(e){return{onSubstitution:function(t,r){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}};var v=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new h(y("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(v):v(e)?e:""}}},p,d,m);const g=function(e,t){return{onSubstitution:function(r,n){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==r?r:r.toString().replace(e,t)}}};new h(y("\n"),p,d,m,g(/&/g,"&amp;"),g(/</g,"&lt;"),g(/>/g,"&gt;"),g(/"/g,"&quot;"),g(/'/g,"&#x27;"),g(/`/g,"&#x60;"));const b=function(e,t){return{onEndResult:function(r){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return r.replace(e,t)}}},w=new h(b(/(?:\n(?:\s*))+/g," "),m);new h(b(/(?:\n\s*)/g,""),m),new h(p({separator:","}),b(/(?:\s+)/g," "),m),new h(p({separator:",",conjunction:"or"}),b(/(?:\s+)/g," "),m),new h(p({separator:",",conjunction:"and"}),b(/(?:\s+)/g," "),m),new h(p,d,m),new h(p,b(/(?:\s+)/g," "),m);const E=new h(d,m);new h(d("all"),m);var R=u(3135);function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(null,arguments)}var k=u(8110),x={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function O(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var T=/[A-Z]|^ms/g,I=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_=function(e){return 45===e.charCodeAt(1)},A=function(e){return null!=e&&"boolean"!=typeof e},P=O(function(e){return _(e)?e:e.replace(T,"-$&").toLowerCase()}),C=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(I,function(e,t,r){return q={name:t,styles:r,next:q},t})}return 1===x[e]||_(e)||"number"!=typeof t||0===t?t:t+"px"};function N(e,t,r){if(null==r)return"";var n=r;if(void 0!==n.__emotion_styles)return n;switch(typeof r){case"boolean":return"";case"object":var i=r;if(1===i.anim)return q={name:i.name,styles:i.styles,next:q},i.name;var o=r;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)q={name:a.name,styles:a.styles,next:q},a=a.next;return o.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=N(e,t,r[i])+";";else for(var o in r){var a=r[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?n+=o+"{"+t[s]+"}":A(s)&&(n+=P(o)+":"+C(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var u=N(e,t,a);switch(o){case"animation":case"animationName":n+=P(o)+":"+u+";";break;default:n+=o+"{"+u+"}"}}else for(var c=0;c<a.length;c++)A(a[c])&&(n+=P(o)+":"+C(o,a[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var s=q,u=r(e);return q=s,N(e,t,u)}}var c=r;if(null==t)return c;var l=t[c];return void 0!==l?l:c}var q,F=/label:\s*([^\s;{]+)\s*(;|$)/g;function D(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,i="";q=void 0;var o=e[0];null==o||void 0===o.raw?(n=!1,i+=N(r,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=N(r,t,e[a]),n&&(i+=o[a]);F.lastIndex=0;for(var s,u="";null!==(s=F.exec(i));)u+="-"+s[1];var c=function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+u;return{name:c,styles:i,next:q}}var L=u(4119),$=!!L.useInsertionEffect&&L.useInsertionEffect,B=$||function(e){return e()};function U(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]+";"):r&&(n+=r+" ")}),n}$||L.useLayoutEffect;var M=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},j=function(e,t,r){M(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}},Q=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,V=O(function(e){return Q.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),z=function(e){return"theme"!==e},K=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?V:z},G=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},W=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return M(t,r,n),B(function(){return j(t,r,n)}),null},H=function e(t,r){var n,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==r&&(n=r.label,i=r.target);var s=G(t,r,o),u=s||K(a),c=!u("as");return function(){var l=arguments,h=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&h.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)h.push.apply(h,l);else{var f=l[0];h.push(f[0]);for(var p=l.length,d=1;d<p;d++)h.push(l[d],f[d])}var m=(0,k.withEmotionCache)(function(e,t,r){var n=c&&e.as||a,o="",l=[],f=e;if(null==e.theme){for(var p in f={},e)f[p]=e[p];f.theme=L.useContext(k.ThemeContext)}"string"==typeof e.className?o=U(t.registered,l,e.className):null!=e.className&&(o=e.className+" ");var d=D(h.concat(l),t.registered,f);o+=t.key+"-"+d.name,void 0!==i&&(o+=" "+i);var m=c&&void 0===s?K(n):u,y={};for(var v in e)c&&"as"===v||m(v)&&(y[v]=e[v]);return y.className=o,r&&(y.ref=r),L.createElement(L.Fragment,null,L.createElement(W,{cache:t,serialized:d,isStringTag:"string"==typeof n}),L.createElement(n,y))});return m.displayName=void 0!==n?n:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=h,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,n){return e(t,S({},r,n,{shouldForwardProp:G(m,n,!0)})).apply(void 0,h)},m}},J=u(7434),Y=u.n(J),X=u(7125),Z=u(6171),ee=u(5270),te=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),re=Math.abs,ne=String.fromCharCode,ie=Object.assign;function oe(e){return e.trim()}function ae(e,t,r){return e.replace(t,r)}function se(e,t){return e.indexOf(t)}function ue(e,t){return 0|e.charCodeAt(t)}function ce(e,t,r){return e.slice(t,r)}function le(e){return e.length}function he(e){return e.length}function fe(e,t){return t.push(e),e}var pe=1,de=1,me=0,ye=0,ve=0,ge="";function be(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:pe,column:de,length:a,return:""}}function we(e,t){return ie(be("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ee(){return ve=ye>0?ue(ge,--ye):0,de--,10===ve&&(de=1,pe--),ve}function Re(){return ve=ye<me?ue(ge,ye++):0,de++,10===ve&&(de=1,pe++),ve}function Se(){return ue(ge,ye)}function ke(){return ye}function xe(e,t){return ce(ge,e,t)}function Oe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Te(e){return pe=de=1,me=le(ge=e),ye=0,[]}function Ie(e){return ge="",e}function _e(e){return oe(xe(ye-1,Ce(91===e?e+2:40===e?e+1:e)))}function Ae(e){for(;(ve=Se())&&ve<33;)Re();return Oe(e)>2||Oe(ve)>3?"":" "}function Pe(e,t){for(;--t&&Re()&&!(ve<48||ve>102||ve>57&&ve<65||ve>70&&ve<97););return xe(e,ke()+(t<6&&32==Se()&&32==Re()))}function Ce(e){for(;Re();)switch(ve){case e:return ye;case 34:case 39:34!==e&&39!==e&&Ce(ve);break;case 40:41===e&&Ce(e);break;case 92:Re()}return ye}function Ne(e,t){for(;Re()&&e+ve!==57&&(e+ve!==84||47!==Se()););return"/*"+xe(t,ye-1)+"*"+ne(47===e?e:Re())}function qe(e){for(;!Oe(Se());)Re();return xe(e,ye)}var Fe="-ms-",De="-moz-",Le="-webkit-",$e="comm",Be="rule",Ue="decl",Me="@keyframes";function je(e,t){for(var r="",n=he(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function Qe(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Ue:return e.return=e.return||e.value;case $e:return"";case Me:return e.return=e.value+"{"+je(e.children,n)+"}";case Be:e.value=e.props.join(",")}return le(r=je(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ve(e){return Ie(ze("",null,null,null,[""],e=Te(e),0,[0],e))}function ze(e,t,r,n,i,o,a,s,u){for(var c=0,l=0,h=a,f=0,p=0,d=0,m=1,y=1,v=1,g=0,b="",w=i,E=o,R=n,S=b;y;)switch(d=g,g=Re()){case 40:if(108!=d&&58==ue(S,h-1)){-1!=se(S+=ae(_e(g),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:S+=_e(g);break;case 9:case 10:case 13:case 32:S+=Ae(d);break;case 92:S+=Pe(ke()-1,7);continue;case 47:switch(Se()){case 42:case 47:fe(Ge(Ne(Re(),ke()),t,r),u);break;default:S+="/"}break;case 123*m:s[c++]=le(S)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+l:-1==v&&(S=ae(S,/\f/g,"")),p>0&&le(S)-h&&fe(p>32?We(S+";",n,r,h-1):We(ae(S," ","")+";",n,r,h-2),u);break;case 59:S+=";";default:if(fe(R=Ke(S,t,r,c,l,i,s,b,w=[],E=[],h),o),123===g)if(0===l)ze(S,t,R,R,w,o,h,s,E);else switch(99===f&&110===ue(S,3)?100:f){case 100:case 108:case 109:case 115:ze(e,R,R,n&&fe(Ke(e,R,R,0,0,i,s,b,i,w=[],h),E),i,E,h,s,n?w:E);break;default:ze(S,R,R,R,[""],E,0,s,E)}}c=l=p=0,m=v=1,b=S="",h=a;break;case 58:h=1+le(S),p=d;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==Ee())continue;switch(S+=ne(g),g*m){case 38:v=l>0?1:(S+="\f",-1);break;case 44:s[c++]=(le(S)-1)*v,v=1;break;case 64:45===Se()&&(S+=_e(Re())),f=Se(),l=h=le(b=S+=qe(ke())),g++;break;case 45:45===d&&2==le(S)&&(m=0)}}return o}function Ke(e,t,r,n,i,o,a,s,u,c,l){for(var h=i-1,f=0===i?o:[""],p=he(f),d=0,m=0,y=0;d<n;++d)for(var v=0,g=ce(e,h+1,h=re(m=a[d])),b=e;v<p;++v)(b=oe(m>0?f[v]+" "+g:ae(g,/&\f/g,f[v])))&&(u[y++]=b);return be(e,t,r,0===i?Be:s,u,c,l)}function Ge(e,t,r){return be(e,t,r,$e,ne(ve),ce(e,2,-2),0)}function We(e,t,r,n){return be(e,t,r,Ue,ce(e,0,n),ce(e,n+1,-1),n)}var He=function(e,t,r){for(var n=0,i=0;n=i,i=Se(),38===n&&12===i&&(t[r]=1),!Oe(i);)Re();return xe(e,ye)},Je=new WeakMap,Ye=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Je.get(r))&&!n){Je.set(e,!0);for(var i=[],o=function(e,t){return Ie(function(e,t){var r=-1,n=44;do{switch(Oe(n)){case 0:38===n&&12===Se()&&(t[r]=1),e[r]+=He(ye-1,t,r);break;case 2:e[r]+=_e(n);break;case 4:if(44===n){e[++r]=58===Se()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=ne(n)}}while(n=Re());return e}(Te(e),t))}(t,i),a=r.props,s=0,u=0;s<o.length;s++)for(var c=0;c<a.length;c++,u++)e.props[u]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},Xe=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Ze(e,t){switch(function(e,t){return 45^ue(e,0)?(((t<<2^ue(e,0))<<2^ue(e,1))<<2^ue(e,2))<<2^ue(e,3):0}(e,t)){case 5103:return Le+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Le+e+De+e+Fe+e+e;case 6828:case 4268:return Le+e+Fe+e+e;case 6165:return Le+e+Fe+"flex-"+e+e;case 5187:return Le+e+ae(e,/(\w+).+(:[^]+)/,Le+"box-$1$2"+Fe+"flex-$1$2")+e;case 5443:return Le+e+Fe+"flex-item-"+ae(e,/flex-|-self/,"")+e;case 4675:return Le+e+Fe+"flex-line-pack"+ae(e,/align-content|flex-|-self/,"")+e;case 5548:return Le+e+Fe+ae(e,"shrink","negative")+e;case 5292:return Le+e+Fe+ae(e,"basis","preferred-size")+e;case 6060:return Le+"box-"+ae(e,"-grow","")+Le+e+Fe+ae(e,"grow","positive")+e;case 4554:return Le+ae(e,/([^-])(transform)/g,"$1"+Le+"$2")+e;case 6187:return ae(ae(ae(e,/(zoom-|grab)/,Le+"$1"),/(image-set)/,Le+"$1"),e,"")+e;case 5495:case 3959:return ae(e,/(image-set\([^]*)/,Le+"$1$`$1");case 4968:return ae(ae(e,/(.+:)(flex-)?(.*)/,Le+"box-pack:$3"+Fe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Le+e+e;case 4095:case 3583:case 4068:case 2532:return ae(e,/(.+)-inline(.+)/,Le+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(le(e)-1-t>6)switch(ue(e,t+1)){case 109:if(45!==ue(e,t+4))break;case 102:return ae(e,/(.+:)(.+)-([^]+)/,"$1"+Le+"$2-$3$1"+De+(108==ue(e,t+3)?"$3":"$2-$3"))+e;case 115:return~se(e,"stretch")?Ze(ae(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ue(e,t+1))break;case 6444:switch(ue(e,le(e)-3-(~se(e,"!important")&&10))){case 107:return ae(e,":",":"+Le)+e;case 101:return ae(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Le+(45===ue(e,14)?"inline-":"")+"box$3$1"+Le+"$2$3$1"+Fe+"$2box$3")+e}break;case 5936:switch(ue(e,t+11)){case 114:return Le+e+Fe+ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Le+e+Fe+ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Le+e+Fe+ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Le+e+Fe+e+e}return e}var et=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Ue:e.return=Ze(e.value,e.length);break;case Me:return je([we(e,{value:ae(e.value,"@","@"+Le)})],n);case Be:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return je([we(e,{props:[ae(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return je([we(e,{props:[ae(t,/:(plac\w+)/,":"+Le+"input-$1")]}),we(e,{props:[ae(t,/:(plac\w+)/,":-moz-$1")]}),we(e,{props:[ae(t,/:(plac\w+)/,Fe+"input-$1")]})],n)}return""})}}],tt=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var n,i,o=e.stylisPlugins||et,a={},s=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)a[t[r]]=!0;s.push(e)});var u,c,l,h,f=[Qe,(h=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&h(e)})],p=(c=[Ye,Xe].concat(o,f),l=he(c),function(e,t,r,n){for(var i="",o=0;o<l;o++)i+=c[o](e,t,r,n)||"";return i});i=function(e,t,r,n){u=r,je(Ve(e?e+"{"+t.styles+"}":t.styles),p),n&&(d.inserted[t.name]=!0)};var d={key:t,sheet:new te({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return d.sheet.hydrate(s),d},rt=L.createContext("undefined"!=typeof HTMLElement?tt({key:"css"}):null),nt=(rt.Provider,function(e){return(0,L.forwardRef)(function(t,r){var n=(0,L.useContext)(rt);return e(t,n,r)})}),it=L.createContext({}),ot={}.hasOwnProperty,at="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",st=function(e,t){var r={};for(var n in t)ot.call(t,n)&&(r[n]=t[n]);return r[at]=e,r},ut=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return M(t,r,n),B(function(){return j(t,r,n)}),null},ct=nt(function(e,t,r){var n=e.css;"string"==typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var i=e[at],o=[n],a="";"string"==typeof e.className?a=U(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=D(o,void 0,L.useContext(it));a+=t.key+"-"+s.name;var u={};for(var c in e)ot.call(e,c)&&"css"!==c&&c!==at&&(u[c]=e[c]);return u.className=a,r&&(u.ref=r),L.createElement(L.Fragment,null,L.createElement(ut,{cache:t,serialized:s,isStringTag:"string"==typeof i}),L.createElement(i,u))}),lt=(u(4674),ee.Fragment,function(e,t,r){return ot.call(t,"css")?ee.jsx(ct,st(e,t),r):ee.jsx(e,t,r)}),ht=function(e,t,r){return ot.call(t,"css")?ee.jsxs(ct,st(e,t),r):ee.jsxs(e,t,r)};const ft=H(Z.Icon,{target:"e1ko648l2",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"}),pt=H("div",{target:"e1ko648l1",label:"ForkApprovalContainer"})({name:"13alw87",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;flex-grow:0.2"}),dt=H("div",{target:"e1ko648l0",label:"ForkButtonsContainer"})({name:"125bg8c",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;align-items:center"});class mt extends L.Component{static propTypes={onLogin:Y().func.isRequired,inProgress:Y().bool,base_url:Y().string,siteId:Y().string,authEndpoint:Y().string,config:Y().object.isRequired,clearHash:Y().func,t:Y().func.isRequired};state={};componentDidMount(){Y().checkPropTypes(mt.propTypes,this.props,"prop","GitHubAuthenticationPage")}getPermissionToFork=()=>new Promise((e,t)=>{this.setState({requestingFork:!0,approveFork:()=>{this.setState({requestingFork:!1}),e()},refuseFork:()=>{this.setState({requestingFork:!1}),t()}})});loginWithOpenAuthoring(e){const{backend:t}=this.props;return this.setState({findingFork:!0}),t.authenticateWithFork({userData:e,getPermissionToFork:this.getPermissionToFork}).catch(e=>{throw this.setState({findingFork:!1}),console.error(e),e})}handleLogin=e=>{e.preventDefault();const t={base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"demo.decapcms.org":this.props.siteId,auth_endpoint:this.props.authEndpoint},r=new X.NetlifyAuthenticator(t),{open_authoring:n=!1,auth_scope:i=""}=this.props.config.backend,o=i||(n?"public_repo":"repo");r.authenticate({provider:"github",scope:o},(e,t)=>{if(!e)return n?this.loginWithOpenAuthoring(t).then(()=>this.props.onLogin(t)):void this.props.onLogin(t);this.setState({loginError:e.toString()})})};renderLoginButton=()=>{const{inProgress:e,t}=this.props;return e||this.state.findingFork?t("auth.loggingIn"):ht(L.Fragment,{children:[lt(ft,{type:"github"}),t("auth.loginWithGitHub")]})};getAuthenticationPageRenderArgs(){const{requestingFork:e}=this.state;if(e){const{approveFork:e,refuseFork:t}=this.state;return{renderPageContent:({LoginButton:r,TextButton:n,showAbortButton:i})=>ht(pt,{children:[lt("p",{children:"Open Authoring is enabled: we need to use a fork on your github account. (If a fork already exists, we'll use that.)"}),ht(dt,{children:[lt(r,{onClick:e,children:"Fork the repo"}),i&&lt(n,{onClick:t,children:"Don't fork the repo"})]})]})}}return{renderButtonContent:this.renderLoginButton}}render(){const{inProgress:e,config:t,t:r}=this.props,{loginError:n,requestingFork:i,findingFork:o}=this.state;return lt(Z.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e||o||i,loginErrorMessage:n,logoUrl:t.logo_url,logo:t.logo,siteUrl:t.site_url,...this.getAuthenticationPageRenderArgs(),t:r})}}var yt=u(6533).hp;const vt="3.7.5",gt=vt,bt="function"==typeof atob,wt="function"==typeof btoa,Et="function"==typeof yt,Rt="function"==typeof TextDecoder?new TextDecoder:void 0,St="function"==typeof TextEncoder?new TextEncoder:void 0,kt=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),xt=(e=>{let t={};return e.forEach((e,r)=>t[e]=r),t})(kt),Ot=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Tt=String.fromCharCode.bind(String),It="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),_t=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),At=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Pt=e=>{let t,r,n,i,o="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=kt[t>>18&63]+kt[t>>12&63]+kt[t>>6&63]+kt[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},Ct=wt?e=>btoa(e):Et?e=>yt.from(e,"binary").toString("base64"):Pt,Nt=Et?e=>yt.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(Tt.apply(null,e.subarray(r,r+4096)));return Ct(t.join(""))},qt=(e,t=!1)=>t?_t(Nt(e)):Nt(e),Ft=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Tt(192|t>>>6)+Tt(128|63&t):Tt(224|t>>>12&15)+Tt(128|t>>>6&63)+Tt(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Tt(240|t>>>18&7)+Tt(128|t>>>12&63)+Tt(128|t>>>6&63)+Tt(128|63&t)},Dt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Lt=e=>e.replace(Dt,Ft),$t=Et?e=>yt.from(e,"utf8").toString("base64"):St?e=>Nt(St.encode(e)):e=>Ct(Lt(e)),Bt=(e,t=!1)=>t?_t($t(e)):$t(e),Ut=e=>Bt(e,!0),Mt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,jt=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Tt((t>>>10)+55296)+Tt(56320+(1023&t));case 3:return Tt((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Tt((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Qt=e=>e.replace(Mt,jt),Vt=e=>{if(e=e.replace(/\s+/g,""),!Ot.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,i="";for(let o=0;o<e.length;)t=xt[e.charAt(o++)]<<18|xt[e.charAt(o++)]<<12|(r=xt[e.charAt(o++)])<<6|(n=xt[e.charAt(o++)]),i+=64===r?Tt(t>>16&255):64===n?Tt(t>>16&255,t>>8&255):Tt(t>>16&255,t>>8&255,255&t);return i},zt=bt?e=>atob(At(e)):Et?e=>yt.from(e,"base64").toString("binary"):Vt,Kt=Et?e=>It(yt.from(e,"base64")):e=>It(zt(e).split("").map(e=>e.charCodeAt(0))),Gt=e=>Kt(Ht(e)),Wt=Et?e=>yt.from(e,"base64").toString("utf8"):Rt?e=>Rt.decode(Kt(e)):e=>Qt(zt(e)),Ht=e=>At(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),Jt=e=>Wt(Ht(e)),Yt=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Xt=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Yt(t));e("fromBase64",function(){return Jt(this)}),e("toBase64",function(e){return Bt(this,e)}),e("toBase64URI",function(){return Bt(this,!0)}),e("toBase64URL",function(){return Bt(this,!0)}),e("toUint8Array",function(){return Gt(this)})},Zt=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Yt(t));e("toBase64",function(e){return qt(this,e)}),e("toBase64URI",function(){return qt(this,!0)}),e("toBase64URL",function(){return qt(this,!0)})},er={version:vt,VERSION:gt,atob:zt,atobPolyfill:Vt,btoa:Ct,btoaPolyfill:Pt,fromBase64:Jt,toBase64:Bt,encode:Bt,encodeURI:Ut,encodeURL:Ut,utob:Lt,btou:Qt,decode:Jt,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:qt,toUint8Array:Gt,extendString:Xt,extendUint8Array:Zt,extendBuiltins:()=>{Xt(),Zt()}};var tr=u(5095),rr=u.n(tr),nr=u(5179),ir=u.n(nr),or=u(6270),ar=u.n(or),sr=u(9182),ur=u.n(sr),cr=u(6559),lr=u.n(cr),hr=u(3078);const fr="GitHub",{fetchWithTimeout:pr}=R.unsentRequest,dr=-1;var mr=function(e){return e.Error="error",e.Failure="failure",e.Pending="pending",e.Success="success",e}(mr||{});let yr=function(e){return e.Open="open",e.Closed="closed",e.All="all",e}({});function vr(e,t){return e.labels.some(e=>(0,R.isCMSLabel)(e.name,t))}function gr(e){return e.reduce((e,t)=>("removed"===t.status?e.push({sha:null,path:t.filename}):"renamed"===t.status?(e.push({sha:null,path:t.previous_filename}),e.push({sha:t.sha,path:t.filename})):e.push({sha:t.sha,path:t.filename}),e),[])}let br=!1;class wr{constructor(e){this.apiRoot=e.apiRoot||"https://api.github.com",this.token=e.token||"",this.tokenKeyword=e.tokenKeyword||"token",this.branch=e.branch||"master",this.useOpenAuthoring=e.useOpenAuthoring,this.repo=e.repo||"",this.originRepo=e.originRepo||this.repo,this.repoURL=`/repos/${this.repo}`,this.originRepoURL=`/repos/${this.originRepo}`;const[t,r]=[this.repo.split("/"),this.originRepo.split("/")];this.repoOwner=t[0],this.repoName=t[1],this.originRepoOwner=r[0],this.originRepoName=r[1],this.mergeMethod=e.squashMerges?"squash":"merge",this.cmsLabelPrefix=e.cmsLabelPrefix,this.initialWorkflowStatus=e.initialWorkflowStatus,this.baseUrl=e.baseUrl,this.getUser=e.getUser}static DEFAULT_COMMIT_MESSAGE="Automatically generated by Decap CMS";user(){return this._userPromise||(this._userPromise=this.getUser({token:this.token})),this._userPromise.then(e=>({name:e.name||"Unknown",login:e.login,email:e.email??void 0}))}async hasWriteAccess(){try{const e=await this.request(this.repoURL);return this.repoOwner=e.owner.login,e.permissions?.push??!1}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}reset(){}requestHeaders(e={}){const t={"Content-Type":"application/json; charset=utf-8",...e};return this.token?(t.Authorization=`${this.tokenKeyword} ${this.token}`,Promise.resolve(t)):Promise.resolve(t)}parseJsonResponse(e){return e.json().then(t=>e.ok?t:Promise.reject(t))}urlFor(e,t){const r=[];if(t.params)for(const e in t.params)r.push(`${e}=${encodeURIComponent(t.params[e])}`);return r.length&&(e+=`?${r.join("&")}`),this.apiRoot+e}parseResponse(e){const t=e.headers.get("Content-Type");return t&&t.match(/json/)?this.parseJsonResponse(e):e.text().then(t=>e.ok?t:Promise.reject(t))}handleRequestError(e,t){throw new R.APIError(e.message,t,fr)}buildRequest(e){return e}async request(e,t={},r=e=>this.parseResponse(e)){t={cache:"no-cache",...t};const n=await this.requestHeaders(t.headers||{}),i=this.urlFor(e,t);let o=500;try{const e=R.unsentRequest.fromFetchArguments(i,{...t,headers:n}),a=await(0,R.requestWithBackoff)(this,e);return o=a.status,await r(a)}catch(e){return this.handleRequestError(e,o)}}nextUrlProcessor(){return e=>e}async requestAllPages(e,t={}){t={cache:"no-cache",...t};const r=await this.requestHeaders(t.headers||{}),n=this.urlFor(e,t),i=await(0,R.getAllResponses)(n,{...t,headers:r},"next",this.nextUrlProcessor()),o=await Promise.all(i.map(e=>this.parseResponse(e)));return[].concat(...o)}generateContentKey(e,t){const r=(0,R.generateContentKey)(e,t);return this.useOpenAuthoring?`${this.repo}/${r}`:r}parseContentKey(e){return this.useOpenAuthoring?(0,R.parseContentKey)(e.slice(this.repo.length+1)):(0,R.parseContentKey)(e)}checkMetadataRef(){return this.request(`${this.repoURL}/git/refs/meta/_decap_cms`).then(e=>e.object).catch(()=>this.uploadBlob({raw:"# Decap CMS\n\nThis tree is used by the Decap CMS to store metadata information for specific files and branches."}).then(e=>this.request(`${this.repoURL}/git/trees`,{method:"POST",body:JSON.stringify({tree:[{path:"README.md",mode:"100644",type:"blob",sha:e.sha}]})})).then(e=>this.commit("First Commit",e)).then(e=>this.createRef("meta","_decap_cms",e.sha)).then(e=>e.object))}async storeMetadata(e,t){return this._metadataSemaphore||(this._metadataSemaphore=n()(1)),new Promise((r,n)=>this._metadataSemaphore?.take(async()=>{try{const n=await this.checkMetadataRef(),i={path:`${e}.json`,raw:JSON.stringify(t)};await this.uploadBlob(i);const o=await this.updateTree(n.sha,[i]),{sha:a}=await this.commit(`Updating “${e}” metadata`,o);await this.patchRef("meta","_decap_cms",a),await R.localForage.setItem(`gh.meta.${e}`,{expires:Date.now()+3e5,data:t}),this._metadataSemaphore?.leave(),r()}catch(e){n(e)}}))}deleteMetadata(e){return this._metadataSemaphore||(this._metadataSemaphore=n()(1)),new Promise(t=>this._metadataSemaphore?.take(async()=>{try{const r=await this.checkMetadataRef(),n={path:`${e}.json`,sha:null},i=await this.updateTree(r.sha,[n]),{sha:o}=await this.commit(`Deleting “${e}” metadata`,i);await this.patchRef("meta","_decap_cms",o),this._metadataSemaphore?.leave(),t()}catch(e){this._metadataSemaphore?.leave(),t()}}))}async retrieveMetadataOld(e){console.log("%c Checking for MetaData files","line-height: 30px;text-align: center;font-weight: bold");const t={params:{ref:"refs/meta/_decap_cms"},headers:{Accept:"application/vnd.github.v3.raw"}};function r(t){throw"Not Found"===t.message&&console.log("%c %s does not have metadata","line-height: 30px;text-align: center;font-weight: bold",e),t}if(!this.useOpenAuthoring)return await this.request(`${this.repoURL}/contents/${e}.json`,t).then(e=>JSON.parse(e)).catch(r);const[n,i]=e.split("/");return this.request(`/repos/${n}/${i}/contents/${e}.json`,t).then(e=>JSON.parse(e)).catch(r)}async getPullRequests(e,t,r){return(await this.requestAllPages(`${this.originRepoURL}/pulls`,{params:{...e?{head:await this.getHeadReference(e)}:{},base:this.branch,state:t,per_page:100}})).filter(e=>e.head.ref.startsWith(`${R.CMS_BRANCH_PREFIX}/`)&&r(e))}async getOpenAuthoringPullRequest(e,t){const r=await this.getBranch(e).catch(()=>{throw new R.EditorialWorkflowError("content is not under editorial workflow",!0)}),n=t.filter(e=>e.head.sha===r.commit.sha)[0];if(n){n.labels=n.labels.filter(e=>!(0,R.isCMSLabel)(e.name,this.cmsLabelPrefix));const e=n.state===yr.Closed?{name:(0,R.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}:{name:(0,R.statusToLabel)("pending_review",this.cmsLabelPrefix)};return n.labels.push(e),n}try{return{head:{sha:r.commit.sha},number:dr,labels:[{name:(0,R.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}],state:yr.Open}}catch(e){throw new R.EditorialWorkflowError("content is not under editorial workflow",!0)}}async getBranchPullRequest(e){if(this.useOpenAuthoring){const t=await this.getPullRequests(e,yr.All,()=>!0);return this.getOpenAuthoringPullRequest(e,t)}{const t=await this.getPullRequests(e,yr.Open,e=>vr(e,this.cmsLabelPrefix));if(t.length<=0)throw new R.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}}async getPullRequestCommits(e){if(e===dr)return[];try{return await this.request(`${this.originRepoURL}/pulls/${e}/commits`)}catch(e){return console.log(e),[]}}async getPullRequestAuthor(e){if(e.user?.login)try{const t=await this.request(`/users/${e.user.login}`);return t.name||t.login}catch{return}}async retrieveUnpublishedEntryData(e){const{collection:t,slug:r}=this.parseContentKey(e),n=(0,R.branchFromContentKey)(e),i=await this.getBranchPullRequest(n),[{files:o},a]=await Promise.all([this.getDifferences(this.branch,i.head.sha),this.getPullRequestAuthor(i)]),s=await Promise.all((o||[]).map(e=>this.diffFromFile(e))),u=i.labels.find(e=>(0,R.isCMSLabel)(e.name,this.cmsLabelPrefix)),c=(0,R.labelToStatus)(u.name,this.cmsLabelPrefix),l=i.updated_at;return{collection:t,slug:r,status:c,diffs:s.map(e=>({path:e.path,newFile:e.newFile,id:e.sha})),updatedAt:l,pullRequestAuthor:a}}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await this.fetchBlobContent({sha:t,repoURL:n,parseText:i})}async readFileMetadata(e,t){const r=await(0,R.readFileMetadata)(t,async()=>{try{const t=await this.request(`${this.originRepoURL}/commits`,{params:{path:e,sha:this.branch}}),{commit:r}=t[0];return{author:r.author?.name||r.author?.email||"",updatedOn:r.author?.date||""}}catch(e){return{author:"",updatedOn:""}}},R.localForage);return r}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){const n=await this.request(`${t}/git/blobs/${e}`,{cache:"force-cache"});if(r)return er.decode(n.content);{const e=er.atob(n.content),t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new Blob([t])}}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={}){const i=lr()(e,"/");try{return(await this.request(`${t}/git/trees/${r}:${i}`,{params:n>1?{recursive:1}:{}})).tree.filter(e=>"blob"===e.type&&e.path&&e.path.split("/").length<=n).map(e=>({type:e.type,id:e.sha,name:(0,R.basename)(e.path),path:`${i}/${e.path}`,size:e.size||0}))}catch(e){if(e&&404===e.status)return console.log("This 404 was expected and handled appropriately."),[];throw e}}filterOpenAuthoringBranches=async e=>{try{const t=await this.getBranchPullRequest(e),{state:r,merged_at:n}=t;return t.number!==dr&&r===yr.Closed&&n?(await this.deleteBranch(e),{branch:e,filter:!1}):{branch:e,filter:!0}}catch(t){return{branch:e,filter:!1}}};async migrateToVersion1(e,t){const r=e.head.ref.slice(4),n=`${t.collection}/${r}`,i=`cms/${n}`;await this.getBranch(i).catch(()=>{})||await this.createBranch(i,e.head.sha);const o=(await this.getPullRequests(i,yr.All,()=>!0))[0]||await this.createPR(e.title,i),a={...t,pr:{number:o.number,head:o.head.sha},branch:i,version:"1"};return await this.storeMetadata(n,a),await this.closePR(e.number),await this.deleteBranch(e.head.ref),await this.deleteMetadata(r),{metadata:a,pullRequest:o}}async migrateToPullRequestLabels(e,t){await this.setPullRequestStatus(e,t.status);const r=e.head.ref.slice(4);await this.deleteMetadata(r)}async migratePullRequest(e,t){const{number:r}=e;console.log(`Migrating Pull Request '${r}' (${t})`);const n=(0,R.contentKeyFromBranch)(e.head.ref);let i=await this.retrieveMetadataOld(n).catch(()=>{});if(!i)return void console.log(`Skipped migrating Pull Request '${r}' (${t})`);let o=r;if(!i.version){console.log(`Migrating Pull Request '${r}' to version 1`);try{({metadata:i,pullRequest:e}=await this.migrateToVersion1(e,i))}catch(e){return console.log(`Failed to migrate Pull Request '${r}' to version 1. See error below.`),void console.error(e)}o=e.number,console.log(`Done migrating Pull Request '${r}' to version 1. New pull request '${o}' created.`)}"1"===i.version&&(console.log(`Migrating Pull Request '${o}' to labels`),await this.migrateToPullRequestLabels(e,i),console.log(`Done migrating Pull Request '${o}' to labels`)),console.log(`Done migrating Pull Request '${r===o?o:`${r} => ${o}`}'`)}async getOpenAuthoringBranches(){return await this.requestAllPages(`${this.repoURL}/git/refs/heads/cms/${this.repo}`).catch(()=>[])}async listUnpublishedBranches(){let e;if(console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),this.useOpenAuthoring){e=(await this.getOpenAuthoringBranches()).map(e=>e.ref.slice(11));const t=await Promise.all(e.map(e=>this.filterOpenAuthoringBranches(e)));e=t.filter(e=>e.filter).map(e=>e.branch)}else{const t=await this.getPullRequests(void 0,yr.Open,()=>!0),r=t.filter(e=>!e.head.repo.fork&&function(e,t){return e.labels.every(e=>!(0,R.isCMSLabel)(e.name,t))}(e,this.cmsLabelPrefix));let n=0;for(const e of r)br||(br=!0,alert(w`
3
+ Decap CMS is adding labels to ${r.length} of your Editorial Workflow
4
4
  entries. The "Workflow" tab will be unavailable during this migration. You may use other
5
5
  areas of the CMS during this time. Note that closing the CMS will pause the migration.
6
- `)),r+=1,await this.migratePullRequest(e,`${r} of ${t.length}`);e=(await this.getPullRequests(void 0,yr.Open,e=>vr(e,this.cmsLabelPrefix))).map(e=>e.head.ref)}return e}async getStatuses(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=(await this.getBranchPullRequest(n)).head.sha;return(await this.request(`${this.originRepoURL}/commits/${i}/status`)).statuses.map(e=>({context:e.context,target_url:e.target_url||"",state:e.state===mr.Success?R.PreviewState.Success:R.PreviewState.Other}))}async persistFiles(e,t,r){const n=t.concat(e),i=n.map(e=>this.uploadBlob(e));if(await Promise.all(i),r.useWorkflow){const i=t.map(({sha:e,path:t})=>({path:o()(t,"/"),sha:e})),a=e[0].slug;return this.editorialWorkflowGit(n,a,i,r)}return this.getDefaultBranch().then(e=>this.updateTree(e.commit.sha,n)).then(e=>this.commit(r.commitMessage,e)).then(e=>this.patchBranch(this.branch,e.sha))}async getFileSha(e,{repoURL:t=this.repoURL,branch:r=this.branch}={}){const n=e.split("/"),i=ir()(n),o=rr()(n).join("/"),a=`${t}/git/trees/${r}:${encodeURIComponent(o)}`,s=(await this.request(a)).tree.find(e=>e.path===i);if(s)return s.sha;throw new R.APIError("Not Found",404,fr)}async deleteFiles(e,t){if(this.useOpenAuthoring)return Promise.reject("Cannot delete published entries as an Open Authoring user!");const r=await this.getDefaultBranch(),n=e.map(e=>({path:e,sha:null})),i=await this.updateTree(r.commit.sha,n),o=await this.commit(t,i);await this.patchBranch(this.branch,o.sha)}async createBranchAndPullRequest(e,t,r){return await this.createBranch(e,t),this.createPR(r,e)}async updatePullRequestLabels(e,t){await this.request(`${this.repoURL}/issues/${e}/labels`,{method:"PUT",body:JSON.stringify({labels:t})})}async diffFromFile(e){return{path:e.filename,newFile:"added"===e.status,sha:e.sha||"",binary:"renamed"!==e.status&&!e.patch||e.filename.endsWith(".svg")}}async editorialWorkflowGit(e,t,r,n){const i=this.generateContentKey(n.collectionName,t),o=(0,R.branchFromContentKey)(i),a=n.unpublished||!1,s=!1!==n.hasSubfolders;if(a){const{files:t}=await this.getDifferences(this.branch,await this.getHeadReference(o)),i=await Promise.all((t||[]).map(e=>this.diffFromFile(e))),a=[];for(const e of i.filter(e=>e.binary))r.some(t=>t.path===e.path)||a.push({path:e.path,sha:null});const u=await this.rebaseBranch(o),c=a.concat(e),l=await this.updateTree(u.sha,c,o,s),h=await this.commit(n.commitMessage,l);return this.patchBranch(o,h.sha,{force:!0})}{const t=await this.getDefaultBranch(),r=await this.updateTree(t.commit.sha,e,this.branch,s),i=await this.commit(n.commitMessage,r);if(this.useOpenAuthoring)await this.createBranch(o,i.sha);else{const e=await this.createBranchAndPullRequest(o,i.sha,n.commitMessage);await this.setPullRequestStatus(e,n.status||this.initialWorkflowStatus)}}}async getDifferences(e,t){const r=this.useOpenAuthoring?10:1;for(let n=1;n<=r;n++)try{return await this.request(`${this.originRepoURL}/compare/${e}...${t}`)}catch(e){if(n===r)throw console.warn(`Reached maximum number of attempts '${r}' for getDifferences`),e;await new Promise(e=>setTimeout(e,500*n))}throw new R.APIError("Not Found",404,fr)}async rebaseSingleCommit(e,t){const r=gr((await this.getDifferences(t.parents[0].sha,t.sha)).files);if(r.length>0){const n=await this.updateTree(e.sha,r),{message:i,author:o,committer:a}=t.commit;return await this.createCommit(i,n.sha,[e.sha],o?{name:o.name||"",email:o.email||"",date:o.date}:void 0,a?{name:a.name||"",email:a.email||"",date:a.date}:void 0)}return t}async rebaseCommits(e,t){return 0===t.length||t[0].parents[0].sha===e.sha?ir()(t):t.reduce((e,t)=>e.then(e=>{const r=e,n=t;return this.rebaseSingleCommit(r,n)}),Promise.resolve(e))}async rebaseBranch(e){try{const{base_commit:t,commits:r}=await this.getDifferences(this.branch,await this.getHeadReference(e));return await this.rebaseCommits(t,r)}catch(e){throw console.error(e),e}}async setPullRequestStatus(e,t){const r=[...e.labels.filter(e=>!(0,R.isCMSLabel)(e.name,this.cmsLabelPrefix)).map(e=>e.name),(0,R.statusToLabel)(t,this.cmsLabelPrefix)];await this.updatePullRequestLabels(e.number,r)}async updateUnpublishedEntryStatus(e,t,r){const n=this.generateContentKey(e,t),i=(0,R.branchFromContentKey)(n),o=await this.getBranchPullRequest(i);if(this.useOpenAuthoring){if("pending_publish"===status)throw new Error('Open Authoring entries may not be set to the status "pending_publish".');if(o.number!==dr){const{state:e}=o;e===yr.Open&&"draft"===r&&await this.closePR(o.number),e===yr.Closed&&"pending_review"===r&&await this.openPR(o.number)}else if("pending_review"===r){const e=(0,R.branchFromContentKey)(n),t=await this.getDifferences(this.branch,await this.getHeadReference(e)),r=t.commits[0]?.commit?.message||wr.DEFAULT_COMMIT_MESSAGE;await this.createPR(r,e)}}else await this.setPullRequestStatus(o,r)}async deleteUnpublishedEntry(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);i.number!==dr&&await this.closePR(i.number),await this.deleteBranch(n)}async publishUnpublishedEntry(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);await this.mergePR(i),await this.deleteBranch(n),await this.closeIssueOnPublish(e,t)}async createRef(e,t,r){return await this.request(`${this.repoURL}/git/refs`,{method:"POST",body:JSON.stringify({ref:`refs/${e}/${t}`,sha:r})})}async patchRef(e,t,r,n={}){const i=n.force||!1;return await this.request(`${this.repoURL}/git/refs/${e}/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({sha:r,force:i})})}deleteRef(e,t){return this.request(`${this.repoURL}/git/refs/${e}/${encodeURIComponent(t)}`,{method:"DELETE"})}async getBranch(e){return await this.request(`${this.repoURL}/branches/${encodeURIComponent(e)}`)}async getDefaultBranch(){return await this.request(`${this.originRepoURL}/branches/${encodeURIComponent(this.branch)}`)}async backupBranch(e){try{const t=await this.getBranch(e);await this.createBranch(t.name.replace(new RegExp(`${R.CMS_BRANCH_PREFIX}/`),`${R.CMS_BRANCH_PREFIX}_${Date.now()}/`),t.commit.sha)}catch(e){console.warn(e)}}async createBranch(e,t){try{return await this.createRef("heads",e,t)}catch(r){const n=String(r.message||"");if("Reference update failed"===n)await(0,R.throwOnConflictingBranches)(e,e=>this.getBranch(e),fr);else if("Reference already exists"===n&&e.startsWith(`${R.CMS_BRANCH_PREFIX}/`))try{return await this.backupBranch(e),await this.patchBranch(e,t,{force:!0})}catch(e){console.log(e)}throw r}}assertCmsBranch(e){return e.startsWith(`${R.CMS_BRANCH_PREFIX}/`)}patchBranch(e,t,r={}){const n=r.force||!1;if(n&&!this.assertCmsBranch(e))throw Error(`Only CMS branches can be force updated, cannot force update ${e}`);return this.patchRef("heads",e,t,{force:n})}deleteBranch(e){return this.deleteRef("heads",e).catch(e=>"Reference does not exist"===e.message?Promise.resolve():(console.error(e),Promise.reject(e)))}async getHeadReference(e){return`${this.repoOwner}:${e}`}async createPR(e,t){return await this.request(`${this.originRepoURL}/pulls`,{method:"POST",body:JSON.stringify({title:e,body:R.DEFAULT_PR_BODY,head:await this.getHeadReference(t),base:this.branch})})}async openPR(e){return console.log("%c Re-opening PR","line-height: 30px;text-align: center;font-weight: bold"),await this.request(`${this.originRepoURL}/pulls/${e}`,{method:"PATCH",body:JSON.stringify({state:yr.Open})})}async closePR(e){return console.log("%c Deleting PR","line-height: 30px;text-align: center;font-weight: bold"),await this.request(`${this.originRepoURL}/pulls/${e}`,{method:"PATCH",body:JSON.stringify({state:yr.Closed})})}async mergePR(e){console.log("%c Merging PR","line-height: 30px;text-align: center;font-weight: bold");try{return await this.request(`${this.originRepoURL}/pulls/${e.number}/merge`,{method:"PUT",body:JSON.stringify({commit_message:R.MERGE_COMMIT_MESSAGE,sha:e.head.sha,merge_method:this.mergeMethod})})}catch(t){if(t instanceof R.APIError&&405===t.status)return this.forceMergePR(e);throw t}}async forceMergePR(e){const t=gr((await this.getDifferences(e.base.sha,e.head.sha)).files);let r="Automatically generated. Merged on Decap CMS\n\nForce merge of:";return t.forEach(e=>{r+=`\n* "${e.path}"`}),console.log("%c Automatic merge not possible - Forcing merge.","line-height: 30px;text-align: center;font-weight: bold"),this.getDefaultBranch().then(e=>this.updateTree(e.commit.sha,t)).then(e=>this.commit(r,e)).then(e=>this.patchBranch(this.branch,e.sha))}toBase64(e){return Promise.resolve(er.encode(e))}async uploadBlob(e){const t=await ur()(e,"toBase64",ar()(this.toBase64,e.raw)),r=await this.request(`${this.repoURL}/git/blobs`,{method:"POST",body:JSON.stringify({content:t,encoding:"base64"})});return e.sha=r.sha,e}async updateTree(e,t,r=this.branch,n=!0){const i=[],a=t.reduce((e,t)=>{const r={path:o()(t.path,"/"),mode:"100644",type:"blob",sha:t.sha};return t.newPath?i.push({from:t.path,to:t.newPath,sha:t.sha}):e.push(r),e},[]);for(const{from:e,to:t,sha:s}of i)if(n){const n=(0,hr.dirname)(e),i=(0,hr.dirname)(t),o=await this.listFiles(n,{branch:r,depth:100});for(const t of o)a.push({path:t.path,mode:"100644",type:"blob",sha:null}),a.push({path:t.path.replace(n,i),mode:"100644",type:"blob",sha:t.path===e?s:t.id})}else a.push({path:o()(e,"/"),mode:"100644",type:"blob",sha:null}),a.push({path:o()(t,"/"),mode:"100644",type:"blob",sha:s});return{...await this.createTree(e,a),parentSha:e}}async createTree(e,t){return await this.request(`${this.repoURL}/git/trees`,{method:"POST",body:JSON.stringify({base_tree:e,tree:t})})}commit(e,t){const r=t.parentSha?[t.parentSha]:[];return this.createCommit(e,t.sha,r)}async createCommit(e,t,r,n,i){return await this.request(`${this.repoURL}/git/commits`,{method:"POST",body:JSON.stringify({message:e,tree:t,parents:r,author:n,committer:i})})}async getUnpublishedEntrySha(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r);return(await this.getBranchPullRequest(n)).head.sha}static NOTE_STATUS_RESOLVED="RESOLVED";static NOTE_STATUS_OPEN="OPEN";static NOTES_LABEL="decap-cms-notes";static NOTE_ISSUE_PREFIX="Notes: ";static NOTE_REGEX=/^<!-- DecapCMS Note - Status: (RESOLVED|OPEN) -->([\s\S]+)$/;formatNoteForGithub(e){return`\x3c!-- DecapCMS Note - Status: ${e.resolved?wr.NOTE_STATUS_RESOLVED:wr.NOTE_STATUS_OPEN} --\x3e\n${e.content}`}parseCommentToNote(e){if(!e||!e.body||!e.user)throw new Error("Invalid comment structure");const t=e.body.match(wr.NOTE_REGEX),r=t?t[2].trim():e.body,n=!!t&&t[1]===wr.NOTE_STATUS_RESOLVED;if(!r.trim())throw new Error("Empty note content");return{id:e.id.toString(),author:e.user.login,avatarUrl:e.user.avatar_url,timestamp:e.created_at,content:r,resolved:n,entrySlug:""}}async createEntryIssue(e,t,r){const n=`${wr.NOTE_ISSUE_PREFIX}${r||`${e}/${t}`}`,i=`This issue tracks notes for entry: \`${e}/${t}\`\n\n---\n*This issue was created automatically by Decap CMS for note management.*`;return await this.request(`${this.repoURL}/issues`,{method:"POST",body:JSON.stringify({title:n,body:i,labels:[wr.NOTES_LABEL,`collection:${e}`]})})}async findEntryIssue(e,t){const r=`repo:${this.repo} label:${wr.NOTES_LABEL} "${e}/${t}" in:body`;try{const e=await this.request("/search/issues",{params:{q:r}});return e.items&&e.items.length>0?e.items[0]:null}catch(e){return console.warn("Failed to search for existing notes issue:",e),null}}async getIssueWithETag(e,t){try{const r={Authorization:`${this.tokenKeyword} ${this.token}`};t&&(r["If-None-Match"]=t);const n=await pr(`${this.apiRoot}${this.repoURL}/issues/${e}`,{headers:r});if(304===n.status)return{status:304};if(200===n.status){const t=await n.json(),i=n.headers.get("ETag"),o=await pr(`${this.apiRoot}${this.repoURL}/issues/${e}/comments`,{headers:r}),a=(await o.json()).map(e=>({id:e.id,body:e.body,user:e.user,created_at:e.created_at,updated_at:e.updated_at}));return{status:200,data:{number:t.number,title:t.title,body:t.body,state:t.state,updated_at:t.updated_at,comments:a,labels:t.labels,html_url:t.html_url},etag:i}}throw new Error(`Unexpected status: ${n.status}`)}catch(e){if(304===e.status)return{status:304};throw e}}async getIssueState(e){const t=await this.getIssueWithETag(e,null);if(200===t.status&&t.data)return t.data;throw new Error("Failed to get issue state")}async getIssueComments(e){try{const t=await this.request(`${this.repoURL}/issues/${e}/comments`);return Array.isArray(t)?t:[]}catch(e){return console.error("Failed to get issue comments:",e),[]}}async createIssueComment(e,t){try{return(await this.request(`${this.repoURL}/issues/${e}/comments`,{method:"POST",body:JSON.stringify({body:this.formatNoteForGithub(t)})})).id.toString()}catch(e){throw console.error("Failed to create issue comment:",e),new R.APIError("Failed to create note",e.status||500,fr)}}async updateIssueComment(e,t){try{await this.request(`${this.repoURL}/issues/comments/${e}`,{method:"PATCH",body:JSON.stringify({body:this.formatNoteForGithub(t)})})}catch(e){throw console.error("Failed to update issue comment:",e),new R.APIError("Failed to update note",e.status||500,fr)}}async deleteIssueComment(e){try{await this.request(`${this.repoURL}/issues/comments/${e}`,{method:"DELETE"})}catch(e){throw console.error("Failed to delete issue comment:",e),new R.APIError("Failed to delete note",e.status||500,fr)}}async closeIssueOnPublish(e,t){try{const r=`repo:${this.repo} label:${wr.NOTES_LABEL} "${e}/${t}" in:body state:open`,n=await this.request("/search/issues",{params:{q:r}});if(n.items&&n.items.length>0){const e=n.items[0];await this.request(`${this.repoURL}/issues/${e.number}`,{method:"PATCH",body:JSON.stringify({state:"closed",labels:[...(e.labels||[]).map(e=>e.name),"entry-published"]})})}}catch(e){console.warn("Failed to close notes issue on publish:",e)}}async reopenIssueOnUnpublish(e,t){try{const r=`repo:${this.repo} label:${wr.NOTES_LABEL} "${e}/${t}" in:body`,n=await this.request("/search/issues",{params:{q:r}});if(n.items&&n.items.length>0){const e=n.items[0],t=(e.labels||[]).map(e=>e.name).filter(e=>"entry-published"!==e&&"entry-deleted"!==e);await this.request(`${this.repoURL}/issues/${e.number}`,{method:"PATCH",body:JSON.stringify({state:"open",labels:t})})}}catch(e){console.warn("Failed to reopen notes issue on unpublish:",e)}}async getEntryNotes(e,t){try{const r=await this.findEntryIssue(e,t);if(!r)return[];const n=await this.getIssueComments(r.number),i=r.html_url;return n.map(e=>({...this.parseCommentToNote(e),issueUrl:i}))}catch(e){return console.error("Failed to get entry notes:",e),[]}}async addNoteToEntry(e,t,r,n){try{let i=await this.findEntryIssue(e,t);return i||(i=await this.createEntryIssue(e,t,n)),{commentId:await this.createIssueComment(i.number,r),issueUrl:i.html_url}}catch(e){throw console.error("Failed to add note to entry:",e),new R.APIError("Failed to create note",e.status||500,fr)}}async updateEntryNote(e,t){try{await this.updateIssueComment(e,t)}catch(e){throw console.error("Failed to update entry note:",e),new R.APIError("Failed to update note",e.status||500,fr)}}async deleteEntryNote(e){try{await this.deleteIssueComment(e)}catch(e){throw console.error("Failed to delete entry note:",e),new R.APIError("Failed to delete note",e.status||500,fr)}}async getEntriesWithNotes(){try{const e=`repo:${this.repo} label:${wr.NOTES_LABEL} state:open`,t=await this.request("/search/issues",{params:{q:e,per_page:100}}),r=[];for(const e of t.items||[]){const t=e.body.match(/entry: `(.+)\/(.+)`/);if(t){const[,n,i]=t;r.push({collection:n,slug:i,noteCount:e.comments})}}return r}catch(e){return console.error("Failed to get entries with notes:",e),[]}}async closeEntryNotesIssue(e,t){try{const r=`repo:${this.repo} label:${wr.NOTES_LABEL} "${e}/${t}" in:body state:open`,n=await this.request("/search/issues",{params:{q:r}});if(n.items&&n.items.length>0){const e=n.items[0];await this.request(`${this.repoURL}/issues/${e.number}`,{method:"PATCH",body:JSON.stringify({state:"closed",labels:[...(e.labels||[]).map(e=>e.name),"entry-deleted"]})})}}catch(e){console.warn("Failed to close notes issue:",e)}}async getPRMetadataFromBranch(e){try{const t=(await this.request(`${this.originRepoURL}/pulls`,{params:{head:await this.getHeadReference(e),state:"open"}}))[0];return t?{id:t.number.toString(),url:t.html_url,author:t.user?.login||"unknown",createdAt:t.created_at}:null}catch(e){return console.error("Failed to get PR metadata:",e),null}}}class Er{currentWatch=null;currentIssueKey=null;pollingInterval=15e3;intervalId=null;isDocumentVisible=!0;isPolling=!1;pendingRetryTimeout=null;constructor(e,t=15e3){this.api=e,this.pollingInterval=t,this.setupVisibilityListener()}setupVisibilityListener(){"undefined"!=typeof document&&document.addEventListener("visibilitychange",()=>{this.isDocumentVisible=!document.hidden,this.isDocumentVisible?(this.startPolling(),this.checkAllIssuesNow()):this.stopPolling()})}async watchIssue(e,t,r,n,i=null){const o=this.getIssueKey(t,r);if(this.currentWatch&&this.stopCurrentWatch(),!i)try{i=await this.api.getIssueState(e)}catch(e){console.error("[DecapNotes Polling] Failed to get initial state:",e)}return this.currentWatch={issueNumber:e,collection:t,slug:r,etag:null,lastState:i,onUpdate:n.onUpdate,onChange:n.onChange,retryCount:0,maxRetries:5},this.currentIssueKey=o,!this.intervalId&&this.isDocumentVisible&&this.startPolling(),this.checkCurrentIssue(),()=>this.stopCurrentWatch()}async watchIssueWithRetry(e,t,r,n=5,i=2e3){const o=this.getIssueKey(e,t);this.currentWatch&&this.stopCurrentWatch();const a=async s=>{try{const u=await this.api.findEntryIssue(e,t);return u?await this.watchIssue(u.number,e,t,r):s<n?new Promise((e,t)=>{this.pendingRetryTimeout=setTimeout(async()=>{this.pendingRetryTimeout=null;try{const t=await a(s+1);e(t)}catch(e){t(e)}},i)}):(console.log(`[DecapNotes Polling] No issue found for ${o} after ${n} attempts. This is expected if there are no notes for this entry yet.`),()=>{})}catch(e){if(console.error(`[DecapNotes Polling] Error finding issue for ${o}:`,e),s<n)return new Promise((e,t)=>{this.pendingRetryTimeout=setTimeout(async()=>{this.pendingRetryTimeout=null;try{const t=await a(s+1);e(t)}catch(e){t(e)}},i)});throw e}};return a(1)}stopCurrentWatch(){this.currentWatch&&(this.pendingRetryTimeout&&(clearTimeout(this.pendingRetryTimeout),this.pendingRetryTimeout=null),this.currentWatch=null,this.currentIssueKey=null,this.stopPolling())}startPolling(){!this.intervalId&&this.isDocumentVisible&&this.currentWatch&&(console.log(`[DecapNotes Polling] Starting polling loop (${this.pollingInterval}ms interval) for ${this.currentIssueKey}`),this.intervalId=setInterval(()=>{this.pollAllIssues()},this.pollingInterval))}stopPolling(){this.intervalId&&(console.log("[DecapNotes Polling] Stopping polling loop"),clearInterval(this.intervalId),this.intervalId=null)}async pollAllIssues(){await this.checkCurrentIssue()}async checkCurrentIssue(){if(this.currentWatch&&!this.isPolling){this.isPolling=!0;try{const e=this.currentWatch,t=await this.api.getIssueWithETag(e.issueNumber,e.etag);if(304===t.status)return;if(200===t.status){const r=t.data,n=t.etag;e.etag=n||null;const i=this.detectChanges(e.lastState,r);if(i.length>0){const t=r.comments.map(e=>({...this.api.parseCommentToNote(e),issueUrl:r.html_url}));e.onUpdate&&e.onUpdate(t,i),e.onChange&&i.forEach(t=>{e.onChange(t)})}e.lastState=r}}catch(e){e&&"object"==typeof e&&"status"in e&&304!==e.status&&console.error(`[DecapNotes Polling] Error checking ${this.currentIssueKey}:`,e)}finally{this.isPolling=!1}}}async checkAllIssuesNow(){await this.checkCurrentIssue()}async checkIssueNow(e,t){const r=this.getIssueKey(e,t);this.currentIssueKey===r?await this.checkCurrentIssue():console.warn(`[DecapNotes Polling] Cannot check ${r} - currently watching ${this.currentIssueKey}`)}detectChanges(e,t){if(!e)return[];const r=[],n=t.comments.filter(t=>!e.comments.some(e=>e.id===t.id));n.forEach(e=>{r.push({type:"comment_added",data:e,timestamp:e.created_at})}),t.comments.forEach(t=>{const n=e.comments.find(e=>e.id===t.id);n&&n.updated_at!==t.updated_at&&r.push({type:"comment_updated",data:t,previousData:n,timestamp:t.updated_at})});const i=e.comments.filter(e=>!t.comments.some(t=>t.id===e.id));return i.forEach(e=>{r.push({type:"comment_deleted",data:e,timestamp:(new Date).toISOString()})}),e.state!==t.state&&r.push({type:"issue_state_changed",data:{from:e.state,to:t.state},timestamp:t.updated_at}),this.hasLabelsChanged(e.labels,t.labels)&&r.push({type:"issue_labels_changed",data:{from:e.labels,to:t.labels},timestamp:t.updated_at}),r}hasLabelsChanged(e,t){if(e.length!==t.length)return!0;const r=e.map(e=>e.name).sort(),n=t.map(e=>e.name).sort();return r.join(",")!==n.join(",")}getIssueKey(e,t){return`${e}/${t}`}getStatus(){return{isPolling:null!==this.intervalId,currentWatch:this.currentIssueKey,watchedCount:this.currentWatch?1:0,pollingInterval:this.pollingInterval,isDocumentVisible:this.isDocumentVisible,hasPendingRetry:null!==this.pendingRetryTimeout}}destroy(){console.log("[DecapNotes Polling] Destroying polling manager"),this.pendingRetryTimeout&&(clearTimeout(this.pendingRetryTimeout),this.pendingRetryTimeout=null),this.stopCurrentWatch()}}var Rr=function(e,t){return Rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},Rr(e,t)};function Sr(e,t){function r(){this.constructor=e}Rr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var kr=function(){return kr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kr.apply(this,arguments)};function xr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function Or(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})}function Tr(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function Ir(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}var _r,Ar=u(481),Pr=u(5409),Cr="Invariant Violation",Nr=Object.setPrototypeOf,qr=void 0===Nr?function(e,t){return e.__proto__=t,e}:Nr,Fr=function(e){function t(r){void 0===r&&(r=Cr);var n=e.call(this,"number"==typeof r?Cr+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=Cr,qr(n,t.prototype),n}return Sr(t,e),t}(Error);function Dr(e,t){if(!e)throw new Fr(t)}function Lr(e){return function(){return console[e].apply(console,arguments)}}(_r=Dr||(Dr={})).warn=Lr("warn"),_r.error=Lr("error");var $r={env:{}};if("object"==typeof Pr)$r=Pr;else try{Function("stub","process = stub")($r)}catch(e){}var Br=u(6039),Ur=u.n(Br),Mr=Object.prototype,jr=Mr.toString,Qr=Mr.hasOwnProperty,Vr=new Map;function zr(e,t){try{return Kr(e,t)}finally{Vr.clear()}}function Kr(e,t){if(e===t)return!0;var r=jr.call(e);if(r!==jr.call(t))return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Gr(e,t))return!0;var n=Object.keys(e),i=Object.keys(t),o=n.length;if(o!==i.length)return!1;for(var a=0;a<o;++a)if(!Qr.call(t,n[a]))return!1;for(a=0;a<o;++a){var s=n[a];if(!Kr(e[s],t[s]))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(Gr(e,t))return!0;for(var u=e.entries(),c="[object Map]"===r;;){var l=u.next();if(l.done)break;var h=l.value,f=h[0],p=h[1];if(!t.has(f))return!1;if(c&&!Kr(p,t.get(f)))return!1}return!0}return!1}function Gr(e,t){var r=Vr.get(e);if(r){if(r.has(t))return!0}else Vr.set(e,r=new Set);return r.add(t),!1}var Wr=u(5409);function Hr(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map(function(e){return Hr(i,e.name,e.value,n)}),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map(function(e){var r={};return Hr(r,t,e,n),r[t.value]});else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw new Fr(17);e[t.value]=null}}var Jr=["connection","include","skip","client","rest","export"];function Yr(e,t,r){if(r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i=t,o={};return n.forEach(function(e){o[e]=i[e]}),r.connection.key+"("+JSON.stringify(o)+")"}return r.connection.key}var a=e;if(t){var s=Ur()(t);a+="("+s+")"}return r&&Object.keys(r).forEach(function(e){-1===Jr.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?a+="@"+e+"("+JSON.stringify(r[e])+")":a+="@"+e)}),a}function Xr(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(e){var n=e.name,i=e.value;return Hr(r,n,i,t)}),r}return null}function Zr(e){return e.alias?e.alias.value:e.name.value}function en(e){return"Field"===e.kind}function tn(e){return"InlineFragment"===e.kind}function rn(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function nn(e,t){return void 0===t&&(t=!1),kr({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function on(e,t){if(e.directives&&e.directives.length){var r={};return e.directives.forEach(function(e){r[e.name.value]=Xr(e,t)}),r}return null}function an(e,t){return void 0===t&&(t={}),(r=e.directives,r?r.filter(cn).map(function(e){var t=e.arguments;e.name.value,Dr(t&&1===t.length,14);var r=t[0];Dr(r.name&&"if"===r.name.value,15);var n=r.value;return Dr(n&&("Variable"===n.kind||"BooleanValue"===n.kind),16),{directive:e,ifArgument:r}}):[]).every(function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?Dr(void 0!==(i=t[n.value.name.value]),13):i=n.value.value,"skip"===r.name.value?!i:i});var r}function sn(e,t){return function(e){var t=[];return(0,Ar.visit)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some(function(t){return e.indexOf(t)>-1})}function un(e){return e&&sn(["client"],e)&&sn(["export"],e)}function cn(e){var t=e.name.value;return"skip"===t||"include"===t}function ln(e,t){var r=t,n=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw new Fr(11);"FragmentDefinition"===e.kind&&n.push(e)}),void 0===r&&(Dr(1===n.length,12),r=n[0].name.value),kr(kr({},e),{definitions:Ir([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions)})}function hn(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.forEach(function(t){null!=t&&Object.keys(t).forEach(function(r){e[r]=t[r]})}),e}function fn(e){return Dr(e&&"Document"===e.kind,2),Dr(e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw new Fr(3);return e}).length<=1,4),e}function pn(e){return fn(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function dn(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&e.name}).map(function(e){return e.name.value})[0]||null}function mn(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function yn(e){var t;fn(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw new Fr(10)}function vn(e){void 0===e&&(e=[]);var t={};return e.forEach(function(e){t[e.name.value]=e}),t}function gn(e){if(e&&e.variableDefinitions&&e.variableDefinitions.length){var t=e.variableDefinitions.filter(function(e){return e.defaultValue}).map(function(e){var t=e.variable,r=e.defaultValue,n={};return Hr(n,t.name,r),n});return hn.apply(void 0,Ir([{}],t))}return{}}function bn(e,t,r){var n=0;return e.forEach(function(r,i){t.call(this,r,i,e)&&(e[n++]=r)},r),e.length=n,e}var wn={kind:"Field",name:{kind:"Name",value:"__typename"}};function En(e,t){return e.selectionSet.selections.every(function(e){return"FragmentSpread"===e.kind&&En(t[e.name.value],t)})}function Rn(e){return En(pn(e)||function(e){Dr("Document"===e.kind,7),Dr(e.definitions.length<=1,8);var t=e.definitions[0];return Dr("FragmentDefinition"===t.kind,9),t}(e),vn(mn(e)))?null:e}function Sn(e){return function(t){return e.some(function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)})}}function kn(e,t){var r=Object.create(null),n=[],i=Object.create(null),o=[],a=Rn((0,Ar.visit)(t,{Variable:{enter:function(e,t,n){"VariableDefinition"!==n.kind&&(r[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some(function(e){return e.remove})&&t.directives&&t.directives.some(Sn(e)))return t.arguments&&t.arguments.forEach(function(e){"Variable"===e.value.kind&&n.push({name:e.value.name.value})}),t.selectionSet&&On(t.selectionSet).forEach(function(e){o.push({name:e.name.value})}),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(t){if(Sn(e)(t))return null}}}));return a&&bn(n,function(e){return!r[e.name]}).length&&(a=function(e,t){var r=function(e){return function(t){return e.some(function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))})}}(e);return Rn((0,Ar.visit)(t,{OperationDefinition:{enter:function(t){return kr(kr({},t),{variableDefinitions:t.variableDefinitions.filter(function(t){return!e.some(function(e){return e.name===t.variable.name.value})})})}},Field:{enter:function(t){if(e.some(function(e){return e.remove})){var n=0;if(t.arguments.forEach(function(e){r(e)&&(n+=1)}),1===n)return null}}},Argument:{enter:function(e){if(r(e))return null}}}))}(n,a)),a&&bn(o,function(e){return!i[e.name]}).length&&(a=function(e,t){function r(t){if(e.some(function(e){return e.name===t.name.value}))return null}return Rn((0,Ar.visit)(t,{FragmentSpread:{enter:r},FragmentDefinition:{enter:r}}))}(o,a)),a}var xn={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||e.arguments.some(function(e){return"key"===e.name.value})),t}};function On(e){var t=[];return e.selections.forEach(function(e){(en(e)||tn(e))&&e.selectionSet?On(e.selectionSet).forEach(function(e){return t.push(e)}):"FragmentSpread"===e.kind&&t.push(e)}),t}function Tn(e){if("query"===yn(e).operation)return e;var t=(0,Ar.visit)(e,{OperationDefinition:{enter:function(e){return kr(kr({},e),{operation:"query"})}}});return t}var In="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),_n=Object.prototype.toString;function An(e){return Pn(e,new Map)}function Pn(e,t){switch(_n.call(e)){case"[object Array]":if(t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(e,n){r[n]=Pn(e,t)}),r;case"[object Object]":if(t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(r){n[r]=Pn(e[r],t)}),n;default:return e}}function Cn(e){return(void 0!==Wr?"production":"development")===e}function Nn(e){try{return e()}catch(e){console.error&&console.error(e)}}function qn(e){return e.errors&&e.errors.length}var Fn=Object.prototype.hasOwnProperty;function Dn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ln(e)}function Ln(e){var t=e[0]||{},r=e.length;if(r>1){var n=[];t=Un(t,n);for(var i=1;i<r;++i)t=Bn(t,e[i],n)}return t}function $n(e){return null!==e&&"object"==typeof e}function Bn(e,t,r){return $n(t)&&$n(e)?(Object.isExtensible&&!Object.isExtensible(e)&&(e=Un(e,r)),Object.keys(t).forEach(function(n){var i=t[n];if(Fn.call(e,n)){var o=e[n];i!==o&&(e[n]=Bn(Un(o,r),i,r))}else e[n]=i}),e):t}function Un(e,t){return null!==e&&"object"==typeof e&&t.indexOf(e)<0&&(e=Array.isArray(e)?e.slice(0):kr({__proto__:Object.getPrototypeOf(e)},e),t.push(e)),e}Object.create({});var Mn=u(4378);const jn=u.n(Mn)();var Qn;function Vn(e){return e.request.length<=1}function zn(e){return new jn(function(t){t.error(e)})}function Kn(e,t){return t?t(e):jn.of()}function Gn(e){return"function"==typeof e?new Xn(e):e}function Wn(){return new Xn(function(){return jn.of()})}function Hn(e){return 0===e.length?Wn():e.map(Gn).reduce(function(e,t){return e.concat(t)})}function Jn(e,t,r){var n=Gn(t),i=Gn(r||new Xn(Kn));return Vn(n)&&Vn(i)?new Xn(function(t){return e(t)?n.request(t)||jn.of():i.request(t)||jn.of()}):new Xn(function(t,r){return e(t)?n.request(t,r)||jn.of():i.request(t,r)||jn.of()})}Sr(function(e,t){var r=Qn.call(this,e)||this;return r.link=t,r},Qn=Error);var Yn=function(e,t){var r=Gn(e);if(Vn(r))return r;var n=Gn(t);return Vn(n)?new Xn(function(e){return r.request(e,function(e){return n.request(e)||jn.of()})||jn.of()}):new Xn(function(e,t){return r.request(e,function(e){return n.request(e,t)||jn.of()})||jn.of()})},Xn=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,r,n){return this.concat(Jn(t,r,n||new e(Kn)))},e.prototype.concat=function(e){return Yn(this,e)},e.prototype.request=function(e,t){throw new Fr(1)},e.empty=Wn,e.from=Hn,e.split=Jn,e.execute=Zn,e}();function Zn(e,t){return e.request(function(e,t){var r=kr({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r=kr({},r,"function"==typeof e?e(r):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return kr({},r)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){var t=e.query,r=e.variables,n=e.operationName;return JSON.stringify([n,t,r])}(t)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?dn(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw new Fr(2)}return e}(t))))||jn.of()}var ei,ti=u(4963);function ri(e){return e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(ei||(ei={}));var ni=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Sr(t,e),t.prototype[ti.A]=function(){return this},t.prototype["@@observable"]=function(){return this},t}(jn);function ii(e){return Array.isArray(e)&&e.length>0}var oi,ai=function(e){function t(r){var n,i,o=r.graphQLErrors,a=r.networkError,s=r.errorMessage,u=r.extraInfo,c=e.call(this,s)||this;return c.graphQLErrors=o||[],c.networkError=a||null,c.message=s||(i="",ii((n=c).graphQLErrors)&&n.graphQLErrors.forEach(function(e){var t=e?e.message:"Error message not found.";i+="GraphQL error: "+t+"\n"}),n.networkError&&(i+="Network error: "+n.networkError.message+"\n"),i=i.replace(/\n$/,"")),c.extraInfo=u,c.__proto__=t.prototype,c}return Sr(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(oi||(oi={}));var si=function(e){function t(t){var r=t.queryManager,n=t.options,i=t.shouldSubscribe,o=void 0===i||i,a=e.call(this,function(e){return a.onSubscribe(e)})||this;a.observers=new Set,a.subscriptions=new Set,a.isTornDown=!1,a.options=n,a.variables=n.variables||{},a.queryId=r.generateQueryId(),a.shouldSubscribe=o;var s=pn(n.query);return a.queryName=s&&s.name&&s.name.value,a.queryManager=r,a}return Sr(t,e),t.prototype.result=function(){var e=this;return new Promise(function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:r},i=e.subscribe(n)})},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:ei.error}}var t,r,n,i=this.queryManager.getCurrentQueryResult(this),o=i.data,a=i.partial,s=this.queryManager.queryStore.get(this.queryId),u=this.options.fetchPolicy,c="network-only"===u||"no-cache"===u;if(s){var l=s.networkStatus;if(r=s,void 0===(n=this.options.errorPolicy)&&(n="none"),r&&(r.networkError||"none"===n&&ii(r.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:l,error:new ai({graphQLErrors:s.graphQLErrors,networkError:s.networkError})};s.variables&&(this.options.variables=kr(kr({},this.options.variables),s.variables),this.variables=this.options.variables),t={data:o,loading:ri(l),networkStatus:l},s.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=s.graphQLErrors)}else{var h=c||a&&"cache-only"!==u;t={data:o,loading:h,networkStatus:h?ei.loading:ei.ready}}return a||this.updateLastResult(kr(kr({},t),{stale:!1})),kr(kr({},t),{partial:a})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&zr(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new Fr(1)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),zr(this.variables,e)||(this.variables=kr(kr({},this.variables),e)),zr(this.options.variables,this.variables)||(this.options.variables=kr(kr({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,kr(kr({},this.options),{fetchPolicy:t}),oi.refetch))},t.prototype.fetchMore=function(e){var t=this;Dr(e.updateQuery,2);var r=kr(kr({},e.query?e:kr(kr(kr({},this.options),e),{variables:kr(kr({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),n=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(n,r,oi.normal,this.queryId).then(function(i){return t.updateQuery(function(t){return e.updateQuery(t,{fetchMoreResult:i.data,variables:r.variables})}),t.queryManager.stopQuery(n),i},function(e){throw t.queryManager.stopQuery(n),e})},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery(function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})})},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=kr(kr({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var r=e.fetchPolicy;return this.setVariables(this.options.variables,t!==r&&("cache-only"===t||"standby"===t||"network-only"===r),e.fetchResults)},t.prototype.setVariables=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!0),this.isTornDown=!1,e=e||this.variables,!t&&zr(e,this.variables)?this.observers.size&&r?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=t.getQueryWithPreviousResult(this.queryId),n=r.previousResult,i=r.variables,o=r.document,a=Nn(function(){return e(n,{variables:i})});a&&(t.dataStore.markUpdateQueryResult(o,i,a),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){li(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:An(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var r=e._subscription._observer;r&&!r.error&&(r.error=ui)}catch(e){}var n=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),n&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,r=this.queryId;this.shouldSubscribe&&t.addObservableQuery(r,this),this.options.pollInterval&&(li(this),t.startPollingQuery(this.options,r));var n=function(t){e.updateLastResult(kr(kr({},e.lastResult),{errors:t.graphQLErrors,networkStatus:ei.error,loading:!1})),ci(e.observers,"error",e.lastError=t)};t.observeQuery(r,this.options,{next:function(r){if(e.lastError||e.isDifferentFromLastResult(r)){var n=e.updateLastResult(r),i=e.options,o=i.query,a=i.variables,s=i.fetchPolicy;t.transform(o).hasClientExports?t.getLocalState().addExportedVariables(o,a).then(function(i){var a=e.variables;e.variables=e.options.variables=i,!r.loading&&n&&"cache-only"!==s&&t.transform(o).serverQuery&&!zr(a,i)?e.refetch():ci(e.observers,"next",r)}):ci(e.observers,"next",r)}},error:n}).catch(n)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(ni);function ui(e){}function ci(e,t,r){var n=[];e.forEach(function(e){return e[t]&&n.push(e)}),n.forEach(function(e){return e[t](r)})}function li(e){var t=e.options.fetchPolicy;Dr("cache-first"!==t&&"cache-only"!==t,3)}var hi=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,r){this.store[e]={mutation:t,variables:r||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var r=this.store[e];r&&(r.loading=!1,r.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),fi=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];Dr(!t||t.document===e.document||zr(t.document,e.document),19);var r,n=!1,i=null;e.storePreviousVariables&&t&&t.networkStatus!==ei.loading&&(zr(t.variables,e.variables)||(n=!0,i=t.variables)),r=n?ei.setVariables:e.isPoll?ei.poll:e.isRefetch?ei.refetch:ei.loading;var o=[];t&&t.graphQLErrors&&(o=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:i,networkError:null,graphQLErrors:o,networkStatus:r,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=ei.fetchMore)},e.prototype.markQueryResult=function(e,t,r){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=ii(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=ei.ready,"string"==typeof r&&this.store[r]&&(this.store[r].networkStatus=ei.ready))},e.prototype.markQueryError=function(e,t,r){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=ei.error,"string"==typeof r&&this.markQueryResultClient(r,!0))},e.prototype.markQueryResultClient=function(e,t){var r=this.store&&this.store[e];r&&(r.networkError=null,r.previousVariables=null,t&&(r.networkStatus=ei.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach(function(r){e.indexOf(r)<0?t.stopQuery(r):t.store[r].networkStatus=ei.loading})},e}(),pi=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=Dn(t.resolvers,e)}):this.resolvers=Dn(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,n=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return Or(this,void 0,void 0,function(){return Tr(this,function(e){return t?[2,this.resolveDocument(t,r.data,n,i,this.fragmentMatcher,a).then(function(e){return kr(kr({},r),{data:e.result})})]:[2,r]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return sn(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?function(e){fn(e);var t=kn([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=(0,Ar.visit)(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every(function(e){return en(e)&&"__typename"===e.name.value}))return null}}})),t}(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return kr(kr({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Dr(!1,6)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),Or(this,void 0,void 0,function(){return Tr(this,function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then(function(e){return kr(kr({},t),e.exportedVariables)})]:[2,kr({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,Ar.visit)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return Ar.BREAK}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Tn(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,n,i,o){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),Or(this,void 0,void 0,function(){var a,s,u,c,l,h,f,p,d;return Tr(this,function(m){var y;return a=yn(e),s=mn(e),u=vn(s),c=a.operation,l=c?(y=c).charAt(0).toUpperCase()+y.slice(1):"Query",f=(h=this).cache,p=h.client,d={fragmentMap:u,context:kr(kr({},r),{cache:f,client:p}),variables:n,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,d).then(function(e){return{result:e,exportedVariables:d.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,r){return Or(this,void 0,void 0,function(){var n,i,o,a,s,u=this;return Tr(this,function(c){return n=r.fragmentMap,i=r.context,o=r.variables,a=[t],s=function(e){return Or(u,void 0,void 0,function(){var s,u;return Tr(this,function(c){return an(e,o)?en(e)?[2,this.resolveField(e,t,r).then(function(t){var r;void 0!==t&&a.push(((r={})[Zr(e)]=t,r))})]:(tn(e)?s=e:Dr(s=n[e.name.value],7),s&&s.typeCondition&&(u=s.typeCondition.name.value,r.fragmentMatcher(t,u,i))?[2,this.resolveSelectionSet(s.selectionSet,t,r).then(function(e){a.push(e)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(s)).then(function(){return Ln(a)})]})})},e.prototype.resolveField=function(e,t,r){return Or(this,void 0,void 0,function(){var n,i,o,a,s,u,c,l,h,f=this;return Tr(this,function(p){return n=r.variables,i=e.name.value,o=Zr(e),a=i!==o,s=t[o]||t[i],u=Promise.resolve(s),r.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(c=t.__typename||r.defaultOperationType,(l=this.resolvers&&this.resolvers[c])&&(h=l[a?i:o])&&(u=Promise.resolve(h(t,Xr(e,n),r.context,{field:e,fragmentMap:r.fragmentMap})))),[2,u.then(function(t){return void 0===t&&(t=s),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=t)})}),e.selectionSet?null==t?t:Array.isArray(t)?f.resolveSubSelectedArray(e,t,r):e.selectionSet?f.resolveSelectionSet(e.selectionSet,t,r):void 0:t})]})})},e.prototype.resolveSubSelectedArray=function(e,t,r){var n=this;return Promise.all(t.map(function(t){return null===t?null:Array.isArray(t)?n.resolveSubSelectedArray(e,t,r):e.selectionSet?n.resolveSelectionSet(e.selectionSet,t,r):void 0}))},e}();function di(e){var t=new Set,r=null;return new ni(function(n){return t.add(n),r=r||e.subscribe({next:function(e){t.forEach(function(t){return t.next&&t.next(e)})},error:function(e){t.forEach(function(t){return t.error&&t.error(e)})},complete:function(){t.forEach(function(e){return e.complete&&e.complete()})}}),function(){t.delete(n)&&!t.size&&r&&(r.unsubscribe(),r=null)}})}var mi=Object.prototype.hasOwnProperty,yi=function(){function e(e){var t=e.link,r=e.queryDeduplication,n=void 0!==r&&r,i=e.store,o=e.onBroadcast,a=void 0===o?function(){}:o,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,h=e.localState,f=e.assumeImmutableResults;this.mutationStore=new hi,this.queryStore=new fi,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(In?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=t,this.queryDeduplication=n,this.dataStore=i,this.onBroadcast=a,this.clientAwareness=l,this.localState=h||new pi({cache:i.getCache()}),this.ssrMode=u,this.assumeImmutableResults=!!f}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,r){e.stopQueryNoBroadcast(r)}),this.fetchQueryRejectFns.forEach(function(e){e(new Fr(8))})},e.prototype.mutate=function(e){var t=e.mutation,r=e.variables,n=e.optimisticResponse,i=e.updateQueries,o=e.refetchQueries,a=void 0===o?[]:o,s=e.awaitRefetchQueries,u=void 0!==s&&s,c=e.update,l=e.errorPolicy,h=void 0===l?"none":l,f=e.fetchPolicy,p=e.context,d=void 0===p?{}:p;return Or(this,void 0,void 0,function(){var e,o,s,l=this;return Tr(this,function(p){switch(p.label){case 0:return Dr(t,9),Dr(!f||"no-cache"===f,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,function(){return{document:t}}),r=this.getVariables(t,r),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,r,d)]:[3,2];case 1:r=p.sent(),p.label=2;case 2:return o=function(){var e={};return i&&l.queries.forEach(function(t,r){var n=t.observableQuery;if(n){var o=n.queryName;o&&mi.call(i,o)&&(e[r]={updater:i[o],query:l.queryStore.get(r)})}}),e},this.mutationStore.initMutation(e,t,r),this.dataStore.markMutationInit({mutationId:e,document:t,variables:r,updateQueries:o(),update:c,optimisticResponse:n}),this.broadcastQueries(),s=this,[2,new Promise(function(i,l){var p,m;s.getObservableFromLink(t,kr(kr({},d),{optimisticResponse:n}),r,!1).subscribe({next:function(n){qn(n)&&"none"===h?m=new ai({graphQLErrors:n.errors}):(s.mutationStore.markMutationResult(e),"no-cache"!==f&&s.dataStore.markMutationResult({mutationId:e,result:n,document:t,variables:r,updateQueries:o(),update:c}),p=n)},error:function(t){s.mutationStore.markMutationError(e,t),s.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),s.broadcastQueries(),s.setQuery(e,function(){return{document:null}}),l(new ai({networkError:t}))},complete:function(){if(m&&s.mutationStore.markMutationError(e,m),s.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),s.broadcastQueries(),m)l(m);else{"function"==typeof a&&(a=a(p));var t=[];ii(a)&&a.forEach(function(e){if("string"==typeof e)s.queries.forEach(function(r){var n=r.observableQuery;n&&n.queryName===e&&t.push(n.refetch())});else{var r={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(r.context=e.context),t.push(s.query(r))}}),Promise.all(u?t:[]).then(function(){s.setQuery(e,function(){return{document:null}}),"ignore"===h&&p&&qn(p)&&delete p.errors,i(p)})}}})})]}})})},e.prototype.fetchQuery=function(e,t,r,n){return Or(this,void 0,void 0,function(){var i,o,a,s,u,c,l,h,f,p,d,m,y,v,g,b,w,E,R=this;return Tr(this,function(S){switch(S.label){case 0:return i=t.metadata,o=void 0===i?null:i,a=t.fetchPolicy,s=void 0===a?"cache-first":a,u=t.context,c=void 0===u?{}:u,l=this.transform(t.query).document,h=this.getVariables(l,t.variables),this.transform(l).hasClientExports?[4,this.localState.addExportedVariables(l,h,c)]:[3,2];case 1:h=S.sent(),S.label=2;case 2:if(t=kr(kr({},t),{variables:h}),d=p="network-only"===s||"no-cache"===s,p||(m=this.dataStore.getCache().diff({query:l,variables:h,returnPartialData:!0,optimistic:!1}),y=m.complete,v=m.result,d=!y||"cache-and-network"===s,f=v),g=d&&"cache-only"!==s&&"standby"!==s,sn(["live"],l)&&(g=!0),b=this.idCounter++,w="no-cache"!==s?this.updateQueryWatch(e,l,t):void 0,this.setQuery(e,function(){return{document:l,lastRequestId:b,invalidated:!0,cancel:w}}),this.invalidate(n),this.queryStore.initQuery({queryId:e,document:l,storePreviousVariables:g,variables:h,isPoll:r===oi.poll,isRefetch:r===oi.refetch,metadata:o,fetchMoreForQueryId:n}),this.broadcastQueries(),g){if(E=this.fetchRequest({requestId:b,queryId:e,document:l,options:t,fetchMoreForQueryId:n}).catch(function(t){throw t.hasOwnProperty("graphQLErrors")?t:(b>=R.getQuery(e).lastRequestId&&(R.queryStore.markQueryError(e,t,n),R.invalidate(e),R.invalidate(n),R.broadcastQueries()),new ai({networkError:t}))}),"cache-and-network"!==s)return[2,E];E.catch(function(){})}return this.queryStore.markQueryResultClient(e,!g),this.invalidate(e),this.invalidate(n),this.transform(l).hasForcedResolvers?[2,this.localState.runResolvers({document:l,remoteResult:{data:f},context:c,variables:h,onlyRunForcedResolvers:!0}).then(function(r){return R.markQueryResult(e,r,t,n),R.broadcastQueries(),r})]:(this.broadcastQueries(),[2,{data:f}])}})})},e.prototype.markQueryResult=function(e,t,r,n){var i=r.fetchPolicy,o=r.variables,a=r.errorPolicy;"no-cache"===i?this.setQuery(e,function(){return{newData:{result:t.data,complete:!0}}}):this.dataStore.markQueryResult(t,this.getQuery(e).document,o,n,"ignore"===a||"all"===a)},e.prototype.queryListenerForObserver=function(e,t,r){var n=this;function i(e,t){if(r[e])try{r[e](t)}catch(e){}}return function(r,o){if(n.invalidate(e,!1),r){var a=n.getQuery(e),s=a.observableQuery,u=a.document,c=s?s.options.fetchPolicy:t.fetchPolicy;if("standby"!==c){var l=ri(r.networkStatus),h=s&&s.getLastResult(),f=!(!h||h.networkStatus===r.networkStatus),p=t.returnPartialData||!o&&r.previousVariables||f&&t.notifyOnNetworkStatusChange||"cache-only"===c||"cache-and-network"===c;if(!l||p){var d=ii(r.graphQLErrors),m=s&&s.options.errorPolicy||t.errorPolicy||"none";if("none"===m&&d||r.networkError)return i("error",new ai({graphQLErrors:r.graphQLErrors,networkError:r.networkError}));try{var y=void 0,v=void 0;if(o)"no-cache"!==c&&"network-only"!==c&&n.setQuery(e,function(){return{newData:null}}),y=o.result,v=!o.complete;else{var g=s&&s.getLastError(),b="none"!==m&&(g&&g.graphQLErrors)!==r.graphQLErrors;if(h&&h.data&&!b)y=h.data,v=!1;else{var w=n.dataStore.getCache().diff({query:u,variables:r.previousVariables||r.variables,returnPartialData:!0,optimistic:!0});y=w.result,v=!w.complete}}var E=v&&!(t.returnPartialData||"cache-only"===c),R={data:E?h&&h.data:y,loading:l,networkStatus:r.networkStatus,stale:E};"all"===m&&d&&(R.errors=r.graphQLErrors),i("next",R)}catch(e){i("error",new ai({networkError:e}))}}}}}},e.prototype.transform=function(e){var t,r=this.transformCache;if(!r.has(e)){var n=this.dataStore.getCache(),i=n.transformDocument(e),o=(t=n.transformForLink(i),kn([xn],fn(t))),a=this.localState.clientQuery(i),s=this.localState.serverQuery(o),u={document:i,hasClientExports:un(i),hasForcedResolvers:this.localState.shouldForceResolvers(i),clientQuery:a,serverQuery:s,defaultVars:gn(pn(i))},c=function(e){e&&!r.has(e)&&r.set(e,u)};c(e),c(i),c(a),c(s)}return r.get(e)},e.prototype.getVariables=function(e,t){return kr(kr({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Dr("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=kr({},e);return new si({queryManager:this,options:r,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Dr(e.query,12),Dr("Document"===e.query.kind,13),Dr(!e.returnPartialData,14),Dr(!e.pollInterval,15),new Promise(function(r,n){var i=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+i.queryId,n),i.result().then(r,n).then(function(){return t.fetchQueryRejectFns.delete("query:"+i.queryId)})})},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,function(e){return e.listeners.add(t),{invalidated:!1}})},e.prototype.updateQueryWatch=function(e,t,r){var n=this,i=this.getQuery(e).cancel;return i&&i(),this.dataStore.getCache().watch({query:t,variables:r.variables,optimistic:!0,previousResult:function(){var t=null,r=n.getQuery(e).observableQuery;if(r){var i=r.getLastResult();i&&(t=i.data)}return t},callback:function(t){n.setQuery(e,function(){return{invalidated:!0,newData:t}})}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,function(){return{observableQuery:t}})},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,function(){return{observableQuery:null}}),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach(function(e){e(new Fr(16))});var e=[];return this.queries.forEach(function(t,r){t.observableQuery&&e.push(r)}),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then(function(){return e.reFetchObservableQueries()})},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.queries.forEach(function(n,i){var o=n.observableQuery;if(o){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!e&&"standby"===a||r.push(o.refetch()),t.setQuery(i,function(){return{newData:null}}),t.invalidate(i)}}),this.broadcastQueries(),Promise.all(r)},e.prototype.observeQuery=function(e,t,r){return this.addQueryListener(e,this.queryListenerForObserver(e,t,r)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,r){return this.addQueryListener(e,r),this.fetchQuery(e,t).catch(function(){}),e},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.variables;r=this.transform(r).document,i=this.getVariables(r,i);var o=function(e){return t.getObservableFromLink(r,{},e,!1).map(function(i){if(n&&"no-cache"===n||(t.dataStore.markSubscriptionResult(i,r,e),t.broadcastQueries()),qn(i))throw new ai({graphQLErrors:i.errors});return i})};if(this.transform(r).hasClientExports){var a=this.localState.addExportedVariables(r,i).then(o);return new ni(function(e){var t=null;return a.then(function(r){return t=r.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return o(i)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach(function(e){return e.unsubscribe()}),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var r=e.options,n=r.variables,i=r.query,o=r.fetchPolicy,a=r.returnPartialData,s=e.getLastResult(),u=this.getQuery(e.queryId).newData;if(u&&u.complete)return{data:u.result,partial:!1};if("no-cache"===o||"network-only"===o)return{data:void 0,partial:!1};var c=this.dataStore.getCache().diff({query:i,variables:n,previousResult:s?s.data:void 0,returnPartialData:!0,optimistic:t}),l=c.result,h=c.complete;return{data:h||a?l:void 0,partial:!h}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var r=this.getQuery(e).observableQuery;Dr(r,17),t=r}else t=e;var n=t.options,i=n.variables,o=n.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:i,document:o}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach(function(t,r){t.invalidated&&t.listeners.forEach(function(n){n&&n(e.queryStore.get(r),t.newData)})})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,n){var i,o=this;void 0===n&&(n=this.queryDeduplication);var a=this.transform(e).serverQuery;if(a){var s=this.inFlightLinkObservables,u=this.link,c={query:a,variables:r,operationName:dn(a)||void 0,context:this.prepareContext(kr(kr({},t),{forceFetch:!n}))};if(t=c.context,n){var l=s.get(a)||new Map;s.set(a,l);var h=JSON.stringify(r);if(!(i=l.get(h))){l.set(h,i=di(Zn(u,c)));var f=function(){l.delete(h),l.size||s.delete(a),p.unsubscribe()},p=i.subscribe({next:f,error:f,complete:f})}}else i=di(Zn(u,c))}else i=ni.of({data:{}}),t=this.prepareContext(t);var d=this.transform(e).clientQuery;return d&&(i=function(e){return new ni(function(n){var i=n.next,a=n.error,s=n.complete,u=0,c=!1,l={next:function(e){++u,new Promise(function(n){n(function(e){return o.localState.runResolvers({document:d,remoteResult:e,context:t,variables:r})}(e))}).then(function(e){--u,i&&i.call(n,e),c&&l.complete()},function(e){--u,a&&a.call(n,e)})},error:function(e){a&&a.call(n,e)},complete:function(){c=!0,u||s&&s.call(n)}},h=e.subscribe(l);return function(){return h.unsubscribe()}})}(i)),i},e.prototype.fetchRequest=function(e){var t,r,n=this,i=e.requestId,o=e.queryId,a=e.document,s=e.options,u=e.fetchMoreForQueryId,c=s.variables,l=s.errorPolicy,h=void 0===l?"none":l,f=s.fetchPolicy;return new Promise(function(e,l){var p=n.getObservableFromLink(a,s.context,c),d="fetchRequest:"+o;n.fetchQueryRejectFns.set(d,l);var m=function(){n.fetchQueryRejectFns.delete(d),n.setQuery(o,function(e){e.subscriptions.delete(y)})},y=p.map(function(e){if(i>=n.getQuery(o).lastRequestId&&(n.markQueryResult(o,e,s,u),n.queryStore.markQueryResult(o,e,u),n.invalidate(o),n.invalidate(u),n.broadcastQueries()),"none"===h&&ii(e.errors))return l(new ai({graphQLErrors:e.errors}));if("all"===h&&(r=e.errors),u||"no-cache"===f)t=e.data;else{var p=n.dataStore.getCache().diff({variables:c,query:a,optimistic:!1,returnPartialData:!0}),d=p.result;(p.complete||s.returnPartialData)&&(t=d)}}).subscribe({error:function(e){m(),l(e)},complete:function(){m(),e({data:t,errors:r,loading:!1,networkStatus:ei.ready,stale:!1})}});n.setQuery(o,function(e){e.subscriptions.add(y)})})},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var r=this.getQuery(e),n=kr(kr({},r),t(r));this.queries.set(e,n)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,function(){return{invalidated:t}})},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return kr(kr({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==ei.ready&&t.networkStatus!==ei.error},e.prototype.startPollingQuery=function(e,t,r){var n=this,i=e.pollInterval;if(Dr(i,18),!this.ssrMode){var o=this.pollingInfoByQueryId.get(t);o||this.pollingInfoByQueryId.set(t,o={}),o.interval=i,o.options=kr(kr({},e),{fetchPolicy:"network-only"});var a=function(){var e=n.pollingInfoByQueryId.get(t);e&&(n.checkInFlight(t)?s():n.fetchQuery(t,e.options,oi.poll).then(s,s))},s=function(){var e=n.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(a,e.interval))};r&&this.addQueryListener(t,r),s()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),vi=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,r,n,i){void 0===i&&(i=!1);var o=!qn(e);i&&qn(e)&&e.data&&(o=!0),!n&&o&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:r})},e.prototype.markSubscriptionResult=function(e,t,r){qn(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:r})},e.prototype.markMutationInit=function(e){var t,r=this;e.optimisticResponse&&(t="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction(function(n){var i=r.cache;r.cache=n;try{r.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{r.cache=i}},e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!qn(e.result)){var r=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],n=e.updateQueries;n&&Object.keys(n).forEach(function(i){var o=n[i],a=o.query,s=o.updater,u=t.cache.diff({query:a.document,variables:a.variables,returnPartialData:!0,optimistic:!1}),c=u.result;if(u.complete){var l=Nn(function(){return s(c,{mutationResult:e.result,queryName:dn(a.document)||void 0,queryVariables:a.variables})});l&&r.push({result:l,dataId:"ROOT_QUERY",query:a.document,variables:a.variables})}}),this.cache.performTransaction(function(t){r.forEach(function(e){return t.write(e)});var n=e.update;n&&Nn(function(){return n(t,e.result)})})}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,r){this.cache.write({result:r,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),gi=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.cache,n=e.ssrMode,i=void 0!==n&&n,o=e.ssrForceFetchDelay,a=void 0===o?0:o,s=e.connectToDevTools,u=e.queryDeduplication,c=void 0===u||u,l=e.defaultOptions,h=e.assumeImmutableResults,f=void 0!==h&&h,p=e.resolvers,d=e.typeDefs,m=e.fragmentMatcher,y=e.name,v=e.version,g=e.link;if(!g&&p&&(g=Xn.empty()),!g||!r)throw new Fr(4);this.link=g,this.cache=r,this.store=new vi(r),this.disableNetworkFetches=i||a>0,this.queryDeduplication=c,this.defaultOptions=l||{},this.typeDefs=d,a&&setTimeout(function(){return t.disableNetworkFetches=!1},a),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),void 0!==s&&s&&"undefined"!=typeof window&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new pi({cache:r,client:this,resolvers:p,fragmentMatcher:m}),this.queryManager=new yi({link:this.link,store:this.store,queryDeduplication:c,ssrMode:i,clientAwareness:{name:y,version:v},localState:this.localState,assumeImmutableResults:f,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=kr(kr({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=kr(kr({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=kr(kr({},this.defaultOptions.query),e)),Dr("cache-and-network"!==e.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=kr(kr({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=kr(kr({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Zn(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore()}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore()}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}();function bi(e){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:wi(e)}]}}function wi(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return null;if(Array.isArray(e))return wi(e[0]);var t=[];return Object.keys(e).forEach(function(r){var n={kind:"Field",name:{kind:"Name",value:r},selectionSet:wi(e[r])||void 0};t.push(n)}),{kind:"SelectionSet",selections:t}}var Ei,Ri={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},Si=function(){function e(){}return e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.read({query:e.query,variables:e.variables,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.read({query:ln(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,optimistic:t})},e.prototype.writeQuery=function(e){this.write({dataId:"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables})},e.prototype.writeFragment=function(e){this.write({dataId:e.id,result:e.data,variables:e.variables,query:ln(e.fragment,e.fragmentName)})},e.prototype.writeData=function(e){var t,r,n=e.id,i=e.data;if(void 0!==n){var o=null;try{o=this.read({rootId:n,optimistic:!1,query:Ri})}catch(e){}var a=o&&o.__typename||"__ClientData",s=Object.assign({__typename:a},i);this.writeFragment({id:n,fragment:(t=s,r=a,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:r||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:wi(t)}]}),data:s})}else this.writeQuery({query:bi(i),data:i})},e}();Ei||(Ei={});var ki=null,xi={},Oi=1,Ti="@wry/context:Slot",Ii=Array,_i=Ii[Ti]||function(){var e=function(){function e(){this.id=["slot",Oi++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=ki;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===xi)break;return e!==ki&&(ki.slots[this.id]=t),!0}return ki&&(ki.slots[this.id]=xi),!1},e.prototype.getValue=function(){if(this.hasValue())return ki.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),a=ki;ki={parent:a,slots:o};try{return t.apply(n,r)}finally{ki=a}},e.bind=function(e){var t=ki;return function(){var r=ki;try{return ki=t,e.apply(this,arguments)}finally{ki=r}}},e.noContext=function(e,t,r){if(!ki)return e.apply(r,t);var n=ki;try{return ki=null,e.apply(r,t)}finally{ki=n}},e}();try{Object.defineProperty(Ii,Ti,{value:Ii[Ti]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function Ai(){}_i.bind,_i.noContext;var Pi=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Ai),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},e.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getEntry(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Ci=new _i,Ni=[],qi=[];function Fi(e,t){if(!e)throw new Error(t||"assertion failure")}function Di(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Li=function(){function e(t,r){this.fn=t,this.args=r,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++e.count}return e.prototype.recompute=function(){if(Fi(!this.recomputing,"already recomputing"),function(e){var t=Ci.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Bi(e)?ji(t,e):Qi(t,e),t}(this)||!zi(this))return Bi(this)?(t=Ki(e=this),Ci.withValue(e,$i,[e]),function(e){if("function"==typeof e.subscribe)try{Wi(e),e.unsubscribe=e.subscribe.apply(null,e.args)}catch(t){return e.setDirty(),!1}return!0}(e)&&function(e){e.dirty=!1,Bi(e)||Mi(e)}(e),t.forEach(zi),Di(e.value)):Di(this.value);var e,t},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Ui(this),Wi(this))},e.prototype.dispose=function(){var e=this;Ki(this).forEach(zi),Wi(this),this.parents.forEach(function(t){t.setDirty(),Gi(t,e)})},e.count=0,e}();function $i(e){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,e.args)}catch(t){e.value[1]=t}e.recomputing=!1}function Bi(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Ui(e){e.parents.forEach(function(t){return ji(t,e)})}function Mi(e){e.parents.forEach(function(t){return Qi(t,e)})}function ji(e,t){if(Fi(e.childValues.has(t)),Fi(Bi(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=qi.pop()||new Set;e.dirtyChildren.add(t),Ui(e)}function Qi(e,t){Fi(e.childValues.has(t)),Fi(!Bi(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),Vi(e,t),Bi(e)||Mi(e)}function Vi(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(qi.length<100&&qi.push(r),e.dirtyChildren=null))}function zi(e){return 0===e.parents.size&&"function"==typeof e.reportOrphan&&!0===e.reportOrphan()}function Ki(e){var t=Ni;return e.childValues.size>0&&(t=[],e.childValues.forEach(function(r,n){Gi(e,n),t.push(n)})),Fi(null===e.dirtyChildren),t}function Gi(e,t){t.parents.delete(e),e.childValues.delete(t),Vi(e,t)}function Wi(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Hi=function(){function e(e){this.weakness=e}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return e.forEach(function(e){return t=t.getChildTrie(e)}),t.data||(t.data=Object.create(null))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness)),n},e}(),Ji=new Hi("function"==typeof WeakMap);function Yi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ji.lookupArray(e)}var Xi=new Set;function Zi(e,t){void 0===t&&(t=Object.create(null));var r=new Pi(t.max||Math.pow(2,16),function(e){return e.dispose()}),n=!!t.disposable,i=t.makeCacheKey||Yi;function o(){if(!n||Ci.hasValue()){var o=i.apply(null,arguments);if(void 0===o)return e.apply(null,arguments);var a=Array.prototype.slice.call(arguments),s=r.get(o);s?s.args=a:(s=new Li(e,a),r.set(o,s),s.subscribe=t.subscribe,n&&(s.reportOrphan=function(){return r.delete(o)}));var u=s.recompute();return r.set(o,s),Xi.add(r),Ci.hasValue()||(Xi.forEach(function(e){return e.clean()}),Xi.clear()),n?void 0:u}}return o.dirty=function(){var e=i.apply(null,arguments),t=void 0!==e&&r.get(e);t&&t.setDirty()},o}var eo=!1;function to(){var e=!eo;return!0===Cn("test")||(eo=!0),e}var ro=function(){function e(){}return e.prototype.ensureReady=function(){return Promise.resolve()},e.prototype.canBypassInit=function(){return!0},e.prototype.match=function(e,t,r){var n=r.store.get(e.id),i="ROOT_QUERY"===e.id;if(!n)return i;var o=n.__typename,a=void 0===o?i&&"Query":o;return a&&a===t||(to(),"heuristic")},e}(),no=function(){function e(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}return e.prototype.match=function(e,t,r){Dr(this.isReady,1);var n=r.store.get(e.id),i="ROOT_QUERY"===e.id;if(!n)return i;var o=n.__typename,a=void 0===o?i&&"Query":o;if(Dr(a,2),a===t)return!0;var s=this.possibleTypesMap[t];return!!(a&&s&&s.indexOf(a)>-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach(function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map(function(e){return e.name}))}),t},e}(),io=Object.prototype.hasOwnProperty,oo=function(){function e(e){var t=this;void 0===e&&(e=Object.create(null)),this.data=e,this.depend=Zi(function(e){return t.data[e]},{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){io.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach(function(r){t.set(r,e[r])}),Object.keys(this.data).forEach(function(r){io.call(e,r)||t.delete(r)})):Object.keys(this.data).forEach(function(e){t.delete(e)})},e}();function ao(e){return new oo(e)}var so=function(){function e(e){var t=this,r=void 0===e?{}:e,n=r.cacheKeyRoot,i=void 0===n?new Hi(In):n,o=r.freezeResults,a=void 0!==o&&o,s=this,u=s.executeStoreQuery,c=s.executeSelectionSet,l=s.executeSubSelectedArray;this.freezeResults=a,this.executeStoreQuery=Zi(function(e){return u.call(t,e)},{makeCacheKey:function(e){var t=e.query,r=e.rootValue,n=e.contextValue,o=e.variableValues,a=e.fragmentMatcher;if(n.store instanceof oo)return i.lookup(n.store,t,a,JSON.stringify(o),r.id)}}),this.executeSelectionSet=Zi(function(e){return c.call(t,e)},{makeCacheKey:function(e){var t=e.selectionSet,r=e.rootValue,n=e.execContext;if(n.contextValue.store instanceof oo)return i.lookup(n.contextValue.store,t,n.fragmentMatcher,JSON.stringify(n.variableValues),r.id)}}),this.executeSubSelectedArray=Zi(function(e){return l.call(t,e)},{makeCacheKey:function(e){var t=e.field,r=e.array,n=e.execContext;if(n.contextValue.store instanceof oo)return i.lookup(n.contextValue.store,t,r,JSON.stringify(n.variableValues))}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(kr(kr({},e),{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t,r=e.store,n=e.query,i=e.variables,o=e.previousResult,a=e.returnPartialData,s=void 0===a||a,u=e.rootId,c=void 0===u?"ROOT_QUERY":u,l=e.fragmentMatcherFunction,h=e.config;i=hn({},gn((Dr((t=pn(n))&&"query"===t.operation,6),t)),i);var f={store:r,dataIdFromObject:h&&h.dataIdFromObject,cacheRedirects:h&&h.cacheRedirects||{}},p=this.executeStoreQuery({query:n,rootValue:{type:"id",id:c,generated:!0,typename:"Query"},contextValue:f,variableValues:i,fragmentMatcher:l}),d=p.missing&&p.missing.length>0;return d&&!s&&p.missing.forEach(function(e){if(!e.tolerable)throw new Fr(8)}),o&&zr(o,p.result)&&(p.result=o),{result:p.result,complete:!d}},e.prototype.executeStoreQuery=function(e){var t=e.query,r=e.rootValue,n=e.contextValue,i=e.variableValues,o=e.fragmentMatcher,a=void 0===o?co:o,s=yn(t),u={query:t,fragmentMap:vn(mn(t)),contextValue:n,variableValues:i,fragmentMatcher:a};return this.executeSelectionSet({selectionSet:s.selectionSet,rootValue:r,execContext:u})},e.prototype.executeSelectionSet=function(e){var t=this,r=e.selectionSet,n=e.rootValue,i=e.execContext,o=i.fragmentMap,a=i.contextValue,s=i.variableValues,u={result:null},c=[],l=a.store.get(n.id),h=l&&l.__typename||"ROOT_QUERY"===n.id&&"Query"||void 0;function f(e){var t;return e.missing&&(u.missing=u.missing||[],(t=u.missing).push.apply(t,e.missing)),e.result}return r.selections.forEach(function(e){var r;if(an(e,s))if(en(e)){var u=f(t.executeField(l,h,e,i));void 0!==u&&c.push(((r={})[Zr(e)]=u,r))}else{var p=void 0;if(tn(e))p=e;else if(!(p=o[e.name.value]))throw new Fr(9);var d=p.typeCondition&&p.typeCondition.name.value,m=!d||i.fragmentMatcher(n,d,a);if(m){var y=t.executeSelectionSet({selectionSet:p.selectionSet,rootValue:n,execContext:i});"heuristic"===m&&y.missing&&(y=kr(kr({},y),{missing:y.missing.map(function(e){return kr(kr({},e),{tolerable:!0})})})),c.push(f(y))}}}),u.result=Ln(c),this.freezeResults,u},e.prototype.executeField=function(e,t,r,n){var i=n.variableValues,o=n.contextValue,a=function(e,t,r,n,i,o){var a=o.directives,s=r;(n||a)&&(s=Yr(s,n,a));var u,c=void 0;if(e&&void 0===(c=e[s])&&i.cacheRedirects&&"string"==typeof t){var l=i.cacheRedirects[t];if(l){var h=l[r];h&&(c=h(e,n,{getCacheKey:function(e){var t=i.dataIdFromObject(e);return t&&nn({id:t,typename:e.__typename})}}))}}return void 0===c?{result:c,missing:[{object:e,fieldName:s,tolerable:!1}]}:(null!=(u=c)&&"object"==typeof u&&"json"===u.type&&(c=c.json),{result:c})}(e,t,r.name.value,Xr(r,i),o,{resultKey:Zr(r),directives:on(r,i)});return Array.isArray(a.result)?this.combineExecResults(a,this.executeSubSelectedArray({field:r,array:a.result,execContext:n})):r.selectionSet?null==a.result?a:this.combineExecResults(a,this.executeSelectionSet({selectionSet:r.selectionSet,rootValue:a.result,execContext:n})):(uo(r,a.result),this.freezeResults,a)},e.prototype.combineExecResults=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.forEach(function(t){t.missing&&(e=e||[]).push.apply(e,t.missing)}),{result:t.pop().result,missing:e}},e.prototype.executeSubSelectedArray=function(e){var t,r=this,n=e.field,i=e.array,o=e.execContext;function a(e){return e.missing&&(t=t||[]).push.apply(t,e.missing),e.result}return i=i.map(function(e){return null===e?null:Array.isArray(e)?a(r.executeSubSelectedArray({field:n,array:e,execContext:o})):n.selectionSet?a(r.executeSelectionSet({selectionSet:n.selectionSet,rootValue:e,execContext:o})):(uo(n,e),e)}),this.freezeResults,{result:i,missing:t}},e}();function uo(e,t){if(!e.selectionSet&&rn(t))throw new Fr(10)}function co(){return!0}var lo=function(){function e(e){void 0===e&&(e=Object.create(null)),this.data=e}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t},e.prototype.delete=function(e){this.data[e]=void 0},e.prototype.clear=function(){this.data=Object.create(null)},e.prototype.replace=function(e){this.data=e||Object.create(null)},e}(),ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="WriteError",t}return Sr(t,e),t}(Error),fo=function(){function e(){}return e.prototype.writeQueryToStore=function(e){var t=e.query,r=e.result,n=e.store,i=void 0===n?ao():n,o=e.variables,a=e.dataIdFromObject,s=e.fragmentMatcherFunction;return this.writeResultToStore({dataId:"ROOT_QUERY",result:r,document:t,store:i,variables:o,dataIdFromObject:a,fragmentMatcherFunction:s})},e.prototype.writeResultToStore=function(e){var t=e.dataId,r=e.result,n=e.document,i=e.store,o=void 0===i?ao():i,a=e.variables,s=e.dataIdFromObject,u=e.fragmentMatcherFunction,c=pn(n);try{return this.writeSelectionSetToStore({result:r,dataId:t,selectionSet:c.selectionSet,context:{store:o,processedData:{},variables:hn({},gn(c),a),dataIdFromObject:s,fragmentMap:vn(mn(n)),fragmentMatcherFunction:u}})}catch(e){throw function(e,t){var r=new ho("Error writing result to store for query:\n "+JSON.stringify(t));return r.message+="\n"+e.message,r.stack=e.stack,r}(e,n)}},e.prototype.writeSelectionSetToStore=function(e){var t=this,r=e.result,n=e.dataId,i=e.selectionSet,o=e.context,a=o.variables,s=o.store,u=o.fragmentMap;return i.selections.forEach(function(e){var i;if(an(e,a))if(en(e)){var s=Zr(e),c=r[s];if(void 0!==c)t.writeFieldToStore({dataId:n,value:c,field:e,context:o});else{var l=!1,h=!1;e.directives&&e.directives.length&&(l=e.directives.some(function(e){return e.name&&"defer"===e.name.value}),h=e.directives.some(function(e){return e.name&&"client"===e.name.value})),!l&&!h&&o.fragmentMatcherFunction}}else{var f=void 0;tn(e)?f=e:Dr(f=(u||{})[e.name.value],3);var p=!0;if(o.fragmentMatcherFunction&&f.typeCondition){var d=n||"self",m=nn({id:d,typename:void 0}),y={store:new lo((i={},i[d]=r,i)),cacheRedirects:{}},v=o.fragmentMatcherFunction(m,f.typeCondition.name.value,y);Cn("production"),p=!!v}p&&t.writeSelectionSetToStore({result:r,selectionSet:f.selectionSet,dataId:n,context:o})}}),s},e.prototype.writeFieldToStore=function(e){var t,r,n,i=e.field,o=e.value,a=e.dataId,s=e.context,u=s.variables,c=s.dataIdFromObject,l=s.store,h=function(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach(function(n){var i=n.name,o=n.value;return Hr(r[e.name.value],i,o,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(e){var r=e.name,i=e.value;return Hr(n,r,i,t)})),Yr(e.name.value,n,r)}(i,u);if(i.selectionSet&&null!==o)if(Array.isArray(o)){var f=a+"."+h;r=this.processArrayValue(o,f,i.selectionSet,s)}else{var p=a+"."+h,d=!0;if(po(p)||(p="$"+p),c){var m=c(o);Dr(!m||!po(m),4),(m||"number"==typeof m&&0===m)&&(p=m,d=!1)}yo(p,i,s.processedData)||this.writeSelectionSetToStore({dataId:p,result:o,selectionSet:i.selectionSet,context:s});var y=o.__typename;r=nn({id:p,typename:y},d);var v=(n=l.get(a))&&n[h];if(v!==r&&rn(v)){var g=void 0!==v.typename,b=void 0!==y,w=g&&b&&v.typename!==y;Dr(!d||v.generated||w,5),Dr(!g||b,6),v.generated&&(w?d||l.delete(v.id):mo(v.id,r.id,l))}}else r=null!=o&&"object"==typeof o?{type:"json",json:o}:o;(n=l.get(a))&&zr(r,n[h])||l.set(a,kr(kr({},n),((t={})[h]=r,t)))},e.prototype.processArrayValue=function(e,t,r,n){var i=this;return e.map(function(e,o){if(null===e)return null;var a=t+"."+o;if(Array.isArray(e))return i.processArrayValue(e,a,r,n);var s=!0;if(n.dataIdFromObject){var u=n.dataIdFromObject(e);u&&(a=u,s=!1)}return yo(a,r,n.processedData)||i.writeSelectionSetToStore({dataId:a,result:e,selectionSet:r,context:n}),nn({id:a,typename:e.__typename},s)})},e}();function po(e){return"$"===e[0]}function mo(e,t,r){if(e===t)return!1;var n=r.get(e),i=r.get(t),o=!1;Object.keys(n).forEach(function(e){var t=n[e],a=i[e];rn(t)&&po(t.id)&&rn(a)&&!zr(t,a)&&mo(t.id,a.id,r)&&(o=!0)}),r.delete(e);var a=kr(kr({},n),i);return zr(a,i)?o:(r.set(t,a),!0)}function yo(e,t,r){if(!r)return!1;if(r[e]){if(r[e].indexOf(t)>=0)return!0;r[e].push(t)}else r[e]=[t];return!1}var vo={fragmentMatcher:new ro,dataIdFromObject:go,addTypename:!0,resultCaching:!0,freezeResults:!1};function go(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null}var bo=Object.prototype.hasOwnProperty,wo=function(e){function t(t,r,n){var i=e.call(this,Object.create(null))||this;return i.optimisticId=t,i.parent=r,i.transaction=n,i}return Sr(t,e),t.prototype.toObject=function(){return kr(kr({},this.parent.toObject()),this.data)},t.prototype.get=function(e){return bo.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(lo),Eo=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;r.watches=new Set,r.typenameDocumentCache=new Map,r.cacheKeyRoot=new Hi(In),r.silenceBroadcast=!1,r.config=kr(kr({},vo),t),r.config.customResolvers&&(r.config.cacheRedirects=r.config.customResolvers),r.config.cacheResolvers&&(r.config.cacheRedirects=r.config.cacheResolvers),r.addTypename=!!r.config.addTypename,r.data=r.config.resultCaching?new oo:new lo,r.optimisticData=r.data,r.storeWriter=new fo,r.storeReader=new so({cacheKeyRoot:r.cacheKeyRoot,freezeResults:t.freezeResults});var n=r,i=n.maybeBroadcastWatch;return r.maybeBroadcastWatch=Zi(function(e){return i.call(r,e)},{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return n.data instanceof oo?n.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),r}return Sr(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){if("string"==typeof e.rootId&&void 0===this.data.get(e.rootId))return null;var t=this.config.fragmentMatcher,r=t&&t.match;return this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:r,previousResult:e.previousResult,config:this.config})||null},t.prototype.write=function(e){var t=this.config.fragmentMatcher,r=t&&t.match;this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:r}),this.broadcastWatches()},t.prototype.diff=function(e){var t=this.config.fragmentMatcher,r=t&&t.match;return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:r,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new Fr(7)},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],r=0,n=this.optimisticData;n instanceof wo;)n.optimisticId===e?++r:t.push(n),n=n.parent;if(r>0){for(this.optimisticData=n;t.length>0;){var i=t.pop();this.performTransaction(i.transaction,i.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var r=this.data,n=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new wo(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=n,this.data=r}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(r=e,t=(0,Ar.visit)(fn(r),{SelectionSet:{enter:function(e,t,r){if(!r||"OperationDefinition"!==r.kind){var n=e.selections;if(n&&!n.some(function(e){return en(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))})){var i=r;if(!(en(i)&&i.directives&&i.directives.some(function(e){return"export"===e.name.value})))return kr(kr({},e),{selections:Ir(n,[wn])})}}}}}),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}var r;return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach(function(t){return e.maybeBroadcastWatch(t)})},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(Si),Ro=u(1911),So={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},ko=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},xo=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=new Fr(2);throw n.parseError=e,n}return r},Oo=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,n=e.fetch,i=e.includeExtensions,o=e.useGETForQueries,a=xr(e,["uri","fetch","includeExtensions","useGETForQueries"]);!function(e){if(!e&&"undefined"==typeof fetch)throw new Fr(1)}(n),n||(n=fetch);var s={http:{includeExtensions:i},options:a.fetchOptions,credentials:a.credentials,headers:a.headers};return new Xn(function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(e,r),i=e.getContext(),a={};if(i.clientAwareness){var u=i.clientAwareness,c=u.name,l=u.version;c&&(a["apollographql-client-name"]=c),l&&(a["apollographql-client-version"]=l)}var h,f=kr({},a,i.headers),p={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:f},d=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=kr({},t.options,{headers:t.headers,credentials:t.credentials}),o=t.http;r.forEach(function(e){i=kr({},i,e.options,{headers:kr({},i.headers,e.headers)}),e.credentials&&(i.credentials=e.credentials),o=kr({},o,e.http)});var a=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:a,variables:u};return o.includeExtensions&&(l.extensions=s),o.includeQuery&&(l.query=(0,Ro.y)(c)),{options:i,body:l}}(e,So,s,p),m=d.options,y=d.body;if(!m.signal){var v=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),g=v.controller,b=v.signal;(h=g)&&(m.signal=b)}if(o&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(m.method="GET"),"GET"===m.method){var w=function(e,t){var r=[],n=function(e,t){r.push(e+"="+encodeURIComponent(t))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=xo(t.variables)}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=xo(t.extensions)}catch(e){return{parseError:e}}n("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+r.join("&")+a}}(t,y),E=w.newURI,R=w.parseError;if(R)return zn(R);t=E}else try{m.body=xo(y)}catch(R){return zn(R)}return new jn(function(r){var i;return n(t,m).then(function(t){return e.setContext({response:t}),t}).then((i=e,function(e){return e.text().then(function(t){try{return JSON.parse(t)}catch(n){var r=n;return r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,Promise.reject(r)}}).then(function(t){return e.status>=300&&ko(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||ko(e,t,"Server response was missing for query '"+(Array.isArray(i)?i.map(function(e){return e.operationName}):i.operationName)+"'."),t})})).then(function(e){return r.next(e),r.complete(),e}).catch(function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&r.next(e.result),r.error(e))}),function(){h&&h.abort()}})})};!function(e){Sr(function(t){return e.call(this,Oo(t).request)||this},e)}(Xn);var To=u(4742),Io=u.n(To),_o=function(){return _o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_o.apply(this,arguments)};function Ao(e,t){if(!Boolean(e))throw new Error(t)}function Po(e){return Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Po(e)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var Co="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function No(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,o=t+1;(r=n.exec(e.body))&&r.index<t;)i+=1,o=t+1-(r.index+r[0].length);return{line:i,column:o}}function qo(e){return Fo(e.source,No(e.source,e.start))}function Fo(e,t){var r=e.locationOffset.column-1,n=Lo(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?r:0,u=t.column+s,c="".concat(e.name,":").concat(a,":").concat(u,"\n"),l=n.split(/\r\n|[\n\r]/g),h=l[i];if(h.length>120){for(var f=Math.floor(u/80),p=u%80,d=[],m=0;m<h.length;m+=80)d.push(h.slice(m,m+80));return c+Do([["".concat(a),d[0]]].concat(d.slice(1,f+1).map(function(e){return["",e]}),[[" ",Lo(p-1)+"^"],["",d[f+1]]]))}return c+Do([["".concat(a-1),l[i-1]],["".concat(a),h],["",Lo(u-1)+"^"],["".concat(a+1),l[i+1]]])}function Do(e){var t=e.filter(function(e){return e[0],void 0!==e[1]}),r=Math.max.apply(Math,t.map(function(e){return e[0].length}));return t.map(function(e){var t,n=e[0],i=e[1];return Lo(r-(t=n).length)+t+(i?" | "+i:" |")}).join("\n")}function Lo(e){return Array(e+1).join(" ")}function $o(e){return $o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$o(e)}function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Uo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jo(e,t){return!t||"object"!==$o(t)&&"function"!=typeof t?Qo(e):t}function Qo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vo(e){var t="function"==typeof Map?new Map:void 0;return Vo=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return zo(e,arguments,Wo(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Go(n,e)},Vo(e)}function zo(e,t,r){return zo=Ko()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Go(i,r.prototype),i},zo.apply(null,arguments)}function Ko(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function Go(e,t){return Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Go(e,t)}function Wo(e){return Wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wo(e)}var Ho=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Go(e,t)}(a,e);var t,r,n,i,o=(t=a,r=Ko(),function(){var e,n=Wo(t);if(r){var i=Wo(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return jo(this,e)});function a(e,t,r,n,i,s,u){var c,l,h,f;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(f=o.call(this,e)).name="GraphQLError",f.originalError=null!=s?s:void 0,f.nodes=Jo(Array.isArray(t)?t:t?[t]:void 0);for(var p=[],d=0,m=null!==(y=f.nodes)&&void 0!==y?y:[];d<m.length;d++){var y,v=m[d].loc;null!=v&&p.push(v)}p=Jo(p),f.source=null!=r?r:null===(c=p)||void 0===c?void 0:c[0].source,f.positions=null!=n?n:null===(l=p)||void 0===l?void 0:l.map(function(e){return e.start}),f.locations=n&&r?n.map(function(e){return No(r,e)}):null===(h=p)||void 0===h?void 0:h.map(function(e){return No(e.source,e.start)}),f.path=null!=i?i:void 0;var g,b=null==s?void 0:s.extensions;return null==u&&"object"==Po(g=b)&&null!==g?f.extensions=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(r),!0).forEach(function(t){Uo(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},b):f.extensions=null!=u?u:{},Object.defineProperties(Qo(f),{message:{enumerable:!0},locations:{enumerable:null!=f.locations},path:{enumerable:null!=f.path},extensions:{enumerable:null!=f.extensions&&Object.keys(f.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s&&s.stack?(Object.defineProperty(Qo(f),"stack",{value:s.stack,writable:!0,configurable:!0}),jo(f)):(Error.captureStackTrace?Error.captureStackTrace(Qo(f),a):Object.defineProperty(Qo(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return n=a,i=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var i=n[r];i.loc&&(t+="\n\n"+qo(i.loc))}else if(e.source&&e.locations)for(var o=0,a=e.locations;o<a.length;o++){var s=a[o];t+="\n\n"+Fo(e.source,s)}return t}(this)}},{key:"toJSON",value:function(){return function(e){var t;e||Ao(0,"Received null or undefined error.");var r=null!==(t=e.message)&&void 0!==t?t:"An unknown error occurred.",n=e.locations,i=e.path,o=e.extensions;return o&&Object.keys(o).length>0?{message:r,locations:n,path:i,extensions:o}:{message:r,locations:n,path:i}}(this)}},{key:Co,get:function(){return"Object"}}],i&&Mo(n.prototype,i),a}(Vo(Error));function Jo(e){return void 0===e||0===e.length?void 0:e}function Yo(e,t,r){return new Ho("Syntax Error: ".concat(r),void 0,e,[t])}var Xo=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});const Zo="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function ea(e){var t=e.prototype.toJSON;"function"==typeof t||function(){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,Zo&&(e.prototype[Zo]=t)}var ta=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();ea(ta);var ra=function(){function e(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();ea(ra);var na=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function ia(e){return ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ia(e)}function oa(e,t){switch(ia(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(Zo)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var i=n.call(e);if(i!==e)return"string"==typeof i?i:oa(i,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var r=Math.min(10,e.length),n=e.length-r,i=[],o=0;o<r;++o)i.push(oa(e[o],t));return 1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map(function(r){return r+": "+oa(e[r],t)}).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}function aa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var sa=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||Ao(0,"Body must be a string. Received: ".concat(oa(e,[]),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||Ao(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ao(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r;return t=e,(r=[{key:Co,get:function(){return"Source"}}])&&aa(t.prototype,r),e}(),ua=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function ca(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:r=!1,n=!0,i=0;break;case 9:case 32:++i;break;default:n&&!r&&(null===o||i<o)&&(o=i),n=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==r)for(var n=1;n<t.length;n++)t[n]=t[n].slice(r);for(var i=0;i<t.length&&la(t[i]);)++i;for(var o=t.length;o>i&&la(t[o-1]);)--o;return t.slice(i,o).join("\n")}function la(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var ha=function(){function e(e){var t=new ra(na.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==na.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=pa(this,e)}while(e.kind===na.COMMENT);return e},e}();function fa(e){return isNaN(e)?na.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function pa(e,t){for(var r=e.source,n=r.body,i=n.length,o=t.end;o<i;){var a=n.charCodeAt(o),s=e.line,u=1+o-e.lineStart;switch(a){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===n.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new ra(na.BANG,o,o+1,s,u,t);case 35:return ma(r,o,s,u,t);case 36:return new ra(na.DOLLAR,o,o+1,s,u,t);case 38:return new ra(na.AMP,o,o+1,s,u,t);case 40:return new ra(na.PAREN_L,o,o+1,s,u,t);case 41:return new ra(na.PAREN_R,o,o+1,s,u,t);case 46:if(46===n.charCodeAt(o+1)&&46===n.charCodeAt(o+2))return new ra(na.SPREAD,o,o+3,s,u,t);break;case 58:return new ra(na.COLON,o,o+1,s,u,t);case 61:return new ra(na.EQUALS,o,o+1,s,u,t);case 64:return new ra(na.AT,o,o+1,s,u,t);case 91:return new ra(na.BRACKET_L,o,o+1,s,u,t);case 93:return new ra(na.BRACKET_R,o,o+1,s,u,t);case 123:return new ra(na.BRACE_L,o,o+1,s,u,t);case 124:return new ra(na.PIPE,o,o+1,s,u,t);case 125:return new ra(na.BRACE_R,o,o+1,s,u,t);case 34:return 34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)?ba(r,o,s,u,t,e):ga(r,o,s,u,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ya(r,o,a,s,u,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Ra(r,o,s,u,t)}throw Yo(r,o,da(a))}var c=e.line,l=1+o-e.lineStart;return new ra(na.EOF,i,i,c,l,t)}function da(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(fa(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(fa(e),".")}function ma(e,t,r,n,i){var o,a=e.body,s=t;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new ra(na.COMMENT,t,s,r,n,i,a.slice(t+1,s))}function ya(e,t,r,n,i,o){var a=e.body,s=r,u=t,c=!1;if(45===s&&(s=a.charCodeAt(++u)),48===s){if((s=a.charCodeAt(++u))>=48&&s<=57)throw Yo(e,u,"Invalid number, unexpected digit after 0: ".concat(fa(s),"."))}else u=va(e,u,s),s=a.charCodeAt(u);if(46===s&&(c=!0,s=a.charCodeAt(++u),u=va(e,u,s),s=a.charCodeAt(u)),69!==s&&101!==s||(c=!0,43!==(s=a.charCodeAt(++u))&&45!==s||(s=a.charCodeAt(++u)),u=va(e,u,s),s=a.charCodeAt(u)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw Yo(e,u,"Invalid number, expected digit but got: ".concat(fa(s),"."));return new ra(c?na.FLOAT:na.INT,t,u,n,i,o,a.slice(t,u))}function va(e,t,r){var n=e.body,i=t,o=r;if(o>=48&&o<=57){do{o=n.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw Yo(e,i,"Invalid number, expected digit but got: ".concat(fa(o),"."))}function ga(e,t,r,n,i){for(var o=e.body,a=t+1,s=a,u=0,c="";a<o.length&&!isNaN(u=o.charCodeAt(a))&&10!==u&&13!==u;){if(34===u)return c+=o.slice(s,a),new ra(na.STRING,t,a+1,r,n,i,c);if(u<32&&9!==u)throw Yo(e,a,"Invalid character within String: ".concat(fa(u),"."));if(++a,92===u){switch(c+=o.slice(s,a-1),u=o.charCodeAt(a)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var l=wa(o.charCodeAt(a+1),o.charCodeAt(a+2),o.charCodeAt(a+3),o.charCodeAt(a+4));if(l<0){var h=o.slice(a+1,a+5);throw Yo(e,a,"Invalid character escape sequence: \\u".concat(h,"."))}c+=String.fromCharCode(l),a+=4;break;default:throw Yo(e,a,"Invalid character escape sequence: \\".concat(String.fromCharCode(u),"."))}s=++a}}throw Yo(e,a,"Unterminated string.")}function ba(e,t,r,n,i,o){for(var a=e.body,s=t+3,u=s,c=0,l="";s<a.length&&!isNaN(c=a.charCodeAt(s));){if(34===c&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2))return l+=a.slice(u,s),new ra(na.BLOCK_STRING,t,s+3,r,n,i,ca(l));if(c<32&&9!==c&&10!==c&&13!==c)throw Yo(e,s,"Invalid character within String: ".concat(fa(c),"."));10===c?(++s,++o.line,o.lineStart=s):13===c?(10===a.charCodeAt(s+1)?s+=2:++s,++o.line,o.lineStart=s):92===c&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2)&&34===a.charCodeAt(s+3)?(l+=a.slice(u,s)+'"""',u=s+=4):++s}throw Yo(e,s,"Unterminated string.")}function wa(e,t,r,n){return Ea(e)<<12|Ea(t)<<8|Ea(r)<<4|Ea(n)}function Ea(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ra(e,t,r,n,i){for(var o=e.body,a=o.length,s=t+1,u=0;s!==a&&!isNaN(u=o.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new ra(na.NAME,t,s,r,n,i,o.slice(t,s))}var Sa=function(){function e(e,t){var r=function(e){return e instanceof sa}(e)?e:new sa(e);this._lexer=new ha(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(na.NAME);return{kind:Xo.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:Xo.DOCUMENT,definitions:this.many(na.SOF,this.parseDefinition,na.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(na.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(na.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(na.BRACE_L))return{kind:Xo.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(na.NAME)&&(t=this.parseName()),{kind:Xo.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(na.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(na.PAREN_L,this.parseVariableDefinition,na.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:Xo.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(na.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(na.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(na.DOLLAR),{kind:Xo.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:Xo.SELECTION_SET,selections:this.many(na.BRACE_L,this.parseSelection,na.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(na.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(na.COLON)?(e=n,t=this.parseName()):t=n,{kind:Xo.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(na.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(na.PAREN_L,t,na.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(na.COLON),{kind:Xo.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:Xo.ARGUMENT,name:this.parseName(),value:(this.expectToken(na.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(na.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(na.NAME)?{kind:Xo.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:Xo.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:Xo.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:Xo.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case na.BRACKET_L:return this.parseList(e);case na.BRACE_L:return this.parseObject(e);case na.INT:return this._lexer.advance(),{kind:Xo.INT,value:t.value,loc:this.loc(t)};case na.FLOAT:return this._lexer.advance(),{kind:Xo.FLOAT,value:t.value,loc:this.loc(t)};case na.STRING:case na.BLOCK_STRING:return this.parseStringLiteral();case na.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:Xo.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:Xo.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:Xo.NULL,loc:this.loc(t)};default:return{kind:Xo.ENUM,value:t.value,loc:this.loc(t)}}case na.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:Xo.STRING,value:e.value,block:e.kind===na.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:Xo.LIST,values:this.any(na.BRACKET_L,function(){return t.parseValueLiteral(e)},na.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:Xo.OBJECT,fields:this.any(na.BRACE_L,function(){return t.parseObjectField(e)},na.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(na.COLON),{kind:Xo.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(na.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(na.AT),{kind:Xo.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(na.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(na.BRACKET_R),e={kind:Xo.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(na.BANG)?{kind:Xo.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:Xo.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===na.NAME)switch(e.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()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(na.STRING)||this.peek(na.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(na.BRACE_L,this.parseOperationTypeDefinition,na.BRACE_R);return{kind:Xo.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(na.COLON);var r=this.parseNamedType();return{kind:Xo.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:Xo.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Xo.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(na.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(na.AMP)||this.peek(na.NAME));return t}return this.delimitedMany(na.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(na.BRACE_L)&&this._lexer.lookahead().kind===na.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(na.BRACE_L,this.parseFieldDefinition,na.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(na.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:Xo.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(na.PAREN_L,this.parseInputValueDef,na.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(na.COLON);var n,i=this.parseTypeReference();this.expectOptionalToken(na.EQUALS)&&(n=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:Xo.INPUT_VALUE_DEFINITION,description:t,name:r,type:i,defaultValue:n,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Xo.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:Xo.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(na.EQUALS)?this.delimitedMany(na.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:Xo.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(na.BRACE_L,this.parseEnumValueDefinition,na.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:Xo.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:Xo.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(na.BRACE_L,this.parseInputValueDef,na.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===na.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)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(na.BRACE_L,this.parseOperationTypeDefinition,na.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:Xo.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:Xo.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:Xo.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:Xo.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:Xo.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:Xo.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:Xo.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(na.AT);var r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:Xo.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(na.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==ua[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new ta(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw Yo(this._lexer.source,t.start,"Expected ".concat(xa(e),", found ").concat(ka(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==na.NAME||t.value!==e)throw Yo(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(ka(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===na.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return Yo(this._lexer.source,t.start,"Unexpected ".concat(ka(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function ka(e){var t=e.value;return xa(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function xa(e){return function(e){return e===na.BANG||e===na.DOLLAR||e===na.AMP||e===na.PAREN_L||e===na.PAREN_R||e===na.SPREAD||e===na.COLON||e===na.EQUALS||e===na.AT||e===na.BRACKET_L||e===na.BRACKET_R||e===na.BRACE_L||e===na.PIPE||e===na.BRACE_R}(e)?'"'.concat(e,'"'):e}var Oa=new Map,Ta=new Map,Ia=!0,_a=!1;function Aa(e){return e.replace(/[\s,]+/g," ").trim()}function Pa(e){var t,r,n,i=Aa(e);if(!Oa.has(i)){var o=function(e,t){return new Sa(e,t).parseDocument()}(e,{experimentalFragmentVariables:_a,allowLegacyFragmentVariables:_a});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");Oa.set(i,function(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=o,r=new Set,n=[],t.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,i=Aa((a=e.loc).source.body.substring(a.start,a.end)),o=Ta.get(t);o&&!o.has(i)?Ia&&console.warn("Warning: fragment with name "+t+" 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"):o||Ta.set(t,o=new Set),o.add(i),r.has(i)||(r.add(i),n.push(e))}else n.push(e);var a}),_o(_o({},t),{definitions:n}))))}return Oa.get(i)}function Ca(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach(function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]}),Pa(n)}var Na,qa=Ca;(Na=Ca||(Ca={})).gql=qa,Na.resetCaches=function(){Oa.clear(),Ta.clear()},Na.disableFragmentWarnings=function(){Ia=!1},Na.enableExperimentalFragmentVariables=function(){_a=!0},Na.disableExperimentalFragmentVariables=function(){_a=!1},Ca.default=Ca;const Fa=Ca`
6
+ `)),n+=1,await this.migratePullRequest(e,`${n} of ${r.length}`);e=(r.length?await this.getPullRequests(void 0,yr.Open,e=>vr(e,this.cmsLabelPrefix)):t.filter(e=>vr(e,this.cmsLabelPrefix))).map(e=>e.head.ref)}return e}async getStatuses(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=(await this.getBranchPullRequest(n)).head.sha;return(await this.request(`${this.originRepoURL}/commits/${i}/status`)).statuses.map(e=>({context:e.context,target_url:e.target_url||"",state:e.state===mr.Success?R.PreviewState.Success:R.PreviewState.Other}))}async persistFiles(e,t,r){const n=t.concat(e),i=n.map(e=>this.uploadBlob(e));if(await Promise.all(i),r.useWorkflow){const i=t.map(({sha:e,path:t})=>({path:o()(t,"/"),sha:e})),a=e[0].slug;return this.editorialWorkflowGit(n,a,i,r)}return this.getDefaultBranch().then(e=>this.updateTree(e.commit.sha,n)).then(e=>this.commit(r.commitMessage,e)).then(e=>this.patchBranch(this.branch,e.sha))}async getFileSha(e,{repoURL:t=this.repoURL,branch:r=this.branch}={}){const n=e.split("/"),i=ir()(n),o=rr()(n).join("/"),a=`${t}/git/trees/${r}:${encodeURIComponent(o)}`,s=(await this.request(a)).tree.find(e=>e.path===i);if(s)return s.sha;throw new R.APIError("Not Found",404,fr)}async deleteFiles(e,t){if(this.useOpenAuthoring)return Promise.reject("Cannot delete published entries as an Open Authoring user!");const r=await this.getDefaultBranch(),n=e.map(e=>({path:e,sha:null})),i=await this.updateTree(r.commit.sha,n),o=await this.commit(t,i);await this.patchBranch(this.branch,o.sha)}async createBranchAndPullRequest(e,t,r){return await this.createBranch(e,t),this.createPR(r,e)}async updatePullRequestLabels(e,t){await this.request(`${this.repoURL}/issues/${e}/labels`,{method:"PUT",body:JSON.stringify({labels:t})})}async diffFromFile(e){return{path:e.filename,newFile:"added"===e.status,sha:e.sha||"",binary:"renamed"!==e.status&&!e.patch||e.filename.endsWith(".svg")}}async editorialWorkflowGit(e,t,r,n){const i=this.generateContentKey(n.collectionName,t),o=(0,R.branchFromContentKey)(i),a=n.unpublished||!1,s=!1!==n.hasSubfolders;if(a){const{files:t}=await this.getDifferences(this.branch,await this.getHeadReference(o)),i=await Promise.all((t||[]).map(e=>this.diffFromFile(e))),a=[];for(const e of i.filter(e=>e.binary))r.some(t=>t.path===e.path)||a.push({path:e.path,sha:null});const u=await this.rebaseBranch(o),c=a.concat(e),l=await this.updateTree(u.sha,c,o,s),h=await this.commit(n.commitMessage,l);return this.patchBranch(o,h.sha,{force:!0})}{const t=await this.getDefaultBranch(),r=await this.updateTree(t.commit.sha,e,this.branch,s),i=await this.commit(n.commitMessage,r);if(this.useOpenAuthoring)await this.createBranch(o,i.sha);else{const e=await this.createBranchAndPullRequest(o,i.sha,n.commitMessage);await this.setPullRequestStatus(e,n.status||this.initialWorkflowStatus)}}}async getDifferences(e,t){const r=this.useOpenAuthoring?10:1;for(let n=1;n<=r;n++)try{return await this.request(`${this.originRepoURL}/compare/${e}...${t}`)}catch(e){if(n===r)throw console.warn(`Reached maximum number of attempts '${r}' for getDifferences`),e;await new Promise(e=>setTimeout(e,500*n))}throw new R.APIError("Not Found",404,fr)}async rebaseSingleCommit(e,t){const r=gr((await this.getDifferences(t.parents[0].sha,t.sha)).files);if(r.length>0){const n=await this.updateTree(e.sha,r),{message:i,author:o,committer:a}=t.commit;return await this.createCommit(i,n.sha,[e.sha],o?{name:o.name||"",email:o.email||"",date:o.date}:void 0,a?{name:a.name||"",email:a.email||"",date:a.date}:void 0)}return t}async rebaseCommits(e,t){return 0===t.length||t[0].parents[0].sha===e.sha?ir()(t):t.reduce((e,t)=>e.then(e=>{const r=e,n=t;return this.rebaseSingleCommit(r,n)}),Promise.resolve(e))}async rebaseBranch(e){try{const{base_commit:t,commits:r}=await this.getDifferences(this.branch,await this.getHeadReference(e));return await this.rebaseCommits(t,r)}catch(e){throw console.error(e),e}}async setPullRequestStatus(e,t){const r=[...e.labels.filter(e=>!(0,R.isCMSLabel)(e.name,this.cmsLabelPrefix)).map(e=>e.name),(0,R.statusToLabel)(t,this.cmsLabelPrefix)];await this.updatePullRequestLabels(e.number,r)}async updateUnpublishedEntryStatus(e,t,r){const n=this.generateContentKey(e,t),i=(0,R.branchFromContentKey)(n),o=await this.getBranchPullRequest(i);if(this.useOpenAuthoring){if("pending_publish"===status)throw new Error('Open Authoring entries may not be set to the status "pending_publish".');if(o.number!==dr){const{state:e}=o;e===yr.Open&&"draft"===r&&await this.closePR(o.number),e===yr.Closed&&"pending_review"===r&&await this.openPR(o.number)}else if("pending_review"===r){const e=(0,R.branchFromContentKey)(n),t=await this.getDifferences(this.branch,await this.getHeadReference(e)),r=t.commits[0]?.commit?.message||wr.DEFAULT_COMMIT_MESSAGE;await this.createPR(r,e)}}else await this.setPullRequestStatus(o,r)}async deleteUnpublishedEntry(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);i.number!==dr&&await this.closePR(i.number),await this.deleteBranch(n)}async publishUnpublishedEntry(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);await this.mergePR(i),await this.deleteBranch(n),await this.closeIssueOnPublish(e,t)}async createRef(e,t,r){return await this.request(`${this.repoURL}/git/refs`,{method:"POST",body:JSON.stringify({ref:`refs/${e}/${t}`,sha:r})})}async patchRef(e,t,r,n={}){const i=n.force||!1;return await this.request(`${this.repoURL}/git/refs/${e}/${encodeURIComponent(t)}`,{method:"PATCH",body:JSON.stringify({sha:r,force:i})})}deleteRef(e,t){return this.request(`${this.repoURL}/git/refs/${e}/${encodeURIComponent(t)}`,{method:"DELETE"})}async getBranch(e){return await this.request(`${this.repoURL}/branches/${encodeURIComponent(e)}`)}async getDefaultBranch(){return await this.request(`${this.originRepoURL}/branches/${encodeURIComponent(this.branch)}`)}async backupBranch(e){try{const t=await this.getBranch(e);await this.createBranch(t.name.replace(new RegExp(`${R.CMS_BRANCH_PREFIX}/`),`${R.CMS_BRANCH_PREFIX}_${Date.now()}/`),t.commit.sha)}catch(e){console.warn(e)}}async createBranch(e,t){try{return await this.createRef("heads",e,t)}catch(r){const n=String(r.message||"");if("Reference update failed"===n)await(0,R.throwOnConflictingBranches)(e,e=>this.getBranch(e),fr);else if("Reference already exists"===n&&e.startsWith(`${R.CMS_BRANCH_PREFIX}/`))try{return await this.backupBranch(e),await this.patchBranch(e,t,{force:!0})}catch(e){console.log(e)}throw r}}assertCmsBranch(e){return e.startsWith(`${R.CMS_BRANCH_PREFIX}/`)}patchBranch(e,t,r={}){const n=r.force||!1;if(n&&!this.assertCmsBranch(e))throw Error(`Only CMS branches can be force updated, cannot force update ${e}`);return this.patchRef("heads",e,t,{force:n})}deleteBranch(e){return this.deleteRef("heads",e).catch(e=>"Reference does not exist"===e.message?Promise.resolve():(console.error(e),Promise.reject(e)))}async getHeadReference(e){return`${this.repoOwner}:${e}`}async createPR(e,t){return await this.request(`${this.originRepoURL}/pulls`,{method:"POST",body:JSON.stringify({title:e,body:R.DEFAULT_PR_BODY,head:await this.getHeadReference(t),base:this.branch})})}async openPR(e){return console.log("%c Re-opening PR","line-height: 30px;text-align: center;font-weight: bold"),await this.request(`${this.originRepoURL}/pulls/${e}`,{method:"PATCH",body:JSON.stringify({state:yr.Open})})}async closePR(e){return console.log("%c Deleting PR","line-height: 30px;text-align: center;font-weight: bold"),await this.request(`${this.originRepoURL}/pulls/${e}`,{method:"PATCH",body:JSON.stringify({state:yr.Closed})})}async mergePR(e){console.log("%c Merging PR","line-height: 30px;text-align: center;font-weight: bold");try{return await this.request(`${this.originRepoURL}/pulls/${e.number}/merge`,{method:"PUT",body:JSON.stringify({commit_message:R.MERGE_COMMIT_MESSAGE,sha:e.head.sha,merge_method:this.mergeMethod})})}catch(t){if(t instanceof R.APIError&&405===t.status)return this.forceMergePR(e);throw t}}async forceMergePR(e){const t=gr((await this.getDifferences(e.base.sha,e.head.sha)).files);let r="Automatically generated. Merged on Decap CMS\n\nForce merge of:";return t.forEach(e=>{r+=`\n* "${e.path}"`}),console.log("%c Automatic merge not possible - Forcing merge.","line-height: 30px;text-align: center;font-weight: bold"),this.getDefaultBranch().then(e=>this.updateTree(e.commit.sha,t)).then(e=>this.commit(r,e)).then(e=>this.patchBranch(this.branch,e.sha))}toBase64(e){return Promise.resolve(er.encode(e))}async uploadBlob(e){const t=await ur()(e,"toBase64",ar()(this.toBase64,e.raw)),r=await this.request(`${this.repoURL}/git/blobs`,{method:"POST",body:JSON.stringify({content:t,encoding:"base64"})});return e.sha=r.sha,e}async updateTree(e,t,r=this.branch,n=!0){const i=[],a=t.reduce((e,t)=>{const r={path:o()(t.path,"/"),mode:"100644",type:"blob",sha:t.sha};return t.newPath?i.push({from:t.path,to:t.newPath,sha:t.sha}):e.push(r),e},[]);for(const{from:e,to:t,sha:s}of i)if(n){const n=(0,hr.dirname)(e),i=(0,hr.dirname)(t),o=await this.listFiles(n,{branch:r,depth:100});for(const t of o)a.push({path:t.path,mode:"100644",type:"blob",sha:null}),a.push({path:t.path.replace(n,i),mode:"100644",type:"blob",sha:t.path===e?s:t.id})}else a.push({path:o()(e,"/"),mode:"100644",type:"blob",sha:null}),a.push({path:o()(t,"/"),mode:"100644",type:"blob",sha:s});return{...await this.createTree(e,a),parentSha:e}}async createTree(e,t){return await this.request(`${this.repoURL}/git/trees`,{method:"POST",body:JSON.stringify({base_tree:e,tree:t})})}commit(e,t){const r=t.parentSha?[t.parentSha]:[];return this.createCommit(e,t.sha,r)}async createCommit(e,t,r,n,i){return await this.request(`${this.repoURL}/git/commits`,{method:"POST",body:JSON.stringify({message:e,tree:t,parents:r,author:n,committer:i})})}async getUnpublishedEntrySha(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r);return(await this.getBranchPullRequest(n)).head.sha}static NOTE_STATUS_RESOLVED="RESOLVED";static NOTE_STATUS_OPEN="OPEN";static NOTES_LABEL="decap-cms-notes";static NOTE_ISSUE_PREFIX="Notes: ";static NOTE_REGEX=/^<!-- DecapCMS Note - Status: (RESOLVED|OPEN) -->([\s\S]+)$/;formatNoteForGithub(e){return`\x3c!-- DecapCMS Note - Status: ${e.resolved?wr.NOTE_STATUS_RESOLVED:wr.NOTE_STATUS_OPEN} --\x3e\n${e.content}`}parseCommentToNote(e){if(!e||!e.body||!e.user)throw new Error("Invalid comment structure");const t=e.body.match(wr.NOTE_REGEX),r=t?t[2].trim():e.body,n=!!t&&t[1]===wr.NOTE_STATUS_RESOLVED;if(!r.trim())throw new Error("Empty note content");return{id:e.id.toString(),author:e.user.login,avatarUrl:e.user.avatar_url,timestamp:e.created_at,content:r,resolved:n,entrySlug:""}}async createEntryIssue(e,t,r){const n=`${wr.NOTE_ISSUE_PREFIX}${r||`${e}/${t}`}`,i=`This issue tracks notes for entry: \`${e}/${t}\`\n\n---\n*This issue was created automatically by Decap CMS for note management.*`;return await this.request(`${this.repoURL}/issues`,{method:"POST",body:JSON.stringify({title:n,body:i,labels:[wr.NOTES_LABEL,`collection:${e}`]})})}async findEntryIssue(e,t){const r=`repo:${this.repo} label:${wr.NOTES_LABEL} "${e}/${t}" in:body`;try{const e=await this.request("/search/issues",{params:{q:r}});return e.items&&e.items.length>0?e.items[0]:null}catch(e){return console.warn("Failed to search for existing notes issue:",e),null}}async getIssueWithETag(e,t){try{const r={Authorization:`${this.tokenKeyword} ${this.token}`};t&&(r["If-None-Match"]=t);const n=await pr(`${this.apiRoot}${this.repoURL}/issues/${e}`,{headers:r});if(304===n.status)return{status:304};if(200===n.status){const t=await n.json(),i=n.headers.get("ETag"),o=await pr(`${this.apiRoot}${this.repoURL}/issues/${e}/comments`,{headers:r}),a=(await o.json()).map(e=>({id:e.id,body:e.body,user:e.user,created_at:e.created_at,updated_at:e.updated_at}));return{status:200,data:{number:t.number,title:t.title,body:t.body,state:t.state,updated_at:t.updated_at,comments:a,labels:t.labels,html_url:t.html_url},etag:i}}throw new Error(`Unexpected status: ${n.status}`)}catch(e){if(304===e.status)return{status:304};throw e}}async getIssueState(e){const t=await this.getIssueWithETag(e,null);if(200===t.status&&t.data)return t.data;throw new Error("Failed to get issue state")}async getIssueComments(e){try{const t=await this.request(`${this.repoURL}/issues/${e}/comments`);return Array.isArray(t)?t:[]}catch(e){return console.error("Failed to get issue comments:",e),[]}}async createIssueComment(e,t){try{return(await this.request(`${this.repoURL}/issues/${e}/comments`,{method:"POST",body:JSON.stringify({body:this.formatNoteForGithub(t)})})).id.toString()}catch(e){throw console.error("Failed to create issue comment:",e),new R.APIError("Failed to create note",e.status||500,fr)}}async updateIssueComment(e,t){try{await this.request(`${this.repoURL}/issues/comments/${e}`,{method:"PATCH",body:JSON.stringify({body:this.formatNoteForGithub(t)})})}catch(e){throw console.error("Failed to update issue comment:",e),new R.APIError("Failed to update note",e.status||500,fr)}}async deleteIssueComment(e){try{await this.request(`${this.repoURL}/issues/comments/${e}`,{method:"DELETE"})}catch(e){throw console.error("Failed to delete issue comment:",e),new R.APIError("Failed to delete note",e.status||500,fr)}}async closeIssueOnPublish(e,t){try{const r=`repo:${this.repo} label:${wr.NOTES_LABEL} "${e}/${t}" in:body state:open`,n=await this.request("/search/issues",{params:{q:r}});if(n.items&&n.items.length>0){const e=n.items[0];await this.request(`${this.repoURL}/issues/${e.number}`,{method:"PATCH",body:JSON.stringify({state:"closed",labels:[...(e.labels||[]).map(e=>e.name),"entry-published"]})})}}catch(e){console.warn("Failed to close notes issue on publish:",e)}}async reopenIssueOnUnpublish(e,t){try{const r=`repo:${this.repo} label:${wr.NOTES_LABEL} "${e}/${t}" in:body`,n=await this.request("/search/issues",{params:{q:r}});if(n.items&&n.items.length>0){const e=n.items[0],t=(e.labels||[]).map(e=>e.name).filter(e=>"entry-published"!==e&&"entry-deleted"!==e);await this.request(`${this.repoURL}/issues/${e.number}`,{method:"PATCH",body:JSON.stringify({state:"open",labels:t})})}}catch(e){console.warn("Failed to reopen notes issue on unpublish:",e)}}async getEntryNotes(e,t){try{const r=await this.findEntryIssue(e,t);if(!r)return[];const n=await this.getIssueComments(r.number),i=r.html_url;return n.map(e=>({...this.parseCommentToNote(e),issueUrl:i}))}catch(e){return console.error("Failed to get entry notes:",e),[]}}async addNoteToEntry(e,t,r,n){try{let i=await this.findEntryIssue(e,t);return i||(i=await this.createEntryIssue(e,t,n)),{commentId:await this.createIssueComment(i.number,r),issueUrl:i.html_url}}catch(e){throw console.error("Failed to add note to entry:",e),new R.APIError("Failed to create note",e.status||500,fr)}}async updateEntryNote(e,t){try{await this.updateIssueComment(e,t)}catch(e){throw console.error("Failed to update entry note:",e),new R.APIError("Failed to update note",e.status||500,fr)}}async deleteEntryNote(e){try{await this.deleteIssueComment(e)}catch(e){throw console.error("Failed to delete entry note:",e),new R.APIError("Failed to delete note",e.status||500,fr)}}async getEntriesWithNotes(){try{const e=`repo:${this.repo} label:${wr.NOTES_LABEL} state:open`,t=await this.request("/search/issues",{params:{q:e,per_page:100}}),r=[];for(const e of t.items||[]){const t=e.body.match(/entry: `(.+)\/(.+)`/);if(t){const[,n,i]=t;r.push({collection:n,slug:i,noteCount:e.comments})}}return r}catch(e){return console.error("Failed to get entries with notes:",e),[]}}async closeEntryNotesIssue(e,t){try{const r=`repo:${this.repo} label:${wr.NOTES_LABEL} "${e}/${t}" in:body state:open`,n=await this.request("/search/issues",{params:{q:r}});if(n.items&&n.items.length>0){const e=n.items[0];await this.request(`${this.repoURL}/issues/${e.number}`,{method:"PATCH",body:JSON.stringify({state:"closed",labels:[...(e.labels||[]).map(e=>e.name),"entry-deleted"]})})}}catch(e){console.warn("Failed to close notes issue:",e)}}async getPRMetadataFromBranch(e){try{const t=(await this.request(`${this.originRepoURL}/pulls`,{params:{head:await this.getHeadReference(e),state:"open"}}))[0];return t?{id:t.number.toString(),url:t.html_url,author:t.user?.login||"unknown",createdAt:t.created_at}:null}catch(e){return console.error("Failed to get PR metadata:",e),null}}}class Er{currentWatch=null;currentIssueKey=null;pollingInterval=15e3;intervalId=null;isDocumentVisible=!0;isPolling=!1;pendingRetryTimeout=null;constructor(e,t=15e3){this.api=e,this.pollingInterval=t,this.setupVisibilityListener()}setupVisibilityListener(){"undefined"!=typeof document&&document.addEventListener("visibilitychange",()=>{this.isDocumentVisible=!document.hidden,this.isDocumentVisible?(this.startPolling(),this.checkAllIssuesNow()):this.stopPolling()})}async watchIssue(e,t,r,n,i=null){const o=this.getIssueKey(t,r);if(this.currentWatch&&this.stopCurrentWatch(),!i)try{i=await this.api.getIssueState(e)}catch(e){console.error("[DecapNotes Polling] Failed to get initial state:",e)}return this.currentWatch={issueNumber:e,collection:t,slug:r,etag:null,lastState:i,onUpdate:n.onUpdate,onChange:n.onChange,retryCount:0,maxRetries:5},this.currentIssueKey=o,!this.intervalId&&this.isDocumentVisible&&this.startPolling(),this.checkCurrentIssue(),()=>this.stopCurrentWatch()}async watchIssueWithRetry(e,t,r,n=5,i=2e3){const o=this.getIssueKey(e,t);this.currentWatch&&this.stopCurrentWatch();const a=async s=>{try{const u=await this.api.findEntryIssue(e,t);return u?await this.watchIssue(u.number,e,t,r):s<n?new Promise((e,t)=>{this.pendingRetryTimeout=setTimeout(async()=>{this.pendingRetryTimeout=null;try{const t=await a(s+1);e(t)}catch(e){t(e)}},i)}):(console.log(`[DecapNotes Polling] No issue found for ${o} after ${n} attempts. This is expected if there are no notes for this entry yet.`),()=>{})}catch(e){if(console.error(`[DecapNotes Polling] Error finding issue for ${o}:`,e),s<n)return new Promise((e,t)=>{this.pendingRetryTimeout=setTimeout(async()=>{this.pendingRetryTimeout=null;try{const t=await a(s+1);e(t)}catch(e){t(e)}},i)});throw e}};return a(1)}stopCurrentWatch(){this.currentWatch&&(this.pendingRetryTimeout&&(clearTimeout(this.pendingRetryTimeout),this.pendingRetryTimeout=null),this.currentWatch=null,this.currentIssueKey=null,this.stopPolling())}startPolling(){!this.intervalId&&this.isDocumentVisible&&this.currentWatch&&(console.log(`[DecapNotes Polling] Starting polling loop (${this.pollingInterval}ms interval) for ${this.currentIssueKey}`),this.intervalId=setInterval(()=>{this.pollAllIssues()},this.pollingInterval))}stopPolling(){this.intervalId&&(console.log("[DecapNotes Polling] Stopping polling loop"),clearInterval(this.intervalId),this.intervalId=null)}async pollAllIssues(){await this.checkCurrentIssue()}async checkCurrentIssue(){if(this.currentWatch&&!this.isPolling){this.isPolling=!0;try{const e=this.currentWatch,t=await this.api.getIssueWithETag(e.issueNumber,e.etag);if(304===t.status)return;if(200===t.status){const r=t.data,n=t.etag;e.etag=n||null;const i=this.detectChanges(e.lastState,r);if(i.length>0){const t=r.comments.map(e=>({...this.api.parseCommentToNote(e),issueUrl:r.html_url}));e.onUpdate&&e.onUpdate(t,i),e.onChange&&i.forEach(t=>{e.onChange(t)})}e.lastState=r}}catch(e){e&&"object"==typeof e&&"status"in e&&304!==e.status&&console.error(`[DecapNotes Polling] Error checking ${this.currentIssueKey}:`,e)}finally{this.isPolling=!1}}}async checkAllIssuesNow(){await this.checkCurrentIssue()}async checkIssueNow(e,t){const r=this.getIssueKey(e,t);this.currentIssueKey===r?await this.checkCurrentIssue():console.warn(`[DecapNotes Polling] Cannot check ${r} - currently watching ${this.currentIssueKey}`)}detectChanges(e,t){if(!e)return[];const r=[],n=t.comments.filter(t=>!e.comments.some(e=>e.id===t.id));n.forEach(e=>{r.push({type:"comment_added",data:e,timestamp:e.created_at})}),t.comments.forEach(t=>{const n=e.comments.find(e=>e.id===t.id);n&&n.updated_at!==t.updated_at&&r.push({type:"comment_updated",data:t,previousData:n,timestamp:t.updated_at})});const i=e.comments.filter(e=>!t.comments.some(t=>t.id===e.id));return i.forEach(e=>{r.push({type:"comment_deleted",data:e,timestamp:(new Date).toISOString()})}),e.state!==t.state&&r.push({type:"issue_state_changed",data:{from:e.state,to:t.state},timestamp:t.updated_at}),this.hasLabelsChanged(e.labels,t.labels)&&r.push({type:"issue_labels_changed",data:{from:e.labels,to:t.labels},timestamp:t.updated_at}),r}hasLabelsChanged(e,t){if(e.length!==t.length)return!0;const r=e.map(e=>e.name).sort(),n=t.map(e=>e.name).sort();return r.join(",")!==n.join(",")}getIssueKey(e,t){return`${e}/${t}`}getStatus(){return{isPolling:null!==this.intervalId,currentWatch:this.currentIssueKey,watchedCount:this.currentWatch?1:0,pollingInterval:this.pollingInterval,isDocumentVisible:this.isDocumentVisible,hasPendingRetry:null!==this.pendingRetryTimeout}}destroy(){console.log("[DecapNotes Polling] Destroying polling manager"),this.pendingRetryTimeout&&(clearTimeout(this.pendingRetryTimeout),this.pendingRetryTimeout=null),this.stopCurrentWatch()}}var Rr=function(e,t){return Rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},Rr(e,t)};function Sr(e,t){function r(){this.constructor=e}Rr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var kr=function(){return kr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kr.apply(this,arguments)};function xr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function Or(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})}function Tr(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function Ir(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}var _r,Ar=u(481),Pr=u(5409),Cr="Invariant Violation",Nr=Object.setPrototypeOf,qr=void 0===Nr?function(e,t){return e.__proto__=t,e}:Nr,Fr=function(e){function t(r){void 0===r&&(r=Cr);var n=e.call(this,"number"==typeof r?Cr+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=Cr,qr(n,t.prototype),n}return Sr(t,e),t}(Error);function Dr(e,t){if(!e)throw new Fr(t)}function Lr(e){return function(){return console[e].apply(console,arguments)}}(_r=Dr||(Dr={})).warn=Lr("warn"),_r.error=Lr("error");var $r={env:{}};if("object"==typeof Pr)$r=Pr;else try{Function("stub","process = stub")($r)}catch(e){}var Br=u(6039),Ur=u.n(Br),Mr=Object.prototype,jr=Mr.toString,Qr=Mr.hasOwnProperty,Vr=new Map;function zr(e,t){try{return Kr(e,t)}finally{Vr.clear()}}function Kr(e,t){if(e===t)return!0;var r=jr.call(e);if(r!==jr.call(t))return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Gr(e,t))return!0;var n=Object.keys(e),i=Object.keys(t),o=n.length;if(o!==i.length)return!1;for(var a=0;a<o;++a)if(!Qr.call(t,n[a]))return!1;for(a=0;a<o;++a){var s=n[a];if(!Kr(e[s],t[s]))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(Gr(e,t))return!0;for(var u=e.entries(),c="[object Map]"===r;;){var l=u.next();if(l.done)break;var h=l.value,f=h[0],p=h[1];if(!t.has(f))return!1;if(c&&!Kr(p,t.get(f)))return!1}return!0}return!1}function Gr(e,t){var r=Vr.get(e);if(r){if(r.has(t))return!0}else Vr.set(e,r=new Set);return r.add(t),!1}var Wr=u(5409);function Hr(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map(function(e){return Hr(i,e.name,e.value,n)}),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map(function(e){var r={};return Hr(r,t,e,n),r[t.value]});else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw new Fr(17);e[t.value]=null}}var Jr=["connection","include","skip","client","rest","export"];function Yr(e,t,r){if(r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i=t,o={};return n.forEach(function(e){o[e]=i[e]}),r.connection.key+"("+JSON.stringify(o)+")"}return r.connection.key}var a=e;if(t){var s=Ur()(t);a+="("+s+")"}return r&&Object.keys(r).forEach(function(e){-1===Jr.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?a+="@"+e+"("+JSON.stringify(r[e])+")":a+="@"+e)}),a}function Xr(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(e){var n=e.name,i=e.value;return Hr(r,n,i,t)}),r}return null}function Zr(e){return e.alias?e.alias.value:e.name.value}function en(e){return"Field"===e.kind}function tn(e){return"InlineFragment"===e.kind}function rn(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function nn(e,t){return void 0===t&&(t=!1),kr({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function on(e,t){if(e.directives&&e.directives.length){var r={};return e.directives.forEach(function(e){r[e.name.value]=Xr(e,t)}),r}return null}function an(e,t){return void 0===t&&(t={}),(r=e.directives,r?r.filter(cn).map(function(e){var t=e.arguments;e.name.value,Dr(t&&1===t.length,14);var r=t[0];Dr(r.name&&"if"===r.name.value,15);var n=r.value;return Dr(n&&("Variable"===n.kind||"BooleanValue"===n.kind),16),{directive:e,ifArgument:r}}):[]).every(function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?Dr(void 0!==(i=t[n.value.name.value]),13):i=n.value.value,"skip"===r.name.value?!i:i});var r}function sn(e,t){return function(e){var t=[];return(0,Ar.visit)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some(function(t){return e.indexOf(t)>-1})}function un(e){return e&&sn(["client"],e)&&sn(["export"],e)}function cn(e){var t=e.name.value;return"skip"===t||"include"===t}function ln(e,t){var r=t,n=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw new Fr(11);"FragmentDefinition"===e.kind&&n.push(e)}),void 0===r&&(Dr(1===n.length,12),r=n[0].name.value),kr(kr({},e),{definitions:Ir([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions)})}function hn(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.forEach(function(t){null!=t&&Object.keys(t).forEach(function(r){e[r]=t[r]})}),e}function fn(e){return Dr(e&&"Document"===e.kind,2),Dr(e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw new Fr(3);return e}).length<=1,4),e}function pn(e){return fn(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function dn(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&e.name}).map(function(e){return e.name.value})[0]||null}function mn(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function yn(e){var t;fn(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw new Fr(10)}function vn(e){void 0===e&&(e=[]);var t={};return e.forEach(function(e){t[e.name.value]=e}),t}function gn(e){if(e&&e.variableDefinitions&&e.variableDefinitions.length){var t=e.variableDefinitions.filter(function(e){return e.defaultValue}).map(function(e){var t=e.variable,r=e.defaultValue,n={};return Hr(n,t.name,r),n});return hn.apply(void 0,Ir([{}],t))}return{}}function bn(e,t,r){var n=0;return e.forEach(function(r,i){t.call(this,r,i,e)&&(e[n++]=r)},r),e.length=n,e}var wn={kind:"Field",name:{kind:"Name",value:"__typename"}};function En(e,t){return e.selectionSet.selections.every(function(e){return"FragmentSpread"===e.kind&&En(t[e.name.value],t)})}function Rn(e){return En(pn(e)||function(e){Dr("Document"===e.kind,7),Dr(e.definitions.length<=1,8);var t=e.definitions[0];return Dr("FragmentDefinition"===t.kind,9),t}(e),vn(mn(e)))?null:e}function Sn(e){return function(t){return e.some(function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)})}}function kn(e,t){var r=Object.create(null),n=[],i=Object.create(null),o=[],a=Rn((0,Ar.visit)(t,{Variable:{enter:function(e,t,n){"VariableDefinition"!==n.kind&&(r[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some(function(e){return e.remove})&&t.directives&&t.directives.some(Sn(e)))return t.arguments&&t.arguments.forEach(function(e){"Variable"===e.value.kind&&n.push({name:e.value.name.value})}),t.selectionSet&&On(t.selectionSet).forEach(function(e){o.push({name:e.name.value})}),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(t){if(Sn(e)(t))return null}}}));return a&&bn(n,function(e){return!r[e.name]}).length&&(a=function(e,t){var r=function(e){return function(t){return e.some(function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))})}}(e);return Rn((0,Ar.visit)(t,{OperationDefinition:{enter:function(t){return kr(kr({},t),{variableDefinitions:t.variableDefinitions.filter(function(t){return!e.some(function(e){return e.name===t.variable.name.value})})})}},Field:{enter:function(t){if(e.some(function(e){return e.remove})){var n=0;if(t.arguments.forEach(function(e){r(e)&&(n+=1)}),1===n)return null}}},Argument:{enter:function(e){if(r(e))return null}}}))}(n,a)),a&&bn(o,function(e){return!i[e.name]}).length&&(a=function(e,t){function r(t){if(e.some(function(e){return e.name===t.name.value}))return null}return Rn((0,Ar.visit)(t,{FragmentSpread:{enter:r},FragmentDefinition:{enter:r}}))}(o,a)),a}var xn={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||e.arguments.some(function(e){return"key"===e.name.value})),t}};function On(e){var t=[];return e.selections.forEach(function(e){(en(e)||tn(e))&&e.selectionSet?On(e.selectionSet).forEach(function(e){return t.push(e)}):"FragmentSpread"===e.kind&&t.push(e)}),t}function Tn(e){if("query"===yn(e).operation)return e;var t=(0,Ar.visit)(e,{OperationDefinition:{enter:function(e){return kr(kr({},e),{operation:"query"})}}});return t}var In="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),_n=Object.prototype.toString;function An(e){return Pn(e,new Map)}function Pn(e,t){switch(_n.call(e)){case"[object Array]":if(t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(e,n){r[n]=Pn(e,t)}),r;case"[object Object]":if(t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(r){n[r]=Pn(e[r],t)}),n;default:return e}}function Cn(e){return(void 0!==Wr?"production":"development")===e}function Nn(e){try{return e()}catch(e){console.error&&console.error(e)}}function qn(e){return e.errors&&e.errors.length}var Fn=Object.prototype.hasOwnProperty;function Dn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ln(e)}function Ln(e){var t=e[0]||{},r=e.length;if(r>1){var n=[];t=Un(t,n);for(var i=1;i<r;++i)t=Bn(t,e[i],n)}return t}function $n(e){return null!==e&&"object"==typeof e}function Bn(e,t,r){return $n(t)&&$n(e)?(Object.isExtensible&&!Object.isExtensible(e)&&(e=Un(e,r)),Object.keys(t).forEach(function(n){var i=t[n];if(Fn.call(e,n)){var o=e[n];i!==o&&(e[n]=Bn(Un(o,r),i,r))}else e[n]=i}),e):t}function Un(e,t){return null!==e&&"object"==typeof e&&t.indexOf(e)<0&&(e=Array.isArray(e)?e.slice(0):kr({__proto__:Object.getPrototypeOf(e)},e),t.push(e)),e}Object.create({});var Mn=u(4378);const jn=u.n(Mn)();var Qn;function Vn(e){return e.request.length<=1}function zn(e){return new jn(function(t){t.error(e)})}function Kn(e,t){return t?t(e):jn.of()}function Gn(e){return"function"==typeof e?new Xn(e):e}function Wn(){return new Xn(function(){return jn.of()})}function Hn(e){return 0===e.length?Wn():e.map(Gn).reduce(function(e,t){return e.concat(t)})}function Jn(e,t,r){var n=Gn(t),i=Gn(r||new Xn(Kn));return Vn(n)&&Vn(i)?new Xn(function(t){return e(t)?n.request(t)||jn.of():i.request(t)||jn.of()}):new Xn(function(t,r){return e(t)?n.request(t,r)||jn.of():i.request(t,r)||jn.of()})}Sr(function(e,t){var r=Qn.call(this,e)||this;return r.link=t,r},Qn=Error);var Yn=function(e,t){var r=Gn(e);if(Vn(r))return r;var n=Gn(t);return Vn(n)?new Xn(function(e){return r.request(e,function(e){return n.request(e)||jn.of()})||jn.of()}):new Xn(function(e,t){return r.request(e,function(e){return n.request(e,t)||jn.of()})||jn.of()})},Xn=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,r,n){return this.concat(Jn(t,r,n||new e(Kn)))},e.prototype.concat=function(e){return Yn(this,e)},e.prototype.request=function(e,t){throw new Fr(1)},e.empty=Wn,e.from=Hn,e.split=Jn,e.execute=Zn,e}();function Zn(e,t){return e.request(function(e,t){var r=kr({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r=kr({},r,"function"==typeof e?e(r):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return kr({},r)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){var t=e.query,r=e.variables,n=e.operationName;return JSON.stringify([n,t,r])}(t)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?dn(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw new Fr(2)}return e}(t))))||jn.of()}var ei,ti=u(4963);function ri(e){return e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(ei||(ei={}));var ni=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Sr(t,e),t.prototype[ti.A]=function(){return this},t.prototype["@@observable"]=function(){return this},t}(jn);function ii(e){return Array.isArray(e)&&e.length>0}var oi,ai=function(e){function t(r){var n,i,o=r.graphQLErrors,a=r.networkError,s=r.errorMessage,u=r.extraInfo,c=e.call(this,s)||this;return c.graphQLErrors=o||[],c.networkError=a||null,c.message=s||(i="",ii((n=c).graphQLErrors)&&n.graphQLErrors.forEach(function(e){var t=e?e.message:"Error message not found.";i+="GraphQL error: "+t+"\n"}),n.networkError&&(i+="Network error: "+n.networkError.message+"\n"),i=i.replace(/\n$/,"")),c.extraInfo=u,c.__proto__=t.prototype,c}return Sr(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(oi||(oi={}));var si=function(e){function t(t){var r=t.queryManager,n=t.options,i=t.shouldSubscribe,o=void 0===i||i,a=e.call(this,function(e){return a.onSubscribe(e)})||this;a.observers=new Set,a.subscriptions=new Set,a.isTornDown=!1,a.options=n,a.variables=n.variables||{},a.queryId=r.generateQueryId(),a.shouldSubscribe=o;var s=pn(n.query);return a.queryName=s&&s.name&&s.name.value,a.queryManager=r,a}return Sr(t,e),t.prototype.result=function(){var e=this;return new Promise(function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:r},i=e.subscribe(n)})},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:ei.error}}var t,r,n,i=this.queryManager.getCurrentQueryResult(this),o=i.data,a=i.partial,s=this.queryManager.queryStore.get(this.queryId),u=this.options.fetchPolicy,c="network-only"===u||"no-cache"===u;if(s){var l=s.networkStatus;if(r=s,void 0===(n=this.options.errorPolicy)&&(n="none"),r&&(r.networkError||"none"===n&&ii(r.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:l,error:new ai({graphQLErrors:s.graphQLErrors,networkError:s.networkError})};s.variables&&(this.options.variables=kr(kr({},this.options.variables),s.variables),this.variables=this.options.variables),t={data:o,loading:ri(l),networkStatus:l},s.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=s.graphQLErrors)}else{var h=c||a&&"cache-only"!==u;t={data:o,loading:h,networkStatus:h?ei.loading:ei.ready}}return a||this.updateLastResult(kr(kr({},t),{stale:!1})),kr(kr({},t),{partial:a})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&zr(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new Fr(1)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),zr(this.variables,e)||(this.variables=kr(kr({},this.variables),e)),zr(this.options.variables,this.variables)||(this.options.variables=kr(kr({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,kr(kr({},this.options),{fetchPolicy:t}),oi.refetch))},t.prototype.fetchMore=function(e){var t=this;Dr(e.updateQuery,2);var r=kr(kr({},e.query?e:kr(kr(kr({},this.options),e),{variables:kr(kr({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),n=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(n,r,oi.normal,this.queryId).then(function(i){return t.updateQuery(function(t){return e.updateQuery(t,{fetchMoreResult:i.data,variables:r.variables})}),t.queryManager.stopQuery(n),i},function(e){throw t.queryManager.stopQuery(n),e})},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery(function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})})},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=kr(kr({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var r=e.fetchPolicy;return this.setVariables(this.options.variables,t!==r&&("cache-only"===t||"standby"===t||"network-only"===r),e.fetchResults)},t.prototype.setVariables=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!0),this.isTornDown=!1,e=e||this.variables,!t&&zr(e,this.variables)?this.observers.size&&r?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=t.getQueryWithPreviousResult(this.queryId),n=r.previousResult,i=r.variables,o=r.document,a=Nn(function(){return e(n,{variables:i})});a&&(t.dataStore.markUpdateQueryResult(o,i,a),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){li(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:An(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var r=e._subscription._observer;r&&!r.error&&(r.error=ui)}catch(e){}var n=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),n&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,r=this.queryId;this.shouldSubscribe&&t.addObservableQuery(r,this),this.options.pollInterval&&(li(this),t.startPollingQuery(this.options,r));var n=function(t){e.updateLastResult(kr(kr({},e.lastResult),{errors:t.graphQLErrors,networkStatus:ei.error,loading:!1})),ci(e.observers,"error",e.lastError=t)};t.observeQuery(r,this.options,{next:function(r){if(e.lastError||e.isDifferentFromLastResult(r)){var n=e.updateLastResult(r),i=e.options,o=i.query,a=i.variables,s=i.fetchPolicy;t.transform(o).hasClientExports?t.getLocalState().addExportedVariables(o,a).then(function(i){var a=e.variables;e.variables=e.options.variables=i,!r.loading&&n&&"cache-only"!==s&&t.transform(o).serverQuery&&!zr(a,i)?e.refetch():ci(e.observers,"next",r)}):ci(e.observers,"next",r)}},error:n}).catch(n)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(ni);function ui(e){}function ci(e,t,r){var n=[];e.forEach(function(e){return e[t]&&n.push(e)}),n.forEach(function(e){return e[t](r)})}function li(e){var t=e.options.fetchPolicy;Dr("cache-first"!==t&&"cache-only"!==t,3)}var hi=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,r){this.store[e]={mutation:t,variables:r||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var r=this.store[e];r&&(r.loading=!1,r.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),fi=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];Dr(!t||t.document===e.document||zr(t.document,e.document),19);var r,n=!1,i=null;e.storePreviousVariables&&t&&t.networkStatus!==ei.loading&&(zr(t.variables,e.variables)||(n=!0,i=t.variables)),r=n?ei.setVariables:e.isPoll?ei.poll:e.isRefetch?ei.refetch:ei.loading;var o=[];t&&t.graphQLErrors&&(o=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:i,networkError:null,graphQLErrors:o,networkStatus:r,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=ei.fetchMore)},e.prototype.markQueryResult=function(e,t,r){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=ii(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=ei.ready,"string"==typeof r&&this.store[r]&&(this.store[r].networkStatus=ei.ready))},e.prototype.markQueryError=function(e,t,r){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=ei.error,"string"==typeof r&&this.markQueryResultClient(r,!0))},e.prototype.markQueryResultClient=function(e,t){var r=this.store&&this.store[e];r&&(r.networkError=null,r.previousVariables=null,t&&(r.networkStatus=ei.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach(function(r){e.indexOf(r)<0?t.stopQuery(r):t.store[r].networkStatus=ei.loading})},e}(),pi=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=Dn(t.resolvers,e)}):this.resolvers=Dn(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,n=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return Or(this,void 0,void 0,function(){return Tr(this,function(e){return t?[2,this.resolveDocument(t,r.data,n,i,this.fragmentMatcher,a).then(function(e){return kr(kr({},r),{data:e.result})})]:[2,r]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return sn(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?function(e){fn(e);var t=kn([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=(0,Ar.visit)(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every(function(e){return en(e)&&"__typename"===e.name.value}))return null}}})),t}(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return kr(kr({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Dr(!1,6)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),Or(this,void 0,void 0,function(){return Tr(this,function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then(function(e){return kr(kr({},t),e.exportedVariables)})]:[2,kr({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,Ar.visit)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return Ar.BREAK}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Tn(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,n,i,o){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),Or(this,void 0,void 0,function(){var a,s,u,c,l,h,f,p,d;return Tr(this,function(m){var y;return a=yn(e),s=mn(e),u=vn(s),c=a.operation,l=c?(y=c).charAt(0).toUpperCase()+y.slice(1):"Query",f=(h=this).cache,p=h.client,d={fragmentMap:u,context:kr(kr({},r),{cache:f,client:p}),variables:n,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,d).then(function(e){return{result:e,exportedVariables:d.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,r){return Or(this,void 0,void 0,function(){var n,i,o,a,s,u=this;return Tr(this,function(c){return n=r.fragmentMap,i=r.context,o=r.variables,a=[t],s=function(e){return Or(u,void 0,void 0,function(){var s,u;return Tr(this,function(c){return an(e,o)?en(e)?[2,this.resolveField(e,t,r).then(function(t){var r;void 0!==t&&a.push(((r={})[Zr(e)]=t,r))})]:(tn(e)?s=e:Dr(s=n[e.name.value],7),s&&s.typeCondition&&(u=s.typeCondition.name.value,r.fragmentMatcher(t,u,i))?[2,this.resolveSelectionSet(s.selectionSet,t,r).then(function(e){a.push(e)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(s)).then(function(){return Ln(a)})]})})},e.prototype.resolveField=function(e,t,r){return Or(this,void 0,void 0,function(){var n,i,o,a,s,u,c,l,h,f=this;return Tr(this,function(p){return n=r.variables,i=e.name.value,o=Zr(e),a=i!==o,s=t[o]||t[i],u=Promise.resolve(s),r.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(c=t.__typename||r.defaultOperationType,(l=this.resolvers&&this.resolvers[c])&&(h=l[a?i:o])&&(u=Promise.resolve(h(t,Xr(e,n),r.context,{field:e,fragmentMap:r.fragmentMap})))),[2,u.then(function(t){return void 0===t&&(t=s),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=t)})}),e.selectionSet?null==t?t:Array.isArray(t)?f.resolveSubSelectedArray(e,t,r):e.selectionSet?f.resolveSelectionSet(e.selectionSet,t,r):void 0:t})]})})},e.prototype.resolveSubSelectedArray=function(e,t,r){var n=this;return Promise.all(t.map(function(t){return null===t?null:Array.isArray(t)?n.resolveSubSelectedArray(e,t,r):e.selectionSet?n.resolveSelectionSet(e.selectionSet,t,r):void 0}))},e}();function di(e){var t=new Set,r=null;return new ni(function(n){return t.add(n),r=r||e.subscribe({next:function(e){t.forEach(function(t){return t.next&&t.next(e)})},error:function(e){t.forEach(function(t){return t.error&&t.error(e)})},complete:function(){t.forEach(function(e){return e.complete&&e.complete()})}}),function(){t.delete(n)&&!t.size&&r&&(r.unsubscribe(),r=null)}})}var mi=Object.prototype.hasOwnProperty,yi=function(){function e(e){var t=e.link,r=e.queryDeduplication,n=void 0!==r&&r,i=e.store,o=e.onBroadcast,a=void 0===o?function(){}:o,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,h=e.localState,f=e.assumeImmutableResults;this.mutationStore=new hi,this.queryStore=new fi,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(In?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=t,this.queryDeduplication=n,this.dataStore=i,this.onBroadcast=a,this.clientAwareness=l,this.localState=h||new pi({cache:i.getCache()}),this.ssrMode=u,this.assumeImmutableResults=!!f}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,r){e.stopQueryNoBroadcast(r)}),this.fetchQueryRejectFns.forEach(function(e){e(new Fr(8))})},e.prototype.mutate=function(e){var t=e.mutation,r=e.variables,n=e.optimisticResponse,i=e.updateQueries,o=e.refetchQueries,a=void 0===o?[]:o,s=e.awaitRefetchQueries,u=void 0!==s&&s,c=e.update,l=e.errorPolicy,h=void 0===l?"none":l,f=e.fetchPolicy,p=e.context,d=void 0===p?{}:p;return Or(this,void 0,void 0,function(){var e,o,s,l=this;return Tr(this,function(p){switch(p.label){case 0:return Dr(t,9),Dr(!f||"no-cache"===f,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,function(){return{document:t}}),r=this.getVariables(t,r),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,r,d)]:[3,2];case 1:r=p.sent(),p.label=2;case 2:return o=function(){var e={};return i&&l.queries.forEach(function(t,r){var n=t.observableQuery;if(n){var o=n.queryName;o&&mi.call(i,o)&&(e[r]={updater:i[o],query:l.queryStore.get(r)})}}),e},this.mutationStore.initMutation(e,t,r),this.dataStore.markMutationInit({mutationId:e,document:t,variables:r,updateQueries:o(),update:c,optimisticResponse:n}),this.broadcastQueries(),s=this,[2,new Promise(function(i,l){var p,m;s.getObservableFromLink(t,kr(kr({},d),{optimisticResponse:n}),r,!1).subscribe({next:function(n){qn(n)&&"none"===h?m=new ai({graphQLErrors:n.errors}):(s.mutationStore.markMutationResult(e),"no-cache"!==f&&s.dataStore.markMutationResult({mutationId:e,result:n,document:t,variables:r,updateQueries:o(),update:c}),p=n)},error:function(t){s.mutationStore.markMutationError(e,t),s.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),s.broadcastQueries(),s.setQuery(e,function(){return{document:null}}),l(new ai({networkError:t}))},complete:function(){if(m&&s.mutationStore.markMutationError(e,m),s.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),s.broadcastQueries(),m)l(m);else{"function"==typeof a&&(a=a(p));var t=[];ii(a)&&a.forEach(function(e){if("string"==typeof e)s.queries.forEach(function(r){var n=r.observableQuery;n&&n.queryName===e&&t.push(n.refetch())});else{var r={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(r.context=e.context),t.push(s.query(r))}}),Promise.all(u?t:[]).then(function(){s.setQuery(e,function(){return{document:null}}),"ignore"===h&&p&&qn(p)&&delete p.errors,i(p)})}}})})]}})})},e.prototype.fetchQuery=function(e,t,r,n){return Or(this,void 0,void 0,function(){var i,o,a,s,u,c,l,h,f,p,d,m,y,v,g,b,w,E,R=this;return Tr(this,function(S){switch(S.label){case 0:return i=t.metadata,o=void 0===i?null:i,a=t.fetchPolicy,s=void 0===a?"cache-first":a,u=t.context,c=void 0===u?{}:u,l=this.transform(t.query).document,h=this.getVariables(l,t.variables),this.transform(l).hasClientExports?[4,this.localState.addExportedVariables(l,h,c)]:[3,2];case 1:h=S.sent(),S.label=2;case 2:if(t=kr(kr({},t),{variables:h}),d=p="network-only"===s||"no-cache"===s,p||(m=this.dataStore.getCache().diff({query:l,variables:h,returnPartialData:!0,optimistic:!1}),y=m.complete,v=m.result,d=!y||"cache-and-network"===s,f=v),g=d&&"cache-only"!==s&&"standby"!==s,sn(["live"],l)&&(g=!0),b=this.idCounter++,w="no-cache"!==s?this.updateQueryWatch(e,l,t):void 0,this.setQuery(e,function(){return{document:l,lastRequestId:b,invalidated:!0,cancel:w}}),this.invalidate(n),this.queryStore.initQuery({queryId:e,document:l,storePreviousVariables:g,variables:h,isPoll:r===oi.poll,isRefetch:r===oi.refetch,metadata:o,fetchMoreForQueryId:n}),this.broadcastQueries(),g){if(E=this.fetchRequest({requestId:b,queryId:e,document:l,options:t,fetchMoreForQueryId:n}).catch(function(t){throw t.hasOwnProperty("graphQLErrors")?t:(b>=R.getQuery(e).lastRequestId&&(R.queryStore.markQueryError(e,t,n),R.invalidate(e),R.invalidate(n),R.broadcastQueries()),new ai({networkError:t}))}),"cache-and-network"!==s)return[2,E];E.catch(function(){})}return this.queryStore.markQueryResultClient(e,!g),this.invalidate(e),this.invalidate(n),this.transform(l).hasForcedResolvers?[2,this.localState.runResolvers({document:l,remoteResult:{data:f},context:c,variables:h,onlyRunForcedResolvers:!0}).then(function(r){return R.markQueryResult(e,r,t,n),R.broadcastQueries(),r})]:(this.broadcastQueries(),[2,{data:f}])}})})},e.prototype.markQueryResult=function(e,t,r,n){var i=r.fetchPolicy,o=r.variables,a=r.errorPolicy;"no-cache"===i?this.setQuery(e,function(){return{newData:{result:t.data,complete:!0}}}):this.dataStore.markQueryResult(t,this.getQuery(e).document,o,n,"ignore"===a||"all"===a)},e.prototype.queryListenerForObserver=function(e,t,r){var n=this;function i(e,t){if(r[e])try{r[e](t)}catch(e){}}return function(r,o){if(n.invalidate(e,!1),r){var a=n.getQuery(e),s=a.observableQuery,u=a.document,c=s?s.options.fetchPolicy:t.fetchPolicy;if("standby"!==c){var l=ri(r.networkStatus),h=s&&s.getLastResult(),f=!(!h||h.networkStatus===r.networkStatus),p=t.returnPartialData||!o&&r.previousVariables||f&&t.notifyOnNetworkStatusChange||"cache-only"===c||"cache-and-network"===c;if(!l||p){var d=ii(r.graphQLErrors),m=s&&s.options.errorPolicy||t.errorPolicy||"none";if("none"===m&&d||r.networkError)return i("error",new ai({graphQLErrors:r.graphQLErrors,networkError:r.networkError}));try{var y=void 0,v=void 0;if(o)"no-cache"!==c&&"network-only"!==c&&n.setQuery(e,function(){return{newData:null}}),y=o.result,v=!o.complete;else{var g=s&&s.getLastError(),b="none"!==m&&(g&&g.graphQLErrors)!==r.graphQLErrors;if(h&&h.data&&!b)y=h.data,v=!1;else{var w=n.dataStore.getCache().diff({query:u,variables:r.previousVariables||r.variables,returnPartialData:!0,optimistic:!0});y=w.result,v=!w.complete}}var E=v&&!(t.returnPartialData||"cache-only"===c),R={data:E?h&&h.data:y,loading:l,networkStatus:r.networkStatus,stale:E};"all"===m&&d&&(R.errors=r.graphQLErrors),i("next",R)}catch(e){i("error",new ai({networkError:e}))}}}}}},e.prototype.transform=function(e){var t,r=this.transformCache;if(!r.has(e)){var n=this.dataStore.getCache(),i=n.transformDocument(e),o=(t=n.transformForLink(i),kn([xn],fn(t))),a=this.localState.clientQuery(i),s=this.localState.serverQuery(o),u={document:i,hasClientExports:un(i),hasForcedResolvers:this.localState.shouldForceResolvers(i),clientQuery:a,serverQuery:s,defaultVars:gn(pn(i))},c=function(e){e&&!r.has(e)&&r.set(e,u)};c(e),c(i),c(a),c(s)}return r.get(e)},e.prototype.getVariables=function(e,t){return kr(kr({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Dr("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=kr({},e);return new si({queryManager:this,options:r,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Dr(e.query,12),Dr("Document"===e.query.kind,13),Dr(!e.returnPartialData,14),Dr(!e.pollInterval,15),new Promise(function(r,n){var i=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+i.queryId,n),i.result().then(r,n).then(function(){return t.fetchQueryRejectFns.delete("query:"+i.queryId)})})},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,function(e){return e.listeners.add(t),{invalidated:!1}})},e.prototype.updateQueryWatch=function(e,t,r){var n=this,i=this.getQuery(e).cancel;return i&&i(),this.dataStore.getCache().watch({query:t,variables:r.variables,optimistic:!0,previousResult:function(){var t=null,r=n.getQuery(e).observableQuery;if(r){var i=r.getLastResult();i&&(t=i.data)}return t},callback:function(t){n.setQuery(e,function(){return{invalidated:!0,newData:t}})}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,function(){return{observableQuery:t}})},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,function(){return{observableQuery:null}}),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach(function(e){e(new Fr(16))});var e=[];return this.queries.forEach(function(t,r){t.observableQuery&&e.push(r)}),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then(function(){return e.reFetchObservableQueries()})},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.queries.forEach(function(n,i){var o=n.observableQuery;if(o){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!e&&"standby"===a||r.push(o.refetch()),t.setQuery(i,function(){return{newData:null}}),t.invalidate(i)}}),this.broadcastQueries(),Promise.all(r)},e.prototype.observeQuery=function(e,t,r){return this.addQueryListener(e,this.queryListenerForObserver(e,t,r)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,r){return this.addQueryListener(e,r),this.fetchQuery(e,t).catch(function(){}),e},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.variables;r=this.transform(r).document,i=this.getVariables(r,i);var o=function(e){return t.getObservableFromLink(r,{},e,!1).map(function(i){if(n&&"no-cache"===n||(t.dataStore.markSubscriptionResult(i,r,e),t.broadcastQueries()),qn(i))throw new ai({graphQLErrors:i.errors});return i})};if(this.transform(r).hasClientExports){var a=this.localState.addExportedVariables(r,i).then(o);return new ni(function(e){var t=null;return a.then(function(r){return t=r.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return o(i)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach(function(e){return e.unsubscribe()}),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var r=e.options,n=r.variables,i=r.query,o=r.fetchPolicy,a=r.returnPartialData,s=e.getLastResult(),u=this.getQuery(e.queryId).newData;if(u&&u.complete)return{data:u.result,partial:!1};if("no-cache"===o||"network-only"===o)return{data:void 0,partial:!1};var c=this.dataStore.getCache().diff({query:i,variables:n,previousResult:s?s.data:void 0,returnPartialData:!0,optimistic:t}),l=c.result,h=c.complete;return{data:h||a?l:void 0,partial:!h}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var r=this.getQuery(e).observableQuery;Dr(r,17),t=r}else t=e;var n=t.options,i=n.variables,o=n.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:i,document:o}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach(function(t,r){t.invalidated&&t.listeners.forEach(function(n){n&&n(e.queryStore.get(r),t.newData)})})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,n){var i,o=this;void 0===n&&(n=this.queryDeduplication);var a=this.transform(e).serverQuery;if(a){var s=this.inFlightLinkObservables,u=this.link,c={query:a,variables:r,operationName:dn(a)||void 0,context:this.prepareContext(kr(kr({},t),{forceFetch:!n}))};if(t=c.context,n){var l=s.get(a)||new Map;s.set(a,l);var h=JSON.stringify(r);if(!(i=l.get(h))){l.set(h,i=di(Zn(u,c)));var f=function(){l.delete(h),l.size||s.delete(a),p.unsubscribe()},p=i.subscribe({next:f,error:f,complete:f})}}else i=di(Zn(u,c))}else i=ni.of({data:{}}),t=this.prepareContext(t);var d=this.transform(e).clientQuery;return d&&(i=function(e){return new ni(function(n){var i=n.next,a=n.error,s=n.complete,u=0,c=!1,l={next:function(e){++u,new Promise(function(n){n(function(e){return o.localState.runResolvers({document:d,remoteResult:e,context:t,variables:r})}(e))}).then(function(e){--u,i&&i.call(n,e),c&&l.complete()},function(e){--u,a&&a.call(n,e)})},error:function(e){a&&a.call(n,e)},complete:function(){c=!0,u||s&&s.call(n)}},h=e.subscribe(l);return function(){return h.unsubscribe()}})}(i)),i},e.prototype.fetchRequest=function(e){var t,r,n=this,i=e.requestId,o=e.queryId,a=e.document,s=e.options,u=e.fetchMoreForQueryId,c=s.variables,l=s.errorPolicy,h=void 0===l?"none":l,f=s.fetchPolicy;return new Promise(function(e,l){var p=n.getObservableFromLink(a,s.context,c),d="fetchRequest:"+o;n.fetchQueryRejectFns.set(d,l);var m=function(){n.fetchQueryRejectFns.delete(d),n.setQuery(o,function(e){e.subscriptions.delete(y)})},y=p.map(function(e){if(i>=n.getQuery(o).lastRequestId&&(n.markQueryResult(o,e,s,u),n.queryStore.markQueryResult(o,e,u),n.invalidate(o),n.invalidate(u),n.broadcastQueries()),"none"===h&&ii(e.errors))return l(new ai({graphQLErrors:e.errors}));if("all"===h&&(r=e.errors),u||"no-cache"===f)t=e.data;else{var p=n.dataStore.getCache().diff({variables:c,query:a,optimistic:!1,returnPartialData:!0}),d=p.result;(p.complete||s.returnPartialData)&&(t=d)}}).subscribe({error:function(e){m(),l(e)},complete:function(){m(),e({data:t,errors:r,loading:!1,networkStatus:ei.ready,stale:!1})}});n.setQuery(o,function(e){e.subscriptions.add(y)})})},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var r=this.getQuery(e),n=kr(kr({},r),t(r));this.queries.set(e,n)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,function(){return{invalidated:t}})},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return kr(kr({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==ei.ready&&t.networkStatus!==ei.error},e.prototype.startPollingQuery=function(e,t,r){var n=this,i=e.pollInterval;if(Dr(i,18),!this.ssrMode){var o=this.pollingInfoByQueryId.get(t);o||this.pollingInfoByQueryId.set(t,o={}),o.interval=i,o.options=kr(kr({},e),{fetchPolicy:"network-only"});var a=function(){var e=n.pollingInfoByQueryId.get(t);e&&(n.checkInFlight(t)?s():n.fetchQuery(t,e.options,oi.poll).then(s,s))},s=function(){var e=n.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(a,e.interval))};r&&this.addQueryListener(t,r),s()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),vi=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,r,n,i){void 0===i&&(i=!1);var o=!qn(e);i&&qn(e)&&e.data&&(o=!0),!n&&o&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:r})},e.prototype.markSubscriptionResult=function(e,t,r){qn(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:r})},e.prototype.markMutationInit=function(e){var t,r=this;e.optimisticResponse&&(t="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction(function(n){var i=r.cache;r.cache=n;try{r.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{r.cache=i}},e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!qn(e.result)){var r=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],n=e.updateQueries;n&&Object.keys(n).forEach(function(i){var o=n[i],a=o.query,s=o.updater,u=t.cache.diff({query:a.document,variables:a.variables,returnPartialData:!0,optimistic:!1}),c=u.result;if(u.complete){var l=Nn(function(){return s(c,{mutationResult:e.result,queryName:dn(a.document)||void 0,queryVariables:a.variables})});l&&r.push({result:l,dataId:"ROOT_QUERY",query:a.document,variables:a.variables})}}),this.cache.performTransaction(function(t){r.forEach(function(e){return t.write(e)});var n=e.update;n&&Nn(function(){return n(t,e.result)})})}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,r){this.cache.write({result:r,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),gi=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.cache,n=e.ssrMode,i=void 0!==n&&n,o=e.ssrForceFetchDelay,a=void 0===o?0:o,s=e.connectToDevTools,u=e.queryDeduplication,c=void 0===u||u,l=e.defaultOptions,h=e.assumeImmutableResults,f=void 0!==h&&h,p=e.resolvers,d=e.typeDefs,m=e.fragmentMatcher,y=e.name,v=e.version,g=e.link;if(!g&&p&&(g=Xn.empty()),!g||!r)throw new Fr(4);this.link=g,this.cache=r,this.store=new vi(r),this.disableNetworkFetches=i||a>0,this.queryDeduplication=c,this.defaultOptions=l||{},this.typeDefs=d,a&&setTimeout(function(){return t.disableNetworkFetches=!1},a),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),void 0!==s&&s&&"undefined"!=typeof window&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new pi({cache:r,client:this,resolvers:p,fragmentMatcher:m}),this.queryManager=new yi({link:this.link,store:this.store,queryDeduplication:c,ssrMode:i,clientAwareness:{name:y,version:v},localState:this.localState,assumeImmutableResults:f,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=kr(kr({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=kr(kr({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=kr(kr({},this.defaultOptions.query),e)),Dr("cache-and-network"!==e.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=kr(kr({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=kr(kr({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Zn(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore()}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore()}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}();function bi(e){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:wi(e)}]}}function wi(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return null;if(Array.isArray(e))return wi(e[0]);var t=[];return Object.keys(e).forEach(function(r){var n={kind:"Field",name:{kind:"Name",value:r},selectionSet:wi(e[r])||void 0};t.push(n)}),{kind:"SelectionSet",selections:t}}var Ei,Ri={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},Si=function(){function e(){}return e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.read({query:e.query,variables:e.variables,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.read({query:ln(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,optimistic:t})},e.prototype.writeQuery=function(e){this.write({dataId:"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables})},e.prototype.writeFragment=function(e){this.write({dataId:e.id,result:e.data,variables:e.variables,query:ln(e.fragment,e.fragmentName)})},e.prototype.writeData=function(e){var t,r,n=e.id,i=e.data;if(void 0!==n){var o=null;try{o=this.read({rootId:n,optimistic:!1,query:Ri})}catch(e){}var a=o&&o.__typename||"__ClientData",s=Object.assign({__typename:a},i);this.writeFragment({id:n,fragment:(t=s,r=a,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:r||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:wi(t)}]}),data:s})}else this.writeQuery({query:bi(i),data:i})},e}();Ei||(Ei={});var ki=null,xi={},Oi=1,Ti="@wry/context:Slot",Ii=Array,_i=Ii[Ti]||function(){var e=function(){function e(){this.id=["slot",Oi++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=ki;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===xi)break;return e!==ki&&(ki.slots[this.id]=t),!0}return ki&&(ki.slots[this.id]=xi),!1},e.prototype.getValue=function(){if(this.hasValue())return ki.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),a=ki;ki={parent:a,slots:o};try{return t.apply(n,r)}finally{ki=a}},e.bind=function(e){var t=ki;return function(){var r=ki;try{return ki=t,e.apply(this,arguments)}finally{ki=r}}},e.noContext=function(e,t,r){if(!ki)return e.apply(r,t);var n=ki;try{return ki=null,e.apply(r,t)}finally{ki=n}},e}();try{Object.defineProperty(Ii,Ti,{value:Ii[Ti]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function Ai(){}_i.bind,_i.noContext;var Pi=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Ai),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},e.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getEntry(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Ci=new _i,Ni=[],qi=[];function Fi(e,t){if(!e)throw new Error(t||"assertion failure")}function Di(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Li=function(){function e(t,r){this.fn=t,this.args=r,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++e.count}return e.prototype.recompute=function(){if(Fi(!this.recomputing,"already recomputing"),function(e){var t=Ci.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Bi(e)?ji(t,e):Qi(t,e),t}(this)||!zi(this))return Bi(this)?(t=Ki(e=this),Ci.withValue(e,$i,[e]),function(e){if("function"==typeof e.subscribe)try{Wi(e),e.unsubscribe=e.subscribe.apply(null,e.args)}catch(t){return e.setDirty(),!1}return!0}(e)&&function(e){e.dirty=!1,Bi(e)||Mi(e)}(e),t.forEach(zi),Di(e.value)):Di(this.value);var e,t},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Ui(this),Wi(this))},e.prototype.dispose=function(){var e=this;Ki(this).forEach(zi),Wi(this),this.parents.forEach(function(t){t.setDirty(),Gi(t,e)})},e.count=0,e}();function $i(e){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,e.args)}catch(t){e.value[1]=t}e.recomputing=!1}function Bi(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Ui(e){e.parents.forEach(function(t){return ji(t,e)})}function Mi(e){e.parents.forEach(function(t){return Qi(t,e)})}function ji(e,t){if(Fi(e.childValues.has(t)),Fi(Bi(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=qi.pop()||new Set;e.dirtyChildren.add(t),Ui(e)}function Qi(e,t){Fi(e.childValues.has(t)),Fi(!Bi(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),Vi(e,t),Bi(e)||Mi(e)}function Vi(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(qi.length<100&&qi.push(r),e.dirtyChildren=null))}function zi(e){return 0===e.parents.size&&"function"==typeof e.reportOrphan&&!0===e.reportOrphan()}function Ki(e){var t=Ni;return e.childValues.size>0&&(t=[],e.childValues.forEach(function(r,n){Gi(e,n),t.push(n)})),Fi(null===e.dirtyChildren),t}function Gi(e,t){t.parents.delete(e),e.childValues.delete(t),Vi(e,t)}function Wi(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var Hi=function(){function e(e){this.weakness=e}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return e.forEach(function(e){return t=t.getChildTrie(e)}),t.data||(t.data=Object.create(null))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness)),n},e}(),Ji=new Hi("function"==typeof WeakMap);function Yi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ji.lookupArray(e)}var Xi=new Set;function Zi(e,t){void 0===t&&(t=Object.create(null));var r=new Pi(t.max||Math.pow(2,16),function(e){return e.dispose()}),n=!!t.disposable,i=t.makeCacheKey||Yi;function o(){if(!n||Ci.hasValue()){var o=i.apply(null,arguments);if(void 0===o)return e.apply(null,arguments);var a=Array.prototype.slice.call(arguments),s=r.get(o);s?s.args=a:(s=new Li(e,a),r.set(o,s),s.subscribe=t.subscribe,n&&(s.reportOrphan=function(){return r.delete(o)}));var u=s.recompute();return r.set(o,s),Xi.add(r),Ci.hasValue()||(Xi.forEach(function(e){return e.clean()}),Xi.clear()),n?void 0:u}}return o.dirty=function(){var e=i.apply(null,arguments),t=void 0!==e&&r.get(e);t&&t.setDirty()},o}var eo=!1;function to(){var e=!eo;return!0===Cn("test")||(eo=!0),e}var ro=function(){function e(){}return e.prototype.ensureReady=function(){return Promise.resolve()},e.prototype.canBypassInit=function(){return!0},e.prototype.match=function(e,t,r){var n=r.store.get(e.id),i="ROOT_QUERY"===e.id;if(!n)return i;var o=n.__typename,a=void 0===o?i&&"Query":o;return a&&a===t||(to(),"heuristic")},e}(),no=function(){function e(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}return e.prototype.match=function(e,t,r){Dr(this.isReady,1);var n=r.store.get(e.id),i="ROOT_QUERY"===e.id;if(!n)return i;var o=n.__typename,a=void 0===o?i&&"Query":o;if(Dr(a,2),a===t)return!0;var s=this.possibleTypesMap[t];return!!(a&&s&&s.indexOf(a)>-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach(function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map(function(e){return e.name}))}),t},e}(),io=Object.prototype.hasOwnProperty,oo=function(){function e(e){var t=this;void 0===e&&(e=Object.create(null)),this.data=e,this.depend=Zi(function(e){return t.data[e]},{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){io.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach(function(r){t.set(r,e[r])}),Object.keys(this.data).forEach(function(r){io.call(e,r)||t.delete(r)})):Object.keys(this.data).forEach(function(e){t.delete(e)})},e}();function ao(e){return new oo(e)}var so=function(){function e(e){var t=this,r=void 0===e?{}:e,n=r.cacheKeyRoot,i=void 0===n?new Hi(In):n,o=r.freezeResults,a=void 0!==o&&o,s=this,u=s.executeStoreQuery,c=s.executeSelectionSet,l=s.executeSubSelectedArray;this.freezeResults=a,this.executeStoreQuery=Zi(function(e){return u.call(t,e)},{makeCacheKey:function(e){var t=e.query,r=e.rootValue,n=e.contextValue,o=e.variableValues,a=e.fragmentMatcher;if(n.store instanceof oo)return i.lookup(n.store,t,a,JSON.stringify(o),r.id)}}),this.executeSelectionSet=Zi(function(e){return c.call(t,e)},{makeCacheKey:function(e){var t=e.selectionSet,r=e.rootValue,n=e.execContext;if(n.contextValue.store instanceof oo)return i.lookup(n.contextValue.store,t,n.fragmentMatcher,JSON.stringify(n.variableValues),r.id)}}),this.executeSubSelectedArray=Zi(function(e){return l.call(t,e)},{makeCacheKey:function(e){var t=e.field,r=e.array,n=e.execContext;if(n.contextValue.store instanceof oo)return i.lookup(n.contextValue.store,t,r,JSON.stringify(n.variableValues))}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(kr(kr({},e),{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t,r=e.store,n=e.query,i=e.variables,o=e.previousResult,a=e.returnPartialData,s=void 0===a||a,u=e.rootId,c=void 0===u?"ROOT_QUERY":u,l=e.fragmentMatcherFunction,h=e.config;i=hn({},gn((Dr((t=pn(n))&&"query"===t.operation,6),t)),i);var f={store:r,dataIdFromObject:h&&h.dataIdFromObject,cacheRedirects:h&&h.cacheRedirects||{}},p=this.executeStoreQuery({query:n,rootValue:{type:"id",id:c,generated:!0,typename:"Query"},contextValue:f,variableValues:i,fragmentMatcher:l}),d=p.missing&&p.missing.length>0;return d&&!s&&p.missing.forEach(function(e){if(!e.tolerable)throw new Fr(8)}),o&&zr(o,p.result)&&(p.result=o),{result:p.result,complete:!d}},e.prototype.executeStoreQuery=function(e){var t=e.query,r=e.rootValue,n=e.contextValue,i=e.variableValues,o=e.fragmentMatcher,a=void 0===o?co:o,s=yn(t),u={query:t,fragmentMap:vn(mn(t)),contextValue:n,variableValues:i,fragmentMatcher:a};return this.executeSelectionSet({selectionSet:s.selectionSet,rootValue:r,execContext:u})},e.prototype.executeSelectionSet=function(e){var t=this,r=e.selectionSet,n=e.rootValue,i=e.execContext,o=i.fragmentMap,a=i.contextValue,s=i.variableValues,u={result:null},c=[],l=a.store.get(n.id),h=l&&l.__typename||"ROOT_QUERY"===n.id&&"Query"||void 0;function f(e){var t;return e.missing&&(u.missing=u.missing||[],(t=u.missing).push.apply(t,e.missing)),e.result}return r.selections.forEach(function(e){var r;if(an(e,s))if(en(e)){var u=f(t.executeField(l,h,e,i));void 0!==u&&c.push(((r={})[Zr(e)]=u,r))}else{var p=void 0;if(tn(e))p=e;else if(!(p=o[e.name.value]))throw new Fr(9);var d=p.typeCondition&&p.typeCondition.name.value,m=!d||i.fragmentMatcher(n,d,a);if(m){var y=t.executeSelectionSet({selectionSet:p.selectionSet,rootValue:n,execContext:i});"heuristic"===m&&y.missing&&(y=kr(kr({},y),{missing:y.missing.map(function(e){return kr(kr({},e),{tolerable:!0})})})),c.push(f(y))}}}),u.result=Ln(c),this.freezeResults,u},e.prototype.executeField=function(e,t,r,n){var i=n.variableValues,o=n.contextValue,a=function(e,t,r,n,i,o){var a=o.directives,s=r;(n||a)&&(s=Yr(s,n,a));var u,c=void 0;if(e&&void 0===(c=e[s])&&i.cacheRedirects&&"string"==typeof t){var l=i.cacheRedirects[t];if(l){var h=l[r];h&&(c=h(e,n,{getCacheKey:function(e){var t=i.dataIdFromObject(e);return t&&nn({id:t,typename:e.__typename})}}))}}return void 0===c?{result:c,missing:[{object:e,fieldName:s,tolerable:!1}]}:(null!=(u=c)&&"object"==typeof u&&"json"===u.type&&(c=c.json),{result:c})}(e,t,r.name.value,Xr(r,i),o,{resultKey:Zr(r),directives:on(r,i)});return Array.isArray(a.result)?this.combineExecResults(a,this.executeSubSelectedArray({field:r,array:a.result,execContext:n})):r.selectionSet?null==a.result?a:this.combineExecResults(a,this.executeSelectionSet({selectionSet:r.selectionSet,rootValue:a.result,execContext:n})):(uo(r,a.result),this.freezeResults,a)},e.prototype.combineExecResults=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.forEach(function(t){t.missing&&(e=e||[]).push.apply(e,t.missing)}),{result:t.pop().result,missing:e}},e.prototype.executeSubSelectedArray=function(e){var t,r=this,n=e.field,i=e.array,o=e.execContext;function a(e){return e.missing&&(t=t||[]).push.apply(t,e.missing),e.result}return i=i.map(function(e){return null===e?null:Array.isArray(e)?a(r.executeSubSelectedArray({field:n,array:e,execContext:o})):n.selectionSet?a(r.executeSelectionSet({selectionSet:n.selectionSet,rootValue:e,execContext:o})):(uo(n,e),e)}),this.freezeResults,{result:i,missing:t}},e}();function uo(e,t){if(!e.selectionSet&&rn(t))throw new Fr(10)}function co(){return!0}var lo=function(){function e(e){void 0===e&&(e=Object.create(null)),this.data=e}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t},e.prototype.delete=function(e){this.data[e]=void 0},e.prototype.clear=function(){this.data=Object.create(null)},e.prototype.replace=function(e){this.data=e||Object.create(null)},e}(),ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="WriteError",t}return Sr(t,e),t}(Error),fo=function(){function e(){}return e.prototype.writeQueryToStore=function(e){var t=e.query,r=e.result,n=e.store,i=void 0===n?ao():n,o=e.variables,a=e.dataIdFromObject,s=e.fragmentMatcherFunction;return this.writeResultToStore({dataId:"ROOT_QUERY",result:r,document:t,store:i,variables:o,dataIdFromObject:a,fragmentMatcherFunction:s})},e.prototype.writeResultToStore=function(e){var t=e.dataId,r=e.result,n=e.document,i=e.store,o=void 0===i?ao():i,a=e.variables,s=e.dataIdFromObject,u=e.fragmentMatcherFunction,c=pn(n);try{return this.writeSelectionSetToStore({result:r,dataId:t,selectionSet:c.selectionSet,context:{store:o,processedData:{},variables:hn({},gn(c),a),dataIdFromObject:s,fragmentMap:vn(mn(n)),fragmentMatcherFunction:u}})}catch(e){throw function(e,t){var r=new ho("Error writing result to store for query:\n "+JSON.stringify(t));return r.message+="\n"+e.message,r.stack=e.stack,r}(e,n)}},e.prototype.writeSelectionSetToStore=function(e){var t=this,r=e.result,n=e.dataId,i=e.selectionSet,o=e.context,a=o.variables,s=o.store,u=o.fragmentMap;return i.selections.forEach(function(e){var i;if(an(e,a))if(en(e)){var s=Zr(e),c=r[s];if(void 0!==c)t.writeFieldToStore({dataId:n,value:c,field:e,context:o});else{var l=!1,h=!1;e.directives&&e.directives.length&&(l=e.directives.some(function(e){return e.name&&"defer"===e.name.value}),h=e.directives.some(function(e){return e.name&&"client"===e.name.value})),!l&&!h&&o.fragmentMatcherFunction}}else{var f=void 0;tn(e)?f=e:Dr(f=(u||{})[e.name.value],3);var p=!0;if(o.fragmentMatcherFunction&&f.typeCondition){var d=n||"self",m=nn({id:d,typename:void 0}),y={store:new lo((i={},i[d]=r,i)),cacheRedirects:{}},v=o.fragmentMatcherFunction(m,f.typeCondition.name.value,y);Cn("production"),p=!!v}p&&t.writeSelectionSetToStore({result:r,selectionSet:f.selectionSet,dataId:n,context:o})}}),s},e.prototype.writeFieldToStore=function(e){var t,r,n,i=e.field,o=e.value,a=e.dataId,s=e.context,u=s.variables,c=s.dataIdFromObject,l=s.store,h=function(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach(function(n){var i=n.name,o=n.value;return Hr(r[e.name.value],i,o,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(e){var r=e.name,i=e.value;return Hr(n,r,i,t)})),Yr(e.name.value,n,r)}(i,u);if(i.selectionSet&&null!==o)if(Array.isArray(o)){var f=a+"."+h;r=this.processArrayValue(o,f,i.selectionSet,s)}else{var p=a+"."+h,d=!0;if(po(p)||(p="$"+p),c){var m=c(o);Dr(!m||!po(m),4),(m||"number"==typeof m&&0===m)&&(p=m,d=!1)}yo(p,i,s.processedData)||this.writeSelectionSetToStore({dataId:p,result:o,selectionSet:i.selectionSet,context:s});var y=o.__typename;r=nn({id:p,typename:y},d);var v=(n=l.get(a))&&n[h];if(v!==r&&rn(v)){var g=void 0!==v.typename,b=void 0!==y,w=g&&b&&v.typename!==y;Dr(!d||v.generated||w,5),Dr(!g||b,6),v.generated&&(w?d||l.delete(v.id):mo(v.id,r.id,l))}}else r=null!=o&&"object"==typeof o?{type:"json",json:o}:o;(n=l.get(a))&&zr(r,n[h])||l.set(a,kr(kr({},n),((t={})[h]=r,t)))},e.prototype.processArrayValue=function(e,t,r,n){var i=this;return e.map(function(e,o){if(null===e)return null;var a=t+"."+o;if(Array.isArray(e))return i.processArrayValue(e,a,r,n);var s=!0;if(n.dataIdFromObject){var u=n.dataIdFromObject(e);u&&(a=u,s=!1)}return yo(a,r,n.processedData)||i.writeSelectionSetToStore({dataId:a,result:e,selectionSet:r,context:n}),nn({id:a,typename:e.__typename},s)})},e}();function po(e){return"$"===e[0]}function mo(e,t,r){if(e===t)return!1;var n=r.get(e),i=r.get(t),o=!1;Object.keys(n).forEach(function(e){var t=n[e],a=i[e];rn(t)&&po(t.id)&&rn(a)&&!zr(t,a)&&mo(t.id,a.id,r)&&(o=!0)}),r.delete(e);var a=kr(kr({},n),i);return zr(a,i)?o:(r.set(t,a),!0)}function yo(e,t,r){if(!r)return!1;if(r[e]){if(r[e].indexOf(t)>=0)return!0;r[e].push(t)}else r[e]=[t];return!1}var vo={fragmentMatcher:new ro,dataIdFromObject:go,addTypename:!0,resultCaching:!0,freezeResults:!1};function go(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null}var bo=Object.prototype.hasOwnProperty,wo=function(e){function t(t,r,n){var i=e.call(this,Object.create(null))||this;return i.optimisticId=t,i.parent=r,i.transaction=n,i}return Sr(t,e),t.prototype.toObject=function(){return kr(kr({},this.parent.toObject()),this.data)},t.prototype.get=function(e){return bo.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(lo),Eo=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;r.watches=new Set,r.typenameDocumentCache=new Map,r.cacheKeyRoot=new Hi(In),r.silenceBroadcast=!1,r.config=kr(kr({},vo),t),r.config.customResolvers&&(r.config.cacheRedirects=r.config.customResolvers),r.config.cacheResolvers&&(r.config.cacheRedirects=r.config.cacheResolvers),r.addTypename=!!r.config.addTypename,r.data=r.config.resultCaching?new oo:new lo,r.optimisticData=r.data,r.storeWriter=new fo,r.storeReader=new so({cacheKeyRoot:r.cacheKeyRoot,freezeResults:t.freezeResults});var n=r,i=n.maybeBroadcastWatch;return r.maybeBroadcastWatch=Zi(function(e){return i.call(r,e)},{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return n.data instanceof oo?n.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),r}return Sr(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){if("string"==typeof e.rootId&&void 0===this.data.get(e.rootId))return null;var t=this.config.fragmentMatcher,r=t&&t.match;return this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:r,previousResult:e.previousResult,config:this.config})||null},t.prototype.write=function(e){var t=this.config.fragmentMatcher,r=t&&t.match;this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:r}),this.broadcastWatches()},t.prototype.diff=function(e){var t=this.config.fragmentMatcher,r=t&&t.match;return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:r,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new Fr(7)},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],r=0,n=this.optimisticData;n instanceof wo;)n.optimisticId===e?++r:t.push(n),n=n.parent;if(r>0){for(this.optimisticData=n;t.length>0;){var i=t.pop();this.performTransaction(i.transaction,i.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var r=this.data,n=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new wo(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=n,this.data=r}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(r=e,t=(0,Ar.visit)(fn(r),{SelectionSet:{enter:function(e,t,r){if(!r||"OperationDefinition"!==r.kind){var n=e.selections;if(n&&!n.some(function(e){return en(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))})){var i=r;if(!(en(i)&&i.directives&&i.directives.some(function(e){return"export"===e.name.value})))return kr(kr({},e),{selections:Ir(n,[wn])})}}}}}),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}var r;return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach(function(t){return e.maybeBroadcastWatch(t)})},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(Si),Ro=u(1911),So={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},ko=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},xo=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=new Fr(2);throw n.parseError=e,n}return r},Oo=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,n=e.fetch,i=e.includeExtensions,o=e.useGETForQueries,a=xr(e,["uri","fetch","includeExtensions","useGETForQueries"]);!function(e){if(!e&&"undefined"==typeof fetch)throw new Fr(1)}(n),n||(n=fetch);var s={http:{includeExtensions:i},options:a.fetchOptions,credentials:a.credentials,headers:a.headers};return new Xn(function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(e,r),i=e.getContext(),a={};if(i.clientAwareness){var u=i.clientAwareness,c=u.name,l=u.version;c&&(a["apollographql-client-name"]=c),l&&(a["apollographql-client-version"]=l)}var h,f=kr({},a,i.headers),p={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:f},d=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=kr({},t.options,{headers:t.headers,credentials:t.credentials}),o=t.http;r.forEach(function(e){i=kr({},i,e.options,{headers:kr({},i.headers,e.headers)}),e.credentials&&(i.credentials=e.credentials),o=kr({},o,e.http)});var a=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:a,variables:u};return o.includeExtensions&&(l.extensions=s),o.includeQuery&&(l.query=(0,Ro.y)(c)),{options:i,body:l}}(e,So,s,p),m=d.options,y=d.body;if(!m.signal){var v=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),g=v.controller,b=v.signal;(h=g)&&(m.signal=b)}if(o&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(m.method="GET"),"GET"===m.method){var w=function(e,t){var r=[],n=function(e,t){r.push(e+"="+encodeURIComponent(t))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=xo(t.variables)}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=xo(t.extensions)}catch(e){return{parseError:e}}n("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+r.join("&")+a}}(t,y),E=w.newURI,R=w.parseError;if(R)return zn(R);t=E}else try{m.body=xo(y)}catch(R){return zn(R)}return new jn(function(r){var i;return n(t,m).then(function(t){return e.setContext({response:t}),t}).then((i=e,function(e){return e.text().then(function(t){try{return JSON.parse(t)}catch(n){var r=n;return r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,Promise.reject(r)}}).then(function(t){return e.status>=300&&ko(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||ko(e,t,"Server response was missing for query '"+(Array.isArray(i)?i.map(function(e){return e.operationName}):i.operationName)+"'."),t})})).then(function(e){return r.next(e),r.complete(),e}).catch(function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&r.next(e.result),r.error(e))}),function(){h&&h.abort()}})})};!function(e){Sr(function(t){return e.call(this,Oo(t).request)||this},e)}(Xn);var To=u(4742),Io=u.n(To),_o=function(){return _o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_o.apply(this,arguments)};function Ao(e,t){if(!Boolean(e))throw new Error(t)}function Po(e){return Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Po(e)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var Co="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function No(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,o=t+1;(r=n.exec(e.body))&&r.index<t;)i+=1,o=t+1-(r.index+r[0].length);return{line:i,column:o}}function qo(e){return Fo(e.source,No(e.source,e.start))}function Fo(e,t){var r=e.locationOffset.column-1,n=Lo(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?r:0,u=t.column+s,c="".concat(e.name,":").concat(a,":").concat(u,"\n"),l=n.split(/\r\n|[\n\r]/g),h=l[i];if(h.length>120){for(var f=Math.floor(u/80),p=u%80,d=[],m=0;m<h.length;m+=80)d.push(h.slice(m,m+80));return c+Do([["".concat(a),d[0]]].concat(d.slice(1,f+1).map(function(e){return["",e]}),[[" ",Lo(p-1)+"^"],["",d[f+1]]]))}return c+Do([["".concat(a-1),l[i-1]],["".concat(a),h],["",Lo(u-1)+"^"],["".concat(a+1),l[i+1]]])}function Do(e){var t=e.filter(function(e){return e[0],void 0!==e[1]}),r=Math.max.apply(Math,t.map(function(e){return e[0].length}));return t.map(function(e){var t,n=e[0],i=e[1];return Lo(r-(t=n).length)+t+(i?" | "+i:" |")}).join("\n")}function Lo(e){return Array(e+1).join(" ")}function $o(e){return $o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$o(e)}function Bo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Uo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jo(e,t){return!t||"object"!==$o(t)&&"function"!=typeof t?Qo(e):t}function Qo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vo(e){var t="function"==typeof Map?new Map:void 0;return Vo=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return zo(e,arguments,Wo(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Go(n,e)},Vo(e)}function zo(e,t,r){return zo=Ko()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Go(i,r.prototype),i},zo.apply(null,arguments)}function Ko(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function Go(e,t){return Go=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Go(e,t)}function Wo(e){return Wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wo(e)}var Ho=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Go(e,t)}(a,e);var t,r,n,i,o=(t=a,r=Ko(),function(){var e,n=Wo(t);if(r){var i=Wo(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return jo(this,e)});function a(e,t,r,n,i,s,u){var c,l,h,f;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(f=o.call(this,e)).name="GraphQLError",f.originalError=null!=s?s:void 0,f.nodes=Jo(Array.isArray(t)?t:t?[t]:void 0);for(var p=[],d=0,m=null!==(y=f.nodes)&&void 0!==y?y:[];d<m.length;d++){var y,v=m[d].loc;null!=v&&p.push(v)}p=Jo(p),f.source=null!=r?r:null===(c=p)||void 0===c?void 0:c[0].source,f.positions=null!=n?n:null===(l=p)||void 0===l?void 0:l.map(function(e){return e.start}),f.locations=n&&r?n.map(function(e){return No(r,e)}):null===(h=p)||void 0===h?void 0:h.map(function(e){return No(e.source,e.start)}),f.path=null!=i?i:void 0;var g,b=null==s?void 0:s.extensions;return null==u&&"object"==Po(g=b)&&null!==g?f.extensions=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(r),!0).forEach(function(t){Uo(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},b):f.extensions=null!=u?u:{},Object.defineProperties(Qo(f),{message:{enumerable:!0},locations:{enumerable:null!=f.locations},path:{enumerable:null!=f.path},extensions:{enumerable:null!=f.extensions&&Object.keys(f.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s&&s.stack?(Object.defineProperty(Qo(f),"stack",{value:s.stack,writable:!0,configurable:!0}),jo(f)):(Error.captureStackTrace?Error.captureStackTrace(Qo(f),a):Object.defineProperty(Qo(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return n=a,i=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var i=n[r];i.loc&&(t+="\n\n"+qo(i.loc))}else if(e.source&&e.locations)for(var o=0,a=e.locations;o<a.length;o++){var s=a[o];t+="\n\n"+Fo(e.source,s)}return t}(this)}},{key:"toJSON",value:function(){return function(e){var t;e||Ao(0,"Received null or undefined error.");var r=null!==(t=e.message)&&void 0!==t?t:"An unknown error occurred.",n=e.locations,i=e.path,o=e.extensions;return o&&Object.keys(o).length>0?{message:r,locations:n,path:i,extensions:o}:{message:r,locations:n,path:i}}(this)}},{key:Co,get:function(){return"Object"}}],i&&Mo(n.prototype,i),a}(Vo(Error));function Jo(e){return void 0===e||0===e.length?void 0:e}function Yo(e,t,r){return new Ho("Syntax Error: ".concat(r),void 0,e,[t])}var Xo=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});const Zo="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function ea(e){var t=e.prototype.toJSON;"function"==typeof t||function(){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,Zo&&(e.prototype[Zo]=t)}var ta=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();ea(ta);var ra=function(){function e(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();ea(ra);var na=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function ia(e){return ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ia(e)}function oa(e,t){switch(ia(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(Zo)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var i=n.call(e);if(i!==e)return"string"==typeof i?i:oa(i,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var r=Math.min(10,e.length),n=e.length-r,i=[],o=0;o<r;++o)i.push(oa(e[o],t));return 1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map(function(r){return r+": "+oa(e[r],t)}).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}function aa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var sa=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||Ao(0,"Body must be a string. Received: ".concat(oa(e,[]),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||Ao(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Ao(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r;return t=e,(r=[{key:Co,get:function(){return"Source"}}])&&aa(t.prototype,r),e}(),ua=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function ca(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:r=!1,n=!0,i=0;break;case 9:case 32:++i;break;default:n&&!r&&(null===o||i<o)&&(o=i),n=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==r)for(var n=1;n<t.length;n++)t[n]=t[n].slice(r);for(var i=0;i<t.length&&la(t[i]);)++i;for(var o=t.length;o>i&&la(t[o-1]);)--o;return t.slice(i,o).join("\n")}function la(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var ha=function(){function e(e){var t=new ra(na.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==na.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=pa(this,e)}while(e.kind===na.COMMENT);return e},e}();function fa(e){return isNaN(e)?na.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function pa(e,t){for(var r=e.source,n=r.body,i=n.length,o=t.end;o<i;){var a=n.charCodeAt(o),s=e.line,u=1+o-e.lineStart;switch(a){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===n.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new ra(na.BANG,o,o+1,s,u,t);case 35:return ma(r,o,s,u,t);case 36:return new ra(na.DOLLAR,o,o+1,s,u,t);case 38:return new ra(na.AMP,o,o+1,s,u,t);case 40:return new ra(na.PAREN_L,o,o+1,s,u,t);case 41:return new ra(na.PAREN_R,o,o+1,s,u,t);case 46:if(46===n.charCodeAt(o+1)&&46===n.charCodeAt(o+2))return new ra(na.SPREAD,o,o+3,s,u,t);break;case 58:return new ra(na.COLON,o,o+1,s,u,t);case 61:return new ra(na.EQUALS,o,o+1,s,u,t);case 64:return new ra(na.AT,o,o+1,s,u,t);case 91:return new ra(na.BRACKET_L,o,o+1,s,u,t);case 93:return new ra(na.BRACKET_R,o,o+1,s,u,t);case 123:return new ra(na.BRACE_L,o,o+1,s,u,t);case 124:return new ra(na.PIPE,o,o+1,s,u,t);case 125:return new ra(na.BRACE_R,o,o+1,s,u,t);case 34:return 34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)?ba(r,o,s,u,t,e):ga(r,o,s,u,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ya(r,o,a,s,u,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Ra(r,o,s,u,t)}throw Yo(r,o,da(a))}var c=e.line,l=1+o-e.lineStart;return new ra(na.EOF,i,i,c,l,t)}function da(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(fa(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(fa(e),".")}function ma(e,t,r,n,i){var o,a=e.body,s=t;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new ra(na.COMMENT,t,s,r,n,i,a.slice(t+1,s))}function ya(e,t,r,n,i,o){var a=e.body,s=r,u=t,c=!1;if(45===s&&(s=a.charCodeAt(++u)),48===s){if((s=a.charCodeAt(++u))>=48&&s<=57)throw Yo(e,u,"Invalid number, unexpected digit after 0: ".concat(fa(s),"."))}else u=va(e,u,s),s=a.charCodeAt(u);if(46===s&&(c=!0,s=a.charCodeAt(++u),u=va(e,u,s),s=a.charCodeAt(u)),69!==s&&101!==s||(c=!0,43!==(s=a.charCodeAt(++u))&&45!==s||(s=a.charCodeAt(++u)),u=va(e,u,s),s=a.charCodeAt(u)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw Yo(e,u,"Invalid number, expected digit but got: ".concat(fa(s),"."));return new ra(c?na.FLOAT:na.INT,t,u,n,i,o,a.slice(t,u))}function va(e,t,r){var n=e.body,i=t,o=r;if(o>=48&&o<=57){do{o=n.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw Yo(e,i,"Invalid number, expected digit but got: ".concat(fa(o),"."))}function ga(e,t,r,n,i){for(var o=e.body,a=t+1,s=a,u=0,c="";a<o.length&&!isNaN(u=o.charCodeAt(a))&&10!==u&&13!==u;){if(34===u)return c+=o.slice(s,a),new ra(na.STRING,t,a+1,r,n,i,c);if(u<32&&9!==u)throw Yo(e,a,"Invalid character within String: ".concat(fa(u),"."));if(++a,92===u){switch(c+=o.slice(s,a-1),u=o.charCodeAt(a)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var l=wa(o.charCodeAt(a+1),o.charCodeAt(a+2),o.charCodeAt(a+3),o.charCodeAt(a+4));if(l<0){var h=o.slice(a+1,a+5);throw Yo(e,a,"Invalid character escape sequence: \\u".concat(h,"."))}c+=String.fromCharCode(l),a+=4;break;default:throw Yo(e,a,"Invalid character escape sequence: \\".concat(String.fromCharCode(u),"."))}s=++a}}throw Yo(e,a,"Unterminated string.")}function ba(e,t,r,n,i,o){for(var a=e.body,s=t+3,u=s,c=0,l="";s<a.length&&!isNaN(c=a.charCodeAt(s));){if(34===c&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2))return l+=a.slice(u,s),new ra(na.BLOCK_STRING,t,s+3,r,n,i,ca(l));if(c<32&&9!==c&&10!==c&&13!==c)throw Yo(e,s,"Invalid character within String: ".concat(fa(c),"."));10===c?(++s,++o.line,o.lineStart=s):13===c?(10===a.charCodeAt(s+1)?s+=2:++s,++o.line,o.lineStart=s):92===c&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2)&&34===a.charCodeAt(s+3)?(l+=a.slice(u,s)+'"""',u=s+=4):++s}throw Yo(e,s,"Unterminated string.")}function wa(e,t,r,n){return Ea(e)<<12|Ea(t)<<8|Ea(r)<<4|Ea(n)}function Ea(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ra(e,t,r,n,i){for(var o=e.body,a=o.length,s=t+1,u=0;s!==a&&!isNaN(u=o.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new ra(na.NAME,t,s,r,n,i,o.slice(t,s))}var Sa=function(){function e(e,t){var r=function(e){return e instanceof sa}(e)?e:new sa(e);this._lexer=new ha(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(na.NAME);return{kind:Xo.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:Xo.DOCUMENT,definitions:this.many(na.SOF,this.parseDefinition,na.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(na.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(na.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(na.BRACE_L))return{kind:Xo.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(na.NAME)&&(t=this.parseName()),{kind:Xo.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(na.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(na.PAREN_L,this.parseVariableDefinition,na.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:Xo.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(na.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(na.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(na.DOLLAR),{kind:Xo.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:Xo.SELECTION_SET,selections:this.many(na.BRACE_L,this.parseSelection,na.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(na.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(na.COLON)?(e=n,t=this.parseName()):t=n,{kind:Xo.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(na.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(na.PAREN_L,t,na.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(na.COLON),{kind:Xo.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:Xo.ARGUMENT,name:this.parseName(),value:(this.expectToken(na.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(na.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(na.NAME)?{kind:Xo.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:Xo.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:Xo.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:Xo.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case na.BRACKET_L:return this.parseList(e);case na.BRACE_L:return this.parseObject(e);case na.INT:return this._lexer.advance(),{kind:Xo.INT,value:t.value,loc:this.loc(t)};case na.FLOAT:return this._lexer.advance(),{kind:Xo.FLOAT,value:t.value,loc:this.loc(t)};case na.STRING:case na.BLOCK_STRING:return this.parseStringLiteral();case na.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:Xo.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:Xo.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:Xo.NULL,loc:this.loc(t)};default:return{kind:Xo.ENUM,value:t.value,loc:this.loc(t)}}case na.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:Xo.STRING,value:e.value,block:e.kind===na.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:Xo.LIST,values:this.any(na.BRACKET_L,function(){return t.parseValueLiteral(e)},na.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:Xo.OBJECT,fields:this.any(na.BRACE_L,function(){return t.parseObjectField(e)},na.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(na.COLON),{kind:Xo.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(na.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(na.AT),{kind:Xo.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(na.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(na.BRACKET_R),e={kind:Xo.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(na.BANG)?{kind:Xo.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:Xo.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===na.NAME)switch(e.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()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(na.STRING)||this.peek(na.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(na.BRACE_L,this.parseOperationTypeDefinition,na.BRACE_R);return{kind:Xo.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(na.COLON);var r=this.parseNamedType();return{kind:Xo.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:Xo.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Xo.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(na.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(na.AMP)||this.peek(na.NAME));return t}return this.delimitedMany(na.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(na.BRACE_L)&&this._lexer.lookahead().kind===na.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(na.BRACE_L,this.parseFieldDefinition,na.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(na.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:Xo.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(na.PAREN_L,this.parseInputValueDef,na.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(na.COLON);var n,i=this.parseTypeReference();this.expectOptionalToken(na.EQUALS)&&(n=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:Xo.INPUT_VALUE_DEFINITION,description:t,name:r,type:i,defaultValue:n,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Xo.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:Xo.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(na.EQUALS)?this.delimitedMany(na.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:Xo.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(na.BRACE_L,this.parseEnumValueDefinition,na.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:Xo.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:Xo.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(na.BRACE_L,this.parseInputValueDef,na.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===na.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)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(na.BRACE_L,this.parseOperationTypeDefinition,na.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:Xo.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:Xo.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:Xo.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:Xo.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:Xo.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:Xo.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:Xo.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(na.AT);var r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:Xo.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(na.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==ua[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new ta(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw Yo(this._lexer.source,t.start,"Expected ".concat(xa(e),", found ").concat(ka(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==na.NAME||t.value!==e)throw Yo(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(ka(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===na.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return Yo(this._lexer.source,t.start,"Unexpected ".concat(ka(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function ka(e){var t=e.value;return xa(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function xa(e){return function(e){return e===na.BANG||e===na.DOLLAR||e===na.AMP||e===na.PAREN_L||e===na.PAREN_R||e===na.SPREAD||e===na.COLON||e===na.EQUALS||e===na.AT||e===na.BRACKET_L||e===na.BRACKET_R||e===na.BRACE_L||e===na.PIPE||e===na.BRACE_R}(e)?'"'.concat(e,'"'):e}var Oa=new Map,Ta=new Map,Ia=!0,_a=!1;function Aa(e){return e.replace(/[\s,]+/g," ").trim()}function Pa(e){var t,r,n,i=Aa(e);if(!Oa.has(i)){var o=function(e,t){return new Sa(e,t).parseDocument()}(e,{experimentalFragmentVariables:_a,allowLegacyFragmentVariables:_a});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");Oa.set(i,function(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=o,r=new Set,n=[],t.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,i=Aa((a=e.loc).source.body.substring(a.start,a.end)),o=Ta.get(t);o&&!o.has(i)?Ia&&console.warn("Warning: fragment with name "+t+" 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"):o||Ta.set(t,o=new Set),o.add(i),r.has(i)||(r.add(i),n.push(e))}else n.push(e);var a}),_o(_o({},t),{definitions:n}))))}return Oa.get(i)}function Ca(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach(function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]}),Pa(n)}var Na,qa=Ca;(Na=Ca||(Ca={})).gql=qa,Na.resetCaches=function(){Oa.clear(),Ta.clear()},Na.disableFragmentWarnings=function(){Ia=!1},Na.enableExperimentalFragmentVariables=function(){_a=!0},Na.disableExperimentalFragmentVariables=function(){_a=!1},Ca.default=Ca;const Fa=Ca`
7
7
  fragment RepositoryParts on Repository {
8
8
  id
9
9
  isFork
@@ -300,7 +300,7 @@
300
300
  }
301
301
  }
302
302
  ${Ba}
303
- `,fs="no-cache",ps="cache-first",ds=new no({introspectionQueryResultData:Io()});function ms(e){return{...e,labels:e.labels.nodes,head:{ref:e.headRefName,sha:e.headRefOid,repo:{fork:e.repository.isFork}},base:{ref:e.baseRefName,sha:e.baseRefOid}}}class ys extends wr{constructor(e){super(e),this.client=this.getApolloClient()}getApolloClient(){const e=(t=(e,{headers:t})=>({headers:{"Content-Type":"application/json; charset=utf-8",...t,authorization:this.token?`${this.tokenKeyword} ${this.token}`:""}}),new Xn(function(e,r){var n=xr(e,[]);return new jn(function(i){var o;return Promise.resolve(n).then(function(r){return t(0,e.getContext())}).then(e.setContext).then(function(){o=r(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)})}).catch(i.error.bind(i)),function(){o&&o.unsubscribe()}})}));var t;const r=Oo({uri:`${this.apiRoot}/graphql`});return new gi({link:e.concat(r),cache:new Eo({fragmentMatcher:ds}),defaultOptions:{watchQuery:{fetchPolicy:fs,errorPolicy:"ignore"},query:{fetchPolicy:fs,errorPolicy:"all"}}})}reset(){return this.client.resetStore()}async getRepository(e,t){const{data:r}=await this.query({query:Ha,variables:{owner:e,name:t},fetchPolicy:ps});return r.repository}query(e){return this.client.query(e).catch(e=>{throw new R.APIError(e.message,500,"GitHub")})}async mutate(e){try{return await this.client.mutate(e)}catch(t){const r=t.graphQLErrors;if(Array.isArray(r)&&r.some(e=>"Ref cannot be created."===e.message)){const t=e?.variables?.createRefInput?.name||"",r=o()(t,"refs/heads/");r&&await(0,R.throwOnConflictingBranches)(r,e=>this.getBranch(e),fr)}else if(Array.isArray(r)&&r.some(e=>new RegExp(`A ref named "refs/heads/${R.CMS_BRANCH_PREFIX}/.+?" already exists in the repository.`).test(e.message))){const t=e?.variables?.createRefInput?.name||"",r=e?.variables?.createRefInput?.oid||"",n=o()(t,"refs/heads/");if(n&&n.startsWith(`${R.CMS_BRANCH_PREFIX}/`)&&r)try{return await this.backupBranch(n),await this.deleteBranch(n),await this.client.mutate(e)}catch(e){console.log(e)}}throw new R.APIError(t.message,500,"GitHub")}}async hasWriteAccess(){const{repoOwner:e,repoName:t}=this;try{const{data:r}=await this.query({query:Ma,variables:{owner:e,name:t},fetchPolicy:ps}),{viewerPermission:n}=r.repository;return["ADMIN","MAINTAIN","WRITE"].includes(n)}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}async user(){const{data:e}=await this.query({query:ja,fetchPolicy:ps});return e.viewer}async retrieveBlobObject(e,t,r,n={}){const{data:i}=await this.query({query:Qa,variables:{owner:e,name:t,expression:r},...n});if(i.repository.object){const{is_binary:e,text:t}=i.repository.object;return{isNull:!1,isBinary:e,text:t}}return{isNull:!0}}getOwnerAndNameFromRepoUrl(e){let{repoOwner:t,repoName:r}=this;return e===this.originRepoURL&&({originRepoOwner:t,originRepoName:r}=this),{owner:t,name:r}}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await(0,R.readFile)(t,()=>this.fetchBlobContent({sha:t,repoURL:n,parseText:i}),R.localForage,i)}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){if(!r)return super.fetchBlobContent({sha:e,repoURL:t,parseText:r});const{owner:n,name:i}=this.getOwnerAndNameFromRepoUrl(t),{isNull:o,isBinary:a,text:s}=await this.retrieveBlobObject(n,i,e,{fetchPolicy:ps});if(o)throw new R.APIError("Not Found",404,"GitHub");return a?super.fetchBlobContent({sha:e,repoURL:t,parseText:r}):s}async getPullRequestAuthor(e){const t=e.user;return t?.name||t?.login}async getPullRequests(e,t,r){const{originRepoOwner:n,originRepoName:i}=this;let o;o=t===yr.Open?["OPEN"]:t===yr.Closed?["CLOSED","MERGED"]:["OPEN","CLOSED","MERGED"];const{data:a}=await this.query({query:Xa,variables:{owner:n,name:i,...e?{head:e}:{},states:o}}),{pullRequests:s}=a.repository;return s.nodes.map(ms).filter(e=>e.head.ref.startsWith(`${R.CMS_BRANCH_PREFIX}/`)&&r(e))}async getOpenAuthoringBranches(){const{repoOwner:e,repoName:t}=this,{data:r}=await this.query({query:Wa,variables:{owner:e,name:t,refPrefix:`refs/heads/cms/${this.repo}/`}});return r.repository.refs.nodes.map(({name:e,prefix:t})=>({ref:`${t}${e}`}))}async getStatuses(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=(await this.getBranchPullRequest(n)).head.sha,{originRepoOwner:o,originRepoName:a}=this,{data:s}=await this.query({query:Va,variables:{owner:o,name:a,sha:i}});if(s.repository.object){const{status:e}=s.repository.object,{contexts:t}=e||{contexts:[]};return t}return[]}getAllFiles(e,t){return e.reduce((e,r)=>{if("tree"===r.type){const n=r.object?.entries||[];return[...e,...this.getAllFiles(n,`${t}/${r.name}`)]}return"blob"===r.type?[...e,{name:r.name,type:r.type,id:r.sha,path:`${t}/${r.name}`,size:r.blob?r.blob.size:0}]:e},[])}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={}){const{owner:i,name:o}=this.getOwnerAndNameFromRepoUrl(t),a=lr()(e,"/"),{data:s}=await this.query({query:za(n),variables:{owner:i,name:o,expression:`${r}:${a}`}});return s.repository.object?this.getAllFiles(s.repository.object.entries,a):[]}getBranchQualifiedName(e){return`refs/heads/${e}`}getBranchQuery(e,t,r){return{query:Ga,variables:{owner:t,name:r,qualifiedName:this.getBranchQualifiedName(e)}}}async getDefaultBranch(){const{data:e}=await this.query({...this.getBranchQuery(this.branch,this.originRepoOwner,this.originRepoName)});return e.repository.branch}async getBranch(e){const{data:t}=await this.query({...this.getBranchQuery(e,this.repoOwner,this.repoName),fetchPolicy:ps});if(!t.repository.branch)throw new R.APIError("Branch not found",404,fr);return t.repository.branch}async patchRef(e,t,r,n={}){if("heads"!==e)return super.patchRef(e,t,r,n);const i=n.force||!1,o=await this.getBranch(t),{data:a}=await this.mutate({mutation:ts,variables:{input:{oid:r,refId:o.id,force:i}}});return a.updateRef.branch}async deleteBranch(e){const t=await this.getBranch(e),{data:r}=await this.mutate({mutation:ns,variables:{deleteRefInput:{refId:t.id}},update:e=>e.data.delete(go(t))});return r.deleteRef}getPullRequestQuery(e){const{originRepoOwner:t,originRepoName:r}=this;return{query:Ya,variables:{owner:t,name:r,number:e}}}async getPullRequest(e){const{data:t}=await this.query({...this.getPullRequestQuery(e),fetchPolicy:ps}),r="OPEN"===t.repository.pullRequest.state?yr.Open:yr.Closed;return{...t.repository.pullRequest,state:r}}getPullRequestAndBranchQuery(e,t){const{repoOwner:r,repoName:n}=this,{originRepoOwner:i,originRepoName:o}=this;return{query:Za,variables:{owner:r,name:n,originRepoOwner:i,originRepoName:o,number:t,qualifiedName:this.getBranchQualifiedName(e)}}}async getPullRequestAndBranch(e,t){const{data:r}=await this.query({...this.getPullRequestAndBranchQuery(e,t),fetchPolicy:ps}),{repository:n,origin:i}=r;return{branch:n.branch,pullRequest:i.pullRequest}}async openPR(e){const t=await this.getPullRequest(e),{data:r}=await this.mutate({mutation:hs,variables:{reopenPullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.reopenPullRequest,n={repository:{...r.repository,pullRequest:r}};e.writeQuery({...this.getPullRequestQuery(r.number),data:n})}});return r.reopenPullRequest}async closePR(e){const t=await this.getPullRequest(e),{data:r}=await this.mutate({mutation:os,variables:{closePullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.closePullRequest,n={repository:{...r.repository,pullRequest:r}};e.writeQuery({...this.getPullRequestQuery(r.number),data:n})}});return r.closePullRequest}async deleteUnpublishedEntry(e,t){try{const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);if(i.number!==dr){const{branch:e,pullRequest:t}=await this.getPullRequestAndBranch(n,i.number),{data:r}=await this.mutate({mutation:as,variables:{deleteRefInput:{refId:e.id},closePullRequestInput:{pullRequestId:t.id}},update:r=>{r.data.delete(go(e)),r.data.delete(go(t))}});return r.closePullRequest}return await this.deleteBranch(n)}catch(e){const{graphQLErrors:t}=e;if(t&&t.length>0){const e=t.some(e=>"NOT_FOUND"===e.type);if(e)return}throw e}}async createPR(e,t){const[r,n]=await Promise.all([this.getRepository(this.originRepoOwner,this.originRepoName),this.useOpenAuthoring?`${(await this.user()).login}:${t}`:t]),{data:i}=await this.mutate({mutation:us,variables:{createPullRequestInput:{baseRefName:this.branch,body:R.DEFAULT_PR_BODY,title:e,headRefName:n,repositoryId:r.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.createPullRequest,n={repository:{...r.repository,pullRequest:r}};e.writeQuery({...this.getPullRequestQuery(r.number),data:n})}}),{pullRequest:o}=i.createPullRequest;return{...o,head:{sha:o.headRefOid}}}async createBranch(e,t){const r=this.repoOwner,n=this.repoName,i=await this.getRepository(r,n),{data:o}=await this.mutate({mutation:cs,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:i.id}},update:(t,{data:i})=>{const{branch:o}=i.createRef,a={repository:{...o.repository,branch:o}};t.writeQuery({...this.getBranchQuery(e,r,n),data:a})}}),{branch:a}=o.createRef;return{...a,ref:`${a.prefix}${a.name}`}}async createBranchAndPullRequest(e,t,r){const n=this.originRepoOwner,i=this.originRepoName,o=await this.getRepository(n,i),{data:a}=await this.mutate({mutation:ls,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:o.id},createPullRequestInput:{baseRefName:this.branch,body:R.DEFAULT_PR_BODY,title:r,headRefName:e,repositoryId:o.id}},update:(t,{data:r})=>{const{branch:o}=r.createRef,{pullRequest:a}=r.createPullRequest,s={repository:{...o.repository,branch:o}},u={repository:{...a.repository,branch:o},origin:{...a.repository,pullRequest:a}};t.writeQuery({...this.getBranchQuery(e,n,i),data:s}),t.writeQuery({...this.getPullRequestAndBranchQuery(e,a.number),data:u})}}),{pullRequest:s}=a.createPullRequest;return ms(s)}async getFileSha(e,{repoURL:t=this.repoURL,branch:r=this.branch}={}){const{owner:n,name:i}=this.getOwnerAndNameFromRepoUrl(t),{data:o}=await this.query({query:es,variables:{owner:n,name:i,expression:`${r}:${e}`}});if(o.repository.file)return o.repository.file.sha;throw new R.APIError("Not Found",404,fr)}}const{fetchWithTimeout:vs}=R.unsentRequest,gs="https://www.githubstatus.com",bs=`${gs}/api/v2/components.json`,ws=["API Requests","Issues, Pull Requests, Projects"],Es={GitHubBackend:class{bypassWriteAccessCheckForAppTokens=!1;unwatchFunctions=new Map;constructor(e,t={}){if(this.options={proxied:!1,API:null,initialWorkflowStatus:"",...t},!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The GitHub backend needs a "repo" in the backend configuration.');if(this.api=this.options.API||null,this.isBranchConfigured=!!e.backend.branch,this.openAuthoringEnabled=e.backend.open_authoring||!1,this.openAuthoringEnabled){if(!this.options.useWorkflow)throw new Error("backend.open_authoring is true but publish_mode is not set to editorial_workflow.");this.originRepo=e.backend.repo||""}else this.repo=this.originRepo=e.backend.repo||"";this.alwaysForkEnabled=e.backend.always_fork||!1,this.branch=e.backend.branch?.trim()||"master",this.apiRoot=e.backend.api_root||"https://api.github.com",this.token="",this.tokenKeyword="token",this.baseUrl=e.backend.base_url,this.squashMerges=e.backend.squash_merges||!1,this.cmsLabelPrefix=e.backend.cms_label_prefix||"",this.useGraphql=e.backend.use_graphql||!1,this.mediaFolder=e.media_folder,this.previewContext=e.backend.preview_context||"",this.lock=(0,R.asyncLock)()}isGitBackend(){return!0}async status(){const e=await vs(bs).then(e=>e.json()).then(e=>e.components.filter(e=>ws.includes(e.name)).every(e=>"operational"===e.status)).catch(e=>(console.warn("Failed getting GitHub status",e),!0));let t=!1;return e&&(t=await(this.api?.getUser({token:this.token??""}).then(e=>!!e).catch(e=>(console.warn("Failed getting GitHub user",e),!1)))||!1),{auth:{status:t},api:{status:e,statusPage:gs}}}authComponent(){const e=e=>lt(mt,{...e,backend:this});return e.displayName="AuthenticationPage",e}restoreUser(e){return this.openAuthoringEnabled?this.authenticateWithFork({userData:e,getPermissionToFork:()=>!0}).then(()=>this.authenticate(e)):this.authenticate(e)}async pollUntilForkExists({repo:e,token:t}){let r=!1;for(;!r;)r=await vs(`${this.apiRoot}/repos/${e}`,{headers:{Authorization:`${this.tokenKeyword} ${t}`}}).then(()=>!0).catch(e=>e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),!1):Promise.reject(e)),r||await new Promise(e=>setTimeout(e,250));return Promise.resolve()}async currentUser({token:e}){return this._currentUserPromise||(this._currentUserPromise=(async()=>{const t=await vs(`${this.apiRoot}/user`,{headers:{Authorization:`${this.tokenKeyword} ${e}`}}),r=await t.json();return{...r,name:r.name||"Unknown"}})()),this._currentUserPromise}async userIsOriginMaintainer({username:e,token:t}){const r=e||(await this.currentUser({token:t})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[r]||(this._userIsOriginMaintainerPromises[r]=vs(`${this.apiRoot}/repos/${this.originRepo}/collaborators/${r}/permission`,{headers:{Authorization:`${this.tokenKeyword} ${t}`}}).then(e=>e.json()).then(({permission:e})=>"admin"===e||"write"===e)),this._userIsOriginMaintainerPromises[r]}async forkExists({token:e}){try{const t=await this.currentUser({token:e}),r=this.originRepo.split("/")[1],n=await vs(`${this.apiRoot}/repos/${t.login}/${r}`,{method:"GET",headers:{Authorization:`${this.tokenKeyword} ${e}`}}).then(e=>e.json());return!0===n.fork&&n.parent&&n.parent.full_name.toLowerCase()===this.originRepo.toLowerCase()}catch{return!1}}async authenticateWithFork({userData:e,getPermissionToFork:t}){if(!this.openAuthoringEnabled)throw new Error("Cannot authenticate with fork; Open Authoring is turned off.");const r=e.token;if(!this.alwaysForkEnabled&&await this.userIsOriginMaintainer({token:r}))return this.repo=this.originRepo,this.useOpenAuthoring=!1,Promise.resolve();const n=await this.currentUser({token:r}),i=this.originRepo.split("/")[1];if(this.repo=`${n.login}/${i}`,this.useOpenAuthoring=!0,await this.forkExists({token:r}))return vs(`${this.apiRoot}/repos/${this.repo}/merge-upstream`,{method:"POST",headers:{Authorization:`${this.tokenKeyword} ${r}`},body:JSON.stringify({branch:this.branch})});{await t();const e=await vs(`${this.apiRoot}/repos/${this.originRepo}/forks`,{method:"POST",headers:{Authorization:`${this.tokenKeyword} ${r}`}}).then(e=>e.json());return this.pollUntilForkExists({repo:e.full_name,token:r})}}async authenticate(e){if(this.token=e.token,!this.isBranchConfigured){const e=await vs(`${this.apiRoot}/repos/${this.originRepo}`,{headers:{Authorization:`token ${this.token}`}}).then(e=>e.json()).catch(()=>null);e&&e.default_branch&&(this.branch=e.default_branch)}const t=this.useGraphql?ys:wr;this.api=new t({token:this.token,tokenKeyword:this.tokenKeyword,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,useOpenAuthoring:this.useOpenAuthoring,initialWorkflowStatus:this.options.initialWorkflowStatus,baseUrl:this.baseUrl,getUser:e=>this.currentUser(e)});const r=await this.api.user();if(!await this.api.hasWriteAccess().catch(e=>{throw e.message=E`
303
+ `,fs="no-cache",ps="cache-first",ds=new no({introspectionQueryResultData:Io()});function ms(e){return{...e,labels:e.labels.nodes,head:{ref:e.headRefName,sha:e.headRefOid,repo:{fork:e.repository.isFork}},base:{ref:e.baseRefName,sha:e.baseRefOid}}}class ys extends wr{constructor(e){super(e),this.client=this.getApolloClient()}getApolloClient(){const e=(t=(e,{headers:t})=>({headers:{"Content-Type":"application/json; charset=utf-8",...t,authorization:this.token?`${this.tokenKeyword} ${this.token}`:""}}),new Xn(function(e,r){var n=xr(e,[]);return new jn(function(i){var o;return Promise.resolve(n).then(function(r){return t(0,e.getContext())}).then(e.setContext).then(function(){o=r(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)})}).catch(i.error.bind(i)),function(){o&&o.unsubscribe()}})}));var t;const r=Oo({uri:`${this.apiRoot}/graphql`});return new gi({link:e.concat(r),cache:new Eo({fragmentMatcher:ds}),defaultOptions:{watchQuery:{fetchPolicy:fs,errorPolicy:"ignore"},query:{fetchPolicy:fs,errorPolicy:"all"}}})}reset(){return this.client.resetStore()}async getRepository(e,t){const{data:r}=await this.query({query:Ha,variables:{owner:e,name:t},fetchPolicy:ps});return r.repository}query(e){return this.client.query(e).catch(e=>{throw new R.APIError(e.message,500,"GitHub")})}async mutate(e){try{return await this.client.mutate(e)}catch(t){const r=t.graphQLErrors;if(Array.isArray(r)&&r.some(e=>"Ref cannot be created."===e.message)){const t=e?.variables?.createRefInput?.name||"",r=o()(t,"refs/heads/");r&&await(0,R.throwOnConflictingBranches)(r,e=>this.getBranch(e),fr)}else if(Array.isArray(r)&&r.some(e=>new RegExp(`A ref named "refs/heads/${R.CMS_BRANCH_PREFIX}/.+?" already exists in the repository.`).test(e.message))){const t=e?.variables?.createRefInput?.name||"",r=e?.variables?.createRefInput?.oid||"",n=o()(t,"refs/heads/");if(n&&n.startsWith(`${R.CMS_BRANCH_PREFIX}/`)&&r)try{return await this.backupBranch(n),await this.deleteBranch(n),await this.client.mutate(e)}catch(e){console.log(e)}}throw new R.APIError(t.message,500,"GitHub")}}async hasWriteAccess(){const{repoOwner:e,repoName:t}=this;try{const{data:r}=await this.query({query:Ma,variables:{owner:e,name:t},fetchPolicy:ps}),{viewerPermission:n}=r.repository;return["ADMIN","MAINTAIN","WRITE"].includes(n)}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}async user(){const{data:e}=await this.query({query:ja,fetchPolicy:ps});return e.viewer}async retrieveBlobObject(e,t,r,n={}){const{data:i}=await this.query({query:Qa,variables:{owner:e,name:t,expression:r},...n});if(i.repository.object){const{is_binary:e,text:t}=i.repository.object;return{isNull:!1,isBinary:e,text:t}}return{isNull:!0}}getOwnerAndNameFromRepoUrl(e){let{repoOwner:t,repoName:r}=this;return e===this.originRepoURL&&({originRepoOwner:t,originRepoName:r}=this),{owner:t,name:r}}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await(0,R.readFile)(t,()=>this.fetchBlobContent({sha:t,repoURL:n,parseText:i}),R.localForage,i)}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){if(!r)return super.fetchBlobContent({sha:e,repoURL:t,parseText:r});const{owner:n,name:i}=this.getOwnerAndNameFromRepoUrl(t),{isNull:o,isBinary:a,text:s}=await this.retrieveBlobObject(n,i,e,{fetchPolicy:ps});if(o)throw new R.APIError("Not Found",404,"GitHub");return a?super.fetchBlobContent({sha:e,repoURL:t,parseText:r}):s}async getPullRequestAuthor(e){const t=e.user;return t?.name||t?.login}async getPullRequests(e,t,r){const{originRepoOwner:n,originRepoName:i}=this;let o;o=t===yr.Open?["OPEN"]:t===yr.Closed?["CLOSED","MERGED"]:["OPEN","CLOSED","MERGED"];const{data:a}=await this.query({query:Xa,variables:{owner:n,name:i,...e?{head:e}:{},states:o}}),{pullRequests:s}=a.repository;return s.nodes.map(ms).filter(e=>e.head.ref.startsWith(`${R.CMS_BRANCH_PREFIX}/`)&&r(e))}async getOpenAuthoringBranches(){const{repoOwner:e,repoName:t}=this,{data:r}=await this.query({query:Wa,variables:{owner:e,name:t,refPrefix:`refs/heads/cms/${this.repo}/`}});return r.repository.refs.nodes.map(({name:e,prefix:t})=>({ref:`${t}${e}`}))}async getStatuses(e,t){const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=(await this.getBranchPullRequest(n)).head.sha,{originRepoOwner:o,originRepoName:a}=this,{data:s}=await this.query({query:Va,variables:{owner:o,name:a,sha:i}});if(s.repository.object){const{status:e}=s.repository.object,{contexts:t}=e||{contexts:[]};return t}return[]}getAllFiles(e,t){return e.reduce((e,r)=>{if("tree"===r.type){const n=r.object?.entries||[];return[...e,...this.getAllFiles(n,`${t}/${r.name}`)]}return"blob"===r.type?[...e,{name:r.name,type:r.type,id:r.sha,path:`${t}/${r.name}`,size:r.blob?r.blob.size:0}]:e},[])}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={}){const{owner:i,name:o}=this.getOwnerAndNameFromRepoUrl(t),a=lr()(e,"/"),{data:s}=await this.query({query:za(n),variables:{owner:i,name:o,expression:`${r}:${a}`}});return s.repository.object?this.getAllFiles(s.repository.object.entries,a):[]}getBranchQualifiedName(e){return`refs/heads/${e}`}getBranchQuery(e,t,r){return{query:Ga,variables:{owner:t,name:r,qualifiedName:this.getBranchQualifiedName(e)}}}async getDefaultBranch(){const{data:e}=await this.query({...this.getBranchQuery(this.branch,this.originRepoOwner,this.originRepoName)});return e.repository.branch}async getBranch(e){const{data:t}=await this.query({...this.getBranchQuery(e,this.repoOwner,this.repoName),fetchPolicy:ps});if(!t.repository.branch)throw new R.APIError("Branch not found",404,fr);return t.repository.branch}async patchRef(e,t,r,n={}){if("heads"!==e)return super.patchRef(e,t,r,n);const i=n.force||!1,o=await this.getBranch(t),{data:a}=await this.mutate({mutation:ts,variables:{input:{oid:r,refId:o.id,force:i}}});return a.updateRef.branch}async deleteBranch(e){const t=await this.getBranch(e),{data:r}=await this.mutate({mutation:ns,variables:{deleteRefInput:{refId:t.id}},update:e=>e.data.delete(go(t))});return r.deleteRef}getPullRequestQuery(e){const{originRepoOwner:t,originRepoName:r}=this;return{query:Ya,variables:{owner:t,name:r,number:e}}}async getPullRequest(e){const{data:t}=await this.query({...this.getPullRequestQuery(e),fetchPolicy:ps}),r="OPEN"===t.repository.pullRequest.state?yr.Open:yr.Closed;return{...t.repository.pullRequest,state:r}}getPullRequestAndBranchQuery(e,t){const{repoOwner:r,repoName:n}=this,{originRepoOwner:i,originRepoName:o}=this;return{query:Za,variables:{owner:r,name:n,originRepoOwner:i,originRepoName:o,number:t,qualifiedName:this.getBranchQualifiedName(e)}}}async getPullRequestAndBranch(e,t){const{data:r}=await this.query({...this.getPullRequestAndBranchQuery(e,t),fetchPolicy:ps}),{repository:n,origin:i}=r;return{branch:n.branch,pullRequest:i.pullRequest}}async openPR(e){const t=await this.getPullRequest(e),{data:r}=await this.mutate({mutation:hs,variables:{reopenPullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.reopenPullRequest,n={repository:{...r.repository,pullRequest:r}};e.writeQuery({...this.getPullRequestQuery(r.number),data:n})}});return r.reopenPullRequest}async closePR(e){const t=await this.getPullRequest(e),{data:r}=await this.mutate({mutation:os,variables:{closePullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.closePullRequest,n={repository:{...r.repository,pullRequest:r}};e.writeQuery({...this.getPullRequestQuery(r.number),data:n})}});return r.closePullRequest}async deleteUnpublishedEntry(e,t){try{const r=this.generateContentKey(e,t),n=(0,R.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);if(i.number!==dr){const{branch:e,pullRequest:t}=await this.getPullRequestAndBranch(n,i.number),{data:r}=await this.mutate({mutation:as,variables:{deleteRefInput:{refId:e.id},closePullRequestInput:{pullRequestId:t.id}},update:r=>{r.data.delete(go(e)),r.data.delete(go(t))}});return r.closePullRequest}return await this.deleteBranch(n)}catch(e){const{graphQLErrors:t}=e;if(t&&t.length>0){const e=t.some(e=>"NOT_FOUND"===e.type);if(e)return}throw e}}async createPR(e,t){const[r,n]=await Promise.all([this.getRepository(this.originRepoOwner,this.originRepoName),this.useOpenAuthoring?`${(await this.user()).login}:${t}`:t]),{data:i}=await this.mutate({mutation:us,variables:{createPullRequestInput:{baseRefName:this.branch,body:R.DEFAULT_PR_BODY,title:e,headRefName:n,repositoryId:r.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.createPullRequest,n={repository:{...r.repository,pullRequest:r}};e.writeQuery({...this.getPullRequestQuery(r.number),data:n})}}),{pullRequest:o}=i.createPullRequest;return{...o,head:{sha:o.headRefOid}}}async createBranch(e,t){const r=this.repoOwner,n=this.repoName,i=await this.getRepository(r,n),{data:o}=await this.mutate({mutation:cs,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:i.id}},update:(t,{data:i})=>{const{branch:o}=i.createRef,a={repository:{...o.repository,branch:o}};t.writeQuery({...this.getBranchQuery(e,r,n),data:a})}}),{branch:a}=o.createRef;return{...a,ref:`${a.prefix}${a.name}`}}async createBranchAndPullRequest(e,t,r){const n=this.originRepoOwner,i=this.originRepoName,o=await this.getRepository(n,i),{data:a}=await this.mutate({mutation:ls,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:o.id},createPullRequestInput:{baseRefName:this.branch,body:R.DEFAULT_PR_BODY,title:r,headRefName:e,repositoryId:o.id}},update:(t,{data:r})=>{const{branch:o}=r.createRef,{pullRequest:a}=r.createPullRequest,s={repository:{...o.repository,branch:o}},u={repository:{...a.repository,branch:o},origin:{...a.repository,pullRequest:a}};t.writeQuery({...this.getBranchQuery(e,n,i),data:s}),t.writeQuery({...this.getPullRequestAndBranchQuery(e,a.number),data:u})}}),{pullRequest:s}=a.createPullRequest;return ms(s)}async getFileSha(e,{repoURL:t=this.repoURL,branch:r=this.branch}={}){const{owner:n,name:i}=this.getOwnerAndNameFromRepoUrl(t),{data:o}=await this.query({query:es,variables:{owner:n,name:i,expression:`${r}:${e}`}});if(o.repository.file)return o.repository.file.sha;throw new R.APIError("Not Found",404,fr)}}const{fetchWithTimeout:vs}=R.unsentRequest,gs="https://www.githubstatus.com",bs=`${gs}/api/v2/components.json`,ws=["API Requests","Issues, Pull Requests, Projects"],Es={GitHubBackend:class{bypassWriteAccessCheckForAppTokens=!1;unwatchFunctions=new Map;constructor(e,t={}){if(this.options={proxied:!1,API:null,initialWorkflowStatus:"",...t},!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The GitHub backend needs a "repo" in the backend configuration.');if(this.api=this.options.API||null,this.isBranchConfigured=!!e.backend.branch,this.openAuthoringEnabled=e.backend.open_authoring||!1,this.openAuthoringEnabled){if(!this.options.useWorkflow)throw new Error("backend.open_authoring is true but publish_mode is not set to editorial_workflow.");this.originRepo=e.backend.repo||""}else this.repo=this.originRepo=e.backend.repo||"";this.alwaysForkEnabled=e.backend.always_fork||!1,this.branch=e.backend.branch?.trim()||"master",this.apiRoot=e.backend.api_root||"https://api.github.com",this.token="",this.tokenKeyword="token",this.baseUrl=e.backend.base_url,this.squashMerges=e.backend.squash_merges||!1,this.cmsLabelPrefix=e.backend.cms_label_prefix||"",this.useGraphql=e.backend.use_graphql||!1,this.mediaFolder=e.media_folder,this.previewContext=e.backend.preview_context||"",this.lock=(0,R.asyncLock)()}isGitBackend(){return!0}async status(){const e=await vs(bs).then(e=>e.json()).then(e=>e.components.filter(e=>ws.includes(e.name)).every(e=>"operational"===e.status)).catch(e=>(console.warn("Failed getting GitHub status",e),!0));let t=!1;return e&&(t=await(this.api?.getUser({token:this.token??""}).then(e=>!!e).catch(e=>(console.warn("Failed getting GitHub user",e),!1)))||!1),{auth:{status:t},api:{status:e,statusPage:gs}}}authComponent(){const e=e=>lt(mt,{...e,backend:this});return e.displayName="AuthenticationPage",e}restoreUser(e){return this.openAuthoringEnabled?this.authenticateWithFork({userData:e,getPermissionToFork:()=>!0}).then(()=>this.authenticate(e)):this.authenticate(e)}async pollUntilForkExists({repo:e,token:t}){let r=!1;for(;!r;)r=await vs(`${this.apiRoot}/repos/${e}`,{headers:{Authorization:`${this.tokenKeyword} ${t}`}}).then(()=>!0).catch(e=>e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),!1):Promise.reject(e)),r||await new Promise(e=>setTimeout(e,250));return Promise.resolve()}async currentUser({token:e}){return this._currentUserPromise||(this._currentUserPromise=(async()=>{const t=await vs(`${this.apiRoot}/user`,{headers:{Authorization:`${this.tokenKeyword} ${e}`}}),r=await t.json();return{...r,name:r.name||"Unknown"}})()),this._currentUserPromise}async userIsOriginMaintainer({username:e,token:t}){const r=e||(await this.currentUser({token:t})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[r]||(this._userIsOriginMaintainerPromises[r]=vs(`${this.apiRoot}/repos/${this.originRepo}/collaborators/${r}/permission`,{headers:{Authorization:`${this.tokenKeyword} ${t}`}}).then(e=>e.json()).then(({permission:e})=>"admin"===e||"write"===e)),this._userIsOriginMaintainerPromises[r]}async forkExists({token:e}){try{const t=await this.currentUser({token:e}),r=this.originRepo.split("/")[1],n=await vs(`${this.apiRoot}/repos/${t.login}/${r}`,{method:"GET",headers:{Authorization:`${this.tokenKeyword} ${e}`}}).then(e=>e.json());return!0===n.fork&&n.parent&&n.parent.full_name.toLowerCase()===this.originRepo.toLowerCase()}catch{return!1}}async authenticateWithFork({userData:e,getPermissionToFork:t}){if(!this.openAuthoringEnabled)throw new Error("Cannot authenticate with fork; Open Authoring is turned off.");const r=e.token;if(!this.alwaysForkEnabled&&await this.userIsOriginMaintainer({token:r}))return this.repo=this.originRepo,this.useOpenAuthoring=!1,Promise.resolve();const n=await this.currentUser({token:r}),i=this.originRepo.split("/")[1];if(this.repo=`${n.login}/${i}`,this.useOpenAuthoring=!0,await this.forkExists({token:r}))return vs(`${this.apiRoot}/repos/${this.repo}/merge-upstream`,{method:"POST",headers:{Authorization:`${this.tokenKeyword} ${r}`},body:JSON.stringify({branch:this.branch})});{await t();const e=await vs(`${this.apiRoot}/repos/${this.originRepo}/forks`,{method:"POST",headers:{Authorization:`${this.tokenKeyword} ${r}`}}).then(e=>e.json());return this.pollUntilForkExists({repo:e.full_name,token:r})}}async authenticate(e){if(this.token=e.token,!this.isBranchConfigured){const e=await vs(`${this.apiRoot}/repos/${this.originRepo}`,{headers:{Authorization:`token ${this.token}`}}).then(e=>e.json()).catch(()=>null);e&&e.default_branch&&(this.branch=e.default_branch)}const t=this.useGraphql?ys:wr;this.api=new t({token:this.token,tokenKeyword:this.tokenKeyword,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,useOpenAuthoring:this.useOpenAuthoring,initialWorkflowStatus:this.options.initialWorkflowStatus,baseUrl:this.baseUrl,getUser:this.currentUser.bind(this)});const r=await this.api.user();if(!await this.api.hasWriteAccess().catch(e=>{throw e.message=E`
304
304
  Repo "${this.repo}" not found.
305
305
 
306
306
  Please ensure the repo information is spelled correctly.