@fugood/bricks-cli 2.25.0-beta.67 → 2.25.0-beta.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/1010.js +1 -1
- package/lib/1708.js +2 -2
- package/lib/2486.js +1 -1
- package/lib/5066.js +1 -0
- package/lib/6818.js +1 -1
- package/lib/7511.js +1 -1
- package/lib/8117.js +2 -2
- package/lib/index.js +3 -3
- package/package.json +9 -9
- package/lib/853.js +0 -1
package/lib/2486.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __rspack_esm_id=2486;export const __rspack_esm_ids=[2486];export const __webpack_modules__={421(e,r,a){a.r(r),a.d(r,{buildDoctorReport:()=>k,renderDoctorReport:()=>v});var o,i,t=a(99436),s=a(85382),n=a(8479),c=a(7586),p=a(47988),l=(o=t(function*(){try{return yield Promise.all([a.e(9866),a.e(6645),a.e(4479),a.e(7648),a.e(
|
|
1
|
+
export const __rspack_esm_id=2486;export const __rspack_esm_ids=[2486];export const __webpack_modules__={421(e,r,a){a.r(r),a.d(r,{buildDoctorReport:()=>k,renderDoctorReport:()=>v});var o,i,t=a(99436),s=a(85382),n=a(8479),c=a(7586),p=a(47988),l=(o=t(function*(){try{return yield Promise.all([a.e(9866),a.e(6645),a.e(4479),a.e(7648),a.e(5066),a.e(1010),a.e(8117)]).then(a.bind(a,98372)),{available:!0}}catch(e){return{available:!1,error:e.message}}}),function(){return o.apply(this,arguments)}),u=(e,r,a)=>({severity:e,code:r,message:a}),k=(i=t(function*({version:e="2.25.0-beta.69",mcpCheck:r=l}={}){var a=(0,p.getCurrentProfile)(),o=(0,p.getCurrentProfileSource)(),i=(0,p.getTokenInfo)(a),t=(0,p.getBaseUrl)(),k=(0,p.getActivityLogBaseUrl)(),h=[],v={ok:!1,timestamp:new Date().toISOString(),cli:{name:"bricks",version:e},profile:{name:a,source:o},config:{path:p.CONFIG_PATH,baseUrl:t,activityLogBaseUrl:k},auth:{available:!!i?.token,source:i?.token?"config":"missing",workspaceId:i?.workspaceId||null,workspaceName:i?.workspaceName||null,createdAt:i?.createdAt||null,tokenPreview:(0,c.$l)(i?.token)},connectivity:{workspace:{ok:!1,skipped:!i?.token,error:null}},capabilities:{zeroArgMode:(0,n.isInteractiveTerminal)()?"interactive":"help",mcp:{available:!1,error:null}},issues:h};if(i?.token)try{var d=yield(0,s.createClient)(t,i.token).workspace();v.connectivity.workspace={ok:!0,skipped:!1,error:null,id:d?._id||i.workspaceId||null,name:d?.name||i.workspaceName||null},v.auth.workspaceId=d?._id||v.auth.workspaceId,v.auth.workspaceName=d?.name||v.auth.workspaceName}catch(e){v.connectivity.workspace={ok:!1,skipped:!1,error:e.message},h.push(u("error","workspace_unreachable",`Workspace query failed for ${t}: ${e.message}`))}else h.push(u("warning","auth_missing","No saved token for the current profile."));var m=yield r();return v.capabilities.mcp={available:m.available,error:m.error||null},m.available||h.push(u("warning","mcp_unavailable",`MCP stdio server is unavailable: ${m.error||"Unknown error"}`)),v.ok=0===h.length,v}),function(){return i.apply(this,arguments)}),h=(e,r,a)=>`${e.padEnd(14)} ${r}${a?` ${a}`:""}`,v=e=>{var r=[];if(r.push("BRICKS CLI Doctor"),r.push("─".repeat(60)),r.push(h("CLI","OK",`bricks v${e.cli.version}`)),r.push(h("Profile","OK",`${e.profile.name} (${e.profile.source})`)),r.push(h("BRICKS API","OK",e.config.baseUrl)),r.push(h("Activity Log","OK",e.config.activityLogBaseUrl)),e.auth.available){var a=e.auth.workspaceName||e.auth.workspaceId||"Unknown workspace";r.push(h("Auth","OK",`${a} (${e.auth.source}, ${e.auth.tokenPreview})`))}else r.push(h("Auth","WARN","No saved token for the current profile"));if(e.connectivity.workspace.skipped)r.push(h("Workspace","WARN","Skipped because no token is available"));else if(e.connectivity.workspace.ok){var o=e.connectivity.workspace.name||e.connectivity.workspace.id||"Unknown workspace";r.push(h("Workspace","OK",o))}else r.push(h("Workspace","FAIL",e.connectivity.workspace.error));return e.capabilities.mcp.available?r.push(h("MCP","OK","STDIO server import is available")):r.push(h("MCP","WARN",e.capabilities.mcp.error)),r.push(h("Zero-arg mode",((e,r=!1)=>e?"OK":r?"WARN":"FAIL")("interactive"===e.capabilities.zeroArgMode,"help"===e.capabilities.zeroArgMode),"interactive"===e.capabilities.zeroArgMode?"Starts Ink interactive mode on TTY":"Shows help outside TTY contexts")),e.issues.length>0&&(r.push("─".repeat(60)),r.push("Issues"),e.issues.forEach(e=>{r.push(`- [${e.severity}] ${e.message}`)})),r.join("\n")}}};
|
package/lib/5066.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __rspack_esm_id=5066;export const __rspack_esm_ids=[5066];export const __webpack_modules__={99548(e,t,r){r.d(t,{L:()=>d});var n=r(76502),o=r.n(n),i=r(45838);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var a={enum:1,type:0},u=/"/g,c=/NOT/g,l=/\//g,h=function(e){var t=e.value,r=e.suggestions,n=e.format;if(!t)return"";var i=r.reduce(function(e,r){var n=o()(t,r);return e.distance>n?{value:r,distance:n}:e},{distance:1/0,value:""});return i.distance<t.length?(void 0===n?function(e){return"Did you mean '"+e+"'?"}:n)(i.value):""},p=function(e){return e.split("/").pop()},f=function(e){var t=e.object,r=e.pnter,n=e.fallback;try{return i.Jt(t,r)}catch(e){return n}},d=function(e){var t=e.errors,r=e.data,n=e.schema,o=e.basePath,i=void 0===o?"{base}":o;return Array.isArray(t)&&0!==t.length?Object.values(t.reduce(function(e,t){var r,n,o,i,s,u,c=t.instancePath+(null!=(r=null!=(n=null==(o=t.params)?void 0:o.additionalProperty)?n:null==(i=t.params)?void 0:i.missingProperty)?r:""),l=e[c];return l?(null!=(s=a[t.keyword])?s:0)>(null!=(u=a[l.keyword])?u:0)&&(e[c]=t):e[c]=t,e},{})).map(function(e){var t,o=(i+e.instancePath).replace(l,"."),a=p(e.instancePath),d={errorType:e.keyword},y=(a?"property '"+a+"'":o)+" "+e.message.replace(u,"'").replace(c,"not");switch(e.keyword){case"additionalProperties":var v=e.params.additionalProperty,b=f({object:n,pnter:e.schemaPath.replace("#","").replace("/additionalProperties",""),fallback:{properties:{}}}).properties;t={message:"'"+v+"' property is not expected to be here",suggestion:h({value:v,suggestions:Object.keys(null!=b?b:{}),format:function(e){return"Did you mean property '"+e+"'?"}}),path:o,context:d};break;case"enum":var g=e.params.allowedValues.map(function(e){return e.toString()});t={message:"'"+p(e.instancePath)+"' property must be equal to one of the allowed values",suggestion:h({value:f({object:r,pnter:e.instancePath,fallback:""}),suggestions:g}),path:o,context:s({},d,{allowedValues:e.params.allowedValues})};break;case"type":t={message:"'"+p(e.instancePath)+"' property type must be "+e.params.type,path:o,context:d};break;case"required":t={message:o+" must have required property '"+e.params.missingProperty+"'",path:o,context:d};break;case"const":return{message:"'"+a+"' property must be equal to the allowed value",path:o,context:s({},d,{allowedValue:e.params.allowedValue})};default:return{message:y,path:o,context:d}}for(var m=Object.entries(t),w=0;w<m.length;w++){var _=m[w],x=_[0],I=_[1];(null==I||""===I)&&delete t[x]}return t}):[]}},90879(e,t){var r,n=this&&this.__extends||(r=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])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,r,n){void 0===n&&(n=408);var o=e.call(this,t)||this;return o.timeout=r,o.statusCode=n,o}return n(t,e),t}(Error)},17681(e,t,r){var n,o=this&&this.__extends||(n=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])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0});var s=r(2714),a=r(90879);t.default=function(e){function t(t,r){var n=e.call(this)||this;return n.timeout=t||15e3,n.statusCode=r,n}return o(t,e),t.prototype.request=function(e,t){var r,n=this,o=e.getContext().timeout||this.timeout;if("u">typeof AbortController){var u=e.getContext().fetchOptions||{};r=u.controller||new AbortController,u=i({},u,{controller:r,signal:r.signal}),e.setContext({fetchOptions:u})}var c=t(e),l=e.query.definitions.find(function(e){return"OperationDefinition"===e.kind}).operation;return o<=0||"subscription"===l?c:new s.Observable(function(t){var s,u=c.subscribe(function(e){clearTimeout(s),t.next(e),t.complete()},function(e){clearTimeout(s),t.error(e),t.complete()});s=setTimeout(function(){if(r){r.abort();var s=e.getContext().fetchOptions||{};s.controller===r&&s.signal===r.signal&&(s=i({},s,{controller:null,signal:null}),e.setContext({fetchOptions:s}))}t.error(new a.default("Timeout exceeded",o,n.statusCode)),u.unsubscribe()},o);var l=e.getContext().timeoutRef;return l&&l({unsubscribe:function(){clearTimeout(s),u.unsubscribe()}}),function(){clearTimeout(s),u.unsubscribe()}})},t}(s.ApolloLink)},13036(e,t,r){r.d(t,{Vn:()=>p});var n,o=function(e,t){return(o=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])})(e,t)},i="Invariant Violation",s=Object.setPrototypeOf,a=void 0===s?function(e,t){return e.__proto__=t,e}:s,u=function(e){function t(){this.constructor=r}function r(t){void 0===t&&(t=i);var n=e.call(this,"number"==typeof t?i+": "+t+" (see https://github.com/apollographql/invariant-packages)":t)||this;return n.framesToPop=1,n.name=i,a(n,r.prototype),n}return o(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),r}(Error);function c(e,t){if(!e)throw new u(t)}function l(e){return function(){return console[e].apply(console,arguments)}}(n=c||(c={})).warn=l("warn"),n.error=l("error");var h={env:{}};if("object"==typeof process)h=process;else try{Function("stub","process = stub")(h)}catch(e){}function p(e){c(e&&"Document"===e.kind,2),t=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw new u(3);return e}),c(t.length<=1,4);for(var t,r,n=0,o=e.definitions;n<o.length;n++){var i=o[n];if("OperationDefinition"===i.kind){var s=i.operation;if("query"===s||"mutation"===s||"subscription"===s)return i}"FragmentDefinition"!==i.kind||r||(r=i)}if(r)return r;throw new u(10)}r(56075),"function"==typeof WeakMap&&("object"!=typeof navigator||navigator.product),Object.prototype.toString,Object.prototype.hasOwnProperty,Object.create({})},56075(e){e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(r=t.cmp,function(e){return function(t,n){return r({key:t,value:e[t]},{key:n,value:e[n]})}}),i=[];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);if(Array.isArray(t)){for(r=0,s="[";r<t.length;r++)r&&(s+=","),s+=e(t[r])||"null";return s+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw TypeError("Converting circular structure to JSON")}var r,s,a=i.push(t)-1,u=Object.keys(t).sort(o&&o(t));for(r=0,s="";r<u.length;r++){var c=u[r],l=e(t[c]);l&&(s&&(s+=","),s+=JSON.stringify(c)+":"+l)}return i.splice(a,1),"{"+s+"}"}}(e)}},68875(e){!function(t){"use strict";let r="(0?\\d+|0x[a-f0-9]+)",n={fourOctet:RegExp(`^${r}\\.${r}\\.${r}\\.${r}$`,"i"),threeOctet:RegExp(`^${r}\\.${r}\\.${r}$`,"i"),twoOctet:RegExp(`^${r}\\.${r}$`,"i"),longValue:RegExp(`^${r}$`,"i")},o=RegExp("^0[0-7]+$","i"),i=RegExp("^0x[a-f0-9]+$","i"),s="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",u={zoneIndex:RegExp(s,"i"),native:RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${s})?$`,"i"),deprecatedTransitional:RegExp(`^(?:::)(${r}\\.${r}\\.${r}\\.${r}(${s})?)$`,"i"),transitional:RegExp(`^((?:${a})|(?:::)(?:${a})?)${r}\\.${r}\\.${r}\\.${r}(${s})?$`,"i")};function c(e,t){let r,n;if(e.indexOf("::")!==e.lastIndexOf("::"))return null;let o=0,i=-1,s=(e.match(u.zoneIndex)||[])[0];for(s&&(s=s.substring(1),e=e.replace(/%.+$/,""));(i=e.indexOf(":",i+1))>=0;)o++;if("::"===e.substr(0,2)&&o--,"::"===e.substr(-2,2)&&o--,o>t)return null;for(n=t-o,r=":";n--;)r+="0:";return":"===(e=e.replace("::",r))[0]&&(e=e.slice(1)),":"===e[e.length-1]&&(e=e.slice(0,-1)),{parts:t=function(){let t=e.split(":"),r=[];for(let e=0;e<t.length;e++)r.push(parseInt(t[e],16));return r}(),zoneId:s}}function l(e,t,r,n){let o;if(e.length!==t.length)throw Error("ipaddr: cannot match CIDR for objects with different lengths");let i=0;for(;n>0;){if((o=r-n)<0&&(o=0),e[i]>>o!=t[i]>>o)return!1;n-=r,i+=1}return!0}function h(e){if(i.test(e))return parseInt(e,16);if("0"===e[0]&&!isNaN(parseInt(e[1],10))){if(o.test(e))return parseInt(e,8);throw Error(`ipaddr: cannot parse ${e} as octal`)}return parseInt(e,10)}let p={};p.IPv4=function(){function e(e){let t,r;if(4!==e.length)throw Error("ipaddr: ipv4 octet count should be 4");for(t=0;t<e.length;t++)if(!(0<=(r=e[t])&&r<=255))throw Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=e}return e.prototype.SpecialRanges={unspecified:[[new e([0,0,0,0]),8]],broadcast:[[new e([255,255,255,255]),32]],multicast:[[new e([224,0,0,0]),4]],linkLocal:[[new e([169,254,0,0]),16]],loopback:[[new e([127,0,0,0]),8]],carrierGradeNat:[[new e([100,64,0,0]),10]],private:[[new e([10,0,0,0]),8],[new e([172,16,0,0]),12],[new e([192,168,0,0]),16]],reserved:[[new e([192,0,0,0]),24],[new e([192,0,2,0]),24],[new e([192,88,99,0]),24],[new e([198,18,0,0]),15],[new e([198,51,100,0]),24],[new e([203,0,113,0]),24],[new e([240,0,0,0]),4]],as112:[[new e([192,175,48,0]),24],[new e([192,31,196,0]),24]],amt:[[new e([192,52,193,0]),24]]},e.prototype.kind=function(){return"ipv4"},e.prototype.match=function(e,t){let r;if(void 0===t&&(e=(r=e)[0],t=r[1]),"ipv4"!==e.kind())throw Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return l(this.octets,e.octets,8,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e,t,r,n=0,o=!1,i={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};for(e=3;e>=0;e-=1){if(!((t=this.octets[e])in i)||(r=i[t],o&&0!==r))return null;8!==r&&(o=!0),n+=r}return 32-n},e.prototype.range=function(){return p.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return p.IPv6.parse(`::ffff:${this.toString()}`)},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(".")},e}(),p.IPv4.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),r=t[0].toByteArray(),n=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[],i=0;for(;i<4;)o.push(parseInt(r[i],10)|255^parseInt(n[i],10)),i++;return new this(o)}catch(e){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},p.IPv4.isIPv4=function(e){return null!==this.parser(e)},p.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch(e){return!1}},p.IPv4.isValidCIDR=function(e){try{return this.parseCIDR(e),!0}catch(e){return!1}},p.IPv4.isValidFourPartDecimal=function(e){return!!(p.IPv4.isValid(e)&&e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},p.IPv4.isValidCIDRFourPartDecimal=function(e){let t=e.match(/^(.+)\/(\d+)$/);return!!p.IPv4.isValidCIDR(e)&&!!t&&p.IPv4.isValidFourPartDecimal(t[1])},p.IPv4.networkAddressFromCIDR=function(e){let t,r,n,o,i;try{for(n=(t=this.parseCIDR(e))[0].toByteArray(),i=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[],r=0;r<4;)o.push(parseInt(n[r],10)&parseInt(i[r],10)),r++;return new this(o)}catch(e){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},p.IPv4.parse=function(e){let t=this.parser(e);if(null===t)throw Error("ipaddr: string is not formatted like an IPv4 Address");return new this(t)},p.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){let e=parseInt(t[2]);if(e>=0&&e<=32){let r=[this.parse(t[1]),e];return Object.defineProperty(r,"toString",{value:function(){return this.join("/")}}),r}}throw Error("ipaddr: string is not formatted like an IPv4 CIDR range")},p.IPv4.parser=function(e){let t,r;if(t=e.match(n.fourOctet)){let e=t.slice(1,6),r=[];for(let t=0;t<e.length;t++)r.push(h(e[t]));return r}if(t=e.match(n.longValue)){if((r=h(t[1]))>0xffffffff||r<0)throw Error("ipaddr: address outside defined range");return(function(){let e,t=[];for(e=0;e<=24;e+=8)t.push(r>>e&255);return t})().reverse()}if(t=e.match(n.twoOctet)){let e=t.slice(1,4),n=[];if((r=h(e[1]))>0xffffff||r<0)throw Error("ipaddr: address outside defined range");return n.push(h(e[0])),n.push(r>>16&255),n.push(r>>8&255),n.push(255&r),n}{if(!(t=e.match(n.threeOctet)))return null;let o=t.slice(1,5),i=[];if((r=h(o[2]))>65535||r<0)throw Error("ipaddr: address outside defined range");return i.push(h(o[0])),i.push(h(o[1])),i.push(r>>8&255),i.push(255&r),i}},p.IPv4.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>32)throw Error("ipaddr: invalid IPv4 prefix length");let t=[0,0,0,0],r=0,n=Math.floor(e/8);for(;r<n;)t[r]=255,r++;return n<4&&(t[n]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},p.IPv6=function(){function e(e,t){let r,n;if(16===e.length)for(r=0,this.parts=[];r<=14;r+=2)this.parts.push(e[r]<<8|e[r+1]);else if(8===e.length)this.parts=e;else throw Error("ipaddr: ipv6 part count should be 8 or 16");for(r=0;r<this.parts.length;r++)if(!(0<=(n=this.parts[r])&&n<=65535))throw Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}return e.prototype.SpecialRanges={unspecified:[new e([0,0,0,0,0,0,0,0]),128],linkLocal:[new e([65152,0,0,0,0,0,0,0]),10],multicast:[new e([65280,0,0,0,0,0,0,0]),8],loopback:[new e([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new e([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new e([0,0,0,0,0,65535,0,0]),96],discard:[new e([256,0,0,0,0,0,0,0]),64],rfc6145:[new e([0,0,0,0,65535,0,0,0]),96],rfc6052:[new e([100,65435,0,0,0,0,0,0]),96],"6to4":[new e([8194,0,0,0,0,0,0,0]),16],teredo:[new e([8193,0,0,0,0,0,0,0]),32],benchmarking:[new e([8193,2,0,0,0,0,0,0]),48],amt:[new e([8193,3,0,0,0,0,0,0]),32],as112v6:[[new e([8193,4,274,0,0,0,0,0]),48],[new e([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new e([8193,16,0,0,0,0,0,0]),28],orchid2:[new e([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new e([8193,48,0,0,0,0,0,0]),28],reserved:[[new e([8193,0,0,0,0,0,0,0]),23],[new e([8193,3512,0,0,0,0,0,0]),32]]},e.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},e.prototype.kind=function(){return"ipv6"},e.prototype.match=function(e,t){let r;if(void 0===t&&(e=(r=e)[0],t=r[1]),"ipv6"!==e.kind())throw Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return l(this.parts,e.parts,16,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e,t,r=0,n=!1,o={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};for(let i=7;i>=0;i-=1){if(!((e=this.parts[i])in o)||(t=o[e],n&&0!==t))return null;16!==t&&(n=!0),r+=t}return 128-r},e.prototype.range=function(){return p.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let e,t=[],r=this.parts;for(let n=0;n<r.length;n++)t.push((e=r[n])>>8),t.push(255&e);return t},e.prototype.toFixedLengthString=function(){let e=(function(){let e=[];for(let t=0;t<this.parts.length;t++)e.push(function(e){for(;e.length<4;)e=`0${e}`;return e}(this.parts[t].toString(16)));return e}).call(this).join(":"),t="";return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let e=this.parts.slice(-2),t=e[0],r=e[1];return new p.IPv4([t>>8,255&t,r>>8,255&r])},e.prototype.toNormalizedString=function(){let e=(function(){let e=[];for(let t=0;t<this.parts.length;t++)e.push(this.parts[t].toString(16));return e}).call(this).join(":"),t="";return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toRFC5952String=function(){let e,t=/((^|:)(0(:|$)){2,})/g,r=this.toNormalizedString(),n=0,o=-1;for(;e=t.exec(r);)e[0].length>o&&(n=e.index,o=e[0].length);return o<0?r:`${r.substring(0,n)}::${r.substring(n+o)}`},e.prototype.toString=function(){return this.toRFC5952String()},e}(),p.IPv6.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),r=t[0].toByteArray(),n=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[],i=0;for(;i<16;)o.push(parseInt(r[i],10)|255^parseInt(n[i],10)),i++;return new this(o)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},p.IPv6.isIPv6=function(e){return null!==this.parser(e)},p.IPv6.isValid=function(e){if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{let t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch(e){return!1}},p.IPv6.isValidCIDR=function(e){if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{return this.parseCIDR(e),!0}catch(e){return!1}},p.IPv6.networkAddressFromCIDR=function(e){let t,r,n,o,i;try{for(n=(t=this.parseCIDR(e))[0].toByteArray(),i=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[],r=0;r<16;)o.push(parseInt(n[r],10)&parseInt(i[r],10)),r++;return new this(o)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},p.IPv6.parse=function(e){let t=this.parser(e);if(null===t.parts)throw Error("ipaddr: string is not formatted like an IPv6 Address");return new this(t.parts,t.zoneId)},p.IPv6.parseCIDR=function(e){let t,r,n;if((r=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(r[2]))>=0&&t<=128)return Object.defineProperty(n=[this.parse(r[1]),t],"toString",{value:function(){return this.join("/")}}),n;throw Error("ipaddr: string is not formatted like an IPv6 CIDR range")},p.IPv6.parser=function(e){let t,r,n,o,i,s;if(n=e.match(u.deprecatedTransitional))return this.parser(`::ffff:${n[1]}`);if(u.native.test(e))return c(e,8);if((n=e.match(u.transitional))&&(s=n[6]||"",t=n[1],n[1].endsWith("::")||(t=t.slice(0,-1)),(t=c(t+s,6)).parts)){for(r=0,i=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])];r<i.length;r++)if(!(0<=(o=i[r])&&o<=255))return null;return t.parts.push(i[0]<<8|i[1]),t.parts.push(i[2]<<8|i[3]),{parts:t.parts,zoneId:t.zoneId}}return null},p.IPv6.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>128)throw Error("ipaddr: invalid IPv6 prefix length");let t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=0,n=Math.floor(e/8);for(;r<n;)t[r]=255,r++;return n<16&&(t[n]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},p.fromByteArray=function(e){let t=e.length;if(4===t)return new p.IPv4(e);if(16===t)return new p.IPv6(e);throw Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},p.isValid=function(e){return p.IPv6.isValid(e)||p.IPv4.isValid(e)},p.isValidCIDR=function(e){return p.IPv6.isValidCIDR(e)||p.IPv4.isValidCIDR(e)},p.parse=function(e){if(p.IPv6.isValid(e))return p.IPv6.parse(e);if(p.IPv4.isValid(e))return p.IPv4.parse(e);throw Error("ipaddr: the address has neither IPv6 nor IPv4 format")},p.parseCIDR=function(e){try{return p.IPv6.parseCIDR(e)}catch(t){try{return p.IPv4.parseCIDR(e)}catch(e){throw Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},p.process=function(e){let t=this.parse(e);return"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t},p.subnetMatch=function(e,t,r){let n,o,i,s;for(o in null==r&&(r="unicast"),t)if(Object.prototype.hasOwnProperty.call(t,o)){for(!(i=t[o])[0]||i[0]instanceof Array||(i=[i]),n=0;n<i.length;n++)if(s=i[n],e.kind()===s[0].kind()&&e.match.apply(e,s))return o}return r},e.exports?e.exports=p:t.ipaddr=p}(this)},45838(e,t){var r=/~/,n=/~[01]/g;function o(e){switch(e){case"~1":return"/";case"~0":return"~"}throw Error("Invalid tilde escape: "+e)}t.Jt=function(e,t){if("object"!=typeof e)throw Error("Invalid input object.");var i,s=(t=function(e){if("string"==typeof e){if(""===(e=e.split("/"))[0])return e}else if(Array.isArray(e)){for(let t of e)if("string"!=typeof t&&"number"!=typeof t)throw Error("Invalid JSON pointer. Must be of type string or number.");return e}throw Error("Invalid JSON pointer.")}(t)).length;if(1===s)return e;for(var a=1;a<s;){if(e=e[i=t[a++],r.test(i)?i.replace(n,o):i],s===a)return e;if("object"!=typeof e||null===e)return}}},76502(e){let t=[],r=[],n=(e,n)=>{let o,i,s,a;if(e===n)return 0;let u=e;e.length>n.length&&(e=n,n=u);let c=e.length,l=n.length;for(;c>0&&e.charCodeAt(~-c)===n.charCodeAt(~-l);)c--,l--;let h=0;for(;h<c&&e.charCodeAt(h)===n.charCodeAt(h);)h++;if(c-=h,l-=h,0===c)return l;let p=0,f=0;for(;p<c;)r[p]=e.charCodeAt(h+p),t[p]=++p;for(;f<l;)for(p=0,o=n.charCodeAt(h+f),s=f++,i=f;p<c;p++)a=o===r[p]?s:s+1,s=t[p],i=t[p]=s>i?a>i?i+1:a:a>s?s+1:a;return i};e.exports=n,e.exports.default=n},46123(e,t,r){var n=r(57923);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},95479(e,t,r){var n=r(93640),o=r(5485);e.exports=n(function(e,t,r){return e+(r?" ":"")+o(t)})},45620(e,t,r){r.d(t,{v4:()=>l});var n=r(76982),o=r.n(n);let i=new Uint8Array(256),s=i.length,a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).substr(1));let c=function(e,t=0){let r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!("string"==typeof r&&a.test(r)))throw TypeError("Stringified UUID is invalid");return r},l=function(e,t,r){let n=(e=e||{}).random||(e.rng||function(){return s>i.length-16&&(o().randomFillSync(i),s=0),i.slice(s,s+=16)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return c(n)}},65372(e){e.exports=function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},30409(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},40906(e,t,r){var n=r(69893);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},63315(e,t,r){var n=r(14319).default,o=r(65372);e.exports=function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},69893(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},22268(e,t,r){r.d(t,{R:()=>K});var n=r(85608),o=r(70916),i=r(19074),s=r(25174),a=r(73972),u=r(49952),c=r(55888),l=r(37396),h=r(82307),p=r(53925),f=r(2904),d=r(44214),y=r(9354),v=r(5762),b=r(32710),g=r(73767),m=r(3777),w=r(28907),_=r(21777),x=r(21461),I=r(36054),P=r(45637),k=r(53570),E=r(18709),S=r(75950),O=r(30671),R=new((r(51360)).et?WeakMap:Map);function q(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return R.set(e,(R.get(e)+1)%1e15),r.apply(this,arguments)})}var A=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.document=null,this.lastRequestId=1,this.stopped=!1,this.observableQuery=null;var r=this.cache=e.cache;R.has(r)||(R.set(r,0),q(r,"evict"),q(r,"modify"),q(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||S.pT.loading;return this.variables&&this.networkStatus!==S.pT.loading&&!(0,c.equal)(this.variables,e.variables)&&(t=S.pT.setVariables),(0,c.equal)(e.variables,this.variables)||(this.lastDiff=void 0,this.cancel()),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&(0,c.equal)(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&"no-cache"===t.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(e);return this.updateLastDiff(r,e),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null==(t=this.observableQuery)?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t,r,n=this.lastDiff&&this.lastDiff.diff;!(e&&!e.complete&&(null==(t=this.observableQuery)?void 0:t.getLastError()))&&(this.updateLastDiff(e),(0,c.equal)(n&&n.result,e&&e.result)||null==(r=this.observableQuery)||r.scheduleNotify())},e.prototype.setObservableQuery=function(e){e!==this.observableQuery&&(this.observableQuery=e,e&&(e.queryInfo=this))},e.prototype.stop=function(){var e;if(!this.stopped){this.stopped=!0,null==(e=this.observableQuery)||e.resetNotifications(),this.cancel();var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){var e;null==(e=this.cancelWatch)||e.call(this),this.cancelWatch=void 0},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var o=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,c.equal)(o,this.lastWatch)||(this.cancel(),this.cancelWatch=this.cache.watch(this.lastWatch=o))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===R.get(this.cache)&&(0,c.equal)(t,r.variables)&&(0,c.equal)(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var o,i=this,s=new O.ZI,a=(0,g.E)(e.errors)?e.errors.slice(0):[];if(null==(o=this.observableQuery)||o.resetNotifications(),"incremental"in e&&(0,g.E)(e.incremental)){var u=(0,l.bd)(this.getDiff().result,e);e.data=u}else if("hasNext"in e&&e.hasNext){var h=this.getDiff();e.data=s.merge(h.result,e.data)}this.graphQLErrors=a,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(C(e,r.errorPolicy)?this.cache.performTransaction(function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:R.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var s=i.getDiffOptions(r.variables),a=o.diff(s);!i.stopped&&(0,c.equal)(i.variables,r.variables)&&i.updateWatch(r.variables),i.updateLastDiff(a,s),a.complete&&(e.data=a.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=S.pT.ready},e.prototype.markError=function(e){var t;return this.networkStatus=S.pT.error,this.lastWrite=void 0,null==(t=this.observableQuery)||t.resetNotifications(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function C(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!(0,b.t)(e);return!n&&r&&e.data&&(n=!0),n}var M=r(38678),T=r(44592),D=r(45078),Q=r(555),F=r(28354),L=r(62959),N=Object.prototype.hasOwnProperty,$=Object.create(null),B=function(){function e(e){var t=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new D.A(Q.v["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new T.Trie(!1),this.noCacheWarningsByQueryId=new Set;var r=new y.c(function(e){return t.cache.transformDocument(e)},{cache:!1});this.cache=e.cache,this.link=e.link,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientAwareness=e.clientAwareness,this.localState=e.localState,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking;var n=e.documentTransform;this.documentTransform=n?r.concat(n).concat(r):r,this.defaultContext=e.defaultContext||Object.create(null),(this.onBroadcast=e.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,r){e.stopQueryNoBroadcast(r)}),this.cancelPendingFetches((0,o.newInvariantError)(27))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){return(0,n.__awaiter)(this,arguments,void 0,function(e){var t,r,i,s,a,u,c,l=e.mutation,h=e.variables,p=e.optimisticResponse,f=e.updateQueries,d=e.refetchQueries,y=void 0===d?[]:d,g=e.awaitRefetchQueries,m=void 0!==g&&g,w=e.update,_=e.onQueryUpdated,x=e.fetchPolicy,I=void 0===x?(null==(u=this.defaultOptions.mutate)?void 0:u.fetchPolicy)||"network-only":x,P=e.errorPolicy,E=void 0===P?(null==(c=this.defaultOptions.mutate)?void 0:c.errorPolicy)||"none":P,S=e.keepRootFields,O=e.context;return(0,n.__generator)(this,function(e){switch(e.label){case 0:if((0,o.invariant)(l,28),(0,o.invariant)("network-only"===I||"no-cache"===I,29),t=this.generateMutationId(),l=this.cache.transformForLink(this.transform(l)),r=this.getDocumentInfo(l).hasClientExports,h=this.getVariables(l,h),!r)return[3,2];return[4,this.localState.addExportedVariables(l,h,O)];case 1:h=e.sent(),e.label=2;case 2:return i=this.mutationStore&&(this.mutationStore[t]={mutation:l,variables:h,loading:!0,error:null}),s=p&&this.markMutationOptimistic(p,{mutationId:t,document:l,variables:h,fetchPolicy:I,errorPolicy:E,context:O,updateQueries:f,update:w,keepRootFields:S}),this.broadcastQueries(),a=this,[2,new Promise(function(e,r){return(0,v.x)(a.getObservableFromLink(l,(0,n.__assign)((0,n.__assign)({},O),{optimisticResponse:s?p:void 0}),h,{},!1),function(e){if((0,b.t)(e)&&"none"===E)throw new k.ApolloError({graphQLErrors:(0,b.M)(e)});i&&(i.loading=!1,i.error=null);var r=(0,n.__assign)({},e);return"function"==typeof y&&(y=y(r)),"ignore"===E&&(0,b.t)(r)&&delete r.errors,a.markMutationResult({mutationId:t,result:r,document:l,variables:h,fetchPolicy:I,errorPolicy:E,context:O,update:w,updateQueries:f,awaitRefetchQueries:m,refetchQueries:y,removeOptimistic:s?t:void 0,onQueryUpdated:_,keepRootFields:S})}).subscribe({next:function(r){a.broadcastQueries(),"hasNext"in r&&!1!==r.hasNext||e((0,n.__assign)((0,n.__assign)({},r),{data:a.maskOperation({document:l,data:r.data,fetchPolicy:I,id:t})}))},error:function(e){i&&(i.loading=!1,i.error=e),s&&a.cache.removeOptimistic(t),a.broadcastQueries(),r(e instanceof k.ApolloError?e:new k.ApolloError({networkError:e}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var o=e.result,i=[],s="no-cache"===e.fetchPolicy;if(!s&&C(o,e.errorPolicy)){if((0,l.ST)(o)||i.push({result:o.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),(0,l.ST)(o)&&(0,g.E)(o.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;a.result&&(u=(0,l.bd)(a.result,o)),void 0!==u&&(o.data=u,i.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach(function(e,n){var s=e.observableQuery,a=s&&s.queryName;if(a&&N.call(c,a)){var u=c[a],l=r.queries.get(n),h=l.document,p=l.variables,f=t.diff({query:h,variables:p,returnPartialData:!0,optimistic:!1}),d=f.result;if(f.complete&&d){var y=u(d,{mutationResult:o,queryName:h&&(0,m.n4)(h)||void 0,queryVariables:p});y&&i.push({result:y,dataId:"ROOT_QUERY",query:h,variables:p})}}})}if(i.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var h=[];if(this.refetchQueries({updateCache:function(t){s||i.forEach(function(e){return t.write(e)});var a=e.update,u=!(0,l.YX)(o)||(0,l.ST)(o)&&!o.hasNext;if(a){if(!s){var c=t.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});c.complete&&("incremental"in(o=(0,n.__assign)((0,n.__assign)({},o),{data:c.result}))&&delete o.incremental,"hasNext"in o&&delete o.hasNext)}u&&a(t,o,{context:e.context,variables:e.variables})}s||e.keepRootFields||!u||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return h.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(h).then(function(){return o})}return Promise.resolve(o)},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables,{IGNORE:$}):e;return i!==$&&(this.cache.recordOptimisticTransaction(function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:i}}),e)}catch(e){!1!==globalThis.__DEV__&&o.invariant.error(e)}},t.mutationId),!0)},e.prototype.fetchQuery=function(e,t,r){return this.fetchConcastWithInfo(this.getOrCreateQuery(e),t,r).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var r={hasClientExports:(0,h.f2)(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:(0,h.d8)(["nonreactive"],e),nonReactiveQuery:(0,p.x3)(e),clientQuery:this.localState.clientQuery(e),serverQuery:(0,p.iz)([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),defaultVars:(0,m.wY)((0,m.Vu)(e)),asQuery:(0,n.__assign)((0,n.__assign)({},e),{definitions:e.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e})})};t.set(e,r)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=new A(this),o=new E.U({queryManager:this,queryInfo:r,options:e});return o.lastQuery=t,E.U.inactiveOnCreation.getValue()||this.queries.set(o.queryId,r),r.init({document:t,observableQuery:o,variables:o.variables}),o},e.prototype.query=function(e,t){var r=this;void 0===t&&(t=this.generateQueryId()),(0,o.invariant)(e.query,30),(0,o.invariant)("Document"===e.query.kind,31),(0,o.invariant)(!e.returnPartialData,32),(0,o.invariant)(!e.pollInterval,33);var i=this.transform(e.query);return this.fetchQuery(t,(0,n.__assign)((0,n.__assign)({},e),{query:i})).then(function(o){return o&&(0,n.__assign)((0,n.__assign)({},o),{data:r.maskOperation({document:i,data:o.data,fetchPolicy:e.fetchPolicy,id:t})})}).finally(function(){return r.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches((0,o.newInvariantError)(34)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=S.pT.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,i=new Map,s=new Map,a=new Set;return Array.isArray(e)&&e.forEach(function(e){if("string"==typeof e)i.set(e,e),s.set(e,!1);else if((0,w.Kc)(e)){var r=(0,M.y)(t.transform(e));i.set(r,(0,m.n4)(e)),s.set(r,!1)}else(0,_.U)(e)&&e.query&&a.add(e)}),this.queries.forEach(function(t,n){var o=t.observableQuery,i=t.document;if(o){if("all"===e)return void r.set(n,o);var a=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||a&&s.has(a)||i&&s.has((0,M.y)(i)))&&(r.set(n,o),a&&s.set(a,!0),i&&s.set((0,M.y)(i),!0))}}),a.size&&a.forEach(function(e){var i=(0,x.v)("legacyOneTimeQuery"),s=t.getOrCreateQuery(i).init({document:e.query,variables:e.variables}),a=new E.U({queryManager:t,queryInfo:s,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});(0,o.invariant)(a.queryId===i),s.setObservableQuery(a),r.set(i,a)}),!1!==globalThis.__DEV__&&s.size&&s.forEach(function(e,t){if(!e){var r=i.get(t);r?!1!==globalThis.__DEV__&&o.invariant.warn(35,r):!1!==globalThis.__DEV__&&o.invariant.warn(36)}}),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach(function(n,o){var i=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==i&&"cache-only"!==i)&&r.push(n.refetch()),(t.queries.get(o)||n.queryInfo).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.variables,o=e.fetchPolicy,i=e.errorPolicy,s=void 0===i?"none":i,a=e.context,u=void 0===a?{}:a,c=e.extensions,l=void 0===c?{}:c;r=this.transform(r),n=this.getVariables(r,n);var h=function(e){return t.getObservableFromLink(r,u,e,l).map(function(n){"no-cache"!==o&&(C(n,s)&&t.cache.write({query:r,result:n.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var i=(0,b.t)(n),a=(0,k.graphQLResultHasProtocolErrors)(n);if(i||a){var u={};if(i&&(u.graphQLErrors=n.errors),a&&(u.protocolErrors=n.extensions[k.PROTOCOL_ERRORS_SYMBOL]),"none"===s||a)throw new k.ApolloError(u)}return"ignore"===s&&delete n.errors,n})};if(this.getDocumentInfo(r).hasClientExports){var p=this.localState.addExportedVariables(r,n,u).then(h);return new I.c(function(e){var t=null;return p.then(function(r){return t=r.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return h(n)},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){var t;this.fetchCancelFns.delete(e),this.queries.has(e)&&(null==(t=this.queries.get(e))||t.stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){var t;return null==(t=e.observableQuery)?void 0:t.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,o,i){var a,u,c=this;void 0===i&&(i=null!=(a=null==t?void 0:t.queryDeduplication)?a:this.queryDeduplication);var l=this.getDocumentInfo(e),h=l.serverQuery,p=l.clientQuery;if(h){var f=this.inFlightLinkObservables,y=this.link,b={query:h,variables:r,operationName:(0,m.n4)(h)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i})),extensions:o};if(t=b.context,i){var g=(0,M.y)(h),w=(0,d.M)(r),_=f.lookup(g,w);if(!(u=_.observable)){var x=new P.E([(0,s.g)(y,b)]);u=_.observable=x,x.beforeNext(function e(t,r){"next"===t&&"hasNext"in r&&r.hasNext?x.beforeNext(e):f.remove(g,w)})}}else u=new P.E([(0,s.g)(y,b)])}else u=new P.E([I.c.of({data:{}})]),t=this.prepareContext(t);return p&&(u=(0,v.x)(u,function(e){return c.localState.runResolvers({document:p,remoteResult:e,context:t,variables:r})})),u},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(r.query);return(0,v.x)(this.getObservableFromLink(o,r.context,r.variables),function(i){var s=(0,b.M)(i),a=s.length>0,u=r.errorPolicy;if(n>=e.lastRequestId){if(a&&"none"===u)throw e.markError(new k.ApolloError({graphQLErrors:s}));e.markResult(i,o,r,t),e.markReady()}var c={data:i.data,loading:!1,networkStatus:S.pT.ready};return a&&"none"===u&&(c.data=void 0),a&&"ignore"!==u&&(c.errors=s,c.networkStatus=S.pT.error),c},function(t){var r=(0,k.isApolloError)(t)?t:new k.ApolloError({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r})},e.prototype.fetchConcastWithInfo=function(e,t,r,n){var o,i,s=this;void 0===r&&(r=S.pT.loading),void 0===n&&(n=t.query);var a=this.getVariables(n,t.variables),u=this.defaultOptions.watchQuery,c=t.fetchPolicy,l=void 0===c?u&&u.fetchPolicy||"cache-first":c,h=t.errorPolicy,p=void 0===h?u&&u.errorPolicy||"none":h,f=t.returnPartialData,d=t.notifyOnNetworkStatusChange,y=t.context,v=Object.assign({},t,{query:n,variables:a,fetchPolicy:l,errorPolicy:p,returnPartialData:void 0!==f&&f,notifyOnNetworkStatusChange:void 0!==d&&d,context:void 0===y?{}:y}),b=function(n){v.variables=n;var o=s.fetchQueryByPolicy(e,v,r);return"standby"!==v.fetchPolicy&&o.sources.length>0&&e.observableQuery&&e.observableQuery.applyNextFetchPolicy("after-fetch",t),o},g=function(){return s.fetchCancelFns.delete(e.queryId)};if(this.fetchCancelFns.set(e.queryId,function(e){g(),setTimeout(function(){return o.cancel(e)})}),this.getDocumentInfo(v.query).hasClientExports)o=new P.E(this.localState.addExportedVariables(v.query,v.variables,v.context).then(b).then(function(e){return e.sources})),i=!0;else{var m=b(v.variables);i=m.fromLink,o=new P.E(m.sources)}return o.promise.then(g,g),{concast:o,fromLink:i}},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,o=e.optimistic,i=void 0!==o&&o,s=e.removeOptimistic,a=void 0===s?i?(0,x.v)("refetchQueries"):void 0:s,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach(function(e,r){c.set(r,{oq:e,lastDiff:(t.queries.get(r)||e.queryInfo).getDiff()})});var l=new Map;return r&&this.cache.batch({update:r,optimistic:i&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof A&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var o=u(n,t,r);return!0===o&&(o=n.refetch()),!1!==o&&l.set(n,o),o}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach(function(e,r){var n,o=e.oq,i=e.lastDiff,s=e.diff;u&&(s||(s=t.cache.diff(o.queryInfo.getDiffOptions())),n=u(o,s,i)),u&&!0!==n||(n=o.refetch()),!1!==n&&l.set(o,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)}),a&&this.cache.removeOptimistic(a),l},e.prototype.maskOperation=function(e){var t,r,n,i=e.document,s=e.data;if(!1!==globalThis.__DEV__){var a=e.fetchPolicy,u=e.id,c=null==(t=(0,m.Vu)(i))?void 0:t.operation,l=(null!=(r=null==c?void 0:c[0])?r:"o")+u;!this.dataMasking||"no-cache"!==a||(0,f.s6)(i)||this.noCacheWarningsByQueryId.has(l)||(this.noCacheWarningsByQueryId.add(l),!1!==globalThis.__DEV__&&o.invariant.warn(37,null!=(n=(0,m.n4)(i))?n:"Unnamed ".concat(null!=c?c:"operation")))}return this.dataMasking?(0,F.m)(s,i,this.cache):s},e.prototype.maskFragment=function(e){var t=e.data,r=e.fragment,n=e.fragmentName;return this.dataMasking?(0,L.z)(t,r,this.cache,n):t},e.prototype.fetchQueryByPolicy=function(e,t,r){var o=this,i=t.query,s=t.variables,a=t.fetchPolicy,u=t.refetchWritePolicy,l=t.errorPolicy,h=t.returnPartialData,p=t.context,f=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:i,variables:s,networkStatus:r});var y=function(){return e.getDiff()},v=function(t,r){void 0===r&&(r=e.networkStatus||S.pT.loading);var a=t.result;!1===globalThis.__DEV__||h||(0,c.equal)(a,{})||(0,E.y)(t.missing);var u=function(e){return I.c.of((0,n.__assign)({data:e,loading:(0,S.bi)(r),networkStatus:r},t.complete?null:{partial:!0}))};return a&&o.getDocumentInfo(i).hasForcedResolvers?o.localState.runResolvers({document:i,remoteResult:{data:a},context:p,variables:s,onlyRunForcedResolvers:!0}).then(function(e){return u(e.data||void 0)}):"none"===l&&r===S.pT.refetch&&Array.isArray(t.missing)?u(void 0):u(a)},b="no-cache"===a?0:r===S.pT.refetch&&"merge"!==u?1:2,g=function(){return o.getResultsFromLink(e,b,{query:i,variables:s,context:p,fetchPolicy:a,errorPolicy:l})},m=f&&"number"==typeof d&&d!==r&&(0,S.bi)(r);switch(a){default:case"cache-first":var w=y();if(w.complete)return{fromLink:!1,sources:[v(w,e.markReady())]};if(h||m)return{fromLink:!0,sources:[v(w),g()]};return{fromLink:!0,sources:[g()]};case"cache-and-network":var w=y();if(w.complete||h||m)return{fromLink:!0,sources:[v(w),g()]};return{fromLink:!0,sources:[g()]};case"cache-only":return{fromLink:!1,sources:[v(y(),e.markReady())]};case"network-only":if(m)return{fromLink:!0,sources:[v(y()),g()]};return{fromLink:!0,sources:[g()]};case"no-cache":if(m)return{fromLink:!0,sources:[v(e.getDiff()),g()]};return{fromLink:!0,sources:[g()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getOrCreateQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new A(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},e}(),V=r(90424),j=r(3420),W=r(777),z=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,o=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=(0,O.D9)(t.resolvers,e)}):this.resolvers=(0,O.D9)(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){return(0,n.__awaiter)(this,arguments,void 0,function(e){var t=e.document,r=e.remoteResult,o=e.context,i=e.variables,s=e.onlyRunForcedResolvers,a=void 0!==s&&s;return(0,n.__generator)(this,function(e){return t?[2,this.resolveDocument(t,r.data,o,i,this.fragmentMatcher,a).then(function(e){return(0,n.__assign)((0,n.__assign)({},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(0,h.d8)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,p.er)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e){return(0,n.__awaiter)(this,arguments,void 0,function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__generator)(this,function(o){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then(function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)})]:[2,(0,n.__assign)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,V.YR)(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 V.sP}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,p.zc)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t){return(0,n.__awaiter)(this,arguments,void 0,function(e,t,r,o,i,s){var a,u,c,l,h,p,d,y,v,b;return void 0===r&&(r={}),void 0===o&&(o={}),void 0===i&&(i=function(){return!0}),void 0===s&&(s=!1),(0,n.__generator)(this,function(g){return a=(0,m.Vn)(e),u=(0,m.zK)(e),c=(0,f.JG)(u),l=this.collectSelectionsToResolve(a,c),p=(h=a.operation)?h.charAt(0).toUpperCase()+h.slice(1):"Query",d=this,y=d.cache,v=d.client,b={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:y,client:v}),variables:o,fragmentMatcher:i,defaultOperationType:p,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(a.selectionSet,!1,t,b).then(function(e){return{result:e,exportedVariables:b.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,function(){var s,a,u,c,l,p=this;return(0,n.__generator)(this,function(f){return s=i.fragmentMap,a=i.context,u=i.variables,c=[r],l=function(e){return(0,n.__awaiter)(p,void 0,void 0,function(){var l,p;return(0,n.__generator)(this,function(n){return(t||i.selectionsToResolve.has(e))&&(0,h.MS)(e,u)?(0,w.dt)(e)?[2,this.resolveField(e,t,r,i).then(function(t){var r;void 0!==t&&c.push(((r={})[(0,w.ue)(e)]=t,r))})]:((0,w.kd)(e)?l=e:(l=s[e.name.value],(0,o.invariant)(l,19,e.name.value)),l&&l.typeCondition&&(p=l.typeCondition.name.value,i.fragmentMatcher(r,p,a)))?[2,this.resolveSelectionSet(l.selectionSet,t,r,i).then(function(e){c.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(l)).then(function(){return(0,O.IM)(c)})]})})},e.prototype.resolveField=function(e,t,r,o){return(0,n.__awaiter)(this,void 0,void 0,function(){var i,s,a,u,c,l,h,p,f,d=this;return(0,n.__generator)(this,function(n){return r?(i=o.variables,u=(s=e.name.value)!==(a=(0,w.ue)(e)),l=Promise.resolve(c=r[a]||r[s]),(!o.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(h=r.__typename||o.defaultOperationType,(p=this.resolvers&&this.resolvers[h])&&(f=p[u?s:a])&&(l=Promise.resolve(W.bl.withValue(this.cache,f,[r,(0,w.MB)(e,i),o.context,{field:e,fragmentMap:o.fragmentMap}])))),[2,l.then(function(r){if(void 0===r&&(r=c),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&&(o.exportedVariables[e.value.value]=r)})}),!e.selectionSet||null==r)return r;var n,i,s=null!=(i=null==(n=e.directives)?void 0:n.some(function(e){return"client"===e.name.value}))&&i;return Array.isArray(r)?d.resolveSubSelectedArray(e,t||s,r,o):e.selectionSet?d.resolveSelectionSet(e.selectionSet,t||s,r,o):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var o=this;return Promise.all(r.map(function(r){return null===r?null:Array.isArray(r)?o.resolveSubSelectedArray(e,t,r,n):e.selectionSet?o.resolveSelectionSet(e.selectionSet,t,r,n):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var s=new Set;n.set(i,s),(0,V.YR)(i,{Directive:function(e,t,n,o,i){"client"===e.name.value&&i.forEach(function(e){r(e)&&(0,j.VK)(e)&&s.add(e)})},FragmentSpread:function(n,i,a,u,c){var l=t[n.name.value];(0,o.invariant)(l,20,n.name.value);var h=e(l);h.size>0&&(c.forEach(function(e){r(e)&&(0,j.VK)(e)&&s.add(e)}),s.add(n),h.forEach(function(e){s.add(e)}))}})}return n.get(i)}(e)},e}(),U=r(31507),G=r(44114),H=!1,K=function(){function e(e){var t,r=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw(0,o.newInvariantError)(16);var s=e.uri,c=e.credentials,l=e.headers,h=e.cache,p=e.documentTransform,f=e.ssrMode,d=void 0!==f&&f,y=e.ssrForceFetchDelay,v=void 0===y?0:y,b=e.connectToDevTools,g=e.queryDeduplication,m=void 0===g||g,w=e.defaultOptions,_=e.defaultContext,x=e.assumeImmutableResults,I=void 0===x?h.assumeImmutableResults:x,P=e.resolvers,k=e.typeDefs,E=e.fragmentMatcher,S=e.name,O=e.version,R=e.devtools,q=e.dataMasking,A=e.link;A||(A=s?new u.P({uri:s,credentials:c,headers:l}):i.C.empty()),this.link=A,this.cache=h,this.disableNetworkFetches=d||v>0,this.queryDeduplication=m,this.defaultOptions=w||Object.create(null),this.typeDefs=k,this.devtoolsConfig=(0,n.__assign)((0,n.__assign)({},R),{enabled:null!=(t=null==R?void 0:R.enabled)?t:b}),void 0===this.devtoolsConfig.enabled&&(this.devtoolsConfig.enabled=!1!==globalThis.__DEV__),v&&setTimeout(function(){return r.disableNetworkFetches=!1},v),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=a.r,this.localState=new z({cache:h,client:this,resolvers:P,fragmentMatcher:E}),this.queryManager=new B({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:_,documentTransform:p,queryDeduplication:m,ssrMode:d,dataMasking:!!q,clientAwareness:{name:S,version:O},localState:this.localState,assumeImmutableResults:I,onBroadcast:this.devtoolsConfig.enabled?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if("u">typeof window){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,!H&&!1!==globalThis.__DEV__&&(H=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,r=void 0;"string"==typeof t&&(t.indexOf("Chrome/")>-1?r="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(r="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),r&&!1!==globalThis.__DEV__&&o.invariant.log("Download the Apollo DevTools for a better development experience: %s",r)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,U.l)(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,U.l)(this.defaultOptions.query,e)),(0,o.invariant)("cache-and-network"!==e.fetchPolicy,17),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,U.l)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){var t=this,r=this.queryManager.generateQueryId();return this.queryManager.startGraphQLSubscription(e).map(function(o){return(0,n.__assign)((0,n.__assign)({},o),{data:t.queryManager.maskOperation({document:e.query,data:o.data,fetchPolicy:e.fetchPolicy,id:r})})})},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.watchFragment=function(e){var t;return this.cache.watchFragment((0,n.__assign)((0,n.__assign)({},e),((t={})[Symbol.for("apollo.dataMasking")]=this.queryManager.dataMasking,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!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,s.g)(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).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({discardWatches:!0})}).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.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach(function(e,t){r.push(t),n.push(e)});var i=Promise.all(n);return i.queries=r,i.results=n,i.catch(function(e){!1!==globalThis.__DEV__&&o.invariant.debug(18,e)}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(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.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();!1!==globalThis.__DEV__&&(K.prototype.getMemoryInternals=G.ep)},18709(e,t,r){r.d(t,{U:()=>m,y:()=>_});var n=r(85608),o=r(70916),i=r(55888),s=r(75950),a=r(36054),u=r(3777),c=r(50492),l=r(20906),h=r(30234),p=r(87613),f=r(35892),d=r(53570),y=r(55427),v=r(60837),b=Object.assign,g=Object.hasOwnProperty,m=function(e){function t(r){var o=r.queryManager,i=r.queryInfo,s=r.options,a=this,c=t.inactiveOnCreation.getValue();(a=e.call(this,function(e){c&&(o.queries.set(a.queryId,i),c=!1);try{var t=e._subscription._observer;t&&!t.error&&(t.error=w)}catch(e){}var r=!a.observers.size;a.observers.add(e);var n=a.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(a.maskResult(n.result)),r&&a.reobserve().catch(function(){}),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}})||this).observers=new Set,a.subscriptions=new Set,a.dirty=!1,a.queryInfo=i,a.queryManager=o,a.waitForOwnResult=x(s.fetchPolicy),a.isTornDown=!1,a.subscribeToMore=a.subscribeToMore.bind(a),a.maskResult=a.maskResult.bind(a);var l=o.defaultOptions.watchQuery,h=(void 0===l?{}:l).fetchPolicy,p=void 0===h?"cache-first":h,f=s.fetchPolicy,d=void 0===f?p:f,y=s.initialFetchPolicy,v=void 0===y?"standby"===d?p:d:y;a.options=(0,n.__assign)((0,n.__assign)({},s),{initialFetchPolicy:v,fetchPolicy:d}),a.queryId=i.queryId||o.generateQueryId();var b=(0,u.Vu)(a.query);return a.queryName=b&&b.name&&b.name.value,a}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),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(){o.unsubscribe()},0)},error:r},o=e.subscribe(n)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentFullResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||s.pT.ready,o=(0,n.__assign)((0,n.__assign)({},t),{loading:(0,s.bi)(r),networkStatus:r}),a=this.options.fetchPolicy,u=void 0===a?"cache-first":a;if(x(u)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers);else if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var c=this.queryInfo.getDiff();(c.complete||this.options.returnPartialData)&&(o.data=c.result),(0,i.equal)(o.data,{})&&(o.data=void 0),c.complete?(delete o.partial,c.complete&&o.networkStatus===s.pT.loading&&("cache-first"===u||"cache-only"===u)&&(o.networkStatus=s.pT.ready,o.loading=!1)):o.partial=!0,o.networkStatus===s.pT.ready&&(o.error||o.errors)&&(o.networkStatus=s.pT.error),!1===globalThis.__DEV__||c.complete||this.options.partialRefetch||o.loading||o.data||o.error||_(c.missing)}return e&&this.updateLastResult(o),o},t.prototype.getCurrentResult=function(e){return void 0===e&&(e=!0),this.maskResult(this.getCurrentFullResult(e))},t.prototype.isDifferentFromLastResult=function(e,t){if(!this.last)return!0;var r=this.queryManager.getDocumentInfo(this.query),n=this.queryManager.dataMasking,o=n?r.nonReactiveQuery:this.query;return(n||r.hasNonreactiveDirective?!(0,y.a)(o,this.last.result,e,this.variables):!(0,i.equal)(this.last.result,e))||t&&!(0,i.equal)(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||(0,i.equal)(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0};if("no-cache"===this.options.fetchPolicy?r.fetchPolicy="no-cache":r.fetchPolicy="network-only",!1!==globalThis.__DEV__&&e&&g.call(e,"variables")){var a=(0,u.AT)(this.query),c=a.variableDefinitions;c&&c.some(function(e){return"variables"===e.variable.name.value})||!1===globalThis.__DEV__||o.invariant.warn(21,e,(null==(t=a.name)?void 0:t.value)||a)}return e&&!(0,i.equal)(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,s.pT.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.options.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"});r.query=this.transformDocument(r.query);var i=this.queryManager.generateQueryId();this.lastQuery=e.query?this.transformDocument(this.options.query):r.query;var a=this.queryInfo,u=a.networkStatus;a.networkStatus=s.pT.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var c=new Set,l=null==e?void 0:e.updateQuery,h="no-cache"!==this.options.fetchPolicy;return h||(0,o.invariant)(l,22),this.queryManager.fetchQuery(i,r,s.pT.fetchMore).then(function(o){if(t.queryManager.removeQuery(i),a.networkStatus===s.pT.fetchMore&&(a.networkStatus=u),h)t.queryManager.cache.batch({update:function(n){var i=e.updateQuery;i?n.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},function(e){return i(e,{fetchMoreResult:o.data,variables:r.variables})}):n.writeQuery({query:r.query,variables:r.variables,data:o.data})},onWatchUpdated:function(e){c.add(e.query)}});else{var p=t.getLast("result"),f=l(p.data,{fetchMoreResult:o.data,variables:r.variables});t.reportResult((0,n.__assign)((0,n.__assign)({},p),{networkStatus:u,loading:(0,s.bi)(u),data:f}),t.variables)}return t.maskResult(o)}).finally(function(){h&&!c.has(t.query)&&t.reobserveCacheFirst()})},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var o=e.updateQuery;o&&t.updateQuery(function(e,t){return o(e,(0,n.__assign)({subscriptionData:r},t))})},error:function(t){e.onError?e.onError(t):!1!==globalThis.__DEV__&&o.invariant.error(23,t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.silentSetOptions=function(e){var t=(0,c.o)(this.options,e||{});b(this.options,t)},t.prototype.setVariables=function(e){return(0,i.equal)(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size)?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},s.pT.setVariables):Promise.resolve()},t.prototype.updateQuery=function(e){var t=this.queryManager,r=t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}),n=r.result,o=r.complete,i=e(n,{variables:this.variables,complete:!!o,previousData:n});i&&(t.cache.writeQuery({query:this.options.query,data:i,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,o=t.initialFetchPolicy,i=void 0===o?n:o;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:i}):"variables-changed"===e?t.fetchPolicy=i:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t,r){var n=this.queryManager.getOrCreateQuery(this.queryId);return n.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(n,e,t,r)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(!r||!this.hasObservers()){t&&(clearTimeout(t.timeout),delete this.pollingInfo);return}if(!t||t.interval!==r){(0,o.invariant)(r,24),(t||(this.pollingInfo={})).interval=r;var n=function(){var t,r;e.pollingInfo&&((0,s.bi)(e.queryInfo.networkStatus)||(null==(r=(t=e.options).skipPollAttempt)?void 0:r.call(t))?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},s.pT.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}},t.prototype.updateLastResult=function(e,t){void 0===t&&(t=this.variables);var r=this.getLastError();return r&&this.last&&!(0,i.equal)(t,this.last.variables)&&(r=void 0),this.last=(0,n.__assign)({result:this.queryManager.assumeImmutableResults?e:(0,l.m)(e),variables:t},r?{error:r}:null)},t.prototype.reobserveAsConcast=function(e,t){var r=this;this.isTornDown=!1;var o=t===s.pT.refetch||t===s.pT.fetchMore||t===s.pT.poll,a=this.options.variables,u=this.options.fetchPolicy,l=(0,c.o)(this.options,e||{}),h=o?l:b(this.options,l),p=this.transformDocument(h.query);this.lastQuery=p,!o&&(this.updatePolling(),e&&e.variables&&!(0,i.equal)(e.variables,a)&&"standby"!==h.fetchPolicy&&(h.fetchPolicy===u||"function"==typeof h.nextFetchPolicy)&&(this.applyNextFetchPolicy("variables-changed",h),void 0===t&&(t=s.pT.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=x(h.fetchPolicy));var f=function(){r.concast===g&&(r.waitForOwnResult=!1)},y=h.variables&&(0,n.__assign)({},h.variables),v=this.fetch(h,t,p),g=v.concast,m=v.fromLink,w={next:function(e){(0,i.equal)(r.variables,y)&&(f(),r.reportResult(e,y))},error:function(e){(0,i.equal)(r.variables,y)&&((0,d.isApolloError)(e)||(e=new d.ApolloError({networkError:e})),f(),r.reportError(e,y))}};return o||!m&&this.concast||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=g,this.observer=w),g.addObserver(w),g},t.prototype.reobserve=function(e,t){return(0,h.X)(this.reobserveAsConcast(e,t).promise.then(this.maskResult))},t.prototype.resubscribeAfterError=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.last;this.resetLastResults();var n=this.subscribe.apply(this,e);return this.last=r,n},t.prototype.observe=function(){this.reportResult(this.getCurrentFullResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError(),n=this.isDifferentFromLastResult(e,t);(r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),(r||n)&&(0,p.w)(this.observers,"next",this.maskResult(e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:s.pT.error,loading:!1});this.updateLastResult(r,t),(0,p.w)(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t.prototype.maskResult=function(e){return e&&"data"in e?(0,n.__assign)((0,n.__assign)({},e),{data:this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):e},t.prototype.resetNotifications=function(){this.cancelNotifyTimeout(),this.dirty=!1},t.prototype.cancelNotifyTimeout=function(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0)},t.prototype.scheduleNotify=function(){var e=this;!this.dirty&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return e.notify()},0)))},t.prototype.notify=function(){this.cancelNotifyTimeout(),this.dirty&&("cache-only"==this.options.fetchPolicy||"cache-and-network"==this.options.fetchPolicy||!(0,s.bi)(this.queryInfo.networkStatus))&&(this.queryInfo.getDiff().fromOptimisticTransaction?this.observe():this.reobserveCacheFirst()),this.dirty=!1},t.prototype.reobserveCacheFirst=function(){var e=this.options,t=e.fetchPolicy,r=e.nextFetchPolicy;return"cache-and-network"===t||"network-only"===t?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(e,n){return(this.nextFetchPolicy=r,"function"==typeof this.nextFetchPolicy)?this.nextFetchPolicy(e,n):t}}):this.reobserve()},t.inactiveOnCreation=new v.Slot,t}(a.c);function w(e){!1!==globalThis.__DEV__&&o.invariant.error(25,e.message,e.stack)}function _(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&o.invariant.debug(26,e)}function x(e){return"network-only"===e||"no-cache"===e||"standby"===e}(0,f.r)(m)},2714(e,t,r){r.r(t),r.d(t,{ApolloCache:()=>c.k,ApolloClient:()=>n.R,ApolloError:()=>a.ApolloError,ApolloLink:()=>d.ApolloLink,Cache:()=>u.l,DocumentTransform:()=>w.c,HttpLink:()=>y.HttpLink,InMemoryCache:()=>l.D,MissingFieldError:()=>h.Z,NetworkStatus:()=>s.pT,Observable:()=>_.c,ObservableQuery:()=>i.U,checkFetcher:()=>y.checkFetcher,concat:()=>d.concat,createHttpLink:()=>y.createHttpLink,createSignalIfSupported:()=>y.createSignalIfSupported,defaultDataIdFromObject:()=>p.or,defaultPrinter:()=>y.defaultPrinter,disableExperimentalFragmentVariables:()=>P.disableExperimentalFragmentVariables,disableFragmentWarnings:()=>P.disableFragmentWarnings,empty:()=>d.empty,enableExperimentalFragmentVariables:()=>P.enableExperimentalFragmentVariables,execute:()=>d.execute,fallbackHttpConfig:()=>y.fallbackHttpConfig,from:()=>d.from,fromError:()=>v.N,fromPromise:()=>g.S,gql:()=>P.gql,isApolloError:()=>a.isApolloError,isNetworkRequestSettled:()=>s.D2,isReference:()=>x.A_,makeReference:()=>x.WU,makeVar:()=>f.UT,mergeOptions:()=>o.l,parseAndCheckHttpResponse:()=>y.parseAndCheckHttpResponse,resetCaches:()=>P.resetCaches,rewriteURIForGET:()=>y.rewriteURIForGET,selectHttpOptionsAndBody:()=>y.selectHttpOptionsAndBody,selectHttpOptionsAndBodyInternal:()=>y.selectHttpOptionsAndBodyInternal,selectURI:()=>y.selectURI,serializeFetchParameter:()=>y.serializeFetchParameter,setLogVerbosity:()=>I.setVerbosity,split:()=>d.split,throwServerError:()=>m.A,toPromise:()=>b.h});var n=r(22268),o=r(31507),i=r(18709),s=r(75950),a=r(53570),u=r(84673),c=r(42495),l=r(7068),h=r(65702),p=r(35207),f=r(777),d=r(4232),y=r(28876),v=r(93161),b=r(60441),g=r(22594),m=r(3848),w=r(9354),_=r(36054),x=r(28907),I=r(19371),P=r(94370);(0,I.setVerbosity)(!1!==globalThis.__DEV__?"log":"silent")},75950(e,t,r){var n,o;function i(e){return!!e&&e<7}function s(e){return 7===e||8===e}r.d(t,{D2:()=>s,bi:()=>i,pT:()=>n}),(o=n||(n={}))[o.loading=1]="loading",o[o.setVariables=2]="setVariables",o[o.fetchMore=3]="fetchMore",o[o.refetch=4]="refetch",o[o.poll=6]="poll",o[o.ready=7]="ready",o[o.error=8]="error"},74114(e,t,r){r.d(t,{z:()=>m});var n=r(85608),o=r(19074),i=r(70916),s=r(82307),a=r(53925),u=r(36054),c=r(93161),l=r(74559),h=r(67195),p=r(33068),f=r(63647),d=r(90117),y=function(){function e(e){var t=e.batchDebounce,r=e.batchInterval,n=e.batchMax,o=e.batchHandler,i=e.batchKey;this.batchesByKey=new Map,this.scheduledBatchTimerByKey=new Map,this.batchDebounce=t,this.batchInterval=r,this.batchMax=n||0,this.batchHandler=o,this.batchKey=i||function(){return""}}return e.prototype.enqueueRequest=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e),{next:[],error:[],complete:[],subscribers:new Set}),o=this.batchKey(e.operation);return r.observable||(r.observable=new u.c(function(e){var n=t.batchesByKey.get(o);n||t.batchesByKey.set(o,n=new Set);var i=0===n.size,s=0===r.subscribers.size;return r.subscribers.add(e),s&&n.add(r),e.next&&r.next.push(e.next.bind(e)),e.error&&r.error.push(e.error.bind(e)),e.complete&&r.complete.push(e.complete.bind(e)),(i||t.batchDebounce)&&t.scheduleQueueConsumption(o),n.size===t.batchMax&&t.consumeQueue(o),function(){var i;r.subscribers.delete(e)&&r.subscribers.size<1&&n.delete(r)&&n.size<1&&(t.consumeQueue(o),null==(i=n.subscription)||i.unsubscribe())}})),r.observable},e.prototype.consumeQueue=function(e){void 0===e&&(e="");var t=this.batchesByKey.get(e);if(this.batchesByKey.delete(e),t&&t.size){var r=[],n=[],o=[],i=[],s=[],a=[];t.forEach(function(e){r.push(e.operation),n.push(e.forward),o.push(e.observable),i.push(e.next),s.push(e.error),a.push(e.complete)});var c=this.batchHandler(r,n)||u.c.of(),l=function(e){s.forEach(function(t){t&&t.forEach(function(t){return t(e)})})};return t.subscription=c.subscribe({next:function(e){if(Array.isArray(e)||(e=[e]),i.length!==e.length){var t=Error("server returned results with length ".concat(e.length,", expected length of ").concat(i.length));return t.result=e,l(t)}e.forEach(function(e,t){i[t]&&i[t].forEach(function(t){return t(e)})})},error:l,complete:function(){a.forEach(function(e){e&&e.forEach(function(e){return e()})})}}),o}},e.prototype.scheduleQueueConsumption=function(e){var t=this;clearTimeout(this.scheduledBatchTimerByKey.get(e)),this.scheduledBatchTimerByKey.set(e,setTimeout(function(){t.consumeQueue(e),t.scheduledBatchTimerByKey.delete(e)},this.batchInterval))},e}(),v=function(e){function t(t){var r=e.call(this)||this,n=t||{},o=n.batchDebounce,i=n.batchInterval,s=n.batchMax,a=n.batchHandler,u=n.batchKey;return r.batcher=new y({batchDebounce:o,batchInterval:void 0===i?10:i,batchMax:void 0===s?0:s,batchHandler:void 0===a?function(){return null}:a,batchKey:void 0===u?function(){return""}:u}),t.batchHandler.length<=1&&(r.request=function(e){return r.batcher.enqueueRequest({operation:e})}),r}return(0,n.__extends)(t,e),t.prototype.request=function(e,t){return this.batcher.enqueueRequest({operation:e,forward:t})},t}(o.C),b=r(70783),g=(0,i.maybe)(function(){return fetch}),m=function(e){function t(t){var r=e.call(this)||this,o=t||{},y=o.uri,m=void 0===y?"/graphql":y,w=o.fetch,_=o.print,x=void 0===_?l.i1:_,I=o.includeExtensions,P=o.preserveHeaderCase,k=o.batchInterval,E=o.batchDebounce,S=o.batchMax,O=o.batchKey,R=o.includeUnusedVariables,q=void 0!==R&&R,A=(0,n.__rest)(o,["uri","fetch","print","includeExtensions","preserveHeaderCase","batchInterval","batchDebounce","batchMax","batchKey","includeUnusedVariables"]);!1!==globalThis.__DEV__&&(0,h.S)(w||g);var C={http:{includeExtensions:I,preserveHeaderCase:P},options:A.fetchOptions,credentials:A.credentials,headers:A.headers};return r.batchDebounce=E,r.batchInterval=k||10,r.batchMax=S||10,O=O||function(e){var t=e.getContext(),r={http:t.http,options:t.fetchOptions,credentials:t.credentials,headers:t.headers};return(0,p.z)(e,m)+JSON.stringify(r)},r.batcher=new v({batchDebounce:r.batchDebounce,batchInterval:r.batchInterval,batchMax:r.batchMax,batchKey:O,batchHandler:function(e){var t,r=(0,p.z)(e[0],m),o=e[0].getContext(),h={};if(o.clientAwareness){var y=o.clientAwareness,v=y.name,_=y.version;v&&(h["apollographql-client-name"]=v),_&&(h["apollographql-client-version"]=_)}var I={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:(0,n.__assign)((0,n.__assign)({},h),o.headers)},P=e.map(function(e){var t=e.query;return(0,s.d8)(["client"],t)?(0,a.er)(t):t});if(P.some(function(e){return!e}))return(0,c.N)(Error("BatchHttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or enable the `transformOptions.removeClientFields` option."));var k=e.map(function(e,t){var r=(0,l.HY)((0,n.__assign)((0,n.__assign)({},e),{query:P[t]}),x,l.R4,C,I);return r.body.variables&&!q&&(r.body.variables=(0,b.X)(r.body.variables,e.query)),r}),E=k.map(function(e){return e.body}),S=k[0].options;if("GET"===S.method)return(0,c.N)(Error("apollo-link-batch-http does not support GET requests"));try{S.body=(0,f.Y)(E,"Payload")}catch(e){return(0,c.N)(e)}return!S.signal&&"u">typeof AbortController&&(S.signal=(t=new AbortController).signal),new u.c(function(n){return(w||(0,i.maybe)(function(){return fetch})||g)(r,S).then(function(t){return e.forEach(function(e){return e.setContext({response:t})}),t}).then((0,d.OQ)(e)).then(function(e){return t=void 0,n.next(e),n.complete(),e}).catch(function(e){t=void 0,e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e)}),function(){t&&t.abort()}})}}),r}return(0,n.__extends)(t,e),t.prototype.request=function(e){return this.batcher.request(e)},t}(o.C)},26197(e,t,r){r.d(t,{o:()=>s});var n=r(85608),o=r(19074),i=r(36054);function s(e){return new o.C(function(t,r){var o=(0,n.__rest)(t,[]);return new i.c(function(n){var i,s=!1;return Promise.resolve(o).then(function(r){return e(r,t.getContext())}).then(t.setContext).then(function(){s||(i=r(t).subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}))}).catch(n.error.bind(n)),function(){s=!0,i&&i.unsubscribe()}})})}},79556(e,t,r){r.d(t,{S:()=>a});var n=r(85608),o=r(53570),i=r(36054),s=r(19074);function a(e){return new s.C(function(t,r){return new i.c(function(n){var i,s,a;try{i=r(t).subscribe({next:function(i){if(i.errors?a=e({graphQLErrors:i.errors,response:i,operation:t,forward:r}):(0,o.graphQLResultHasProtocolErrors)(i)&&(a=e({protocolErrors:i.extensions[o.PROTOCOL_ERRORS_SYMBOL],response:i,operation:t,forward:r})),a){s=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(i)},error:function(o){if(a=e({operation:t,networkError:o,graphQLErrors:o&&o.result&&o.result.errors||void 0,forward:r})){s=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(o)},complete:function(){a||n.complete.bind(n)()}})}catch(o){e({networkError:o,operation:t,forward:r}),n.error(o)}return function(){i&&i.unsubscribe(),s&&i.unsubscribe()}})})}var u=s.C;function c(e){var t=u.call(this)||this;return t.link=a(e),t}(0,n.__extends)(c,u),c.prototype.request=function(e,t){return this.link.request(e,t)}},78342(e,t,r){r.d(t,{z:()=>u});var n=r(85608),o=r(19074),i=r(36054),s=r(53570),a=function(){function e(e,t,r,o,i){var s=this;this.observer=e,this.operation=t,this.forward=r,this.delayFor=o,this.retryIf=i,this.retryCount=0,this.currentSubscription=null,this.onError=function(e){return(0,n.__awaiter)(s,void 0,void 0,function(){return(0,n.__generator)(this,function(t){switch(t.label){case 0:return this.retryCount+=1,[4,this.retryIf(this.retryCount,this.operation,e)];case 1:if(t.sent())return this.scheduleRetry(this.delayFor(this.retryCount,this.operation,e)),[2];return this.observer.error(e),[2]}})})},this.try()}return e.prototype.cancel=function(){this.currentSubscription&&this.currentSubscription.unsubscribe(),clearTimeout(this.timerId),this.timerId=void 0,this.currentSubscription=null},e.prototype.try=function(){var e=this;this.currentSubscription=this.forward(this.operation).subscribe({next:function(t){var r;if((0,s.graphQLResultHasProtocolErrors)(t)){e.onError(new s.ApolloError({protocolErrors:t.extensions[s.PROTOCOL_ERRORS_SYMBOL]})),null==(r=e.currentSubscription)||r.unsubscribe();return}e.observer.next(t)},error:this.onError,complete:this.observer.complete.bind(this.observer)})},e.prototype.scheduleRetry=function(e){var t=this;if(this.timerId)throw Error("RetryLink BUG! Encountered overlapping retries");this.timerId=setTimeout(function(){t.timerId=void 0,t.try()},e)},e}(),u=function(e){function t(t){var r,n,o,i,s,a,u,c,l,h,p,f,d=e.call(this)||this,y=t||{},v=y.attempts,b=y.delay;return d.delayFor="function"==typeof b?b:(o=void 0===(n=(r=b||{}).initial)?300:n,s=void 0===(i=r.jitter)||i,u=void 0===(a=r.max)?1/0:a,c=s?o:o/2,function(e){var t=Math.min(u,c*Math.pow(2,e));return s&&(t=Math.random()*t),t}),d.retryIf="function"==typeof v?v:(h=(l=v||{}).retryIf,f=void 0===(p=l.max)?5:p,function(e,t,r){return!(e>=f)&&(h?h(r,t):!!r)}),d}return(0,n.__extends)(t,e),t.prototype.request=function(e,t){var r=this;return new i.c(function(n){var o=new a(n,e,t,r.delayFor,r.retryIf);return function(){o.cancel()}})},t}(o.C)},42028(e,t,r){r.d(t,{c:()=>c});var n=r(85608),o=r(38678),i=r(19074),s=r(21777),a=r(36054),u=r(53570),c=function(e){function t(t){var r=e.call(this)||this;return r.client=t,r}return(0,n.__extends)(t,e),t.prototype.request=function(e){var t=this;return new a.c(function(r){return t.client.subscribe((0,n.__assign)((0,n.__assign)({},e),{query:(0,o.y)(e.query)}),{next:r.next.bind(r),complete:r.complete.bind(r),error:function(e){if(e instanceof Error)return r.error(e);var t,n=(0,s.U)(e)&&"code"in e&&"reason"in e;return n||(0,s.U)(e)&&(null==(t=e.target)?void 0:t.readyState)===WebSocket.CLOSED?r.error(Error("Socket closed".concat(n?" with event ".concat(e.code):"").concat(n?" ".concat(e.reason):""))):r.error(new u.ApolloError({graphQLErrors:Array.isArray(e)?e:[e]}))}})})},t}(i.C)},99815(e,t,r){function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function o(e){return"object"===n(e)}function i(e,t){return e.length<124?e:t}function s(e){if(!o(e))throw Error(`Message is expected to be an object, but got ${n(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${n(e.type)}`);switch(e.type){case h.ConnectionInit:case h.ConnectionAck:case h.Ping:case h.Pong:if(null!=e.payload&&!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case h.Subscribe:if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${n(e.payload.query)}`);if(null!=e.payload.variables&&!o(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${n(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==n(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${n(e.payload.operationName)}`);if(null!=e.payload.extensions&&!o(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${n(e.payload.extensions)}`);break;case h.Next:if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);break;case h.Error:var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case h.Complete:if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function a(e,t){return s(e),JSON.stringify(e,t)}r.d(t,{UU:()=>d}),(u=l||(l={}))[u.InternalServerError=4500]="InternalServerError",u[u.InternalClientError=4005]="InternalClientError",u[u.BadRequest=4400]="BadRequest",u[u.BadResponse=4004]="BadResponse",u[u.Unauthorized=4401]="Unauthorized",u[u.Forbidden=4403]="Forbidden",u[u.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",u[u.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",u[u.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",u[u.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",u[u.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",(c=h||(h={})).ConnectionInit="connection_init",c.ConnectionAck="connection_ack",c.Ping="ping",c.Pong="pong",c.Subscribe="subscribe",c.Next="next",c.Error="error",c.Complete="complete";var u,c,l,h,p=function(e){return this instanceof p?(this.v=e,this):new p(e)},f=function(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{var r;(r=o[e](t)).value instanceof p?Promise.resolve(r.value.v).then(u,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}};function d(e){let t,r,n,o,{url:u,connectionParams:c,lazy:d=!0,onNonLazyError:b=console.error,lazyCloseTimeout:g=0,keepAlive:m=0,disablePong:w,connectionAckWaitTimeout:_=0,retryAttempts:x=5,retryWait:I=async function(e){let t=1e3;for(let r=0;r<e;r++)t*=2;await new Promise(e=>setTimeout(e,t+Math.floor(2700*Math.random()+300)))},shouldRetry:P=v,isFatalConnectionProblem:k,on:E,webSocketImpl:S,generateID:O=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:R,jsonMessageReviver:q}=e;if(S){var A;if(!("function"==typeof(A=S)&&"constructor"in A&&"CLOSED"in A&&"CLOSING"in A&&"CONNECTING"in A&&"OPEN"in A))throw Error("Invalid WebSocket implementation provided");t=S}else"u">typeof WebSocket?t=WebSocket:"u">typeof global?t=global.WebSocket||global.MozWebSocket:"u">typeof window&&(t=window.WebSocket||window.MozWebSocket);if(!t)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let C=t,M=(r={},n={on:(e,t)=>(r[e]=t,()=>{delete r[e]}),emit(e){var t;"id"in e&&(null==(t=r[e.id])||t.call(r,e))}},o={connecting:(null==E?void 0:E.connecting)?[E.connecting]:[],opened:(null==E?void 0:E.opened)?[E.opened]:[],connected:(null==E?void 0:E.connected)?[E.connected]:[],ping:(null==E?void 0:E.ping)?[E.ping]:[],pong:(null==E?void 0:E.pong)?[E.pong]:[],message:(null==E?void 0:E.message)?[n.emit,E.message]:[n.emit],closed:(null==E?void 0:E.closed)?[E.closed]:[],error:(null==E?void 0:E.error)?[E.error]:[]},{onMessage:n.on,on(e,t){let r=o[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...o[e]])r(...t)}});function T(e){let t=[M.on("error",r=>{t.forEach(e=>e()),e(r)}),M.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let D,Q=0,F,L=!1,N=0,$=!1;async function B(){clearTimeout(F);let[e,t]=await (null!=D?D:D=new Promise((e,t)=>(async()=>{let r,n;if(L){if(await I(N),!Q)return D=void 0,t({code:1e3,reason:"All Subscriptions Gone"});N++}M.emit("connecting",L);let o=new C("function"==typeof u?await u():u,"graphql-transport-ws");function p(){isFinite(m)&&m>0&&(clearTimeout(n),n=setTimeout(()=>{o.readyState===C.OPEN&&(o.send(a({type:h.Ping})),M.emit("ping",!1,void 0))},m))}T(e=>{D=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof y&&(o.close(4499,"Terminated"),o.onerror=null,o.onclose=null)}),o.onerror=e=>M.emit("error",e),o.onclose=e=>M.emit("closed",e),o.onopen=async()=>{try{M.emit("opened",o);let e="function"==typeof c?await c():c;if(o.readyState!==C.OPEN)return;o.send(a(e?{type:h.ConnectionInit,payload:e}:{type:h.ConnectionInit},R)),isFinite(_)&&_>0&&(r=setTimeout(()=>{o.close(l.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},_)),p()}catch(e){M.emit("error",e),o.close(l.InternalClientError,i(e instanceof Error?e.message:Error(e).message,"Internal client error"))}};let f=!1;o.onmessage=({data:t})=>{try{let n=s("string"==typeof t?JSON.parse(t,q):t);if(M.emit("message",n),"ping"===n.type||"pong"===n.type){M.emit(n.type,!0,n.payload),"pong"===n.type?p():w||(o.send(a(n.payload?{type:h.Pong,payload:n.payload}:{type:h.Pong})),M.emit("pong",!1,n.payload));return}if(f)return;if(n.type!==h.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),f=!0,M.emit("connected",o,n.payload,L),L=!1,N=0,e([o,new Promise((e,t)=>T(t))])}catch(e){o.onmessage=null,M.emit("error",e),o.close(l.BadResponse,i(e instanceof Error?e.message:Error(e).message,"Bad response"))}}})()));e.readyState===C.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{Q||(isFinite(g)&&g>0?F=setTimeout(()=>{e.readyState===C.OPEN&&e.close(1e3,"Normal Closure")},g):e.close(1e3,"Normal Closure"))}),t])]}function V(e){var t;if(v(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[l.InternalServerError,l.InternalClientError,l.BadRequest,l.BadResponse,l.Unauthorized,l.SubprotocolNotAcceptable,l.SubscriberAlreadyExists,l.TooManyInitialisationRequests].includes(e.code)))throw e;if($)return!1;if(v(e)&&1e3===e.code)return Q>0;if(!x||N>=x||!P(e)||(null==k?void 0:k(e)))throw e;return L=!0}function j(e,t){let r=O(e),n=!1,o=!1,i=()=>{Q--,n=!0};return(async()=>{for(Q++;;)try{let[s,u,c]=await B();if(n)return u();let l=M.onMessage(r,e=>{switch(e.type){case h.Next:return void t.next(e.payload);case h.Error:o=!0,n=!0,t.error(e.payload),i();return;case h.Complete:n=!0,i();return}});s.send(a({id:r,type:h.Subscribe,payload:e},R)),i=()=>{n||s.readyState!==C.OPEN||s.send(a({id:r,type:h.Complete},R)),Q--,n=!0,u()},await c.finally(l);return}catch(e){if(!V(e))return}})().then(()=>{o||t.complete()}).catch(e=>{t.error(e)}),()=>{n||i()}}return d||(async()=>{for(Q++;;)try{let[,,e]=await B();await e}catch(e){try{if(!V(e))return}catch(e){return null==b?void 0:b(e)}}})(),{on:M.on,subscribe:j,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=j(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),o=function(){return f(this,arguments,function*(){for(;;){for(t.length||(yield p(new Promise(e=>r.resolve=e)));t.length;)yield yield p(t.shift());if(r.error)throw r.error;if(r.done)return yield p(void 0)}})}();return o.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),o.return=async()=>(n(),{done:!0,value:void 0}),o},async dispose(){if($=!0,D){let[e]=await D;e.close(1e3,"Normal Closure")}},terminate(){D&&M.emit("closed",new y)}}}class y extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function v(e){return o(e)&&"code"in e&&"reason"in e}},96423(e,t,r){r.d(t,{A:()=>P});let n=(e,t="Internal Logic Error")=>{if(!e)throw Error("function"==typeof t?t():t)};class o{constructor(e,t){this.value=e,this.excluded=t,this.isSimpleStarRec="**"===e,this.isRegexStarRec=e.startsWith("**(")&&e.endsWith(")"),this.isStarRec=this.isSimpleStarRec||this.isRegexStarRec}}class i{constructor(e,t=null){this.left=null===t,this.link=null===t?new i(e,this):t,this.type=e,this.isStarRec="**"===this.type,this.node=null,this.pointer=null}setPointer(e){this.pointer=e,this.link.pointer=e}setNode(e){this.node=e,this.link.node=e}}let s=(e,t,r={})=>{throw Error(Object.entries(r).reduce((e,[t,r])=>`${e}, ${t} ${r}`,`${e}: ${t}`))},a=e=>1===e.length?e[0]:e,u=/^[?*+\d]+$/,c=(e,t,r={})=>{throw Error(Object.entries(r).reduce((e,[t,r])=>`${e}, ${t} ${r}`,`${e}: ${t}`))},l=(e,t)=>{let r,l,h,p,f,d,y;if(""===e)return new o("",!1);if(Array.isArray(e))return 0===e.length?new o("",!1):e.map((r,n)=>"number"==typeof r?(t.useArraySelector||c("Forbidden Array Selector",JSON.stringify(e),{idx:n}),new o(`[${r}]`,!1)):new o(r.replaceAll("\\","\\\\"),!1));let v=((r=[]).or=!0,l=!1,h=!1,p=0,f=[],d=e=>{!0===r.excluded&&(n(!1===h),h=!0),f.push(r),(r=[]).or=e},y=()=>{let e=f.pop(),t=a(r);!0===e.or&&!0===t.or?e.push(...t):e.push(t),r=e},d(!1),{setInArray:(t,r)=>{l===t&&s(l?"Bad Array Start":"Bad Array Terminator",e,{char:r}),l=t},finishElement:(t,n,a,{finReq:c=!1,group:f=!1}={})=>{if(p===t)a.includes(e[t-1]||null)||s(n,e,{char:t}),p+=1;else{c&&s(n,e,{char:t});let a=e.slice(p,t);f&&!["**","++"].includes(a)&&s("Bad Group Start",e,{char:t}),l&&!(u.test(a)||a.startsWith("(")&&a.endsWith(")"))&&s("Bad Array Selector",e,{selector:a}),f?r.push(new i(a)):(r.push(new o(l?`[${a}]`:a,h)),h=!1),p=t+1}},startExclusion:t=>{!1!==h&&s("Redundant Exclusion",e,{char:t}),h=!0},startGroup:()=>{d(!0),h&&(r.excluded=!0,h=!1),d(!1)},newGroupElement:()=>{y(),d(!1)},finishGroup:t=>{f.length<2&&s("Unexpected Group Terminator",e,{char:t}),y(),y(),n(Array.isArray(r));let o=r[r.length-2];o instanceof i&&!0===o.left&&r.push(o.link)},finalizeResult:()=>(y(),n(!1===h),0!==f.length&&s("Non Terminated Group",e),l&&s("Non Terminated Array",e),a(r))}),b=e.length,g=!1,m=0;for(let r=0;r<b;r+=1){let n=e[r];if(!1===g){if(0===m)switch(n){case".":v.finishElement(r,"Bad Path Separator",["]","}"]);break;case"[":t.useArraySelector||c("Forbidden Array Selector",e,{char:r}),v.finishElement(r,"Bad Array Start",[null,"!","{",",","}","]"]),v.setInArray(!0,r);break;case"]":v.finishElement(r,"Bad Array Terminator",["}"]),v.setInArray(!1,r);break;case"{":v.finishElement(r,"Bad Group Start",[null,"!",".","[","{",","],{group:!0}),v.startGroup();break;case",":v.finishElement(r,"Bad Group Separator",["]","}"]),v.newGroupElement();break;case"}":v.finishElement(r,"Bad Group Terminator",["]","}"]),v.finishGroup(r);break;case"!":v.finishElement(r,"Bad Exclusion",[null,".",",","{","["],{finReq:!0}),v.startExclusion(r)}switch(n){case"(":m+=1;break;case")":0===m&&c("Unexpected Parentheses",e,{char:r}),m-=1}}g="\\"===n&&!g}return!1!==g&&c("Dangling Escape",e,{char:b-1}),0!==m&&c("Unterminated Parentheses",e),v.finishElement(b,"Bad Terminator",["]","}"]),v.finalizeResult()},h=/[?!,.*+[\](){}\\]/g,p=/^\^?[^-/\\^$*+?.()|[\]{}]*\$?$/g,f=e=>{if(p.test(e)){let t=e.startsWith("^"),r=e.endsWith("$");if(t&&r){let t=e.slice(1,-1);return{test:e=>String(e)===t}}if(t){let t=e.slice(1);return{test:e=>String(e).startsWith(t)}}if(r){let t=e.slice(0,-1);return{test:e=>String(e).endsWith(t)}}return{test:t=>String(t).includes(e)}}try{return new RegExp(e)}catch(t){throw Error(`Invalid Regex: "${e}"`)}},d=e=>e.reduce((e,t)=>`${e}${"number"==typeof t?`[${t}]`:`${e?".":""}${t.replace(h,"\\$&")}`}`,""),y=e=>Array.isArray(e)?d(e):e,v=["-","/","\\","^","$","*","+","?",".","(",")","|","[","]","{","}"],b=e=>{let t="",r=!1,n=!0;for(let o=0;o<e.length;o+=1){let i=e[o];r||"\\"!==i?r||"*"!==i?r||"+"!==i?r||"?"!==i?(v.includes(i)&&(n=!1,t+="\\"),t+=i,r=!1):(n=!1,t+="."):(n=!1,t+=".+"):(n=!1,t+=".*"):r=!0}return n?{test:e=>String(e)===t}:".+"===t?{test:e=>""!==e}:RegExp(`^${t}$`)};class g{constructor(e,t){if(t.nodes.push(this),this.value=e,this.ctx=t,this.order=t.counter,this.children=[],this.match=!1,this.matches=!1,this.needles=[],this.leafNeedles=[],this.leafNeedlesExclude=[],this.leafNeedlesMatch=[],this.isArrayTarget=e.startsWith("[")&&e.endsWith("]"),this.isSimpleStarRec="**"===e,this.isSimplePlusRec="++"===e,this.isSimpleRec=this.isSimpleStarRec||this.isSimplePlusRec,this.isRegexStarRec=e.startsWith("**(")&&e.endsWith(")"),this.isRegexPlusRec=e.startsWith("++(")&&e.endsWith(")"),this.isStarRec=this.isSimpleStarRec||this.isRegexStarRec,this.isPlusRec=this.isSimplePlusRec||this.isRegexPlusRec,this.isRec=this.isStarRec||this.isPlusRec,this.isAnyArrayTarget="[*]"===e,this.isAnyObjTarget="*"===e,this.isSimpleRec||this.isAnyObjTarget||this.isAnyArrayTarget)this.regex=null;else{let{regex:r}=t;e in r||(r[e]=(e.startsWith("**(")||e.startsWith("++("))&&e.endsWith(")")?f(e.slice(3,-1)):e.startsWith("[(")&&e.endsWith(")]")?f(e.slice(2,-2)):e.startsWith("(")&&e.endsWith(")")?f(e.slice(1,-1)):e.startsWith("[")&&e.endsWith("]")?b(e.slice(1,-1)):b(e)),this.regex=r[e]}}recMatch(e){return!!this.isRec&&(!!this.isSimpleRec||this.regex.test(e))}typeMatch(e,t){return!!this.isSimpleRec||(this.isAnyArrayTarget?t:this.isAnyObjTarget?!t:(t===this.isArrayTarget||!!this.isRec)&&this.regex.test(e))}add(e){this.children.push(e)}get(e){return this.children.find(({value:t})=>t===e)}markMatches(){this.matches=!0}addNeedle(e){this.needles.includes(e)||this.needles.push(e)}setRoots(e){this.roots=e}finish(e,t,r){this.addNeedle(e),this.leafNeedles.includes(e)||this.leafNeedles.push(e);let n=t?this.leafNeedlesExclude:this.leafNeedlesMatch;n.includes(e)||n.push(e),this.match=!t,this.matches=this.match,this.index=r}}let m=(e,t,r,n)=>{((e,t,r,{onAdd:n,onFin:o})=>{let i=[[[e,null]]],s=!1;((e,t)=>{let r=[e],n=[null],o=[],i=[],s=0,a=!0;for(;-1!==s;){let e=r[s];Array.isArray(e)?!0!==e.or?(r.splice(s,1,...e),n.splice(s,1,...Array(e.length).fill(n[s])),null!==n[s]&&(i[n[s]]+=e.length-1)):(void 0===o[s]?(o[s]=0,i[s]=0):0!==i[s]&&(r.splice(s+1,i[s]),n.splice(s+1,i[s]),i[s]=0),o[s]<e.length?(r.splice(s+1,0,e[o[s]]),n.splice(s+1,0,s),o[s]=(o[s]||0)+1,i[s]+=1,a=!0,s+=1):(o[s]=0,s-=1)):!0===a?(t("ADD",e),s===r.length-1?(t("FIN",e),a=!1):s+=1):(t("RM",e),s-=1)}})(r,(r,a)=>{if("RM"===r)!0===a.excluded&&(s=!1),i.length-=2;else if("ADD"===r){if(!0===a.excluded){if(s)throw Error(`Redundant Exclusion: "${t}"`);s=!0}let e=[],r=i[i.length-2];i[i.length-1].forEach(([t,o])=>n(t,o,a,r,r=>e.push([r,t]))),i.push(a,e)}else i[i.length-1].filter(([t])=>t!==e).forEach(([e,t])=>o(e,t,a,s))})})(e,t,r,{onAdd:(e,r,o,s,a)=>{if(e.addNeedle(t),o instanceof i)return void(!0===o.left?(o.isStarRec&&o.setPointer(e),o.setNode(new g("*",n)),n.links.push(e,o.node),a(o.node)):(o.target="target"in s?s.target:r.get(s.value),n.links.push(o.target,o.node),null!==o.pointer&&(a(o.pointer),o.setPointer(null)),a(e)));let u=o.isStarRec&&o.value===s?.value;if(u&&n.strict)throw Error(`Redundant Recursion: "${t}"`);if(u)o.target=e;else{let t=e.get(o.value);void 0===t&&(t=new g(o.value,n),e.add(t)),a(t)}o.isStarRec&&a(e)},onFin:(e,r,o,i)=>{if(n.strict&&o.isSimpleStarRec){let e=r.children.filter(({value:e})=>!["","**"].includes(e));if(0!==e.length)throw Error(`Needle Target Invalidated: "${e[0].needles[0]}" by "${t}"`)}if(n.strict&&0!==e.leafNeedles.length){let r=y(e.leafNeedles[0]),n=y(t);throw Error(`Redundant Needle Target: "${r}" vs "${n}"`)}e.finish(t,i,n.counter),n.counter+=1}})},w=(e,t)=>{let r=[];for(let n=0,o=e.length;n<o;n+=1){let o=e[n][t];for(let e=0,t=o.length;e<t;e+=1){let t=o[e];r.includes(t)||r.push(t)}}return r},_=e=>{let t=-1,r=!1,n=e.length;for(;n--;){let{index:o,match:i}=e[n];o>t&&(t=o,r=i)}return r},x=(e,t)=>t?d(e):[...e],I=(e,t,r)=>{n(r.includes(typeof e[t]),()=>`Option "${t}" not one of [${r.join(", ")}]`)},P=(e,t={})=>{let r;if(n(Array.isArray(e),'Argument "needles" expected to be Array'),n(t instanceof Object&&!Array.isArray(t),'Argument "opts" expected to be Object'),0===e.length)return(e,t)=>void 0===t?[]:t;let o=(n(12===Object.keys(r={filterFn:void 0,breakFn:void 0,beforeFn:void 0,afterFn:void 0,compareFn:void 0,reverse:!0,orderByNeedles:!1,abort:!1,rtn:void 0,joined:!1,useArraySelector:!0,strict:!0,...t}).length,"Unexpected Option provided"),I(r,"filterFn",["function","undefined"]),I(r,"breakFn",["function","undefined"]),I(r,"beforeFn",["function","undefined"]),I(r,"afterFn",["function","undefined"]),I(r,"compareFn",["function","undefined"]),I(r,"reverse",["boolean"]),I(r,"orderByNeedles",["boolean"]),I(r,"abort",["boolean"]),n("function"==typeof r.rtn&&1===r.rtn.length||[void 0,"context","key","value","entry","property","gproperty","parent","gparent","parents","isMatch","matchedBy","excludedBy","traversedBy","isCircular","isLeaf","depth","bool","count","sum"].includes(r.rtn)||Array.isArray(r.rtn)&&r.rtn.every(e=>["key","value","entry","property","gproperty","parent","gparent","parents","isMatch","matchedBy","excludedBy","traversedBy","isCircular","isLeaf","depth"].includes(e)),'Option "rtn" is malformed'),I(r,"joined",["boolean"]),I(r,"useArraySelector",["boolean"]),I(r,"strict",["boolean"]),r),i=((e,t)=>{t.counter=0,t.links=[],t.nodes=[],t.regex=Object.create(null);let r=new g("*",t);for(let n=0;n<e.length;n+=1){let o=e[n],i=[l(o,t)];m(r,o,i,t)}return((e,t)=>{let{links:r}=t;for(;0!==r.length;){let e=r.pop(),t=r.pop(),{children:n}=t;t.children=[...e.children.filter(e=>!n.includes(e)),...n]}!1===t.useArraySelector&&e.setRoots(e.children.filter(({isStarRec:e,value:t})=>e||""===t));let{nodes:n}=t;for(;0!==n.length;){let e=n.pop(),{children:t}=e;t.reverse(),t.some(({matches:e})=>e)&&e.markMatches()}})(r,t),r})(e,o);return(e,t)=>((e,t,r)=>{let n,o,i,s,a={haystack:e,context:r.context};if(void 0!==r.beforeFn){let e=r.beforeFn(a);void 0!==e&&(a.haystack=e)}let u=[!1,[t],null,0],c=[],l=[],h=a.haystack,p={getKey:(e=r.joined)=>x(c,e),get key(){return p.getKey()},getValue:()=>h,get value(){return p.getValue()},getEntry:(e=r.joined)=>[x(c,e),h],get entry(){return p.getEntry()},getIsMatch:()=>s,get isMatch(){return p.getIsMatch()},getMatchedBy:()=>w(i,"leafNeedlesMatch"),get matchedBy(){return p.getMatchedBy()},getExcludedBy:()=>w(i,"leafNeedlesExclude"),get excludedBy(){return p.getExcludedBy()},getTraversedBy:()=>w(i,"needles"),get traversedBy(){return p.getTraversedBy()},getGproperty:()=>c[c.length-2],get gproperty(){return p.getGproperty()},getProperty:()=>c[c.length-1],get property(){return p.getProperty()},getGparent:()=>l[l.length-2],get gparent(){return p.getGparent()},getParent:()=>l[l.length-1],get parent(){return p.getParent()},getParents:()=>[...l].reverse(),get parents(){return p.getParents()},getIsCircular:()=>l.includes(h),get isCircular(){return p.getIsCircular()},getIsLeaf:()=>!(h instanceof Object),get isLeaf(){return p.getIsLeaf()},getDepth:()=>c.length,get depth(){return p.getDepth()},get result(){return p.getResult()},context:a.context},f=((e,t)=>{if("context"===t.rtn)return{onMatch:()=>{},get:()=>e.context};if("bool"===t.rtn){let e=!1;return{onMatch:()=>{e=!0},get:()=>e}}if("count"===t.rtn){let e=0;return{onMatch:()=>{e+=1},get:()=>e}}if("sum"===t.rtn){let e=0;return{onMatch:({value:t})=>{e+=t},get:()=>e}}let r=[];return{onMatch:"function"==typeof t.rtn?()=>r.push(t.rtn(e)):Array.isArray(t.rtn)?()=>r.push(t.rtn.map(t=>e[t])):()=>r.push(e[t.rtn]),get:()=>t.abort?r[0]:r}})(p,r);if(p.getResult=()=>f.get(),r.useArraySelector||!Array.isArray(a.haystack)){let e=t.get("");void 0!==e&&u[1].push(e)}do{n=u.pop(),o=u.pop(),i=u.pop(),s=u.pop();let e=c.length-n;for(let t=0;t<e;t+=1)l.pop(),c.pop();if(-1===e?(l.push(h),c.push(o),h=h[o]):null!==o?(c[c.length-1]=o,h=l[l.length-1][o]):h=a.haystack,s){(void 0===r.filterFn||!1!==r.filterFn(p))&&(f.onMatch(p),r.abort&&(u.length=0));continue}if(!i.some(({matches:e})=>e))continue;let d=!1===r.useArraySelector&&Array.isArray(h);if(!d&&_(i)&&(u.push(!0,i,o,n),s=!0),(void 0===r.breakFn||!0!==r.breakFn(p))&&h instanceof Object){let e=Array.isArray(h),o=e?h.map((e,t)=>t).filter(()=>!0):Object.keys(h);!e&&r.compareFn&&o.sort(r.compareFn(p)),r.reverse||o.reverse();for(let s=0,a=o.length;s<a;s+=1){let a=o[s],c=[];if(d)c.push(...i),0===n&&c.push(...t.roots);else for(let t=0,r=i.length;t!==r;t+=1){let r=i[t];r.recMatch(a)&&c.push(r);let{children:n}=r,o=n.length;for(;o--;){let t=n[o];t.typeMatch(a,e)&&c.push(t)}}if(r.orderByNeedles){c.index=Buffer.from(c.map(({order:e})=>e).sort());let e=u.length-3,t=e-4*s;for(;e!==t&&1===Buffer.compare(c.index,u[e].index);)e-=4;u.splice(e+3,0,!1,c,a,n+1)}else u.push(!1,c,a,n+1)}}}while(0!==u.length);if(a.result=f.get(),void 0!==r.afterFn){let e=r.afterFn(a);void 0!==e&&(a.result=e)}return a.result})(e,i,{context:t,...o,rtn:o.rtn||(void 0===t?"key":"context")})}},79861(e,t,r){r.d(t,{fJ:()=>v});var n=r(77030),o=r(37067),i=r(44708),s=r(68875),a=r(40610);let u=[],c=[],l=({address:e,host:t,family:r},o)=>{if(0!==n.isIP(e))try{let n=s.parse(e).range();if(o.allowIPAddressList.length>0&&o.allowIPAddressList.includes(e))return;if(!o.allowMetaIPAddress&&"unspecified"===n)return Error(`DNS lookup ${e}(family:${r}, host:${t}) is not allowed. Because, It is meta IP address.`);if(!o.allowPrivateIPAddress&&"unicast"!==n)return Error(`DNS lookup ${e}(family:${r}, host:${t}) is not allowed. Because, It is private IP address.`);if(o.denyIPAddressList.length>0&&o.denyIPAddressList.includes(e))return Error(`DNS lookup ${e}(family:${r}, host:${t}) is not allowed. Because It is defined in denyIPAddressList.`)}catch(e){return e}},h=(e,t)=>(r,n,o)=>{let i,s=e.lookup||a.lookup;i=n.all?(e,n)=>{if(e)return void o(e);for(let{address:e,family:i}of n){let n=l({address:e,family:i,host:r},t);if(n)return void o(n)}o(null,n)}:(e,n,i)=>{if(e)return void o(e);let s=l({address:n,family:i,host:r},t);s?o(s):o(null,n,i)},s(r,n,i)};class p extends o.Agent{requestFilterOptions;constructor(e){super(e),this.requestFilterOptions={allowPrivateIPAddress:!!e&&void 0!==e.allowPrivateIPAddress&&e.allowPrivateIPAddress,allowMetaIPAddress:!!e&&void 0!==e.allowMetaIPAddress&&e.allowMetaIPAddress,allowIPAddressList:e&&e.allowIPAddressList?e.allowIPAddressList:u,denyIPAddressList:e&&e.denyIPAddressList?e.denyIPAddressList:c}}createConnection(e,t){let{host:r}=e;if(void 0!==r){let e=l({address:r},this.requestFilterOptions);if(e)throw e}return super.createConnection({...e,lookup:h(e,this.requestFilterOptions)},t)}}class f extends i.Agent{requestFilterOptions;constructor(e){super(e),this.requestFilterOptions={allowPrivateIPAddress:!!e&&void 0!==e.allowPrivateIPAddress&&e.allowPrivateIPAddress,allowMetaIPAddress:!!e&&void 0!==e.allowMetaIPAddress&&e.allowMetaIPAddress,allowIPAddressList:e&&e.allowIPAddressList?e.allowIPAddressList:[],denyIPAddressList:e&&e.denyIPAddressList?e.denyIPAddressList:[]}}createConnection(e,t){let{host:r}=e;if(void 0!==r){let e=l({address:r},this.requestFilterOptions);if(e)throw e}return super.createConnection({...e,lookup:h(e,this.requestFilterOptions)},t)}}let d=new p,y=new f,v=(e,t)=>t?e.startsWith("https")?new f(t):new p(t):e.startsWith("https")?y:d}};
|
package/lib/6818.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __rspack_esm_id=6818;export const __rspack_esm_ids=[6818];export const __webpack_modules__={53241(e,t,r){r.r(t),r.d(t,{detectChannel:()=>i,detectInstallMethod:()=>o});var a=r(73024),n=r(76760),s=r(48161),l=e=>{if(!e)return e;try{return a.realpathSync(e)}catch{return e}},i=({version:e,execPath:t}={})=>{var r=t||process.execPath;return r&&/[\\/]bricks-beta(?:\.exe)?$/i.test(r)||/-(beta|alpha|rc|next)\b/i.test(e||"2.25.0-beta.
|
|
1
|
+
export const __rspack_esm_id=6818;export const __rspack_esm_ids=[6818];export const __webpack_modules__={53241(e,t,r){r.r(t),r.d(t,{detectChannel:()=>i,detectInstallMethod:()=>o});var a=r(73024),n=r(76760),s=r(48161),l=e=>{if(!e)return e;try{return a.realpathSync(e)}catch{return e}},i=({version:e,execPath:t}={})=>{var r=t||process.execPath;return r&&/[\\/]bricks-beta(?:\.exe)?$/i.test(r)||/-(beta|alpha|rc|next)\b/i.test(e||"2.25.0-beta.69")?"beta":"release"},o=({execPath:e=process.execPath,scriptPath:t=process.argv[1],homeDir:r=s.homedir(),realpath:a=l}={})=>{let i;var o=(i=e)?n.basename(i).replace(/\.exe$/i,""):"";if("bricks"===o||"bricks-beta"===o)return{method:"binary",execPath:e,installDir:n.dirname(e)};var c=a(t),p=((e,t)=>{if(!e)return null;var r=n.sep,a=`${r}node_modules${r}${t.replace(/\//g,r)}${r}`,s=e.indexOf(a);return -1===s?null:e.slice(0,s)})(c,"@fugood/bricks-cli");if(p){var b=n.sep,d=n.join(r,".bun","install","global");return p===d||p.startsWith(d+b)?{method:"bun",installRoot:p}:/[\\/](?:\.pnpm|pnpm[\\/]global)[\\/]/.test(p)?{method:"pnpm",installRoot:p}:/[\\/](?:\.yarn|yarn[\\/]global)[\\/]/.test(p)?{method:"yarn",installRoot:p}:{method:"npm",installRoot:p.endsWith(`${b}lib`)?p.slice(0,-`${b}lib`.length):p}}return{method:"unknown",execPath:e,scriptPath:c}}}};
|
package/lib/7511.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __rspack_esm_id=7511;export const __rspack_esm_ids=[7511];export const __webpack_modules__={66422(e,t){let a=e=>`PROPERTY_BANK_DATA_NODE_${e}`,i={isLocalSyncMainDevice:{id:a("325068e3-89b6-4c6a-942b-126d38c84a62"),title:"SYSTEM: Is Local Sync Main Device",description:"The current device is main for local sync",type:"bool",value:!0},currentCanvasId:{id:a("2dfeb635-deb4-481a-9d17-ea7b1fe19f74"),title:"SYSTEM: Current Canvas ID",description:"ID for known current canvas",type:"string",value:""},previousCanvasId:{id:a("2971e463-0b0e-45b7-bbfb-a01d8fd49db3"),title:"SYSTEM: Previous Canvas ID",description:"ID for known previous canvas",type:"string",value:""},canvasIdHistory:{id:a("1a086f39-817d-40ed-92f0-5a999535d3dd"),title:"SYSTEM: Change Canvas History",description:"Change Canvas ID History (Limit: 10)",type:"array",schema:{type:"string",allowNewItem:!1,allowCustomProperty:!1},value:[]},rootSubspaceInfo:{id:a("c0817f4a-1ff3-40ed-9cbf-71d8cefd2cd9"),title:"SYSTEM: Root Subspace Info",description:"Root Subspace Information",type:"object",value:{}},subspaceInfo:{id:a("2657ec09-7323-46c3-a96e-3d8b5a0f79b3"),title:"SYSTEM: Current Subspace Info",description:"Current Subspace Information",type:"object",value:{}},uniqueID:{id:a("6f4a543f-a88a-4a83-bf53-223259263be3"),title:"SYSTEM: Unique ID",description:"Unique ID of current device",type:"string",value:"unknown"},appVersion:{id:a("d614a258-2a45-4f91-9f6b-3936038cb2b1"),title:"SYSTEM: App Version",description:"App Version of current installed BRICKS Foundation app",type:"string",value:"unknown"},lastUpdateTime:{id:a("956f3b3e-cb0b-47ca-8119-65663910d110"),title:"SYSTEM: Last Update Time",description:"Last update time of current installed BRICKS Foundation app",type:"string",value:"2019-07-09T03:32:27.058Z"},deviceName:{id:a("7b9d9ad4-e9a2-47cd-91d3-b64187895c16"),title:"SYSTEM: Device Name",description:"Name of current device",type:"string",value:"Default Device Name"},deviceType:{id:a("b0beae12-e45e-4870-ae15-858eeac566fa"),title:"SYSTEM: Device Type",description:"Type of current device (Handset, Tv, Tablet)",type:"string",value:"Tv"},operationMode:{id:a("2e715d3b-92bf-4761-b5c0-ca21f7c1ada8"),title:"SYSTEM: Operation Mode",description:"Operation Mode of current device (android, ios, ...)",type:"string",value:"android"},operationVersion:{id:a("fa886963-0a16-4b5f-b4ea-6c25b049db03"),title:"SYSTEM: Operation Version",description:"Operation Version of current device",type:"string",value:""},screenWidth:{id:a("2942470a-c3bc-413e-8f2c-30a89aded3f8"),title:"SYSTEM: Screen Width",description:"Width of current device main screen",type:"number",value:1280},screenHeight:{id:a("4f031e27-f67b-40e0-a317-9f6c5215d97d"),title:"SYSTEM: Screen Height",description:"Height of current device main screen",type:"number",value:768},screenScale:{id:a("c3c9b7aa-1dc1-4be1-8a4a-d9e299b9eeaa"),title:"SYSTEM: Screen Scale",description:"Scale of current device main screen",type:"number",value:2},screenFontScale:{id:a("0312f380-d525-4938-82d2-5b35ef8ef1e8"),title:"SYSTEM: Screen Font Scale",description:"Font scale of current device main screen",type:"number",value:1},orientation:{id:a("4f584f51-a250-4f97-a2f8-d5e6a3affb4f"),title:"SYSTEM: Orientation",description:"Orientation of current device main screen",type:"string",value:"landspace"},touchAvailable:{id:a("1fe7555f-df41-43ce-a268-3ea1b5efda6d"),title:"SYSTEM: Touch Available",description:"Is touch available of current device main screen?",type:"bool",value:!0},soundAvailable:{id:a("bf839498-f7d6-4212-ac3a-b409e3ad77a5"),title:"SYSTEM: Sound Available",description:"Is sound available of current device?",type:"bool",value:!0},cameraAvailable:{id:a("4878f3c2-8bb8-4c94-855c-06bda5a287d5"),title:"SYSTEM: Camera Available",description:"Is camera available of current device?",type:"bool",value:!0},audioInputAvailable:{id:a("4854b259-96c1-40d7-b17b-47156b4698dc"),title:"SYSTEM: Audio Input Available",description:"Is audio input available of current device?",type:"bool",value:!1},networkType:{id:a("1cbb1756-e53c-45a9-be23-5d84a214e144"),title:"SYSTEM: Network Type",description:"Network Type of current device",type:"string",value:"wifi"},networkConnected:{id:a("687b62fe-ead5-417a-b415-9bd5233784a4"),title:"SYSTEM: Network Connected",description:"Is Network connected of current device?",type:"bool",value:!0},networkIpAddress:{id:a("41971ba7-8294-4aa6-a425-ecd39853c3e6"),title:"SYSTEM: Network IP Address",description:"Current network IP address",type:"string",value:""},networkDetails:{id:a("9351fbfc-4ace-477a-b05d-41ac9b05087d"),title:"SYSTEM: Network Details",description:"Network details, provide different data depends on Network Type",type:"object",value:null},isInternetReachable:{id:a("e367ae7e-46ec-46d0-b87d-51e544591ff9"),title:"SYSTEM: Internet Reachable",description:"Is Internet reachable?",type:"bool",value:!0},isWifiEnabled:{id:a("be395305-fb85-4d05-8506-22a4ae8c7b9e"),title:"SYSTEM: Wifi Enabled",description:"Is WiFi enabled?",type:"bool",value:!0},deviceDisplayName:{id:a("76356a9a-fc46-11ec-9905-db53d6811cb7"),title:"SYSTEM: Device Display Name",description:"Current device display name",type:"string",value:""},workspaceName:{id:a("d857125e-0401-40f1-b768-56190aa8e147"),title:"SYSTEM: Workspace Name",description:"Current workspace name",type:"string",value:""},applicationInfo:{id:a("935d3322-84aa-4465-b1e7-241d1f024267"),title:"SYSTEM: Application Info",description:"Current application info",type:"object",value:{}},applicationName:{id:a("df395fd6-a754-4b60-8bac-1360933e6707"),title:"SYSTEM: Application Name",description:"Current application name",type:"string",value:""},deviceID:{id:a("8b5c2d9e-f0a1-4b2c-8d3e-4f5a6b7c8d9e"),title:"SYSTEM: Device ID",description:"Device ID of current device",type:"string",value:"unknown"},macAddress:{id:a("f01fcc78-0723-11ed-ac00-877339de1030"),title:"SYSTEM: MAC Address",description:"Network adapter MAC address of current device",type:"string",value:""},bindDeviceCode:{id:a("1ca90262-3584-11ed-8c9a-174949844872"),title:"SYSTEM: Bind Device Code",description:"The passcode to bind the device",type:"string",value:"",hide:!0},bindDeviceCodeExpire:{id:a("5b52d204-3584-11ed-bb5e-abb4d270daf1"),title:"SYSTEM: Bind Device Code Expire Time",description:"The expire time of bind passcode",type:"string",value:"",hide:!0},bindDeviceUrl:{id:a("833a7db2-3584-11ed-88dd-3b3d3ff58855"),title:"SYSTEM: Bind Device URL",description:"The URL to bind the device",type:"string",value:"",hide:!0},bindDeviceUseApplication:{id:a("631bbce8-9c90-4590-b8ec-8b27f4a0e50b"),title:"SYSTEM: Selected Application on Bind Device",description:"Current selected use application info on Bind Device",type:"object",value:null,hide:!0},isApplicationPreview:{id:a("c673967a-3996-11ed-96d9-efbc3f7eac53"),title:"SYSTEM: Is Preview Mode",description:"Is current in preview mode?",type:"bool",value:"",hide:!0},isSupportAuthInDevice:{id:a("beb2a666-3e18-11ed-bdab-6f0cb082fa67"),title:"SYSTEM: Is Support Auth In Device",description:"Is current device support auth in device?",type:"bool",value:"",hide:!0},env:{id:a("74e7a574-1099-4fe5-b193-8a9ea7d20ed0"),title:"SYSTEM: Environment Variables",description:"Environment Variables of the device",type:"object",value:{}},isViewDebugModeEnabled:{id:a("3f61c4f6-1e02-492e-8e4c-a8dc4a5bc101"),title:"SYSTEM: Is View Debug mode Enabled",description:"Is View Debug mode enabled?",type:"bool",value:!1},language:{id:a("f0ed0a03-6195-459f-9ffe-bca61923f94e"),title:"SYSTEM: Language",description:"Language of the device",type:"string",value:""},aiFilters:{id:a("3ffc1e98-8f65-4cc8-a949-3da8d2092ccb"),title:"SYSTEM: AI Filters",description:"AI filters configuration from the application",type:"array",value:[]},systemOpenAIApiKey:{id:a("a1b2c3d4-5e6f-7890-abcd-ef1234567890"),title:"SYSTEM: OpenAI API Key",description:"System OpenAI API Key (only available if application enabled)",type:"string",value:""},systemAnthropicApiKey:{id:a("b2c3d4e5-6f78-9012-bcde-f23456789012"),title:"SYSTEM: Anthropic API Key",description:"System Anthropic API Key (only available if application enabled)",type:"string",value:""},systemGeminiApiKey:{id:a("c3d4e5f6-7890-1234-cdef-345678901234"),title:"SYSTEM: Gemini API Key",description:"System Gemini API Key (only available if application enabled)",type:"string",value:""},ggmlBackendDevices:{id:a("9e8f7a6b-5c4d-3e2f-1a0b-9c8d7e6f5a4b"),title:"SYSTEM: GGML Backend Devices",description:"Available GGML backend devices with supported generators",type:"array",schema:{type:"object",allowNewItem:!1,allowCustomProperty:!1},value:[]}};t.idMap=Object.entries(i).reduce((e,[t,a])=>(e[t]=a.id,e),{}),Object.fromEntries(Object.entries(t.idMap).map(([e,t])=>[t,e])),t.MI=Object.entries(i).reduce((e,[t,a])=>{let{id:i,...r}=a;return e[t]=r,e},{}),Object.keys(t.MI)},18501(e,t,a){let{docs:i}=a(5867);t.isCommand=e=>!!(e&&e.type&&e.type.startsWith("command-node-")),t.getPorts=e=>e?Array.isArray(e)?e:[e]:[],t.getCommandCallbackFromPort=(e,a)=>{let r=e[a];if(!t.isCommand(r))return null;let n=i[r.type.replace("command-node-","")]?.commands?.[r.properties?.command];return n?.iterateeFrom||n?.invocationFrom||null},t.checkDisableTriggerCommand=(e,a)=>t.getPorts(e[a.id]?.in?.[a.port]).some(e=>e?.disable_trigger_command),t.findCircularReferenceIds=e=>{let a,i=(a=new Map,Object.keys(e).reduce((i,r)=>{let n=[];return Object.values(e[r]?.out||{}).forEach(i=>{t.getPorts(i).forEach(i=>{((e,a,i)=>{var r;return!!a&&!!e[a.id]&&!(a.port===(r=a.id,i.has(r)||i.set(r,t.getCommandCallbackFromPort(e,r)),i.get(r))||t.checkDisableTriggerCommand(e,a))})(e,i,a)&&n.push(i.id)})}),i[r]=n,i},{})),r=new Map;return Object.keys(e).filter(t=>e[t]?.type==="data-node").filter(e=>((e,t,a)=>{if(a.has(e))return a.get(e);let i=[{id:e,edgeIndex:0,reachesCycle:!1}],r=new Set([e]);for(;i.length>0;){let e=i[i.length-1],n=t[e.id]||[];if(e.reachesCycle||e.edgeIndex>=n.length){r.delete(e.id),a.set(e.id,e.reachesCycle),i.pop(),e.reachesCycle&&i.length>0&&(i[i.length-1].reachesCycle=!0);continue}let o=n[e.edgeIndex];if(e.edgeIndex+=1,a.has(o)){a.get(o)&&(e.reachesCycle=!0);continue}if(r.has(o)){e.reachesCycle=!0;continue}r.add(o),i.push({id:o,edgeIndex:0,reachesCycle:!1})}return a.get(e)||!1})(e,i,r))},t.hasCircularReference=e=>t.findCircularReferenceIds(e).length>0;let r=(e={})=>Object.entries(e).reduce((e,[t,a])=>(e[t]=Array.isArray(a)?a.slice():a,e),{}),n=new WeakSet,o=(e,t,a)=>{if(!a)return;let i=((e,t)=>{let a=e[t];if(!a)return e[t]=[],e[t];if(!Array.isArray(a))return e[t]=[a],e[t];if(!n.has(a)){let e=0;for(let t of a)t&&(a[e]=t,e+=1);a.length=e,n.add(a)}return a})(e,t);(Array.isArray(a)?a:[a]).forEach(e=>{e&&i.push(e)})};t.getCalcMap=e=>e?.script_map||e?.scriptMap||e?.map||{},t.composeMap=e=>Object.values(e).reduce((e,a)=>Object.entries(t.getCalcMap(a)).reduce((e,[a,i])=>{if(e[a]){if(t.isCommand(i))throw Error(`Doesn't allow same command id in another map, ${a}`);let r=e[a];Object.keys(i?.in||{}).forEach(e=>{o(r.in,e,i.in[e])}),Object.keys(i?.out||{}).forEach(e=>{o(r.out,e,i.out[e])})}else e[a]={...i,in:r(i?.in),out:r(i?.out)};return e},e),{})},86343(e,t,a){let{v4:i}=a(45620),r=a(95479),n=a(56005),{nameMap:o,brickMapping:s,generatorMapping:c}=a(63981);t.idByItem=(e={})=>e.canvas_id||e.subspace_id||e.brick_id||e.generator_id||e.property_bank_id||e.property_bank_calc_id||e.bank_id||e.scene_id,t.getAnimationType=e=>e.type||e.compose_type||e.composeType,t.cleanUpAnimationMap=e=>Object.entries(e).reduce((e,[t,a])=>((a.type||a.compose_type)&&(e[t]=a),e),{}),t.matchItemByItem=(e,t)=>{let a;if(!e)return!1;switch("string"==typeof t&&(a=t),e.type){case"brick":return e.brick_id===(a||t.brick_id);case"subspace":return e.subspace_id===(a||t.subspace_id);case"canvas":return e.canvas_id===(a||t.canvas_id);case"generator":return e.generator_id===(a||t.generator_id);case"property_bank":return e.property_bank_id===(a||t.property_bank_id);default:return!1}},t.makePasscode=()=>i(),t.kindOneOfTypes={string:["color","datetime","id","graphql","rich-text-content","sandbox-script","llm-prompt","media-resource-image","media-resource-video","media-resource-audio","media-resource-file","lottie-file-uri","rive-file-uri","ggml-model-asset","gguf-model-asset","mlx-model-asset","binary-asset","scene3d-objects"],number:["unit"],object:["tts-speaker-config"],"array-object":["llm-tools","llm-messages","mcp-server-resources","mcp-server-tools","mcp-server-prompts"]},t.getKindOneOfTypes=(e,a)=>"array"===e?"object"===a?t.kindOneOfTypes[`${e}-${a}`]:void 0:t.kindOneOfTypes[e],t.unitOneOfTypes=["grid","px","ms"],t.idOneOfTypes=["canvas","brick","generator","animation","property_bank"],t.typeToName={brick:"Brick",generator:"Generator",subspace:"Subspace",canvas:"Canvas",animation:"Animation",property_bank:"Data",property_bank_calc:"Calculation"},t.getBrickName=(e,a,i)=>{let n;if(!a)return e.toUpperCase();if(a.title)return a.title;switch(e){case"bank":n="BANK";break;case"subspace":n="SUBSPACE";break;case"canvas":n="CANVAS";break;case"animation":n=`<${r(t.getAnimationType(a))}>`;break;case"property_bank":n="<Data>";break;case"property_bank_calc":n="<Map>";break;case"state_group":n="<Switch Case>";break;default:n=`<${o[a.template_key||a.templateKey]||"Unknown"}>`}return i&&i.length>10?n+=` (${i.replace(/[A-Z_]+/g,"").substr(0,6)}...)`:i&&(n+=` (${i})`),n},t.getEventLabel=(e,{templateKey:t,itemType:a}={})=>{if(!e)return"";let i=e;return"subspace"===a?i=e.replace("SUBSPACE_ACTION_",""):t&&(i=e.replace(`${t}_`,"").replace("CANVAS_","")),r(n(r(i)))},t.getCallInternalActions=e=>{let t=s[e]||c[e];if(t)return t.callInternalActions},t.mapToList=(e,a)=>Object.entries(a).reduce((a,[i,r])=>(a.push({id:i,...r,title:t.getBrickName(e,r,i)}),a),[]);let d={subspaceMap:"subspace",brickMap:"brick",generatorMap:"generator",propertyBankMap:"property_bank",propertyAvailableToAdd:"property_bank",canvasMap:"canvas",animationMap:"animation"},l={};t.mapToListForDerivedState=(e,a,i,r)=>{let n=i[e]||l;return n!==r[e]?{[e]:n,[a]:t.mapToList(d[e],n)}:{}},t.arrayTypePrefix="array of ",t.propertyBankTypes=["string","number","bool","object","any",`${t.arrayTypePrefix}string`,`${t.arrayTypePrefix}number`,`${t.arrayTypePrefix}bool`,`${t.arrayTypePrefix}object`],t.animationRunTypes=["once","loop"],t.stopPropagationOnKeyBackspace=e=>{8===e.keyCode&&e.stopPropagation()},t.nestedTypes=["object","array","any"],t.isPropertyBankTypeNested=e=>t.nestedTypes.includes(e),t.propertyTypeToSchema=e=>{let a=e.indexOf(t.arrayTypePrefix)>-1,i=e.replace(t.arrayTypePrefix,"");return{type:i,properties:"object"===i?{}:void 0,allowNewItem:a,allowCustomProperty:"object"===i}}},33770(e,t,a){let{idMap:i}=a(66422),{forEachEventAction:r,getActionParam:n}=a(78078),o="PROPERTY_BANK_DATA_NODE_",s=new Set(Object.values(i||{}).filter(e=>"string"==typeof e&&e.startsWith(o)));e.exports=function(e){let t,a,i=[],c=(t=new Set(s),Object.values(e.subspace_map||{}).forEach(e=>{e&&"object"==typeof e&&Object.keys(e.property_bank_map||{}).forEach(e=>t.add(e))}),t),d=(a=new Set,Object.values(e.subspace_map||{}).forEach(e=>{e&&"object"==typeof e&&Object.keys(e.canvas_map||{}).forEach(e=>a.add(e))}),a);return r(e,(e,t)=>{if("PROPERTY_BANK_EXPRESSION"===e.action){let a;Array.isArray(a=n(e,"VARIABLES"))&&a.forEach((e,a)=>{let r=e?.id;if("string"!=typeof r||!r.startsWith(o)||c.has(r))return;let n=e.key?`\`${e.key}\``:`at index ${a}`;i.push({field:`${t}.VARIABLES[${a}].id`,message:`PROPERTY_BANK_EXPRESSION variable ${n} references data node \`${r}\`, which is not defined in any subspace.`})})}else"CHANGE_CANVAS"===e.action&&((e,t,a,i)=>{if("SYSTEM"!==e.handler)return;let r=n(e,"CANVAS_ID");"string"!=typeof r||!r||r.startsWith("PROPERTY_BANK#")||r.startsWith("VARIABLE#")||!r.startsWith("CANVAS_")||a.has(r)||i.push({field:`${t}.CANVAS_ID`,message:`CHANGE_CANVAS references canvas \`${r}\`, which is not defined in any subspace.`})})(e,t,d,i)}),i}},37517(e,t,a){let{composeMap:i,findCircularReferenceIds:r}=a(18501);e.exports=function(e){let t=[];return Object.entries(e.subspace_map||{}).forEach(([e,a])=>{if(a.module?.link)return;let n=a.property_bank_calc_map;if(!n||0===Object.keys(n).length)return;let o=`subspace_map.${e}.property_bank_calc_map`;try{let e=i(n),a=r(e);if(a.length>0){let i=a.slice(0,5).map(t=>e[t].title||t),r=a.length>5?` and ${a.length-5} more`:"";t.push({field:o,message:`Circular reference detected in data calculation. Affected nodes: ${i.join(", ")}${r}. Please check the data connections for loops.`})}}catch(e){t.push({field:o,message:e.message})}}),t}},41900(e){e.exports={expressionFoldAcornOptions:{ecmaVersion:2022,allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0},getUnfoldableStatementDescription:(e,t=null)=>{for(let t=0;t<e.length;t+=1){let a=e[t];if("ExpressionStatement"!==a.type){if("VariableDeclaration"===a.type){if(a.declarations.some(e=>"Identifier"!==e.id.type||!e.init))return"a variable declaration with destructuring or no initializer";continue}if(t!==e.length-1||"ReturnStatement"!==a.type)return`an unsupported ${a.type}`}}return t}}},78078(e,t,a){let{parse:i}=a(89236),{expressionFoldAcornOptions:r}=a(41900),n=(e,t)=>{let a=e.parameter_list||e.parameterList||[];if(!Array.isArray(a))return;let i=a.find(e=>(e?.input_to_receiver||e?.inputToReceiver)===t);return i?i.result_from_sender??i.resultFromSender:void 0},o=(e,t,a)=>{if(e&&"object"==typeof e){if(Array.isArray(e))return void e.forEach((e,i)=>o(e,`${t}[${i}]`,a));Object.entries(e).forEach(([e,i])=>{("event_map"===e||"eventMap"===e)&&i&&"object"==typeof i?Object.entries(i).forEach(([i,r])=>{Array.isArray(r)&&r.forEach((r,n)=>{r&&"object"==typeof r&&a(r,`${t}.${e}.${i}[${n}]`)})}):i&&"object"==typeof i&&o(i,`${t}.${e}`,a)})}},s=(e,t)=>{Object.entries(e.subspace_map||{}).forEach(([e,a])=>{!a||"object"!=typeof a||a.module?.link||o(a,`subspace_map.${e}`,t)})};e.exports=function(e){let t=[];return s(e,(e,a)=>{if("PROPERTY_BANK_EXPRESSION"!==e.action)return;let o=n(e,"EXPRESSION");if("string"!=typeof o||o.startsWith("PROPERTY_BANK#"))return;let s=(e=>{if(!e.trim())return"Expression is empty";try{i(e,r)}catch(e){return`Expression does not parse: ${e.message}`}return null})(o);s&&t.push({field:a,message:s})}),t},e.exports.forEachEventAction=s,e.exports.getActionParam=n},38890(e,t,a){let{getDocByTemplateKey:i}=a(63981),r=a(80211),n=a(45907),o=a(37517),s=a(78078),c=a(33770),{lintConfig:d,lintRuleCodes:l}=a(9098),{getBrickName:p}=a(86343);t.lintConfig=d,t.lintRuleCodes=l;let u=(e,t,a,i)=>({id:e,name:"Used Deprecated Feature",data:`The \`${p("brick",t,e)}\` brick in \`${p("subspace",a,i)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`});t.checkConfigDeprecatedFeatures=e=>{let t=[];return Object.entries(e.subspace_map||{}).forEach(([e,a])=>{Object.entries(a.brick_map||{}).forEach(([r,n])=>{(void 0!==n.property?.borderLeftWidth||void 0!==n.property?.borderRightWidth||void 0!==n.property?.borderTopWidth||void 0!==n.property?.borderBottomWidth)&&t.push({id:r,name:"Used Deprecated Feature",data:`In v2.16, we have been changed \`Border Width\` to \`Border Size\` (Unit \`px\` to \`grid\`). The \`${p("brick",n,r)}\` brick still used the border width. Please re-edit it to transfer to the new unit.`});let o=i(n.template_key);o?.brickMeta?.deprecated&&t.push(u(r,n,a,e))}),Object.entries(a.generator_map||{}).forEach(([r,n])=>{let o=i(n.template_key);o?.brickMeta?.deprecated&&t.push(u(r,n,a,e))})}),t},t.checkConfig=(e,t={})=>{let a={schema:r(e),ref:n(e,t),calc:t.checkCalc?o(e):[],expression:t.checkExpressions?s(e):[],actionRef:t.checkActionRefs?c(e):[]};return a.valid=0===a.schema.length&&0===a.ref.length&&0===a.calc.length&&0===a.expression.length&&0===a.actionRef.length,a.message=a.schema.concat(a.ref).concat(a.calc).concat(a.expression).concat(a.actionRef).map(({instancePath:e,field:t,message:a})=>{let i=e||t;return i?`${i}: ${a}`:a}).join("\n"),a}},27899(e){let t=["x","y","width","height"],a=e=>"string"==typeof e&&e.startsWith("PROPERTY_BANK_"),i=/PROPERTY_BANK#(PROPERTY_BANK_[A-Za-z0-9_-]+)/g,r=/(?:BRICK|ANIMATION|SUBSPACE)_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/g,n=(e,t=new Set)=>{if("string"==typeof e){let a;for(i.lastIndex=0;a=i.exec(e);)t.add(a[1])}else Array.isArray(e)?e.forEach(e=>n(e,t)):e&&"object"==typeof e&&(a(e.id)&&t.add(e.id),Object.values(e).forEach(e=>n(e,t)));return t},o=(e,t)=>{if("string"==typeof e){let a;for(r.lastIndex=0;a=r.exec(e);)t.add(a[0])}else Array.isArray(e)?e.forEach(e=>o(e,t)):e&&"object"==typeof e&&Object.values(e).forEach(e=>o(e,t));return t},s=(e,t)=>{Object.entries(e.subspace_map||{}).forEach(([e,a])=>{!a||"object"!=typeof a||a.module?.link||t(e,a)})},c=(e,t)=>{s(e,(e,a)=>{Object.entries(a.canvas_map||{}).forEach(([i,r])=>{let n=Array.isArray(r?.item_list)?r.item_list:[];t({subspaceId:e,subspace:a,canvasId:i,canvas:r,items:n})})})},d=[["brick_map","brick"],["generator_map","generator"],["property_bank_map","property_bank"],["canvas_map","canvas"]],l=(e,t,a)=>{d.forEach(([i,r])=>{Object.entries(t[i]||{}).forEach(([t,n])=>{Object.entries(n?.event_map||{}).forEach(([n,o])=>{Array.isArray(o)&&a({ownerType:r,ownerId:t,eventKey:n,list:o,path:`subspace_map.${e}.${i}.${t}.event_map.${n}`})})})})},p=(e,t)=>(e.parameter_list||[]).find(e=>e?.input_to_receiver===t)?.result_from_sender;e.exports={FRAME_KEYS:t,isBankNodeId:a,collectBankReads:n,forEachSubspace:s,forEachCanvas:c,forEachCanvasItem:(e,t)=>{c(e,e=>{e.items.forEach((a,i)=>{t({...e,item:a,index:i})})})},forEachEventList:l,getParamValue:p,hasParamValue:(e,t)=>{let a=p(e,t);return null!=a&&""!==a},collectDynamicallyReferencedIds:e=>{let t=new Set;return s(e,(e,a)=>{l(e,a,({list:e})=>{e.forEach(e=>o(e?.parameter_list,t))})}),o(e.automation_map,t),o(e.test_map,t),t},frameIsNumeric:e=>!!e&&t.every(t=>"number"==typeof e[t]),framesAlmostEqual:(e,a,i=.01)=>t.every(t=>Math.abs(e[t]-a[t])<=i),frameContains:(e,t,a=.01)=>e.x<=t.x+a&&e.y<=t.y+a&&e.x+e.width>=t.x+t.width-a&&e.y+e.height>=t.y+t.height-a,framesIntersect:(e,t)=>!(e.x+e.width<=t.x||t.x+t.width<=e.x||e.y+e.height<=t.y||t.y+t.height<=e.y),getItemId:e=>e?.brick_id||e?.subspace_id||null,itemHasAnimations:e=>!!e?.animations&&Object.keys(e.animations).length>0}},9098(e,t,a){let{collectDynamicallyReferencedIds:i}=a(27899),r=[a(98632),a(84223),a(92260),a(96810),a(60760),a(40566),a(31172),a(59707),a(39425)],n=r.map(e=>e.code),o=e=>Array.isArray(e)?e:"string"==typeof e&&e?e.split(",").map(e=>e.trim()).filter(Boolean):null;e.exports={lintConfig:(e,t={})=>{let a,s=o(t.only),c=o(t.ignore),d=[...s||[],...c||[]].filter(e=>!n.includes(e));if(d.length>0)throw Error(`Unknown lint rule code(s): ${d.join(", ")}. Valid codes: ${n.join(", ")}`);if(!e||"object"!=typeof e)return[];let l=r.filter(e=>(!s||s.includes(e.code))&&(!c||!c.includes(e.code)));if(0===l.length)return[];let p={configType:"module"===t.configType?"module":"app",gridStep:"number"==typeof t.gridStep&&t.gridStep>0?t.gridStep:.5,get dynamicRefIds(){return a||(a=i(e)),a}},u=[];return l.forEach(t=>{try{t.check(e,p,e=>u.push({severity:t.severity,code:t.code,path:"",subspaceId:null,itemId:null,hint:null,...e}))}catch(e){u.push({severity:"warning",code:t.code,path:"",subspaceId:null,itemId:null,message:`Lint rule crashed: ${e.message}`,hint:null})}}),u},lintRuleCodes:n}},98632(e,t,a){let{composeMap:i}=a(18501),{forEachSubspace:r,forEachEventList:n,collectBankReads:o,isBankNodeId:s,getParamValue:c}=a(27899),d=(e,t)=>t.map(t=>c(e,t)).filter(s),l={PROPERTY_BANK:{waitable:!0,targets:e=>(e.parameter_list||[]).map(e=>e?.input_to_receiver).filter(s)},PROPERTY_BANK_EXPRESSION:{waitable:!0,targets:e=>d(e,["RESULT","ERROR_RESULT"])},PROPERTY_BANK_COMMAND:{waitable:!0,targets:(e,t)=>((e,t)=>{let a=t();if(!a)return[];let i=[],r=new Set,n=(e.parameter_list||[]).map(e=>e?.input_to_receiver).filter(s);for(let e=0;e<n.length;e+=1){let t=n[e];if(r.has(t))continue;r.add(t);let o=a[t];o&&Object.values(o.out||{}).forEach(e=>{(e||[]).forEach(e=>{e?.id&&(e.id.includes("DATA_NODE")&&i.push(e.id),n.push(e.id))})})}return i})(e,t)},STORAGE_RETRIEVE:{waitable:!0,targets:e=>d(e,["STORAGE_RETRIEVE_RESULT"])},OPEN_FILE:{waitable:!0,targets:e=>d(e,["SAVE_PROPERTY","SAVE_DETAIL_PROPERTY","ERROR_SAVE_PROPERTY"])},SAVE_UPDATE_SNAPSHOT:{waitable:!0,targets:e=>d(e,["SNAPSHOT_SAVE_RESULT","SNAPSHOT_ERROR_RESULT"])},TRIGGER_APPLICATION_FILTER:{waitable:!0,targets:e=>d(e,["RESULT","ERROR_RESULT"])},TAKE_SCREENSHOT:{waitable:!1,targets:e=>d(e,["TAKE_SCREENSHOT_SAVE_PROPERTY"])}},p=/(^|_)RESULT$|_SAVE_PROPERTY$/;e.exports={code:"data-update-race",severity:"warning",description:"A data node is written without wait_async and read by a later action in the same event",check(e,t,a){r(e,(e,t)=>{let r,c=()=>{if(void 0===r)try{r=i(t.property_bank_calc_map||{})}catch{r=null}return r};n(e,t,({path:t,list:i})=>{let r=new Map;i.forEach((i,n)=>{if(!i||"object"!=typeof i)return;if("SYSTEM"===i.handler&&"DELAY"===i.action)return void r.clear();let d=new Set;(i.parameter_list||[]).forEach(e=>o(e?.result_from_sender,d)),d.forEach(o=>{let s=r.get(o);s&&(a({path:`${t}.${n}`,subspaceId:e,itemId:o,message:`\`${o}\` is written by action #${s.index} (${s.action}) without waiting, then read by action #${n} (${i.action}) — the read can still see the previous value.`,hint:s.waitable?`Set \`wait_async: true\` on action #${s.index} (${s.action}).`:`${s.action} ignores \`wait_async\` for its data write — insert a SYSTEM DELAY action between the two, or move the read into the data node's value-change event.`}),r.delete(o))});let u=((e,t)=>{if("SYSTEM"===e.handler){let a=l[e.action];if(!a)return null;let i=a.targets(e,t);return i.length>0?{targets:i,waitable:a.waitable}:null}let a=(e.parameter_list||[]).filter(e=>"string"==typeof e?.input_to_receiver&&p.test(e.input_to_receiver)&&s(e.result_from_sender)).map(e=>e.result_from_sender);return a.length>0?{targets:a,waitable:!0}:null})(i,c);if(!u)return;let f=!0===i.wait_async&&u.waitable;u.targets.forEach(e=>{f?r.delete(e):r.set(e,{index:n,action:i.action,waitable:u.waitable})})})})})}}},39425(e,t,a){let{forEachSubspace:i,forEachEventList:r,getParamValue:n}=a(27899),o=new Set(["Math","Date","Object","Array","Number","String","Boolean","JSON","RegExp","Intl","isNaN","isFinite","parseInt","parseFloat"]);e.exports={code:"expression-global-variable",severity:"error",description:"A PROPERTY_BANK_EXPRESSION variable is named after a JS global and is silently ignored at runtime",check(e,t,a){i(e,(e,t)=>{r(e,t,({path:t,list:i})=>{i.forEach((i,r)=>{if(i?.handler!=="SYSTEM"||"PROPERTY_BANK_EXPRESSION"!==i.action)return;let s=n(i,"VARIABLES");Array.isArray(s)&&s.forEach(i=>{let n=i?.key;"string"==typeof n&&o.has(n)&&a({path:`${t}.${r}`,subspaceId:e,itemId:null,message:`Expression variable "${n}" is named after the JS global \`${n}\` and is silently ignored — the global takes precedence in the expression scope, so the bound value is never used.`,hint:`Rename the variable (e.g. "${n}Value") so the expression reads the bound value.`})})})})})}}},40566(e,t,a){let{forEachSubspace:i,forEachEventList:r,hasParamValue:n}=a(27899),o=[{action:"STORAGE_RETRIEVE",severity:"error",isMissing:e=>!n(e,"STORAGE_RETRIEVE_RESULT"),message:"STORAGE_RETRIEVE requires a STORAGE_RETRIEVE_RESULT parameter — without it the action throws at runtime.",hint:"Add a STORAGE_RETRIEVE_RESULT parameter pointing at a data node."},{action:"TAKE_SCREENSHOT",severity:"warning",isMissing:e=>!n(e,"TAKE_SCREENSHOT_SAVE_PROPERTY"),message:"TAKE_SCREENSHOT without TAKE_SCREENSHOT_SAVE_PROPERTY is silently skipped at runtime.",hint:"Add a TAKE_SCREENSHOT_SAVE_PROPERTY parameter pointing at a data node."},{action:"OPEN_FILE",severity:"warning",isMissing:e=>!n(e,"SAVE_PROPERTY")&&!n(e,"SAVE_DETAIL_PROPERTY"),message:"OPEN_FILE has no SAVE_PROPERTY / SAVE_DETAIL_PROPERTY — the picked file is discarded.",hint:"Add SAVE_PROPERTY (file uri) or SAVE_DETAIL_PROPERTY (file detail) parameters."},{action:"OPEN_URL",severity:"warning",isMissing:e=>!n(e,"URL"),message:"OPEN_URL has no URL parameter — the action does nothing.",hint:"Add a URL parameter."}];e.exports={code:"missing-result-param",severity:"warning",description:"An action is missing the parameter that receives or drives its effect",check(e,t,a){i(e,(e,t)=>{r(e,t,({path:t,list:i})=>{i.forEach((i,r)=>{if(i?.handler!=="SYSTEM")return;let n=o.find(e=>e.action===i.action);n&&n.isMissing(i)&&a({path:`${t}.${r}`,subspaceId:e,itemId:null,severity:n.severity,message:n.message,hint:n.hint})})})})}}},92260(e,t,a){let{forEachCanvasItem:i,frameIsNumeric:r,getItemId:n,FRAME_KEYS:o}=a(27899),s=["width","height"];e.exports={code:"off-grid-frame",severity:"warning",description:"Frame values should be multiples of the 0.5 grid step",check(e,t,a){let c=t.gridStep;i(e,({subspaceId:e,canvasId:t,item:i,index:d})=>{let l=i?.frame;if(!r(l))return;let p=o.filter(e=>{let t=l[e];return(!s.includes(e)||!(t<=c))&&Math.abs(t-Math.round(t/c)*c)>.001});0!==p.length&&a({path:`subspace_map.${e}.canvas_map.${t}.item_list.${d}.frame`,subspaceId:e,itemId:n(i),message:`Frame ${p.map(e=>`${e}=${l[e]}`).join(", ")} ${1===p.length?"is":"are"} not aligned to the ${c} grid step.`,hint:`Round frame values to multiples of ${c}.`})})}}},96810(e,t,a){let{forEachCanvasItem:i,frameIsNumeric:r,getItemId:n,itemHasAnimations:o}=a(27899);e.exports={code:"out-of-bounds-frame",severity:"warning",description:"An element is fully outside the subspace layout or has a non-positive size",check(e,t,a){i(e,({subspaceId:i,subspace:s,canvasId:c,item:d,index:l})=>{let p=s.layout;if("number"!=typeof p?.width||"number"!=typeof p?.height||p.width<=0||p.height<=0)return;let u=d?.frame;if(!r(u)||!0===u.exceed_boundary||u.standby_frame||o(d))return;let f=n(d);if(f&&t.dynamicRefIds.has(f))return;let b=`subspace_map.${i}.canvas_map.${c}.item_list.${l}.frame`;if(u.width<=0||u.height<=0)return void a({path:b,subspaceId:i,itemId:f,message:`Frame has a non-positive size (width=${u.width}, height=${u.height}) — the element renders nothing.`,hint:"Give the element a positive size, or remove it if unused."});let h=i===e.root_subspace_id,m=u.x>=p.width||u.x+u.width<=0,y=u.y>=p.height||u.y+u.height<=0;(m||!h&&y)&&a({path:b,subspaceId:i,itemId:f,message:`Frame (x=${u.x}, y=${u.y}, width=${u.width}, height=${u.height}) is fully outside the ${p.width}\xd7${p.height} layout — nothing is visible.`,hint:"Move the element back into the layout, or set `exceed_boundary` if the placement is intentional."})})}}},84223(e,t,a){let{FRAME_KEYS:i,forEachCanvas:r,frameIsNumeric:n,framesAlmostEqual:o,framesIntersect:s,itemHasAnimations:c}=a(27899),d=new Set(["BRICK_TEXT","BRICK_RICH_TEXT"]),l=["linearGradientEnabled","blurEnabled"],p=e=>Object.values(e?.event_map||{}).some(e=>Array.isArray(e)&&e.length>0),u=/^backgroundColor$|^border/,f=(e,t)=>{if(e?.type!=="brick")return null;let a=t[e.brick_id];return d.has(a?.template_key)?a:null},b=e=>i.map(t=>Math.floor(e[t]/.01)),h=e=>e.join(":"),m=(e,t,a,i)=>{if(!n(t?.frame)||!f(t,a))return;let r=h(b(t.frame)),o=(e.get(r)||0)+i;o>0?e.set(r,o):e.delete(r)};e.exports={code:"redundant-rect-overlay",severity:"info",description:"A plain Rect behind a same-frame Text/RichText can be folded into the text brick",check(e,t,a){r(e,({subspaceId:e,subspace:i,canvasId:r,items:d})=>{let y,E=i.brick_map||{},_=(y=new Map,d.forEach(e=>m(y,e,E,1)),y);d.forEach((i,y)=>{if(m(_,i,E,-1),i?.type!=="brick"||!n(i.frame))return;let g=E[i.brick_id];if(g?.template_key!=="BRICK_RECT"||c(i)||t.dynamicRefIds.has(i.brick_id))return;let S={...g.property,...i.property};if(l.some(e=>S[e])||!((e,t)=>{let[a,i,r,n]=b(t);for(let t=-1;t<=1;t+=1)for(let o=-1;o<=1;o+=1)for(let s=-1;s<=1;s+=1)for(let c=-1;c<=1;c+=1)if(e.has(h([a+t,i+o,r+s,n+c])))return!0;return!1})(_,i.frame))return;let v=p(g);for(let t=y+1;t<d.length;t+=1){let c=d[t];if(!n(c?.frame))continue;let l=f(c,E);if(l&&o(i.frame,c.frame,.01)){let t={...l.property,...c.property};if(Object.keys(t).some(e=>u.test(e)&&void 0!==t[e])||v&&p(l))return;a({path:`subspace_map.${e}.canvas_map.${r}.item_list.${y}`,subspaceId:e,itemId:i.brick_id,message:`Rect \`${g.title||i.brick_id}\` has the same frame as the ${l.template_key} above it and only uses base styles`+(v?", behind its press handler.":"."),hint:v?"Make the Text brick pressable, move backgroundColor / border / radius and the press handler onto it, then remove the Rect.":"Set backgroundColor / border / radius directly on the text brick and remove the Rect."});return}if(s(i.frame,c.frame))return}})})}}},31172(e,t,a){let{autoGeneratedItemIdKind:i}=a(99470),{forEachSubspace:r}=a(27899),n="PROPERTY_BANK_",o=()=>({children:Object.create(null),ids:null}),s=(e,t)=>{let a=e;for(let e of t)a.children[e]||(a.children[e]=o()),a=a.children[e];a.ids||(a.ids=[]),a.ids.push(t)},c=(e,t,a,i)=>{let r=a.children[e[i]];if(r){r.ids&&r.ids.forEach(e=>{t.set(e,t.get(e)+1)});for(let a=i+1;a<e.length&&(r=r.children[e[a]]);a+=1)r.ids&&r.ids.forEach(e=>{t.set(e,t.get(e)+1)})}};e.exports={code:"unused-data-node",severity:"info",description:"A data node is defined but never referenced anywhere in the config",check(e,t,a){let d=JSON.stringify(e),l=[];r(e,(a,r)=>{("module"!==t.configType||a!==e.root_subspace_id)&&Object.entries(r.property_bank_map||{}).forEach(([e,t])=>{!(!t||"object"!=typeof t||t.kind===i||t.enable_remote_update||t.global_remote_update_prop||t.linkedFrom||t.alias||t.preload||r.routing?.[e]?.enabled_routing)&&(Object.values(t?.event_map||{}).some(e=>Array.isArray(e)&&e.length>0)||l.push({subspaceId:a,nodeId:e,node:t}))})});let p=((e,t)=>{let a=[...new Set(t)];if(0===a.length)return new Map;let i=new Map(a.map(e=>[e,0])),r=o(),d=o(),l=!1,p=!1;if(a.forEach(e=>{e.startsWith(n)?(s(r,e),l=!0):(s(d,e),p=!0)}),l){let t=e.indexOf(n);for(;-1!==t;)c(e,i,r,t),t=e.indexOf(n,t+1)}if(p)for(let t=0;t<e.length;t+=1)c(e,i,d,t);return i})(d,l.map(({nodeId:e})=>e));l.forEach(({subspaceId:e,nodeId:t,node:i})=>{(p.get(t)||0)>1||a({path:`subspace_map.${e}.property_bank_map.${t}`,subspaceId:e,itemId:t,message:`Data node \`${i.title||t}\` is never referenced in the config.`,hint:"Remove it, or keep it if external tooling depends on it."})})}}},60760(e,t,a){let{forEachSubspace:i,forEachEventList:r}=a(27899),n=new Set(["MESSAGE","ALERT","POPUP_RESET","TAKE_SCREENSHOT","THROW_EXCEPTION","RESTART_FOUNDATION","DYNAMIC_BRICK","DYNAMIC_BRICK_RESET","DYNAMIC_ANIMATION","DYNAMIC_ANIMATION_RESET","DYNAMIC_ANIMATION_STOP","CHANNEL_SUBSCRIBE","CHANNEL_UNSUBSCRIBE","CHANNEL_PUBLISH","DISMISS_KEYBOARD","STORAGE_SET","STORAGE_DELETE","DELAY","USE_SHARE_APPLICATION","AUTH_IN_DEVICE","REFRESH_BINDCODE","STOP_APPLICATION_FILTER"]);e.exports={code:"wait-async-no-op",severity:"info",description:"wait_async is set on an action that ignores it",check(e,t,a){i(e,(e,t)=>{r(e,t,({path:t,list:i})=>{i.forEach((i,r)=>{i?.handler!=="SYSTEM"||!0!==i.wait_async||n.has(i.action)&&a({path:`${t}.${r}`,subspaceId:e,itemId:null,message:"DELAY"===i.action?"DELAY always waits for its timeout — `wait_async: true` is redundant.":`\`wait_async: true\` has no effect on ${i.action}; the action does not block the chain.`,hint:"DELAY"===i.action?"Remove the redundant flag.":"Remove the flag, or restructure if you relied on it for sequencing."})})})})}}},59707(e,t,a){let{forEachCanvas:i,frameIsNumeric:r,frameContains:n,itemHasAnimations:o}=a(27899);e.exports={code:"z-order-cover",severity:"info",description:"A later opaque element fully covers an earlier pressable element",check(e,t,a){i(e,({subspaceId:e,subspace:i,canvasId:s,items:c})=>{let d=i.brick_map||{},l=[];if(c.forEach((e,t)=>{if(e?.type!=="brick"||!r(e.frame))return;let a=d[e.brick_id];a&&Object.entries(a?.event_map||{}).some(([e,t])=>e.includes("_ON_PRESS")&&Array.isArray(t)&&t.length>0)&&l.push({item:e,index:t,brick:a})}),0===l.length)return;let p=t.dynamicRefIds,u=c.map((e,t)=>((e,t,a,i)=>{let n;if(e?.type!=="brick"||!r(e.frame)||o(e)||i.has(e.brick_id))return null;let s=a[e.brick_id],c={...s?.property,...e.property};return"string"==typeof(n=c.backgroundColor)&&(/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*1(?:\.0+)?\s*\)$/.test(n)||/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(n)||/^#[0-9a-fA-F]{6}$/.test(n))&&(void 0===c.opacity||1===c.opacity)?{index:t,item:e,brick:s,frame:e.frame}:null})(e,t,d,p)).filter(Boolean),f=(e=>{let t=Array(e.length),a=1/0,i=1/0,r=-1/0,n=-1/0,o=-1/0,s=-1/0;for(let c=e.length-1;c>=0;c-=1){let{frame:d}=e[c];a=Math.min(a,d.x),i=Math.min(i,d.y),r=Math.max(r,d.x+d.width),n=Math.max(n,d.y+d.height),o=Math.max(o,d.width),s=Math.max(s,d.height),t[c]={minX:a,minY:i,maxRight:r,maxBottom:n,maxWidth:o,maxHeight:s}}return t})(u),b=0;l.forEach(({item:t,index:i,brick:r})=>{let c,d;if(!(o(t)||p.has(t.brick_id))){for(;b<u.length&&u[b].index<=i;)b+=1;if(c=f[b],d=t.frame,c&&c.minX<=d.x+.01&&c.minY<=d.y+.01&&c.maxRight>=d.x+d.width-.01&&c.maxBottom>=d.y+d.height-.01&&c.maxWidth>=d.width-.02&&c.maxHeight>=d.height-.02)for(let o=b;o<u.length;o+=1){let c=u[o];if(n(c.frame,t.frame))return void a({path:`subspace_map.${e}.canvas_map.${s}.item_list.${i}`,subspaceId:e,itemId:t.brick_id,message:`Pressable \`${r.title||t.brick_id}\` is fully covered by the opaque \`${c.brick?.title||c.item.brick_id}\` later in the item list — it is invisible and untappable.`,hint:"Reorder the items, shrink the covering element, or remove the hidden one."})}}})})}}}};
|
|
1
|
+
export const __rspack_esm_id=7511;export const __rspack_esm_ids=[7511];export const __webpack_modules__={66422(e,t){let i=e=>`PROPERTY_BANK_DATA_NODE_${e}`,a={isLocalSyncMainDevice:{id:i("325068e3-89b6-4c6a-942b-126d38c84a62"),title:"SYSTEM: Is Local Sync Main Device",description:"The current device is main for local sync",type:"bool",value:!0},currentCanvasId:{id:i("2dfeb635-deb4-481a-9d17-ea7b1fe19f74"),title:"SYSTEM: Current Canvas ID",description:"ID for known current canvas",type:"string",value:""},previousCanvasId:{id:i("2971e463-0b0e-45b7-bbfb-a01d8fd49db3"),title:"SYSTEM: Previous Canvas ID",description:"ID for known previous canvas",type:"string",value:""},canvasIdHistory:{id:i("1a086f39-817d-40ed-92f0-5a999535d3dd"),title:"SYSTEM: Change Canvas History",description:"Change Canvas ID History (Limit: 10)",type:"array",schema:{type:"string",allowNewItem:!1,allowCustomProperty:!1},value:[]},rootSubspaceInfo:{id:i("c0817f4a-1ff3-40ed-9cbf-71d8cefd2cd9"),title:"SYSTEM: Root Subspace Info",description:"Root Subspace Information",type:"object",value:{}},subspaceInfo:{id:i("2657ec09-7323-46c3-a96e-3d8b5a0f79b3"),title:"SYSTEM: Current Subspace Info",description:"Current Subspace Information",type:"object",value:{}},uniqueID:{id:i("6f4a543f-a88a-4a83-bf53-223259263be3"),title:"SYSTEM: Unique ID",description:"Unique ID of current device",type:"string",value:"unknown"},appVersion:{id:i("d614a258-2a45-4f91-9f6b-3936038cb2b1"),title:"SYSTEM: App Version",description:"App Version of current installed BRICKS Foundation app",type:"string",value:"unknown"},lastUpdateTime:{id:i("956f3b3e-cb0b-47ca-8119-65663910d110"),title:"SYSTEM: Last Update Time",description:"Last update time of current installed BRICKS Foundation app",type:"string",value:"2019-07-09T03:32:27.058Z"},deviceName:{id:i("7b9d9ad4-e9a2-47cd-91d3-b64187895c16"),title:"SYSTEM: Device Name",description:"Name of current device",type:"string",value:"Default Device Name"},deviceType:{id:i("b0beae12-e45e-4870-ae15-858eeac566fa"),title:"SYSTEM: Device Type",description:"Type of current device (Handset, Tv, Tablet)",type:"string",value:"Tv"},operationMode:{id:i("2e715d3b-92bf-4761-b5c0-ca21f7c1ada8"),title:"SYSTEM: Operation Mode",description:"Operation Mode of current device (android, ios, ...)",type:"string",value:"android"},operationVersion:{id:i("fa886963-0a16-4b5f-b4ea-6c25b049db03"),title:"SYSTEM: Operation Version",description:"Operation Version of current device",type:"string",value:""},screenWidth:{id:i("2942470a-c3bc-413e-8f2c-30a89aded3f8"),title:"SYSTEM: Screen Width",description:"Width of current device main screen",type:"number",value:1280},screenHeight:{id:i("4f031e27-f67b-40e0-a317-9f6c5215d97d"),title:"SYSTEM: Screen Height",description:"Height of current device main screen",type:"number",value:768},screenScale:{id:i("c3c9b7aa-1dc1-4be1-8a4a-d9e299b9eeaa"),title:"SYSTEM: Screen Scale",description:"Scale of current device main screen",type:"number",value:2},screenFontScale:{id:i("0312f380-d525-4938-82d2-5b35ef8ef1e8"),title:"SYSTEM: Screen Font Scale",description:"Font scale of current device main screen",type:"number",value:1},orientation:{id:i("4f584f51-a250-4f97-a2f8-d5e6a3affb4f"),title:"SYSTEM: Orientation",description:"Orientation of current device main screen",type:"string",value:"landspace"},touchAvailable:{id:i("1fe7555f-df41-43ce-a268-3ea1b5efda6d"),title:"SYSTEM: Touch Available",description:"Is touch available of current device main screen?",type:"bool",value:!0},soundAvailable:{id:i("bf839498-f7d6-4212-ac3a-b409e3ad77a5"),title:"SYSTEM: Sound Available",description:"Is sound available of current device?",type:"bool",value:!0},cameraAvailable:{id:i("4878f3c2-8bb8-4c94-855c-06bda5a287d5"),title:"SYSTEM: Camera Available",description:"Is camera available of current device?",type:"bool",value:!0},audioInputAvailable:{id:i("4854b259-96c1-40d7-b17b-47156b4698dc"),title:"SYSTEM: Audio Input Available",description:"Is audio input available of current device?",type:"bool",value:!1},networkType:{id:i("1cbb1756-e53c-45a9-be23-5d84a214e144"),title:"SYSTEM: Network Type",description:"Network Type of current device",type:"string",value:"wifi"},networkConnected:{id:i("687b62fe-ead5-417a-b415-9bd5233784a4"),title:"SYSTEM: Network Connected",description:"Is Network connected of current device?",type:"bool",value:!0},networkIpAddress:{id:i("41971ba7-8294-4aa6-a425-ecd39853c3e6"),title:"SYSTEM: Network IP Address",description:"Current network IP address",type:"string",value:""},networkDetails:{id:i("9351fbfc-4ace-477a-b05d-41ac9b05087d"),title:"SYSTEM: Network Details",description:"Network details, provide different data depends on Network Type",type:"object",value:null},isInternetReachable:{id:i("e367ae7e-46ec-46d0-b87d-51e544591ff9"),title:"SYSTEM: Internet Reachable",description:"Is Internet reachable?",type:"bool",value:!0},isWifiEnabled:{id:i("be395305-fb85-4d05-8506-22a4ae8c7b9e"),title:"SYSTEM: Wifi Enabled",description:"Is WiFi enabled?",type:"bool",value:!0},deviceDisplayName:{id:i("76356a9a-fc46-11ec-9905-db53d6811cb7"),title:"SYSTEM: Device Display Name",description:"Current device display name",type:"string",value:""},workspaceName:{id:i("d857125e-0401-40f1-b768-56190aa8e147"),title:"SYSTEM: Workspace Name",description:"Current workspace name",type:"string",value:""},applicationInfo:{id:i("935d3322-84aa-4465-b1e7-241d1f024267"),title:"SYSTEM: Application Info",description:"Current application info",type:"object",value:{}},applicationName:{id:i("df395fd6-a754-4b60-8bac-1360933e6707"),title:"SYSTEM: Application Name",description:"Current application name",type:"string",value:""},deviceID:{id:i("8b5c2d9e-f0a1-4b2c-8d3e-4f5a6b7c8d9e"),title:"SYSTEM: Device ID",description:"Device ID of current device",type:"string",value:"unknown"},macAddress:{id:i("f01fcc78-0723-11ed-ac00-877339de1030"),title:"SYSTEM: MAC Address",description:"Network adapter MAC address of current device",type:"string",value:""},bindDeviceCode:{id:i("1ca90262-3584-11ed-8c9a-174949844872"),title:"SYSTEM: Bind Device Code",description:"The passcode to bind the device",type:"string",value:"",hide:!0},bindDeviceCodeExpire:{id:i("5b52d204-3584-11ed-bb5e-abb4d270daf1"),title:"SYSTEM: Bind Device Code Expire Time",description:"The expire time of bind passcode",type:"string",value:"",hide:!0},bindDeviceUrl:{id:i("833a7db2-3584-11ed-88dd-3b3d3ff58855"),title:"SYSTEM: Bind Device URL",description:"The URL to bind the device",type:"string",value:"",hide:!0},bindDeviceUseApplication:{id:i("631bbce8-9c90-4590-b8ec-8b27f4a0e50b"),title:"SYSTEM: Selected Application on Bind Device",description:"Current selected use application info on Bind Device",type:"object",value:null,hide:!0},isApplicationPreview:{id:i("c673967a-3996-11ed-96d9-efbc3f7eac53"),title:"SYSTEM: Is Preview Mode",description:"Is current in preview mode?",type:"bool",value:"",hide:!0},isSupportAuthInDevice:{id:i("beb2a666-3e18-11ed-bdab-6f0cb082fa67"),title:"SYSTEM: Is Support Auth In Device",description:"Is current device support auth in device?",type:"bool",value:"",hide:!0},env:{id:i("74e7a574-1099-4fe5-b193-8a9ea7d20ed0"),title:"SYSTEM: Environment Variables",description:"Environment Variables of the device",type:"object",value:{}},isViewDebugModeEnabled:{id:i("3f61c4f6-1e02-492e-8e4c-a8dc4a5bc101"),title:"SYSTEM: Is View Debug mode Enabled",description:"Is View Debug mode enabled?",type:"bool",value:!1},language:{id:i("f0ed0a03-6195-459f-9ffe-bca61923f94e"),title:"SYSTEM: Language",description:"Language of the device",type:"string",value:""},aiFilters:{id:i("3ffc1e98-8f65-4cc8-a949-3da8d2092ccb"),title:"SYSTEM: AI Filters",description:"AI filters configuration from the application",type:"array",value:[]},systemOpenAIApiKey:{id:i("a1b2c3d4-5e6f-7890-abcd-ef1234567890"),title:"SYSTEM: OpenAI API Key",description:"System OpenAI API Key (only available if application enabled)",type:"string",value:""},systemAnthropicApiKey:{id:i("b2c3d4e5-6f78-9012-bcde-f23456789012"),title:"SYSTEM: Anthropic API Key",description:"System Anthropic API Key (only available if application enabled)",type:"string",value:""},systemGeminiApiKey:{id:i("c3d4e5f6-7890-1234-cdef-345678901234"),title:"SYSTEM: Gemini API Key",description:"System Gemini API Key (only available if application enabled)",type:"string",value:""},ggmlBackendDevices:{id:i("9e8f7a6b-5c4d-3e2f-1a0b-9c8d7e6f5a4b"),title:"SYSTEM: GGML Backend Devices",description:"Available GGML backend devices with supported generators",type:"array",schema:{type:"object",allowNewItem:!1,allowCustomProperty:!1},value:[]}};t.idMap=Object.entries(a).reduce((e,[t,i])=>(e[t]=i.id,e),{}),Object.fromEntries(Object.entries(t.idMap).map(([e,t])=>[t,e])),t.MI=Object.entries(a).reduce((e,[t,i])=>{let{id:a,...r}=i;return e[t]=r,e},{}),Object.keys(t.MI)},18501(e,t,i){let{docs:a}=i(5867);t.isCommand=e=>!!(e&&e.type&&e.type.startsWith("command-node-")),t.getPorts=e=>e?Array.isArray(e)?e:[e]:[],t.getCommandCallbackFromPort=(e,i)=>{let r=e[i];if(!t.isCommand(r))return null;let n=a[r.type.replace("command-node-","")]?.commands?.[r.properties?.command];return n?.iterateeFrom||n?.invocationFrom||null},t.checkDisableTriggerCommand=(e,i)=>t.getPorts(e[i.id]?.in?.[i.port]).some(e=>e?.disable_trigger_command),t.findCircularReferenceIds=e=>{let i,a=(i=new Map,Object.keys(e).reduce((a,r)=>{let n=[];return Object.values(e[r]?.out||{}).forEach(a=>{t.getPorts(a).forEach(a=>{((e,i,a)=>{var r;return!!i&&!!e[i.id]&&!(i.port===(r=i.id,a.has(r)||a.set(r,t.getCommandCallbackFromPort(e,r)),a.get(r))||t.checkDisableTriggerCommand(e,i))})(e,a,i)&&n.push(a.id)})}),a[r]=n,a},{})),r=new Map;return Object.keys(e).filter(t=>e[t]?.type==="data-node").filter(e=>((e,t,i)=>{if(i.has(e))return i.get(e);let a=[{id:e,edgeIndex:0,reachesCycle:!1}],r=new Set([e]);for(;a.length>0;){let e=a[a.length-1],n=t[e.id]||[];if(e.reachesCycle||e.edgeIndex>=n.length){r.delete(e.id),i.set(e.id,e.reachesCycle),a.pop(),e.reachesCycle&&a.length>0&&(a[a.length-1].reachesCycle=!0);continue}let o=n[e.edgeIndex];if(e.edgeIndex+=1,i.has(o)){i.get(o)&&(e.reachesCycle=!0);continue}if(r.has(o)){e.reachesCycle=!0;continue}r.add(o),a.push({id:o,edgeIndex:0,reachesCycle:!1})}return i.get(e)||!1})(e,a,r))},t.hasCircularReference=e=>t.findCircularReferenceIds(e).length>0;let r=(e={})=>Object.entries(e).reduce((e,[t,i])=>(e[t]=Array.isArray(i)?i.slice():i,e),{}),n=new WeakSet,o=(e,t,i)=>{if(!i)return;let a=((e,t)=>{let i=e[t];if(!i)return e[t]=[],e[t];if(!Array.isArray(i))return e[t]=[i],e[t];if(!n.has(i)){let e=0;for(let t of i)t&&(i[e]=t,e+=1);i.length=e,n.add(i)}return i})(e,t);(Array.isArray(i)?i:[i]).forEach(e=>{e&&a.push(e)})};t.getCalcMap=e=>e?.script_map||e?.scriptMap||e?.map||{},t.composeMap=e=>Object.values(e).reduce((e,i)=>Object.entries(t.getCalcMap(i)).reduce((e,[i,a])=>{if(e[i]){if(t.isCommand(a))throw Error(`Doesn't allow same command id in another map, ${i}`);let r=e[i];Object.keys(a?.in||{}).forEach(e=>{o(r.in,e,a.in[e])}),Object.keys(a?.out||{}).forEach(e=>{o(r.out,e,a.out[e])})}else e[i]={...a,in:r(a?.in),out:r(a?.out)};return e},e),{})},86343(e,t,i){let{v4:a}=i(45620),r=i(95479),n=i(56005),{nameMap:o,brickMapping:s,generatorMapping:c}=i(63981);t.idByItem=(e={})=>e.canvas_id||e.subspace_id||e.brick_id||e.generator_id||e.property_bank_id||e.property_bank_calc_id||e.bank_id||e.scene_id,t.getAnimationType=e=>e.type||e.compose_type||e.composeType,t.cleanUpAnimationMap=e=>Object.entries(e).reduce((e,[t,i])=>((i.type||i.compose_type)&&(e[t]=i),e),{}),t.matchItemByItem=(e,t)=>{let i;if(!e)return!1;switch("string"==typeof t&&(i=t),e.type){case"brick":return e.brick_id===(i||t.brick_id);case"subspace":return e.subspace_id===(i||t.subspace_id);case"canvas":return e.canvas_id===(i||t.canvas_id);case"generator":return e.generator_id===(i||t.generator_id);case"property_bank":return e.property_bank_id===(i||t.property_bank_id);default:return!1}},t.makePasscode=()=>a(),t.kindOneOfTypes={string:["color","datetime","id","graphql","rich-text-content","sandbox-script","llm-prompt","media-resource-image","media-resource-video","media-resource-audio","media-resource-file","lottie-file-uri","rive-file-uri","ggml-model-asset","gguf-model-asset","mlx-model-asset","binary-asset","scene3d-objects"],number:["unit"],object:["tts-speaker-config"],"array-object":["llm-tools","llm-messages","mcp-server-resources","mcp-server-tools","mcp-server-prompts"]},t.getKindOneOfTypes=(e,i)=>"array"===e?"object"===i?t.kindOneOfTypes[`${e}-${i}`]:void 0:t.kindOneOfTypes[e],t.unitOneOfTypes=["grid","px","ms"],t.idOneOfTypes=["canvas","brick","generator","animation","property_bank"],t.typeToName={brick:"Brick",generator:"Generator",subspace:"Subspace",canvas:"Canvas",animation:"Animation",property_bank:"Data",property_bank_calc:"Calculation"},t.getBrickName=(e,i,a)=>{let n;if(!i)return e.toUpperCase();if(i.title)return i.title;switch(e){case"bank":n="BANK";break;case"subspace":n="SUBSPACE";break;case"canvas":n="CANVAS";break;case"animation":n=`<${r(t.getAnimationType(i))}>`;break;case"property_bank":n="<Data>";break;case"property_bank_calc":n="<Map>";break;case"state_group":n="<Switch Case>";break;default:n=`<${o[i.template_key||i.templateKey]||"Unknown"}>`}return a&&a.length>10?n+=` (${a.replace(/[A-Z_]+/g,"").substr(0,6)}...)`:a&&(n+=` (${a})`),n},t.getEventLabel=(e,{templateKey:t,itemType:i}={})=>{if(!e)return"";let a=e;return"subspace"===i?a=e.replace("SUBSPACE_ACTION_",""):t&&(a=e.replace(`${t}_`,"").replace("CANVAS_","")),r(n(r(a)))},t.getCallInternalActions=e=>{let t=s[e]||c[e];if(t)return t.callInternalActions},t.mapToList=(e,i)=>Object.entries(i).reduce((i,[a,r])=>(i.push({id:a,...r,title:t.getBrickName(e,r,a)}),i),[]);let d={subspaceMap:"subspace",brickMap:"brick",generatorMap:"generator",propertyBankMap:"property_bank",propertyAvailableToAdd:"property_bank",canvasMap:"canvas",animationMap:"animation"},l={};t.mapToListForDerivedState=(e,i,a,r)=>{let n=a[e]||l;return n!==r[e]?{[e]:n,[i]:t.mapToList(d[e],n)}:{}},t.arrayTypePrefix="array of ",t.propertyBankTypes=["string","number","bool","object","any",`${t.arrayTypePrefix}string`,`${t.arrayTypePrefix}number`,`${t.arrayTypePrefix}bool`,`${t.arrayTypePrefix}object`],t.animationRunTypes=["once","loop"],t.stopPropagationOnKeyBackspace=e=>{8===e.keyCode&&e.stopPropagation()},t.nestedTypes=["object","array","any"],t.isPropertyBankTypeNested=e=>t.nestedTypes.includes(e),t.propertyTypeToSchema=e=>{let i=e.indexOf(t.arrayTypePrefix)>-1,a=e.replace(t.arrayTypePrefix,"");return{type:a,properties:"object"===a?{}:void 0,allowNewItem:i,allowCustomProperty:"object"===a}}},33770(e,t,i){let{idMap:a}=i(66422),{forEachEventAction:r,getActionParam:n}=i(78078),o="PROPERTY_BANK_DATA_NODE_",s=new Set(Object.values(a||{}).filter(e=>"string"==typeof e&&e.startsWith(o)));e.exports=function(e){let t,i,a=[],c=(t=new Set(s),Object.values(e.subspace_map||{}).forEach(e=>{e&&"object"==typeof e&&Object.keys(e.property_bank_map||{}).forEach(e=>t.add(e))}),t),d=(i=new Set,Object.values(e.subspace_map||{}).forEach(e=>{e&&"object"==typeof e&&Object.keys(e.canvas_map||{}).forEach(e=>i.add(e))}),i);return r(e,(e,t)=>{if("PROPERTY_BANK_EXPRESSION"===e.action){let i;Array.isArray(i=n(e,"VARIABLES"))&&i.forEach((e,i)=>{let r=e?.id;if("string"!=typeof r||!r.startsWith(o)||c.has(r))return;let n=e.key?`\`${e.key}\``:`at index ${i}`;a.push({field:`${t}.VARIABLES[${i}].id`,message:`PROPERTY_BANK_EXPRESSION variable ${n} references data node \`${r}\`, which is not defined in any subspace.`})})}else"CHANGE_CANVAS"===e.action&&((e,t,i,a)=>{if("SYSTEM"!==e.handler)return;let r=n(e,"CANVAS_ID");"string"!=typeof r||!r||r.startsWith("PROPERTY_BANK#")||r.startsWith("VARIABLE#")||!r.startsWith("CANVAS_")||i.has(r)||a.push({field:`${t}.CANVAS_ID`,message:`CHANGE_CANVAS references canvas \`${r}\`, which is not defined in any subspace.`})})(e,t,d,a)}),a}},37517(e,t,i){let{composeMap:a,findCircularReferenceIds:r}=i(18501);e.exports=function(e){let t=[];return Object.entries(e.subspace_map||{}).forEach(([e,i])=>{if(i.module?.link)return;let n=i.property_bank_calc_map;if(!n||0===Object.keys(n).length)return;let o=`subspace_map.${e}.property_bank_calc_map`;try{let e=a(n),i=r(e);if(i.length>0){let a=i.slice(0,5).map(t=>e[t].title||t),r=i.length>5?` and ${i.length-5} more`:"";t.push({field:o,message:`Circular reference detected in data calculation. Affected nodes: ${a.join(", ")}${r}. Please check the data connections for loops.`})}}catch(e){t.push({field:o,message:e.message})}}),t}},41900(e){e.exports={expressionFoldAcornOptions:{ecmaVersion:2022,allowReturnOutsideFunction:!0,allowAwaitOutsideFunction:!0},getUnfoldableStatementDescription:(e,t=null)=>{for(let t=0;t<e.length;t+=1){let i=e[t];if("ExpressionStatement"===i.type){let{expression:e}=i;if("AssignmentExpression"===e.type&&"Identifier"!==e.left.type)return"an assignment to a member or computed target";continue}if("VariableDeclaration"===i.type){if(i.declarations.some(e=>"Identifier"!==e.id.type||!e.init))return"a variable declaration with destructuring or no initializer";continue}if(t!==e.length-1||"ReturnStatement"!==i.type)return`an unsupported ${i.type}`}return t}}},78078(e,t,i){let{parse:a}=i(89236),{expressionFoldAcornOptions:r}=i(41900),n=(e,t)=>{let i=e.parameter_list||e.parameterList||[];if(!Array.isArray(i))return;let a=i.find(e=>(e?.input_to_receiver||e?.inputToReceiver)===t);return a?a.result_from_sender??a.resultFromSender:void 0},o=(e,t,i)=>{if(e&&"object"==typeof e){if(Array.isArray(e))return void e.forEach((e,a)=>o(e,`${t}[${a}]`,i));Object.entries(e).forEach(([e,a])=>{("event_map"===e||"eventMap"===e)&&a&&"object"==typeof a?Object.entries(a).forEach(([a,r])=>{Array.isArray(r)&&r.forEach((r,n)=>{r&&"object"==typeof r&&i(r,`${t}.${e}.${a}[${n}]`)})}):a&&"object"==typeof a&&o(a,`${t}.${e}`,i)})}},s=(e,t)=>{Object.entries(e.subspace_map||{}).forEach(([e,i])=>{!i||"object"!=typeof i||i.module?.link||o(i,`subspace_map.${e}`,t)})};e.exports=function(e){let t=[];return s(e,(e,i)=>{if("PROPERTY_BANK_EXPRESSION"!==e.action)return;let o=n(e,"EXPRESSION");if("string"!=typeof o||o.startsWith("PROPERTY_BANK#"))return;let s=(e=>{if(!e.trim())return"Expression is empty";try{a(e,r)}catch(e){return`Expression does not parse: ${e.message}`}return null})(o);s&&t.push({field:i,message:s})}),t},e.exports.forEachEventAction=s,e.exports.getActionParam=n},38890(e,t,i){let{getDocByTemplateKey:a}=i(63981),r=i(80211),n=i(45907),o=i(37517),s=i(78078),c=i(33770),{lintConfig:d,lintRuleCodes:l}=i(9098),{getBrickName:p}=i(86343);t.lintConfig=d,t.lintRuleCodes=l;let u=(e,t,i,a)=>({id:e,name:"Used Deprecated Feature",data:`The \`${p("brick",t,e)}\` brick in \`${p("subspace",i,a)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`});t.checkConfigDeprecatedFeatures=e=>{let t=[];return Object.entries(e.subspace_map||{}).forEach(([e,i])=>{Object.entries(i.brick_map||{}).forEach(([r,n])=>{(void 0!==n.property?.borderLeftWidth||void 0!==n.property?.borderRightWidth||void 0!==n.property?.borderTopWidth||void 0!==n.property?.borderBottomWidth)&&t.push({id:r,name:"Used Deprecated Feature",data:`In v2.16, we have been changed \`Border Width\` to \`Border Size\` (Unit \`px\` to \`grid\`). The \`${p("brick",n,r)}\` brick still used the border width. Please re-edit it to transfer to the new unit.`});let o=a(n.template_key);o?.brickMeta?.deprecated&&t.push(u(r,n,i,e))}),Object.entries(i.generator_map||{}).forEach(([r,n])=>{let o=a(n.template_key);o?.brickMeta?.deprecated&&t.push(u(r,n,i,e))})}),t},t.checkConfig=(e,t={})=>{let i={schema:r(e),ref:n(e,t),calc:t.checkCalc?o(e):[],expression:t.checkExpressions?s(e):[],actionRef:t.checkActionRefs?c(e):[]};return i.valid=0===i.schema.length&&0===i.ref.length&&0===i.calc.length&&0===i.expression.length&&0===i.actionRef.length,i.message=i.schema.concat(i.ref).concat(i.calc).concat(i.expression).concat(i.actionRef).map(({instancePath:e,field:t,message:i})=>{let a=e||t;return a?`${a}: ${i}`:i}).join("\n"),i}},27899(e){let t=["x","y","width","height"],i=e=>"string"==typeof e&&e.startsWith("PROPERTY_BANK_"),a=/PROPERTY_BANK#(PROPERTY_BANK_[A-Za-z0-9_-]+)/g,r=/(?:BRICK|ANIMATION|SUBSPACE)_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/g,n=(e,t=new Set)=>{if("string"==typeof e){let i;for(a.lastIndex=0;i=a.exec(e);)t.add(i[1])}else Array.isArray(e)?e.forEach(e=>n(e,t)):e&&"object"==typeof e&&(i(e.id)&&t.add(e.id),Object.values(e).forEach(e=>n(e,t)));return t},o=(e,t)=>{if("string"==typeof e){let i;for(r.lastIndex=0;i=r.exec(e);)t.add(i[0])}else Array.isArray(e)?e.forEach(e=>o(e,t)):e&&"object"==typeof e&&Object.values(e).forEach(e=>o(e,t));return t},s=(e,t)=>{Object.entries(e.subspace_map||{}).forEach(([e,i])=>{!i||"object"!=typeof i||i.module?.link||t(e,i)})},c=(e,t)=>{s(e,(e,i)=>{Object.entries(i.canvas_map||{}).forEach(([a,r])=>{let n=Array.isArray(r?.item_list)?r.item_list:[];t({subspaceId:e,subspace:i,canvasId:a,canvas:r,items:n})})})},d=[["brick_map","brick"],["generator_map","generator"],["property_bank_map","property_bank"],["canvas_map","canvas"]],l=(e,t,i)=>{d.forEach(([a,r])=>{Object.entries(t[a]||{}).forEach(([t,n])=>{Object.entries(n?.event_map||{}).forEach(([n,o])=>{Array.isArray(o)&&i({ownerType:r,ownerId:t,eventKey:n,list:o,path:`subspace_map.${e}.${a}.${t}.event_map.${n}`})})})})},p=(e,t)=>(e.parameter_list||[]).find(e=>e?.input_to_receiver===t)?.result_from_sender;e.exports={FRAME_KEYS:t,isBankNodeId:i,collectBankReads:n,forEachSubspace:s,forEachCanvas:c,forEachCanvasItem:(e,t)=>{c(e,e=>{e.items.forEach((i,a)=>{t({...e,item:i,index:a})})})},forEachEventList:l,getParamValue:p,hasParamValue:(e,t)=>{let i=p(e,t);return null!=i&&""!==i},collectDynamicallyReferencedIds:e=>{let t=new Set;return s(e,(e,i)=>{l(e,i,({list:e})=>{e.forEach(e=>o(e?.parameter_list,t))})}),o(e.automation_map,t),o(e.test_map,t),t},frameIsNumeric:e=>!!e&&t.every(t=>"number"==typeof e[t]),framesAlmostEqual:(e,i,a=.01)=>t.every(t=>Math.abs(e[t]-i[t])<=a),frameContains:(e,t,i=.01)=>e.x<=t.x+i&&e.y<=t.y+i&&e.x+e.width>=t.x+t.width-i&&e.y+e.height>=t.y+t.height-i,framesIntersect:(e,t)=>!(e.x+e.width<=t.x||t.x+t.width<=e.x||e.y+e.height<=t.y||t.y+t.height<=e.y),getItemId:e=>e?.brick_id||e?.subspace_id||null,itemHasAnimations:e=>!!e?.animations&&Object.keys(e.animations).length>0}},9098(e,t,i){let{collectDynamicallyReferencedIds:a}=i(27899),r=[i(98632),i(84223),i(92260),i(96810),i(60760),i(40566),i(31172),i(59707),i(39425)],n=r.map(e=>e.code),o=e=>Array.isArray(e)?e:"string"==typeof e&&e?e.split(",").map(e=>e.trim()).filter(Boolean):null;e.exports={lintConfig:(e,t={})=>{let i,s=o(t.only),c=o(t.ignore),d=[...s||[],...c||[]].filter(e=>!n.includes(e));if(d.length>0)throw Error(`Unknown lint rule code(s): ${d.join(", ")}. Valid codes: ${n.join(", ")}`);if(!e||"object"!=typeof e)return[];let l=r.filter(e=>(!s||s.includes(e.code))&&(!c||!c.includes(e.code)));if(0===l.length)return[];let p={configType:"module"===t.configType?"module":"app",gridStep:"number"==typeof t.gridStep&&t.gridStep>0?t.gridStep:.5,get dynamicRefIds(){return i||(i=a(e)),i}},u=[];return l.forEach(t=>{try{t.check(e,p,e=>u.push({severity:t.severity,code:t.code,path:"",subspaceId:null,itemId:null,hint:null,...e}))}catch(e){u.push({severity:"warning",code:t.code,path:"",subspaceId:null,itemId:null,message:`Lint rule crashed: ${e.message}`,hint:null})}}),u},lintRuleCodes:n}},98632(e,t,i){let{composeMap:a}=i(18501),{forEachSubspace:r,forEachEventList:n,collectBankReads:o,isBankNodeId:s,getParamValue:c}=i(27899),d=(e,t)=>t.map(t=>c(e,t)).filter(s),l={PROPERTY_BANK:{waitable:!0,targets:e=>(e.parameter_list||[]).map(e=>e?.input_to_receiver).filter(s)},PROPERTY_BANK_EXPRESSION:{waitable:!0,targets:e=>d(e,["RESULT","ERROR_RESULT"])},PROPERTY_BANK_COMMAND:{waitable:!0,targets:(e,t)=>((e,t)=>{let i=t();if(!i)return[];let a=[],r=new Set,n=(e.parameter_list||[]).map(e=>e?.input_to_receiver).filter(s);for(let e=0;e<n.length;e+=1){let t=n[e];if(r.has(t))continue;r.add(t);let o=i[t];o&&Object.values(o.out||{}).forEach(e=>{(e||[]).forEach(e=>{e?.id&&(e.id.includes("DATA_NODE")&&a.push(e.id),n.push(e.id))})})}return a})(e,t)},STORAGE_RETRIEVE:{waitable:!0,targets:e=>d(e,["STORAGE_RETRIEVE_RESULT"])},OPEN_FILE:{waitable:!0,targets:e=>d(e,["SAVE_PROPERTY","SAVE_DETAIL_PROPERTY","ERROR_SAVE_PROPERTY"])},SAVE_UPDATE_SNAPSHOT:{waitable:!0,targets:e=>d(e,["SNAPSHOT_SAVE_RESULT","SNAPSHOT_ERROR_RESULT"])},TRIGGER_APPLICATION_FILTER:{waitable:!0,targets:e=>d(e,["RESULT","ERROR_RESULT"])},TAKE_SCREENSHOT:{waitable:!1,targets:e=>d(e,["TAKE_SCREENSHOT_SAVE_PROPERTY"])}},p=/(^|_)RESULT$|_SAVE_PROPERTY$/;e.exports={code:"data-update-race",severity:"warning",description:"A data node is written without wait_async and read by a later action in the same event",check(e,t,i){r(e,(e,t)=>{let r,c=()=>{if(void 0===r)try{r=a(t.property_bank_calc_map||{})}catch{r=null}return r};n(e,t,({path:t,list:a})=>{let r=new Map;a.forEach((a,n)=>{if(!a||"object"!=typeof a)return;if("SYSTEM"===a.handler&&"DELAY"===a.action)return void r.clear();let d=new Set;(a.parameter_list||[]).forEach(e=>o(e?.result_from_sender,d)),d.forEach(o=>{let s=r.get(o);s&&(i({path:`${t}.${n}`,subspaceId:e,itemId:o,message:`\`${o}\` is written by action #${s.index} (${s.action}) without waiting, then read by action #${n} (${a.action}) — the read can still see the previous value.`,hint:s.waitable?`Set \`wait_async: true\` on action #${s.index} (${s.action}).`:`${s.action} ignores \`wait_async\` for its data write — insert a SYSTEM DELAY action between the two, or move the read into the data node's value-change event.`}),r.delete(o))});let u=((e,t)=>{if("SYSTEM"===e.handler){let i=l[e.action];if(!i)return null;let a=i.targets(e,t);return a.length>0?{targets:a,waitable:i.waitable}:null}let i=(e.parameter_list||[]).filter(e=>"string"==typeof e?.input_to_receiver&&p.test(e.input_to_receiver)&&s(e.result_from_sender)).map(e=>e.result_from_sender);return i.length>0?{targets:i,waitable:!0}:null})(a,c);if(!u)return;let f=!0===a.wait_async&&u.waitable;u.targets.forEach(e=>{f?r.delete(e):r.set(e,{index:n,action:a.action,waitable:u.waitable})})})})})}}},39425(e,t,i){let{forEachSubspace:a,forEachEventList:r,getParamValue:n}=i(27899),o=new Set(["Math","Date","Object","Array","Number","String","Boolean","JSON","RegExp","Intl","isNaN","isFinite","parseInt","parseFloat"]);e.exports={code:"expression-global-variable",severity:"error",description:"A PROPERTY_BANK_EXPRESSION variable is named after a JS global and is silently ignored at runtime",check(e,t,i){a(e,(e,t)=>{r(e,t,({path:t,list:a})=>{a.forEach((a,r)=>{if(a?.handler!=="SYSTEM"||"PROPERTY_BANK_EXPRESSION"!==a.action)return;let s=n(a,"VARIABLES");Array.isArray(s)&&s.forEach(a=>{let n=a?.key;"string"==typeof n&&o.has(n)&&i({path:`${t}.${r}`,subspaceId:e,itemId:null,message:`Expression variable "${n}" is named after the JS global \`${n}\` and is silently ignored — the global takes precedence in the expression scope, so the bound value is never used.`,hint:`Rename the variable (e.g. "${n}Value") so the expression reads the bound value.`})})})})})}}},40566(e,t,i){let{forEachSubspace:a,forEachEventList:r,hasParamValue:n}=i(27899),o=[{action:"STORAGE_RETRIEVE",severity:"error",isMissing:e=>!n(e,"STORAGE_RETRIEVE_RESULT"),message:"STORAGE_RETRIEVE requires a STORAGE_RETRIEVE_RESULT parameter — without it the action throws at runtime.",hint:"Add a STORAGE_RETRIEVE_RESULT parameter pointing at a data node."},{action:"TAKE_SCREENSHOT",severity:"warning",isMissing:e=>!n(e,"TAKE_SCREENSHOT_SAVE_PROPERTY"),message:"TAKE_SCREENSHOT without TAKE_SCREENSHOT_SAVE_PROPERTY is silently skipped at runtime.",hint:"Add a TAKE_SCREENSHOT_SAVE_PROPERTY parameter pointing at a data node."},{action:"OPEN_FILE",severity:"warning",isMissing:e=>!n(e,"SAVE_PROPERTY")&&!n(e,"SAVE_DETAIL_PROPERTY"),message:"OPEN_FILE has no SAVE_PROPERTY / SAVE_DETAIL_PROPERTY — the picked file is discarded.",hint:"Add SAVE_PROPERTY (file uri) or SAVE_DETAIL_PROPERTY (file detail) parameters."},{action:"OPEN_URL",severity:"warning",isMissing:e=>!n(e,"URL"),message:"OPEN_URL has no URL parameter — the action does nothing.",hint:"Add a URL parameter."}];e.exports={code:"missing-result-param",severity:"warning",description:"An action is missing the parameter that receives or drives its effect",check(e,t,i){a(e,(e,t)=>{r(e,t,({path:t,list:a})=>{a.forEach((a,r)=>{if(a?.handler!=="SYSTEM")return;let n=o.find(e=>e.action===a.action);n&&n.isMissing(a)&&i({path:`${t}.${r}`,subspaceId:e,itemId:null,severity:n.severity,message:n.message,hint:n.hint})})})})}}},92260(e,t,i){let{forEachCanvasItem:a,frameIsNumeric:r,getItemId:n,FRAME_KEYS:o}=i(27899),s=["width","height"];e.exports={code:"off-grid-frame",severity:"warning",description:"Frame values should be multiples of the 0.5 grid step",check(e,t,i){let c=t.gridStep;a(e,({subspaceId:e,canvasId:t,item:a,index:d})=>{let l=a?.frame;if(!r(l))return;let p=o.filter(e=>{let t=l[e];return(!s.includes(e)||!(t<=c))&&Math.abs(t-Math.round(t/c)*c)>.001});0!==p.length&&i({path:`subspace_map.${e}.canvas_map.${t}.item_list.${d}.frame`,subspaceId:e,itemId:n(a),message:`Frame ${p.map(e=>`${e}=${l[e]}`).join(", ")} ${1===p.length?"is":"are"} not aligned to the ${c} grid step.`,hint:`Round frame values to multiples of ${c}.`})})}}},96810(e,t,i){let{forEachCanvasItem:a,frameIsNumeric:r,getItemId:n,itemHasAnimations:o}=i(27899);e.exports={code:"out-of-bounds-frame",severity:"warning",description:"An element is fully outside the subspace layout or has a non-positive size",check(e,t,i){a(e,({subspaceId:a,subspace:s,canvasId:c,item:d,index:l})=>{let p=s.layout;if("number"!=typeof p?.width||"number"!=typeof p?.height||p.width<=0||p.height<=0)return;let u=d?.frame;if(!r(u)||!0===u.exceed_boundary||u.standby_frame||o(d))return;let f=n(d);if(f&&t.dynamicRefIds.has(f))return;let b=`subspace_map.${a}.canvas_map.${c}.item_list.${l}.frame`;if(u.width<=0||u.height<=0)return void i({path:b,subspaceId:a,itemId:f,message:`Frame has a non-positive size (width=${u.width}, height=${u.height}) — the element renders nothing.`,hint:"Give the element a positive size, or remove it if unused."});let h=a===e.root_subspace_id,m=u.x>=p.width||u.x+u.width<=0,y=u.y>=p.height||u.y+u.height<=0;(m||!h&&y)&&i({path:b,subspaceId:a,itemId:f,message:`Frame (x=${u.x}, y=${u.y}, width=${u.width}, height=${u.height}) is fully outside the ${p.width}\xd7${p.height} layout — nothing is visible.`,hint:"Move the element back into the layout, or set `exceed_boundary` if the placement is intentional."})})}}},84223(e,t,i){let{FRAME_KEYS:a,forEachCanvas:r,frameIsNumeric:n,framesAlmostEqual:o,framesIntersect:s,itemHasAnimations:c}=i(27899),d=new Set(["BRICK_TEXT","BRICK_RICH_TEXT"]),l=["linearGradientEnabled","blurEnabled"],p=e=>Object.values(e?.event_map||{}).some(e=>Array.isArray(e)&&e.length>0),u=/^backgroundColor$|^border/,f=(e,t)=>{if(e?.type!=="brick")return null;let i=t[e.brick_id];return d.has(i?.template_key)?i:null},b=e=>a.map(t=>Math.floor(e[t]/.01)),h=e=>e.join(":"),m=(e,t,i,a)=>{if(!n(t?.frame)||!f(t,i))return;let r=h(b(t.frame)),o=(e.get(r)||0)+a;o>0?e.set(r,o):e.delete(r)};e.exports={code:"redundant-rect-overlay",severity:"info",description:"A plain Rect behind a same-frame Text/RichText can be folded into the text brick",check(e,t,i){r(e,({subspaceId:e,subspace:a,canvasId:r,items:d})=>{let y,E=a.brick_map||{},_=(y=new Map,d.forEach(e=>m(y,e,E,1)),y);d.forEach((a,y)=>{if(m(_,a,E,-1),a?.type!=="brick"||!n(a.frame))return;let g=E[a.brick_id];if(g?.template_key!=="BRICK_RECT"||c(a)||t.dynamicRefIds.has(a.brick_id))return;let S={...g.property,...a.property};if(l.some(e=>S[e])||!((e,t)=>{let[i,a,r,n]=b(t);for(let t=-1;t<=1;t+=1)for(let o=-1;o<=1;o+=1)for(let s=-1;s<=1;s+=1)for(let c=-1;c<=1;c+=1)if(e.has(h([i+t,a+o,r+s,n+c])))return!0;return!1})(_,a.frame))return;let v=p(g);for(let t=y+1;t<d.length;t+=1){let c=d[t];if(!n(c?.frame))continue;let l=f(c,E);if(l&&o(a.frame,c.frame,.01)){let t={...l.property,...c.property};if(Object.keys(t).some(e=>u.test(e)&&void 0!==t[e])||v&&p(l))return;i({path:`subspace_map.${e}.canvas_map.${r}.item_list.${y}`,subspaceId:e,itemId:a.brick_id,message:`Rect \`${g.title||a.brick_id}\` has the same frame as the ${l.template_key} above it and only uses base styles`+(v?", behind its press handler.":"."),hint:v?"Make the Text brick pressable, move backgroundColor / border / radius and the press handler onto it, then remove the Rect.":"Set backgroundColor / border / radius directly on the text brick and remove the Rect."});return}if(s(a.frame,c.frame))return}})})}}},31172(e,t,i){let{autoGeneratedItemIdKind:a}=i(99470),{forEachSubspace:r}=i(27899),n="PROPERTY_BANK_",o=()=>({children:Object.create(null),ids:null}),s=(e,t)=>{let i=e;for(let e of t)i.children[e]||(i.children[e]=o()),i=i.children[e];i.ids||(i.ids=[]),i.ids.push(t)},c=(e,t,i,a)=>{let r=i.children[e[a]];if(r){r.ids&&r.ids.forEach(e=>{t.set(e,t.get(e)+1)});for(let i=a+1;i<e.length&&(r=r.children[e[i]]);i+=1)r.ids&&r.ids.forEach(e=>{t.set(e,t.get(e)+1)})}};e.exports={code:"unused-data-node",severity:"info",description:"A data node is defined but never referenced anywhere in the config",check(e,t,i){let d=JSON.stringify(e),l=[];r(e,(i,r)=>{("module"!==t.configType||i!==e.root_subspace_id)&&Object.entries(r.property_bank_map||{}).forEach(([e,t])=>{!(!t||"object"!=typeof t||t.kind===a||t.enable_remote_update||t.global_remote_update_prop||t.linkedFrom||t.alias||t.preload||r.routing?.[e]?.enabled_routing)&&(Object.values(t?.event_map||{}).some(e=>Array.isArray(e)&&e.length>0)||l.push({subspaceId:i,nodeId:e,node:t}))})});let p=((e,t)=>{let i=[...new Set(t)];if(0===i.length)return new Map;let a=new Map(i.map(e=>[e,0])),r=o(),d=o(),l=!1,p=!1;if(i.forEach(e=>{e.startsWith(n)?(s(r,e),l=!0):(s(d,e),p=!0)}),l){let t=e.indexOf(n);for(;-1!==t;)c(e,a,r,t),t=e.indexOf(n,t+1)}if(p)for(let t=0;t<e.length;t+=1)c(e,a,d,t);return a})(d,l.map(({nodeId:e})=>e));l.forEach(({subspaceId:e,nodeId:t,node:a})=>{(p.get(t)||0)>1||i({path:`subspace_map.${e}.property_bank_map.${t}`,subspaceId:e,itemId:t,message:`Data node \`${a.title||t}\` is never referenced in the config.`,hint:"Remove it, or keep it if external tooling depends on it."})})}}},60760(e,t,i){let{forEachSubspace:a,forEachEventList:r}=i(27899),n=new Set(["MESSAGE","ALERT","POPUP_RESET","TAKE_SCREENSHOT","THROW_EXCEPTION","RESTART_FOUNDATION","DYNAMIC_BRICK","DYNAMIC_BRICK_RESET","DYNAMIC_ANIMATION","DYNAMIC_ANIMATION_RESET","DYNAMIC_ANIMATION_STOP","CHANNEL_SUBSCRIBE","CHANNEL_UNSUBSCRIBE","CHANNEL_PUBLISH","DISMISS_KEYBOARD","STORAGE_SET","STORAGE_DELETE","DELAY","USE_SHARE_APPLICATION","AUTH_IN_DEVICE","REFRESH_BINDCODE","STOP_APPLICATION_FILTER"]);e.exports={code:"wait-async-no-op",severity:"info",description:"wait_async is set on an action that ignores it",check(e,t,i){a(e,(e,t)=>{r(e,t,({path:t,list:a})=>{a.forEach((a,r)=>{a?.handler!=="SYSTEM"||!0!==a.wait_async||n.has(a.action)&&i({path:`${t}.${r}`,subspaceId:e,itemId:null,message:"DELAY"===a.action?"DELAY always waits for its timeout — `wait_async: true` is redundant.":`\`wait_async: true\` has no effect on ${a.action}; the action does not block the chain.`,hint:"DELAY"===a.action?"Remove the redundant flag.":"Remove the flag, or restructure if you relied on it for sequencing."})})})})}}},59707(e,t,i){let{forEachCanvas:a,frameIsNumeric:r,frameContains:n,itemHasAnimations:o}=i(27899);e.exports={code:"z-order-cover",severity:"info",description:"A later opaque element fully covers an earlier pressable element",check(e,t,i){a(e,({subspaceId:e,subspace:a,canvasId:s,items:c})=>{let d=a.brick_map||{},l=[];if(c.forEach((e,t)=>{if(e?.type!=="brick"||!r(e.frame))return;let i=d[e.brick_id];i&&Object.entries(i?.event_map||{}).some(([e,t])=>e.includes("_ON_PRESS")&&Array.isArray(t)&&t.length>0)&&l.push({item:e,index:t,brick:i})}),0===l.length)return;let p=t.dynamicRefIds,u=c.map((e,t)=>((e,t,i,a)=>{let n;if(e?.type!=="brick"||!r(e.frame)||o(e)||a.has(e.brick_id))return null;let s=i[e.brick_id],c={...s?.property,...e.property};return"string"==typeof(n=c.backgroundColor)&&(/^rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*1(?:\.0+)?\s*\)$/.test(n)||/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(n)||/^#[0-9a-fA-F]{6}$/.test(n))&&(void 0===c.opacity||1===c.opacity)?{index:t,item:e,brick:s,frame:e.frame}:null})(e,t,d,p)).filter(Boolean),f=(e=>{let t=Array(e.length),i=1/0,a=1/0,r=-1/0,n=-1/0,o=-1/0,s=-1/0;for(let c=e.length-1;c>=0;c-=1){let{frame:d}=e[c];i=Math.min(i,d.x),a=Math.min(a,d.y),r=Math.max(r,d.x+d.width),n=Math.max(n,d.y+d.height),o=Math.max(o,d.width),s=Math.max(s,d.height),t[c]={minX:i,minY:a,maxRight:r,maxBottom:n,maxWidth:o,maxHeight:s}}return t})(u),b=0;l.forEach(({item:t,index:a,brick:r})=>{let c,d;if(!(o(t)||p.has(t.brick_id))){for(;b<u.length&&u[b].index<=a;)b+=1;if(c=f[b],d=t.frame,c&&c.minX<=d.x+.01&&c.minY<=d.y+.01&&c.maxRight>=d.x+d.width-.01&&c.maxBottom>=d.y+d.height-.01&&c.maxWidth>=d.width-.02&&c.maxHeight>=d.height-.02)for(let o=b;o<u.length;o+=1){let c=u[o];if(n(c.frame,t.frame))return void i({path:`subspace_map.${e}.canvas_map.${s}.item_list.${a}`,subspaceId:e,itemId:t.brick_id,message:`Pressable \`${r.title||t.brick_id}\` is fully covered by the opaque \`${c.brick?.title||c.item.brick_id}\` later in the item list — it is invisible and untappable.`,hint:"Reorder the items, shrink the covering element, or remove the hidden one."})}}})})}}}};
|