@fugood/bricks-cli 2.23.8 → 2.23.9
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/232.js +1 -1
- package/lib/425.js +1 -1
- package/lib/index.js +16 -9
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as t from"ink";import*as i from"ink-picture";import*as n from"prettier";import*as o from"react";import*as r from"react/jsx-runtime";import{default as s}from"conf";var p,l,d,c,u={555:(e,a,t)=>{t.d(a,{v:()=>r});var i=t(85608),n=t(79212),o=Symbol.for("apollo.cacheSize"),r=(0,i.__assign)({},n.global[o])},777:(e,a,t)=>{t.d(a,{MS:()=>p,UT:()=>l,WR:()=>s,bl:()=>n});var i=t(77634),n=new i.Slot,o=new WeakMap;function r(e){var a=o.get(e);return a||o.set(e,a={vars:new Set,dep:(0,i.dep)()}),a}function s(e){r(e).vars.forEach(function(a){return a.forgetCache(e)})}function p(e){r(e).vars.forEach(function(a){return a.attachCache(e)})}function l(e){var a=new Set,t=new Set,i=function(s){if(arguments.length>0){if(e!==s){e=s,a.forEach(function(e){r(e).dep.dirty(i),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)});var p=Array.from(t);t.clear(),p.forEach(function(a){return a(e)})}}else{var l=n.getValue();l&&(o(l),r(l).dep(i))}return e};i.onNextChange=function(e){return t.add(e),function(){t.delete(e)}};var o=i.attachCache=function(e){return a.add(e),r(e).vars.add(i),i};return i.forgetCache=function(e){return a.delete(e)},i}},1708:e=>{e.exports=a("node:process")},2203:e=>{e.exports=a("stream")},2904:(e,a,t)=>{t.d(a,{HQ:()=>p,JG:()=>s,ct:()=>r,s6:()=>l});var i=t(85608),n=t(79212),o=t(90424);function r(e,a){var t=a,o=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw(0,n.newInvariantError)(85,e.operation,e.name?" named '".concat(e.name.value,"'"):"");"FragmentDefinition"===e.kind&&o.push(e)}),void 0===t&&((0,n.invariant)(1===o.length,86,o.length),t=o[0].name.value),(0,i.__assign)((0,i.__assign)({},e),{definitions:(0,i.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}}],e.definitions,!0)})}function s(e){void 0===e&&(e=[]);var a={};return e.forEach(function(e){a[e.name.value]=e}),a}function p(e,a){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var t=e.name.value;if("function"==typeof a)return a(t);var i=a&&a[t];return(0,n.invariant)(i,87,t),i||null;default:return null}}function l(e){var a=!0;return(0,o.YR)(e,{FragmentSpread:function(e){if(!(a=!!e.directives&&e.directives.some(function(e){return"unmask"===e.name.value})))return o.sP}}),a}},3420:(e,a,t)=>{t.d(a,{MD:()=>n,TZ:()=>p,VK:()=>r,_m:()=>o,a6:()=>c,aR:()=>s,dI:()=>l,fT:()=>u,gj:()=>f,i7:()=>m,xu:()=>d});var i=t(42455);function n(e){return o(e)||d(e)||u(e)}function o(e){return e.kind===i.b.OPERATION_DEFINITION||e.kind===i.b.FRAGMENT_DEFINITION}function r(e){return e.kind===i.b.FIELD||e.kind===i.b.FRAGMENT_SPREAD||e.kind===i.b.INLINE_FRAGMENT}function s(e){return e.kind===i.b.VARIABLE||e.kind===i.b.INT||e.kind===i.b.FLOAT||e.kind===i.b.STRING||e.kind===i.b.BOOLEAN||e.kind===i.b.NULL||e.kind===i.b.ENUM||e.kind===i.b.LIST||e.kind===i.b.OBJECT}function p(e){return s(e)&&(e.kind===i.b.LIST?e.values.some(p):e.kind===i.b.OBJECT?e.fields.some(e=>p(e.value)):e.kind!==i.b.VARIABLE)}function l(e){return e.kind===i.b.NAMED_TYPE||e.kind===i.b.LIST_TYPE||e.kind===i.b.NON_NULL_TYPE}function d(e){return e.kind===i.b.SCHEMA_DEFINITION||c(e)||e.kind===i.b.DIRECTIVE_DEFINITION}function c(e){return e.kind===i.b.SCALAR_TYPE_DEFINITION||e.kind===i.b.OBJECT_TYPE_DEFINITION||e.kind===i.b.INTERFACE_TYPE_DEFINITION||e.kind===i.b.UNION_TYPE_DEFINITION||e.kind===i.b.ENUM_TYPE_DEFINITION||e.kind===i.b.INPUT_OBJECT_TYPE_DEFINITION}function u(e){return e.kind===i.b.SCHEMA_EXTENSION||m(e)}function m(e){return e.kind===i.b.SCALAR_TYPE_EXTENSION||e.kind===i.b.OBJECT_TYPE_EXTENSION||e.kind===i.b.INTERFACE_TYPE_EXTENSION||e.kind===i.b.UNION_TYPE_EXTENSION||e.kind===i.b.ENUM_TYPE_EXTENSION||e.kind===i.b.INPUT_OBJECT_TYPE_EXTENSION}function f(e){return e.kind===i.b.TYPE_COORDINATE||e.kind===i.b.MEMBER_COORDINATE||e.kind===i.b.ARGUMENT_COORDINATE||e.kind===i.b.DIRECTIVE_COORDINATE||e.kind===i.b.DIRECTIVE_ARGUMENT_COORDINATE}},3634:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},3680:(e,a,t)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=t(20124):e.exports=t(85038)},3777:(e,a,t)=>{t.d(a,{AT:()=>l,E4:()=>d,Vn:()=>c,Vu:()=>r,n4:()=>s,sw:()=>o,wY:()=>u,zK:()=>p});var i=t(79212),n=t(28907);function o(e){(0,i.invariant)(e&&"Document"===e.kind,88);var a=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw(0,i.newInvariantError)(89,e.kind);return e});return(0,i.invariant)(a.length<=1,90,a.length),e}function r(e){return o(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function s(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&!!e.name}).map(function(e){return e.name.value})[0]||null}function p(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function l(e){var a=r(e);return(0,i.invariant)(a&&"query"===a.operation,91),a}function d(e){(0,i.invariant)("Document"===e.kind,92),(0,i.invariant)(e.definitions.length<=1,93);var a=e.definitions[0];return(0,i.invariant)("FragmentDefinition"===a.kind,94),a}function c(e){var a;o(e);for(var t=0,n=e.definitions;t<n.length;t++){var r=n[t];if("OperationDefinition"===r.kind){var s=r.operation;if("query"===s||"mutation"===s||"subscription"===s)return r}"FragmentDefinition"!==r.kind||a||(a=r)}if(a)return a;throw(0,i.newInvariantError)(95)}function u(e){var a=Object.create(null),t=e&&e.variableDefinitions;return t&&t.length&&t.forEach(function(e){e.defaultValue&&(0,n.J)(a,e.variable.name,e.defaultValue)}),a}},3848:(e,a,t)=>{t.d(a,{A:()=>i});var i=function(e,a,t){var i=new Error(t);throw i.name="ServerError",i.response=e,i.statusCode=e.status,i.result=a,i}},3900:e=>{e.exports=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","❤️ "]},"clock":{"interval":100,"frames":["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]},"grenade":{"interval":80,"frames":["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},"fistBump":{"interval":80,"frames":["🤜 🤛 ","🤜 🤛 ","🤜 🤛 "," 🤜 🤛 "," 🤜🤛 "," 🤜✨🤛 ","🤜 ✨ 🤛 "]},"soccerHeader":{"interval":80,"frames":[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},"mindblown":{"interval":160,"frames":["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ "," "," "," "]},"speaker":{"interval":160,"frames":["🔈 ","🔉 ","🔊 ","🔉 "]},"orangePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},"bluePulse":{"interval":100,"frames":["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"orangeBluePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"timeTravel":{"interval":100,"frames":["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}')},4649:(e,a,t)=>{t.d(a,{BREAK:()=>Ya.sP,BreakingChangeType:()=>En,DEFAULT_DEPRECATION_REASON:()=>ta,DangerousChangeType:()=>Tn,DirectiveLocation:()=>Be.H,ExecutableDefinitionsRule:()=>Xa,FieldsOnCorrectTypeRule:()=>Za,FragmentsOnCompositeTypesRule:()=>et,GRAPHQL_MAX_INT:()=>Me,GRAPHQL_MIN_INT:()=>Ue,GraphQLBoolean:()=>Ye,GraphQLDeprecatedDirective:()=>ia,GraphQLDirective:()=>Ze,GraphQLEnumType:()=>Ce,GraphQLError:()=>l.eO,GraphQLFloat:()=>ze,GraphQLID:()=>Qe,GraphQLIncludeDirective:()=>ea,GraphQLInputObjectType:()=>$e,GraphQLInt:()=>qe,GraphQLInterfaceType:()=>Oe,GraphQLList:()=>se,GraphQLNonNull:()=>pe,GraphQLObjectType:()=>De,GraphQLOneOfDirective:()=>oa,GraphQLScalarType:()=>be,GraphQLSchema:()=>Oa,GraphQLSkipDirective:()=>aa,GraphQLSpecifiedByDirective:()=>na,GraphQLString:()=>Ge,GraphQLUnionType:()=>Ae,Kind:()=>F.b,KnownArgumentNamesRule:()=>at,KnownDirectivesRule:()=>it,KnownFragmentNamesRule:()=>nt,KnownTypeNamesRule:()=>ot,Lexer:()=>Zi.JG,Location:()=>d.aZ,LoneAnonymousOperationRule:()=>st,LoneSchemaDefinitionRule:()=>pt,MaxIntrospectionDepthRule:()=>dt,NoDeprecatedCustomRule:()=>on,NoFragmentCyclesRule:()=>ct,NoSchemaIntrospectionCustomRule:()=>rn,NoUndefinedVariablesRule:()=>ut,NoUnusedFragmentsRule:()=>mt,NoUnusedVariablesRule:()=>ft,OperationTypeNode:()=>d.cE,OverlappingFieldsCanBeMergedRule:()=>gt,PossibleFragmentSpreadsRule:()=>At,PossibleTypeExtensionsRule:()=>St,ProvidedRequiredArgumentsRule:()=>kt,ScalarLeafsRule:()=>Vt,SchemaMetaFieldDef:()=>xa,SingleFieldSubscriptionsRule:()=>Zt,Source:()=>Wi.k,Token:()=>d.ou,TokenKind:()=>en.Y,TypeInfo:()=>Ha,TypeKind:()=>ba,TypeMetaFieldDef:()=>_a,TypeNameMetaFieldDef:()=>wa,UniqueArgumentDefinitionNamesRule:()=>ai,UniqueArgumentNamesRule:()=>ti,UniqueDirectiveNamesRule:()=>ii,UniqueDirectivesPerLocationRule:()=>ni,UniqueEnumValueNamesRule:()=>oi,UniqueFieldDefinitionNamesRule:()=>ri,UniqueFragmentNamesRule:()=>pi,UniqueInputFieldNamesRule:()=>li,UniqueOperationNamesRule:()=>di,UniqueOperationTypesRule:()=>ci,UniqueTypeNamesRule:()=>ui,UniqueVariableNamesRule:()=>mi,ValidationContext:()=>Ei,ValuesOfCorrectTypeRule:()=>fi,VariablesAreInputTypesRule:()=>hi,VariablesInAllowedPositionRule:()=>gi,__Directive:()=>ma,__DirectiveLocation:()=>fa,__EnumValue:()=>ya,__Field:()=>ha,__InputValue:()=>ga,__Schema:()=>ua,__Type:()=>va,__TypeKind:()=>Da,assertAbstractType:()=>re,assertCompositeType:()=>ne,assertDirective:()=>Xe,assertEnumType:()=>z,assertEnumValueName:()=>k,assertInputObjectType:()=>Y,assertInputType:()=>X,assertInterfaceType:()=>B,assertLeafType:()=>te,assertListType:()=>H,assertName:()=>C,assertNamedType:()=>ve,assertNonNullType:()=>W,assertNullableType:()=>ue,assertObjectType:()=>P,assertOutputType:()=>ee,assertScalarType:()=>R,assertSchema:()=>Fa,assertType:()=>$,assertUnionType:()=>U,assertValidName:()=>Gn,assertValidSchema:()=>Ca,assertWrappingType:()=>de,astFromValue:()=>da,buildASTSchema:()=>yn,buildClientSchema:()=>un,buildSchema:()=>bn,coerceInputValue:()=>Lt,concatAST:()=>Bn,createSourceEventStream:()=>nn,defaultFieldResolver:()=>Gi,defaultTypeResolver:()=>zi,doTypesOverlap:()=>Le,execute:()=>Ci,executeSync:()=>ki,extendSchema:()=>mn,findBreakingChanges:()=>Qn,findDangerousChanges:()=>Hn,formatError:()=>l.Wk,getArgumentValues:()=>Gt,getDirectiveValues:()=>Yt,getEnterLeaveForKind:()=>Ya.XO,getIntrospectionQuery:()=>pn,getLocation:()=>Ki.g,getNamedType:()=>he,getNullableType:()=>me,getOperationAST:()=>ln,getOperationRootType:()=>dn,getVariableValues:()=>zt,getVisitFn:()=>Ya.UY,graphql:()=>Qi,graphqlSync:()=>Hi,introspectionFromSchema:()=>cn,introspectionTypes:()=>Ea,isAbstractType:()=>oe,isCompositeType:()=>ie,isConstValueNode:()=>Ka.TZ,isDefinitionNode:()=>Ka.MD,isDirective:()=>Ke,isEnumType:()=>q,isEqualType:()=>je,isExecutableDefinitionNode:()=>Ka._m,isInputObjectType:()=>G,isInputType:()=>K,isInterfaceType:()=>L,isIntrospectionType:()=>Ta,isLeafType:()=>ae,isListType:()=>Q,isNamedType:()=>fe,isNonNullType:()=>J,isNullableType:()=>ce,isObjectType:()=>j,isOutputType:()=>Z,isRequiredArgument:()=>Fe,isRequiredInputField:()=>Re,isScalarType:()=>V,isSchema:()=>Na,isSchemaCoordinateNode:()=>Ka.gj,isSelectionNode:()=>Ka.VK,isSpecifiedDirective:()=>sa,isSpecifiedScalarType:()=>Je,isType:()=>I,isTypeDefinitionNode:()=>Ka.a6,isTypeExtensionNode:()=>Ka.i7,isTypeNode:()=>Ka.dI,isTypeSubTypeOf:()=>Pe,isTypeSystemDefinitionNode:()=>Ka.xu,isTypeSystemExtensionNode:()=>Ka.fT,isUnionType:()=>M,isValidNameError:()=>Yn,isValueNode:()=>Ka.aR,isWrappingType:()=>le,lexicographicSortSchema:()=>Dn,locatedError:()=>Ai,parse:()=>s.qg,parseConstValue:()=>s.u8,parseSchemaCoordinate:()=>s.Ng,parseType:()=>s.Mb,parseValue:()=>s.$x,print:()=>O.y,printError:()=>l.yJ,printIntrospectionSchema:()=>On,printLocation:()=>Xi.V,printSchema:()=>Fn,printSourceLocation:()=>Xi.C,printType:()=>kn,recommendedRules:()=>bi,resolveASTSchemaCoordinate:()=>co,resolveObjMapThunk:()=>ye,resolveReadonlyArrayThunk:()=>ge,resolveSchemaCoordinate:()=>lo,responsePathAsArray:()=>Pt,separateOperations:()=>Mn,specifiedDirectives:()=>ra,specifiedRules:()=>Di,specifiedScalarTypes:()=>He,stripIgnoredCharacters:()=>zn,subscribe:()=>tn,syntaxError:()=>sn.I,typeFromAST:()=>Qa,validate:()=>Ti,validateSchema:()=>Sa,valueFromAST:()=>Ut,valueFromASTUntyped:()=>A,version:()=>i,versionInfo:()=>n,visit:()=>Ya.YR,visitInParallel:()=>Ya.oP,visitWithTypeInfo:()=>Wa}),t.r(a);const i="16.12.0",n=Object.freeze({major:16,minor:12,patch:0,preReleaseTag:null});var o=t(93217);function r(e){return"function"==typeof(null==e?void 0:e.then)}var s=t(93367),p=t(35198),l=t(48255),d=t(59762);const c=5;function u(e,a){const[t,i]=a?[e,a]:[void 0,e];let n=" Did you mean ";t&&(n+=t+" ");const o=i.map(e=>`"${e}"`);switch(o.length){case 0:return"";case 1:return n+o[0]+"?";case 2:return n+o[0]+" or "+o[1]+"?"}const r=o.slice(0,c),s=r.pop();return n+r.join(", ")+", or "+s+"?"}function m(e){return e}var f=t(50792),v=t(91070);function h(e,a){const t=Object.create(null);for(const i of e)t[a(i)]=i;return t}function g(e,a,t){const i=Object.create(null);for(const n of e)i[a(n)]=t(n);return i}function y(e,a){const t=Object.create(null);for(const i of Object.keys(e))t[i]=a(e[i],i);return t}function b(e,a){let t=0,i=0;for(;t<e.length&&i<a.length;){let n=e.charCodeAt(t),o=a.charCodeAt(i);if(_(n)&&_(o)){let r=0;do{++t,r=10*r+n-D,n=e.charCodeAt(t)}while(_(n)&&r>0);let s=0;do{++i,s=10*s+o-D,o=a.charCodeAt(i)}while(_(o)&&s>0);if(r<s)return-1;if(r>s)return 1}else{if(n<o)return-1;if(n>o)return 1;++t,++i}}return e.length-a.length}const D=48,x=57;function _(e){return!isNaN(e)&&D<=e&&e<=x}function w(e,a){const t=Object.create(null),i=new E(e),n=Math.floor(.4*e.length)+1;for(const e of a){const a=i.measure(e,n);void 0!==a&&(t[e]=a)}return Object.keys(t).sort((e,a)=>{const i=t[e]-t[a];return 0!==i?i:b(e,a)})}class E{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=T(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,a){if(this._input===e)return 0;const t=e.toLowerCase();if(this._inputLowerCase===t)return 1;let i=T(t),n=this._inputArray;if(i.length<n.length){const e=i;i=n,n=e}const o=i.length,r=n.length;if(o-r>a)return;const s=this._rows;for(let e=0;e<=r;e++)s[0][e]=e;for(let e=1;e<=o;e++){const t=s[(e-1)%3],o=s[e%3];let p=o[0]=e;for(let a=1;a<=r;a++){const r=i[e-1]===n[a-1]?0:1;let l=Math.min(t[a]+1,o[a-1]+1,t[a-1]+r);if(e>1&&a>1&&i[e-1]===n[a-2]&&i[e-2]===n[a-1]){const t=s[(e-2)%3][a-2];l=Math.min(l,t+1)}l<p&&(p=l),o[a]=l}if(p>a)return}const p=s[o%3][r];return p<=a?p:void 0}}function T(e){const a=e.length,t=new Array(a);for(let i=0;i<a;++i)t[i]=e.charCodeAt(i);return t}function N(e){if(null==e)return Object.create(null);if(null===Object.getPrototypeOf(e))return e;const a=Object.create(null);for(const[t,i]of Object.entries(e))a[t]=i;return a}var F=t(42455),O=t(92704);function A(e,a){switch(e.kind){case F.b.NULL:return null;case F.b.INT:return parseInt(e.value,10);case F.b.FLOAT:return parseFloat(e.value);case F.b.STRING:case F.b.ENUM:case F.b.BOOLEAN:return e.value;case F.b.LIST:return e.values.map(e=>A(e,a));case F.b.OBJECT:return g(e.fields,e=>e.name.value,e=>A(e.value,a));case F.b.VARIABLE:return null==a?void 0:a[e.name.value]}}var S=t(25881);function C(e){if(null!=e||(0,o.U)(!1,"Must provide name."),"string"==typeof e||(0,o.U)(!1,"Expected name to be a string."),0===e.length)throw new l.eO("Expected name to be a non-empty string.");for(let a=1;a<e.length;++a)if(!(0,S.xr)(e.charCodeAt(a)))throw new l.eO(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!(0,S.un)(e.charCodeAt(0)))throw new l.eO(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function k(e){if("true"===e||"false"===e||"null"===e)throw new l.eO(`Enum values cannot be named: ${e}`);return C(e)}function I(e){return V(e)||j(e)||L(e)||M(e)||q(e)||G(e)||Q(e)||J(e)}function $(e){if(!I(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL type.`);return e}function V(e){return(0,f.h)(e,be)}function R(e){if(!V(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Scalar type.`);return e}function j(e){return(0,f.h)(e,De)}function P(e){if(!j(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Object type.`);return e}function L(e){return(0,f.h)(e,Oe)}function B(e){if(!L(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Interface type.`);return e}function M(e){return(0,f.h)(e,Ae)}function U(e){if(!M(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Union type.`);return e}function q(e){return(0,f.h)(e,Ce)}function z(e){if(!q(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Enum type.`);return e}function G(e){return(0,f.h)(e,$e)}function Y(e){if(!G(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Input Object type.`);return e}function Q(e){return(0,f.h)(e,se)}function H(e){if(!Q(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL List type.`);return e}function J(e){return(0,f.h)(e,pe)}function W(e){if(!J(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Non-Null type.`);return e}function K(e){return V(e)||q(e)||G(e)||le(e)&&K(e.ofType)}function X(e){if(!K(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL input type.`);return e}function Z(e){return V(e)||j(e)||L(e)||M(e)||q(e)||le(e)&&Z(e.ofType)}function ee(e){if(!Z(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL output type.`);return e}function ae(e){return V(e)||q(e)}function te(e){if(!ae(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL leaf type.`);return e}function ie(e){return j(e)||L(e)||M(e)}function ne(e){if(!ie(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL composite type.`);return e}function oe(e){return L(e)||M(e)}function re(e){if(!oe(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL abstract type.`);return e}class se{constructor(e){I(e)||(0,o.U)(!1,`Expected ${(0,p.N)(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class pe{constructor(e){ce(e)||(0,o.U)(!1,`Expected ${(0,p.N)(e)} to be a GraphQL nullable type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function le(e){return Q(e)||J(e)}function de(e){if(!le(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL wrapping type.`);return e}function ce(e){return I(e)&&!J(e)}function ue(e){if(!ce(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL nullable type.`);return e}function me(e){if(e)return J(e)?e.ofType:e}function fe(e){return V(e)||j(e)||L(e)||M(e)||q(e)||G(e)}function ve(e){if(!fe(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL named type.`);return e}function he(e){if(e){let a=e;for(;le(a);)a=a.ofType;return a}}function ge(e){return"function"==typeof e?e():e}function ye(e){return"function"==typeof e?e():e}class be{constructor(e){var a,t,i,n;const r=null!==(a=e.parseValue)&&void 0!==a?a:m;this.name=C(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!==(t=e.serialize)&&void 0!==t?t:m,this.parseValue=r,this.parseLiteral=null!==(i=e.parseLiteral)&&void 0!==i?i:(e,a)=>r(A(e,a)),this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(n=e.extensionASTNodes)&&void 0!==n?n:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||(0,o.U)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,p.N)(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||(0,o.U)(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||(0,o.U)(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class De{constructor(e){var a;this.name=C(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._fields=()=>_e(e),this._interfaces=()=>xe(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||(0,o.U)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,p.N)(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Te(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function xe(e){var a;const t=ge(null!==(a=e.interfaces)&&void 0!==a?a:[]);return Array.isArray(t)||(0,o.U)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),t}function _e(e){const a=ye(e.fields);return Ee(a)||(0,o.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),y(a,(a,t)=>{var i;Ee(a)||(0,o.U)(!1,`${e.name}.${t} field config must be an object.`),null==a.resolve||"function"==typeof a.resolve||(0,o.U)(!1,`${e.name}.${t} field resolver must be a function if provided, but got: ${(0,p.N)(a.resolve)}.`);const n=null!==(i=a.args)&&void 0!==i?i:{};return Ee(n)||(0,o.U)(!1,`${e.name}.${t} args must be an object with argument names as keys.`),{name:C(t),description:a.description,type:a.type,args:we(n),resolve:a.resolve,subscribe:a.subscribe,deprecationReason:a.deprecationReason,extensions:N(a.extensions),astNode:a.astNode}})}function we(e){return Object.entries(e).map(([e,a])=>({name:C(e),description:a.description,type:a.type,defaultValue:a.defaultValue,deprecationReason:a.deprecationReason,extensions:N(a.extensions),astNode:a.astNode}))}function Ee(e){return(0,v.Z)(e)&&!Array.isArray(e)}function Te(e){return y(e,e=>({description:e.description,type:e.type,args:Ne(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function Ne(e){return g(e,e=>e.name,e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function Fe(e){return J(e.type)&&void 0===e.defaultValue}class Oe{constructor(e){var a;this.name=C(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._fields=_e.bind(void 0,e),this._interfaces=xe.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,o.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,p.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Te(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Ae{constructor(e){var a;this.name=C(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._types=Se.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,o.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,p.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return"function"==typeof this._types&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Se(e){const a=ge(e.types);return Array.isArray(a)||(0,o.U)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),a}class Ce{constructor(e){var a;this.name=C(e.name),this.description=e.description,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._values="function"==typeof e.values?e.values:Ie(this.name,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return"function"==typeof this._values&&(this._values=Ie(this.name,this._values())),this._values}getValue(e){return null===this._nameLookup&&(this._nameLookup=h(this.getValues(),e=>e.name)),this._nameLookup[e]}serialize(e){null===this._valueLookup&&(this._valueLookup=new Map(this.getValues().map(e=>[e.value,e])));const a=this._valueLookup.get(e);if(void 0===a)throw new l.eO(`Enum "${this.name}" cannot represent value: ${(0,p.N)(e)}`);return a.name}parseValue(e){if("string"!=typeof e){const a=(0,p.N)(e);throw new l.eO(`Enum "${this.name}" cannot represent non-string value: ${a}.`+ke(this,a))}const a=this.getValue(e);if(null==a)throw new l.eO(`Value "${e}" does not exist in "${this.name}" enum.`+ke(this,e));return a.value}parseLiteral(e,a){if(e.kind!==F.b.ENUM){const a=(0,O.y)(e);throw new l.eO(`Enum "${this.name}" cannot represent non-enum value: ${a}.`+ke(this,a),{nodes:e})}const t=this.getValue(e.value);if(null==t){const a=(0,O.y)(e);throw new l.eO(`Value "${a}" does not exist in "${this.name}" enum.`+ke(this,a),{nodes:e})}return t.value}toConfig(){const e=g(this.getValues(),e=>e.name,e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function ke(e,a){return u("the enum value",w(a,e.getValues().map(e=>e.name)))}function Ie(e,a){return Ee(a)||(0,o.U)(!1,`${e} values must be an object with value names as keys.`),Object.entries(a).map(([a,t])=>(Ee(t)||(0,o.U)(!1,`${e}.${a} must refer to an object with a "value" key representing an internal value but got: ${(0,p.N)(t)}.`),{name:k(a),description:t.description,value:void 0!==t.value?t.value:a,deprecationReason:t.deprecationReason,extensions:N(t.extensions),astNode:t.astNode}))}class $e{constructor(e){var a,t;this.name=C(e.name),this.description=e.description,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this.isOneOf=null!==(t=e.isOneOf)&&void 0!==t&&t,this._fields=Ve.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){const e=y(this.getFields(),e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function Ve(e){const a=ye(e.fields);return Ee(a)||(0,o.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),y(a,(a,t)=>(!("resolve"in a)||(0,o.U)(!1,`${e.name}.${t} field has a resolve property, but Input Types cannot define resolvers.`),{name:C(t),description:a.description,type:a.type,defaultValue:a.defaultValue,deprecationReason:a.deprecationReason,extensions:N(a.extensions),astNode:a.astNode}))}function Re(e){return J(e.type)&&void 0===e.defaultValue}function je(e,a){return e===a||(J(e)&&J(a)||!(!Q(e)||!Q(a)))&&je(e.ofType,a.ofType)}function Pe(e,a,t){return a===t||(J(t)?!!J(a)&&Pe(e,a.ofType,t.ofType):J(a)?Pe(e,a.ofType,t):Q(t)?!!Q(a)&&Pe(e,a.ofType,t.ofType):!Q(a)&&(oe(t)&&(L(a)||j(a))&&e.isSubType(t,a)))}function Le(e,a,t){return a===t||(oe(a)?oe(t)?e.getPossibleTypes(a).some(a=>e.isSubType(t,a)):e.isSubType(a,t):!!oe(t)&&e.isSubType(t,a))}var Be=t(42868);const Me=2147483647,Ue=-2147483648,qe=new be({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const a=We(e);if("boolean"==typeof a)return a?1:0;let t=a;if("string"==typeof a&&""!==a&&(t=Number(a)),"number"!=typeof t||!Number.isInteger(t))throw new l.eO(`Int cannot represent non-integer value: ${(0,p.N)(a)}`);if(t>Me||t<Ue)throw new l.eO("Int cannot represent non 32-bit signed integer value: "+(0,p.N)(a));return t},parseValue(e){if("number"!=typeof e||!Number.isInteger(e))throw new l.eO(`Int cannot represent non-integer value: ${(0,p.N)(e)}`);if(e>Me||e<Ue)throw new l.eO(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==F.b.INT)throw new l.eO(`Int cannot represent non-integer value: ${(0,O.y)(e)}`,{nodes:e});const a=parseInt(e.value,10);if(a>Me||a<Ue)throw new l.eO(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return a}}),ze=new be({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const a=We(e);if("boolean"==typeof a)return a?1:0;let t=a;if("string"==typeof a&&""!==a&&(t=Number(a)),"number"!=typeof t||!Number.isFinite(t))throw new l.eO(`Float cannot represent non numeric value: ${(0,p.N)(a)}`);return t},parseValue(e){if("number"!=typeof e||!Number.isFinite(e))throw new l.eO(`Float cannot represent non numeric value: ${(0,p.N)(e)}`);return e},parseLiteral(e){if(e.kind!==F.b.FLOAT&&e.kind!==F.b.INT)throw new l.eO(`Float cannot represent non numeric value: ${(0,O.y)(e)}`,e);return parseFloat(e.value)}}),Ge=new be({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const a=We(e);if("string"==typeof a)return a;if("boolean"==typeof a)return a?"true":"false";if("number"==typeof a&&Number.isFinite(a))return a.toString();throw new l.eO(`String cannot represent value: ${(0,p.N)(e)}`)},parseValue(e){if("string"!=typeof e)throw new l.eO(`String cannot represent a non string value: ${(0,p.N)(e)}`);return e},parseLiteral(e){if(e.kind!==F.b.STRING)throw new l.eO(`String cannot represent a non string value: ${(0,O.y)(e)}`,{nodes:e});return e.value}}),Ye=new be({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const a=We(e);if("boolean"==typeof a)return a;if(Number.isFinite(a))return 0!==a;throw new l.eO(`Boolean cannot represent a non boolean value: ${(0,p.N)(a)}`)},parseValue(e){if("boolean"!=typeof e)throw new l.eO(`Boolean cannot represent a non boolean value: ${(0,p.N)(e)}`);return e},parseLiteral(e){if(e.kind!==F.b.BOOLEAN)throw new l.eO(`Boolean cannot represent a non boolean value: ${(0,O.y)(e)}`,{nodes:e});return e.value}}),Qe=new be({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const a=We(e);if("string"==typeof a)return a;if(Number.isInteger(a))return String(a);throw new l.eO(`ID cannot represent value: ${(0,p.N)(e)}`)},parseValue(e){if("string"==typeof e)return e;if("number"==typeof e&&Number.isInteger(e))return e.toString();throw new l.eO(`ID cannot represent value: ${(0,p.N)(e)}`)},parseLiteral(e){if(e.kind!==F.b.STRING&&e.kind!==F.b.INT)throw new l.eO("ID cannot represent a non-string and non-integer value: "+(0,O.y)(e),{nodes:e});return e.value}}),He=Object.freeze([Ge,qe,ze,Ye,Qe]);function Je(e){return He.some(({name:a})=>e.name===a)}function We(e){if((0,v.Z)(e)){if("function"==typeof e.valueOf){const a=e.valueOf();if(!(0,v.Z)(a))return a}if("function"==typeof e.toJSON)return e.toJSON()}return e}function Ke(e){return(0,f.h)(e,Ze)}function Xe(e){if(!Ke(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL directive.`);return e}class Ze{constructor(e){var a,t;this.name=C(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!==(a=e.isRepeatable)&&void 0!==a&&a,this.extensions=N(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||(0,o.U)(!1,`@${e.name} locations must be an Array.`);const i=null!==(t=e.args)&&void 0!==t?t:{};(0,v.Z)(i)&&!Array.isArray(i)||(0,o.U)(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=we(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Ne(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const ea=new Ze({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Be.H.FIELD,Be.H.FRAGMENT_SPREAD,Be.H.INLINE_FRAGMENT],args:{if:{type:new pe(Ye),description:"Included when true."}}}),aa=new Ze({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Be.H.FIELD,Be.H.FRAGMENT_SPREAD,Be.H.INLINE_FRAGMENT],args:{if:{type:new pe(Ye),description:"Skipped when true."}}}),ta="No longer supported",ia=new Ze({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Be.H.FIELD_DEFINITION,Be.H.ARGUMENT_DEFINITION,Be.H.INPUT_FIELD_DEFINITION,Be.H.ENUM_VALUE],args:{reason:{type:Ge,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:ta}}}),na=new Ze({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Be.H.SCALAR],args:{url:{type:new pe(Ge),description:"The URL that specifies the behavior of this scalar."}}}),oa=new Ze({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Be.H.INPUT_OBJECT],args:{}}),ra=Object.freeze([ea,aa,ia,na,oa]);function sa(e){return ra.some(({name:a})=>a===e.name)}var pa=t(71306);function la(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function da(e,a){if(J(a)){const t=da(e,a.ofType);return(null==t?void 0:t.kind)===F.b.NULL?null:t}if(null===e)return{kind:F.b.NULL};if(void 0===e)return null;if(Q(a)){const t=a.ofType;if(la(e)){const a=[];for(const i of e){const e=da(i,t);null!=e&&a.push(e)}return{kind:F.b.LIST,values:a}}return da(e,t)}if(G(a)){if(!(0,v.Z)(e))return null;const t=[];for(const i of Object.values(a.getFields())){const a=da(e[i.name],i.type);a&&t.push({kind:F.b.OBJECT_FIELD,name:{kind:F.b.NAME,value:i.name},value:a})}return{kind:F.b.OBJECT,fields:t}}if(ae(a)){const t=a.serialize(e);if(null==t)return null;if("boolean"==typeof t)return{kind:F.b.BOOLEAN,value:t};if("number"==typeof t&&Number.isFinite(t)){const e=String(t);return ca.test(e)?{kind:F.b.INT,value:e}:{kind:F.b.FLOAT,value:e}}if("string"==typeof t)return q(a)?{kind:F.b.ENUM,value:t}:a===Qe&&ca.test(t)?{kind:F.b.INT,value:t}:{kind:F.b.STRING,value:t};throw new TypeError(`Cannot convert value to AST: ${(0,p.N)(t)}.`)}(0,pa.V)(!1,"Unexpected input type: "+(0,p.N)(a))}const ca=/^-?(?:0|[1-9][0-9]*)$/,ua=new De({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Ge,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new pe(new se(new pe(va))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new pe(va),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:va,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:va,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new pe(new se(new pe(ma))),resolve:e=>e.getDirectives()}})}),ma=new De({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:()=>({name:{type:new pe(Ge),resolve:e=>e.name},description:{type:Ge,resolve:e=>e.description},isRepeatable:{type:new pe(Ye),resolve:e=>e.isRepeatable},locations:{type:new pe(new se(new pe(fa))),resolve:e=>e.locations},args:{type:new pe(new se(new pe(ga))),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve:(e,{includeDeprecated:a})=>a?e.args:e.args.filter(e=>null==e.deprecationReason)}})}),fa=new Ce({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:Be.H.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Be.H.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Be.H.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Be.H.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Be.H.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Be.H.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Be.H.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Be.H.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Be.H.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Be.H.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Be.H.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Be.H.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Be.H.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Be.H.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Be.H.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Be.H.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Be.H.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Be.H.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Be.H.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),va=new De({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new pe(Da),resolve:e=>V(e)?ba.SCALAR:j(e)?ba.OBJECT:L(e)?ba.INTERFACE:M(e)?ba.UNION:q(e)?ba.ENUM:G(e)?ba.INPUT_OBJECT:Q(e)?ba.LIST:J(e)?ba.NON_NULL:void(0,pa.V)(!1,`Unexpected type: "${(0,p.N)(e)}".`)},name:{type:Ge,resolve:e=>"name"in e?e.name:void 0},description:{type:Ge,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Ge,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new se(new pe(ha)),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve(e,{includeDeprecated:a}){if(j(e)||L(e)){const t=Object.values(e.getFields());return a?t:t.filter(e=>null==e.deprecationReason)}}},interfaces:{type:new se(new pe(va)),resolve(e){if(j(e)||L(e))return e.getInterfaces()}},possibleTypes:{type:new se(new pe(va)),resolve(e,a,t,{schema:i}){if(oe(e))return i.getPossibleTypes(e)}},enumValues:{type:new se(new pe(ya)),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve(e,{includeDeprecated:a}){if(q(e)){const t=e.getValues();return a?t:t.filter(e=>null==e.deprecationReason)}}},inputFields:{type:new se(new pe(ga)),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve(e,{includeDeprecated:a}){if(G(e)){const t=Object.values(e.getFields());return a?t:t.filter(e=>null==e.deprecationReason)}}},ofType:{type:va,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:Ye,resolve:e=>{if(G(e))return e.isOneOf}}})}),ha=new De({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new pe(Ge),resolve:e=>e.name},description:{type:Ge,resolve:e=>e.description},args:{type:new pe(new se(new pe(ga))),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve:(e,{includeDeprecated:a})=>a?e.args:e.args.filter(e=>null==e.deprecationReason)},type:{type:new pe(va),resolve:e=>e.type},isDeprecated:{type:new pe(Ye),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ge,resolve:e=>e.deprecationReason}})}),ga=new De({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new pe(Ge),resolve:e=>e.name},description:{type:Ge,resolve:e=>e.description},type:{type:new pe(va),resolve:e=>e.type},defaultValue:{type:Ge,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:a,defaultValue:t}=e,i=da(t,a);return i?(0,O.y)(i):null}},isDeprecated:{type:new pe(Ye),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ge,resolve:e=>e.deprecationReason}})}),ya=new De({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new pe(Ge),resolve:e=>e.name},description:{type:Ge,resolve:e=>e.description},isDeprecated:{type:new pe(Ye),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ge,resolve:e=>e.deprecationReason}})});var ba;!function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"}(ba||(ba={}));const Da=new Ce({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:ba.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:ba.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:ba.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:ba.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:ba.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:ba.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:ba.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:ba.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),xa={name:"__schema",type:new pe(ua),description:"Access the current type schema of this server.",args:[],resolve:(e,a,t,{schema:i})=>i,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},_a={name:"__type",type:va,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new pe(Ge),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:a},t,{schema:i})=>i.getType(a),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},wa={name:"__typename",type:new pe(Ge),description:"The name of the current Object type at runtime.",args:[],resolve:(e,a,t,{parentType:i})=>i.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Ea=Object.freeze([ua,ma,fa,va,ha,ga,ya,Da]);function Ta(e){return Ea.some(({name:a})=>e.name===a)}function Na(e){return(0,f.h)(e,Oa)}function Fa(e){if(!Na(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL schema.`);return e}class Oa{constructor(e){var a,t;this.__validationErrors=!0===e.assumeValid?[]:void 0,(0,v.Z)(e)||(0,o.U)(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||(0,o.U)(!1,`"types" must be Array if provided but got: ${(0,p.N)(e.types)}.`),!e.directives||Array.isArray(e.directives)||(0,o.U)(!1,`"directives" must be Array if provided but got: ${(0,p.N)(e.directives)}.`),this.description=e.description,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!==(t=e.directives)&&void 0!==t?t:ra;const i=new Set(e.types);if(null!=e.types)for(const a of e.types)i.delete(a),Aa(a,i);null!=this._queryType&&Aa(this._queryType,i),null!=this._mutationType&&Aa(this._mutationType,i),null!=this._subscriptionType&&Aa(this._subscriptionType,i);for(const e of this._directives)if(Ke(e))for(const a of e.args)Aa(a.type,i);Aa(ua,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const e of i){if(null==e)continue;const a=e.name;if(a||(0,o.U)(!1,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[a])throw new Error(`Schema must contain uniquely named types but contains multiple types named "${a}".`);if(this._typeMap[a]=e,L(e)){for(const a of e.getInterfaces())if(L(a)){let t=this._implementationsMap[a.name];void 0===t&&(t=this._implementationsMap[a.name]={objects:[],interfaces:[]}),t.interfaces.push(e)}}else if(j(e))for(const a of e.getInterfaces())if(L(a)){let t=this._implementationsMap[a.name];void 0===t&&(t=this._implementationsMap[a.name]={objects:[],interfaces:[]}),t.objects.push(e)}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case d.cE.QUERY:return this.getQueryType();case d.cE.MUTATION:return this.getMutationType();case d.cE.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return M(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const a=this._implementationsMap[e.name];return null!=a?a:{objects:[],interfaces:[]}}isSubType(e,a){let t=this._subTypeMap[e.name];if(void 0===t){if(t=Object.create(null),M(e))for(const a of e.getTypes())t[a.name]=!0;else{const a=this.getImplementations(e);for(const e of a.objects)t[e.name]=!0;for(const e of a.interfaces)t[e.name]=!0}this._subTypeMap[e.name]=t}return void 0!==t[a.name]}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(a=>a.name===e)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:void 0!==this.__validationErrors}}}function Aa(e,a){const t=he(e);if(!a.has(t))if(a.add(t),M(t))for(const e of t.getTypes())Aa(e,a);else if(j(t)||L(t)){for(const e of t.getInterfaces())Aa(e,a);for(const e of Object.values(t.getFields())){Aa(e.type,a);for(const t of e.args)Aa(t.type,a)}}else if(G(t))for(const e of Object.values(t.getFields()))Aa(e.type,a);return a}function Sa(e){if(Fa(e),e.__validationErrors)return e.__validationErrors;const a=new ka(e);!function(e){const a=e.schema,t=a.getQueryType();if(t){if(!j(t)){var i;e.reportError(`Query root type must be Object type, it cannot be ${(0,p.N)(t)}.`,null!==(i=Ia(a,d.cE.QUERY))&&void 0!==i?i:t.astNode)}}else e.reportError("Query root type must be provided.",a.astNode);const n=a.getMutationType();var o;n&&!j(n)&&e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,p.N)(n)}.`,null!==(o=Ia(a,d.cE.MUTATION))&&void 0!==o?o:n.astNode);const r=a.getSubscriptionType();var s;r&&!j(r)&&e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,p.N)(r)}.`,null!==(s=Ia(a,d.cE.SUBSCRIPTION))&&void 0!==s?s:r.astNode)}(a),function(e){for(const t of e.schema.getDirectives())if(Ke(t)){$a(e,t),0===t.locations.length&&e.reportError(`Directive @${t.name} must include 1 or more locations.`,t.astNode);for(const i of t.args){var a;if($a(e,i),K(i.type)||e.reportError(`The type of @${t.name}(${i.name}:) must be Input Type but got: ${(0,p.N)(i.type)}.`,i.astNode),Fe(i)&&null!=i.deprecationReason)e.reportError(`Required argument @${t.name}(${i.name}:) cannot be deprecated.`,[Ga(i.astNode),null===(a=i.astNode)||void 0===a?void 0:a.type])}}else e.reportError(`Expected directive but got: ${(0,p.N)(t)}.`,null==t?void 0:t.astNode)}(a),function(e){const a=function(e){const a=Object.create(null),t=[],i=Object.create(null);return n;function n(o){if(a[o.name])return;a[o.name]=!0,i[o.name]=t.length;const r=Object.values(o.getFields());for(const a of r)if(J(a.type)&&G(a.type.ofType)){const o=a.type.ofType,r=i[o.name];if(t.push(a),void 0===r)n(o);else{const a=t.slice(r),i=a.map(e=>e.name).join(".");e.reportError(`Cannot reference Input Object "${o.name}" within itself through a series of non-null fields: "${i}".`,a.map(e=>e.astNode))}t.pop()}i[o.name]=void 0}}(e),t=e.schema.getTypeMap();for(const i of Object.values(t))fe(i)?(Ta(i)||$a(e,i),j(i)||L(i)?(Va(e,i),Ra(e,i)):M(i)?La(e,i):q(i)?Ba(e,i):G(i)&&(Ma(e,i),a(i))):e.reportError(`Expected GraphQL named type but got: ${(0,p.N)(i)}.`,i.astNode)}(a);const t=a.getErrors();return e.__validationErrors=t,t}function Ca(e){const a=Sa(e);if(0!==a.length)throw new Error(a.map(e=>e.message).join("\n\n"))}class ka{constructor(e){this._errors=[],this.schema=e}reportError(e,a){const t=Array.isArray(a)?a.filter(Boolean):a;this._errors.push(new l.eO(e,{nodes:t}))}getErrors(){return this._errors}}function Ia(e,a){var t;return null===(t=[e.astNode,...e.extensionASTNodes].flatMap(e=>{var a;return null!==(a=null==e?void 0:e.operationTypes)&&void 0!==a?a:[]}).find(e=>e.operation===a))||void 0===t?void 0:t.type}function $a(e,a){a.name.startsWith("__")&&e.reportError(`Name "${a.name}" must not begin with "__", which is reserved by GraphQL introspection.`,a.astNode)}function Va(e,a){const t=Object.values(a.getFields());0===t.length&&e.reportError(`Type ${a.name} must define one or more fields.`,[a.astNode,...a.extensionASTNodes]);for(const r of t){var i;if($a(e,r),!Z(r.type))e.reportError(`The type of ${a.name}.${r.name} must be Output Type but got: ${(0,p.N)(r.type)}.`,null===(i=r.astNode)||void 0===i?void 0:i.type);for(const t of r.args){const i=t.name;var n,o;if($a(e,t),!K(t.type))e.reportError(`The type of ${a.name}.${r.name}(${i}:) must be Input Type but got: ${(0,p.N)(t.type)}.`,null===(n=t.astNode)||void 0===n?void 0:n.type);if(Fe(t)&&null!=t.deprecationReason)e.reportError(`Required argument ${a.name}.${r.name}(${i}:) cannot be deprecated.`,[Ga(t.astNode),null===(o=t.astNode)||void 0===o?void 0:o.type])}}}function Ra(e,a){const t=Object.create(null);for(const i of a.getInterfaces())L(i)?a!==i?t[i.name]?e.reportError(`Type ${a.name} can only implement ${i.name} once.`,qa(a,i)):(t[i.name]=!0,Pa(e,a,i),ja(e,a,i)):e.reportError(`Type ${a.name} cannot implement itself because it would create a circular reference.`,qa(a,i)):e.reportError(`Type ${(0,p.N)(a)} must only implement Interface types, it cannot implement ${(0,p.N)(i)}.`,qa(a,i))}function ja(e,a,t){const i=a.getFields();for(const l of Object.values(t.getFields())){const d=l.name,c=i[d];if(c){var n,o;if(!Pe(e.schema,c.type,l.type))e.reportError(`Interface field ${t.name}.${d} expects type ${(0,p.N)(l.type)} but ${a.name}.${d} is type ${(0,p.N)(c.type)}.`,[null===(n=l.astNode)||void 0===n?void 0:n.type,null===(o=c.astNode)||void 0===o?void 0:o.type]);for(const i of l.args){const n=i.name,o=c.args.find(e=>e.name===n);var r,s;if(o){if(!je(i.type,o.type))e.reportError(`Interface field argument ${t.name}.${d}(${n}:) expects type ${(0,p.N)(i.type)} but ${a.name}.${d}(${n}:) is type ${(0,p.N)(o.type)}.`,[null===(r=i.astNode)||void 0===r?void 0:r.type,null===(s=o.astNode)||void 0===s?void 0:s.type])}else e.reportError(`Interface field argument ${t.name}.${d}(${n}:) expected but ${a.name}.${d} does not provide it.`,[i.astNode,c.astNode])}for(const i of c.args){const n=i.name;!l.args.find(e=>e.name===n)&&Fe(i)&&e.reportError(`Object field ${a.name}.${d} includes required argument ${n} that is missing from the Interface field ${t.name}.${d}.`,[i.astNode,l.astNode])}}else e.reportError(`Interface field ${t.name}.${d} expected but ${a.name} does not provide it.`,[l.astNode,a.astNode,...a.extensionASTNodes])}}function Pa(e,a,t){const i=a.getInterfaces();for(const n of t.getInterfaces())i.includes(n)||e.reportError(n===a?`Type ${a.name} cannot implement ${t.name} because it would create a circular reference.`:`Type ${a.name} must implement ${n.name} because it is implemented by ${t.name}.`,[...qa(t,n),...qa(a,t)])}function La(e,a){const t=a.getTypes();0===t.length&&e.reportError(`Union type ${a.name} must define one or more member types.`,[a.astNode,...a.extensionASTNodes]);const i=Object.create(null);for(const n of t)i[n.name]?e.reportError(`Union type ${a.name} can only include type ${n.name} once.`,za(a,n.name)):(i[n.name]=!0,j(n)||e.reportError(`Union type ${a.name} can only include Object types, it cannot include ${(0,p.N)(n)}.`,za(a,String(n))))}function Ba(e,a){const t=a.getValues();0===t.length&&e.reportError(`Enum type ${a.name} must define one or more values.`,[a.astNode,...a.extensionASTNodes]);for(const a of t)$a(e,a)}function Ma(e,a){const t=Object.values(a.getFields());0===t.length&&e.reportError(`Input Object type ${a.name} must define one or more fields.`,[a.astNode,...a.extensionASTNodes]);for(const o of t){var i,n;if($a(e,o),!K(o.type))e.reportError(`The type of ${a.name}.${o.name} must be Input Type but got: ${(0,p.N)(o.type)}.`,null===(i=o.astNode)||void 0===i?void 0:i.type);if(Re(o)&&null!=o.deprecationReason)e.reportError(`Required input field ${a.name}.${o.name} cannot be deprecated.`,[Ga(o.astNode),null===(n=o.astNode)||void 0===n?void 0:n.type]);a.isOneOf&&Ua(a,o,e)}}function Ua(e,a,t){var i;J(a.type)&&t.reportError(`OneOf input field ${e.name}.${a.name} must be nullable.`,null===(i=a.astNode)||void 0===i?void 0:i.type);void 0!==a.defaultValue&&t.reportError(`OneOf input field ${e.name}.${a.name} cannot have a default value.`,a.astNode)}function qa(e,a){const{astNode:t,extensionASTNodes:i}=e;return(null!=t?[t,...i]:i).flatMap(e=>{var a;return null!==(a=e.interfaces)&&void 0!==a?a:[]}).filter(e=>e.name.value===a.name)}function za(e,a){const{astNode:t,extensionASTNodes:i}=e;return(null!=t?[t,...i]:i).flatMap(e=>{var a;return null!==(a=e.types)&&void 0!==a?a:[]}).filter(e=>e.name.value===a)}function Ga(e){var a;return null==e||null===(a=e.directives)||void 0===a?void 0:a.find(e=>e.name.value===ia.name)}var Ya=t(90424);function Qa(e,a){switch(a.kind){case F.b.LIST_TYPE:{const t=Qa(e,a.type);return t&&new se(t)}case F.b.NON_NULL_TYPE:{const t=Qa(e,a.type);return t&&new pe(t)}case F.b.NAMED_TYPE:return e.getType(a.name.value)}}class Ha{constructor(e,a,t){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=t?t:Ja,a&&(K(a)&&this._inputTypeStack.push(a),ie(a)&&this._parentTypeStack.push(a),Z(a)&&this._typeStack.push(a))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const a=this._schema;switch(e.kind){case F.b.SELECTION_SET:{const e=he(this.getType());this._parentTypeStack.push(ie(e)?e:void 0);break}case F.b.FIELD:{const t=this.getParentType();let i,n;t&&(i=this._getFieldDef(a,t,e),i&&(n=i.type)),this._fieldDefStack.push(i),this._typeStack.push(Z(n)?n:void 0);break}case F.b.DIRECTIVE:this._directive=a.getDirective(e.name.value);break;case F.b.OPERATION_DEFINITION:{const t=a.getRootType(e.operation);this._typeStack.push(j(t)?t:void 0);break}case F.b.INLINE_FRAGMENT:case F.b.FRAGMENT_DEFINITION:{const t=e.typeCondition,i=t?Qa(a,t):he(this.getType());this._typeStack.push(Z(i)?i:void 0);break}case F.b.VARIABLE_DEFINITION:{const t=Qa(a,e.type);this._inputTypeStack.push(K(t)?t:void 0);break}case F.b.ARGUMENT:{var t;let a,i;const n=null!==(t=this.getDirective())&&void 0!==t?t:this.getFieldDef();n&&(a=n.args.find(a=>a.name===e.name.value),a&&(i=a.type)),this._argument=a,this._defaultValueStack.push(a?a.defaultValue:void 0),this._inputTypeStack.push(K(i)?i:void 0);break}case F.b.LIST:{const e=me(this.getInputType()),a=Q(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push(K(a)?a:void 0);break}case F.b.OBJECT_FIELD:{const a=he(this.getInputType());let t,i;G(a)&&(i=a.getFields()[e.name.value],i&&(t=i.type)),this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(K(t)?t:void 0);break}case F.b.ENUM:{const a=he(this.getInputType());let t;q(a)&&(t=a.getValue(e.value)),this._enumValue=t;break}}}leave(e){switch(e.kind){case F.b.SELECTION_SET:this._parentTypeStack.pop();break;case F.b.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case F.b.DIRECTIVE:this._directive=null;break;case F.b.OPERATION_DEFINITION:case F.b.INLINE_FRAGMENT:case F.b.FRAGMENT_DEFINITION:this._typeStack.pop();break;case F.b.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case F.b.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case F.b.LIST:case F.b.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case F.b.ENUM:this._enumValue=null}}}function Ja(e,a,t){const i=t.name.value;return i===xa.name&&e.getQueryType()===a?xa:i===_a.name&&e.getQueryType()===a?_a:i===wa.name&&ie(a)?wa:j(a)||L(a)?a.getFields()[i]:void 0}function Wa(e,a){return{enter(...t){const i=t[0];e.enter(i);const n=(0,Ya.XO)(a,i.kind).enter;if(n){const o=n.apply(a,t);return void 0!==o&&(e.leave(i),(0,d.Ll)(o)&&e.enter(o)),o}},leave(...t){const i=t[0],n=(0,Ya.XO)(a,i.kind).leave;let o;return n&&(o=n.apply(a,t)),e.leave(i),o}}}var Ka=t(3420);function Xa(e){return{Document(a){for(const t of a.definitions)if(!(0,Ka._m)(t)){const a=t.kind===F.b.SCHEMA_DEFINITION||t.kind===F.b.SCHEMA_EXTENSION?"schema":'"'+t.name.value+'"';e.reportError(new l.eO(`The ${a} definition is not executable.`,{nodes:t}))}return!1}}}function Za(e){return{Field(a){const t=e.getParentType();if(t){if(!e.getFieldDef()){const i=e.getSchema(),n=a.name.value;let o=u("to use an inline fragment on",function(e,a,t){if(!oe(a))return[];const i=new Set,n=Object.create(null);for(const r of e.getPossibleTypes(a))if(r.getFields()[t]){i.add(r),n[r.name]=1;for(const e of r.getInterfaces()){var o;e.getFields()[t]&&(i.add(e),n[e.name]=(null!==(o=n[e.name])&&void 0!==o?o:0)+1)}}return[...i].sort((a,t)=>{const i=n[t.name]-n[a.name];return 0!==i?i:L(a)&&e.isSubType(a,t)?-1:L(t)&&e.isSubType(t,a)?1:b(a.name,t.name)}).map(e=>e.name)}(i,t,n));""===o&&(o=u(function(e,a){if(j(e)||L(e)){return w(a,Object.keys(e.getFields()))}return[]}(t,n))),e.reportError(new l.eO(`Cannot query field "${n}" on type "${t.name}".`+o,{nodes:a}))}}}}}function et(e){return{InlineFragment(a){const t=a.typeCondition;if(t){const a=Qa(e.getSchema(),t);if(a&&!ie(a)){const a=(0,O.y)(t);e.reportError(new l.eO(`Fragment cannot condition on non composite type "${a}".`,{nodes:t}))}}},FragmentDefinition(a){const t=Qa(e.getSchema(),a.typeCondition);if(t&&!ie(t)){const t=(0,O.y)(a.typeCondition);e.reportError(new l.eO(`Fragment "${a.name.value}" cannot condition on non composite type "${t}".`,{nodes:a.typeCondition}))}}}}function at(e){return{...tt(e),Argument(a){const t=e.getArgument(),i=e.getFieldDef(),n=e.getParentType();if(!t&&i&&n){const t=a.name.value,o=w(t,i.args.map(e=>e.name));e.reportError(new l.eO(`Unknown argument "${t}" on field "${n.name}.${i.name}".`+u(o),{nodes:a}))}}}}function tt(e){const a=Object.create(null),t=e.getSchema(),i=t?t.getDirectives():ra;for(const e of i)a[e.name]=e.args.map(e=>e.name);const n=e.getDocument().definitions;for(const e of n)if(e.kind===F.b.DIRECTIVE_DEFINITION){var o;const t=null!==(o=e.arguments)&&void 0!==o?o:[];a[e.name.value]=t.map(e=>e.name.value)}return{Directive(t){const i=t.name.value,n=a[i];if(t.arguments&&n)for(const a of t.arguments){const t=a.name.value;if(!n.includes(t)){const o=w(t,n);e.reportError(new l.eO(`Unknown argument "${t}" on directive "@${i}".`+u(o),{nodes:a}))}}return!1}}}function it(e){const a=Object.create(null),t=e.getSchema(),i=t?t.getDirectives():ra;for(const e of i)a[e.name]=e.locations;const n=e.getDocument().definitions;for(const e of n)e.kind===F.b.DIRECTIVE_DEFINITION&&(a[e.name.value]=e.locations.map(e=>e.value));return{Directive(t,i,n,o,r){const s=t.name.value,c=a[s];if(!c)return void e.reportError(new l.eO(`Unknown directive "@${s}".`,{nodes:t}));const u=function(e){const a=e[e.length-1];switch("kind"in a||(0,pa.V)(!1),a.kind){case F.b.OPERATION_DEFINITION:return function(e){switch(e){case d.cE.QUERY:return Be.H.QUERY;case d.cE.MUTATION:return Be.H.MUTATION;case d.cE.SUBSCRIPTION:return Be.H.SUBSCRIPTION}}(a.operation);case F.b.FIELD:return Be.H.FIELD;case F.b.FRAGMENT_SPREAD:return Be.H.FRAGMENT_SPREAD;case F.b.INLINE_FRAGMENT:return Be.H.INLINE_FRAGMENT;case F.b.FRAGMENT_DEFINITION:return Be.H.FRAGMENT_DEFINITION;case F.b.VARIABLE_DEFINITION:return Be.H.VARIABLE_DEFINITION;case F.b.SCHEMA_DEFINITION:case F.b.SCHEMA_EXTENSION:return Be.H.SCHEMA;case F.b.SCALAR_TYPE_DEFINITION:case F.b.SCALAR_TYPE_EXTENSION:return Be.H.SCALAR;case F.b.OBJECT_TYPE_DEFINITION:case F.b.OBJECT_TYPE_EXTENSION:return Be.H.OBJECT;case F.b.FIELD_DEFINITION:return Be.H.FIELD_DEFINITION;case F.b.INTERFACE_TYPE_DEFINITION:case F.b.INTERFACE_TYPE_EXTENSION:return Be.H.INTERFACE;case F.b.UNION_TYPE_DEFINITION:case F.b.UNION_TYPE_EXTENSION:return Be.H.UNION;case F.b.ENUM_TYPE_DEFINITION:case F.b.ENUM_TYPE_EXTENSION:return Be.H.ENUM;case F.b.ENUM_VALUE_DEFINITION:return Be.H.ENUM_VALUE;case F.b.INPUT_OBJECT_TYPE_DEFINITION:case F.b.INPUT_OBJECT_TYPE_EXTENSION:return Be.H.INPUT_OBJECT;case F.b.INPUT_VALUE_DEFINITION:{const a=e[e.length-3];return"kind"in a||(0,pa.V)(!1),a.kind===F.b.INPUT_OBJECT_TYPE_DEFINITION?Be.H.INPUT_FIELD_DEFINITION:Be.H.ARGUMENT_DEFINITION}default:(0,pa.V)(!1,"Unexpected kind: "+(0,p.N)(a.kind))}}(r);u&&!c.includes(u)&&e.reportError(new l.eO(`Directive "@${s}" may not be used on ${u}.`,{nodes:t}))}}}function nt(e){return{FragmentSpread(a){const t=a.name.value;e.getFragment(t)||e.reportError(new l.eO(`Unknown fragment "${t}".`,{nodes:a.name}))}}}function ot(e){const a=e.getSchema(),t=a?a.getTypeMap():Object.create(null),i=Object.create(null);for(const a of e.getDocument().definitions)(0,Ka.a6)(a)&&(i[a.name.value]=!0);const n=[...Object.keys(t),...Object.keys(i)];return{NamedType(a,o,r,s,p){const d=a.name.value;if(!t[d]&&!i[d]){var c;const t=null!==(c=p[2])&&void 0!==c?c:r,i=null!=t&&("kind"in(m=t)&&((0,Ka.xu)(m)||(0,Ka.fT)(m)));if(i&&rt.includes(d))return;const o=w(d,i?rt.concat(n):n);e.reportError(new l.eO(`Unknown type "${d}".`+u(o),{nodes:a}))}var m}}}const rt=[...He,...Ea].map(e=>e.name);function st(e){let a=0;return{Document(e){a=e.definitions.filter(e=>e.kind===F.b.OPERATION_DEFINITION).length},OperationDefinition(t){!t.name&&a>1&&e.reportError(new l.eO("This anonymous operation must be the only defined operation.",{nodes:t}))}}}function pt(e){var a,t,i;const n=e.getSchema(),o=null!==(a=null!==(t=null!==(i=null==n?void 0:n.astNode)&&void 0!==i?i:null==n?void 0:n.getQueryType())&&void 0!==t?t:null==n?void 0:n.getMutationType())&&void 0!==a?a:null==n?void 0:n.getSubscriptionType();let r=0;return{SchemaDefinition(a){o?e.reportError(new l.eO("Cannot define a new schema within a schema extension.",{nodes:a})):(r>0&&e.reportError(new l.eO("Must provide only one schema definition.",{nodes:a})),++r)}}}const lt=3;function dt(e){function a(t,i=Object.create(null),n=0){if(t.kind===F.b.FRAGMENT_SPREAD){const o=t.name.value;if(!0===i[o])return!1;const r=e.getFragment(o);if(!r)return!1;try{return i[o]=!0,a(r,i,n)}finally{i[o]=void 0}}if(t.kind===F.b.FIELD&&("fields"===t.name.value||"interfaces"===t.name.value||"possibleTypes"===t.name.value||"inputFields"===t.name.value)&&++n>=lt)return!0;if("selectionSet"in t&&t.selectionSet)for(const e of t.selectionSet.selections)if(a(e,i,n))return!0;return!1}return{Field(t){if(("__schema"===t.name.value||"__type"===t.name.value)&&a(t))return e.reportError(new l.eO("Maximum introspection depth exceeded",{nodes:[t]})),!1}}}function ct(e){const a=Object.create(null),t=[],i=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>(n(e),!1)};function n(o){if(a[o.name.value])return;const r=o.name.value;a[r]=!0;const s=e.getFragmentSpreads(o.selectionSet);if(0!==s.length){i[r]=t.length;for(const a of s){const o=a.name.value,r=i[o];if(t.push(a),void 0===r){const a=e.getFragment(o);a&&n(a)}else{const a=t.slice(r),i=a.slice(0,-1).map(e=>'"'+e.name.value+'"').join(", ");e.reportError(new l.eO(`Cannot spread fragment "${o}" within itself`+(""!==i?` via ${i}.`:"."),{nodes:a}))}t.pop()}i[r]=void 0}}}function ut(e){let a=Object.create(null);return{OperationDefinition:{enter(){a=Object.create(null)},leave(t){const i=e.getRecursiveVariableUsages(t);for(const{node:n}of i){const i=n.name.value;!0!==a[i]&&e.reportError(new l.eO(t.name?`Variable "$${i}" is not defined by operation "${t.name.value}".`:`Variable "$${i}" is not defined.`,{nodes:[n,t]}))}}},VariableDefinition(e){a[e.variable.name.value]=!0}}}function mt(e){const a=[],t=[];return{OperationDefinition:e=>(a.push(e),!1),FragmentDefinition:e=>(t.push(e),!1),Document:{leave(){const i=Object.create(null);for(const t of a)for(const a of e.getRecursivelyReferencedFragments(t))i[a.name.value]=!0;for(const a of t){const t=a.name.value;!0!==i[t]&&e.reportError(new l.eO(`Fragment "${t}" is never used.`,{nodes:a}))}}}}}function ft(e){let a=[];return{OperationDefinition:{enter(){a=[]},leave(t){const i=Object.create(null),n=e.getRecursiveVariableUsages(t);for(const{node:e}of n)i[e.name.value]=!0;for(const n of a){const a=n.variable.name.value;!0!==i[a]&&e.reportError(new l.eO(t.name?`Variable "$${a}" is never used in operation "${t.name.value}".`:`Variable "$${a}" is never used.`,{nodes:n}))}}},VariableDefinition(e){a.push(e)}}}function vt(e){switch(e.kind){case F.b.OBJECT:return{...e,fields:(a=e.fields,a.map(e=>({...e,value:vt(e.value)})).sort((e,a)=>b(e.name.value,a.name.value)))};case F.b.LIST:return{...e,values:e.values.map(vt)};case F.b.INT:case F.b.FLOAT:case F.b.STRING:case F.b.BOOLEAN:case F.b.NULL:case F.b.ENUM:case F.b.VARIABLE:return e}var a}function ht(e){return Array.isArray(e)?e.map(([e,a])=>`subfields "${e}" conflict because `+ht(a)).join(" and "):e}function gt(e){const a=new Ft,t=new Ot,i=new Map;return{SelectionSet(n){const o=function(e,a,t,i,n,o){const r=[],[s,p]=Et(e,a,n,o);if(function(e,a,t,i,n,o){for(const[r,s]of Object.entries(o))if(s.length>1)for(let o=0;o<s.length;o++)for(let p=o+1;p<s.length;p++){const l=xt(e,t,i,n,!1,r,s[o],s[p]);l&&a.push(l)}}(e,r,a,t,i,s),0!==p.length)for(let n=0;n<p.length;n++){yt(e,r,a,t,i,!1,s,p[n]);for(let o=n+1;o<p.length;o++)bt(e,r,a,t,i,!1,p[n],p[o])}return r}(e,i,a,t,e.getParentType(),n);for(const[[a,t],i,n]of o){const o=ht(t);e.reportError(new l.eO(`Fields "${a}" conflict because ${o}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:i.concat(n)}))}}}}function yt(e,a,t,i,n,o,r,s){if(i.has(r,s,o))return;i.add(r,s,o);const p=e.getFragment(s);if(!p)return;const[l,d]=Tt(e,t,p);if(r!==l){Dt(e,a,t,i,n,o,r,l);for(const s of d)yt(e,a,t,i,n,o,r,s)}}function bt(e,a,t,i,n,o,r,s){if(r===s)return;if(n.has(r,s,o))return;n.add(r,s,o);const p=e.getFragment(r),l=e.getFragment(s);if(!p||!l)return;const[d,c]=Tt(e,t,p),[u,m]=Tt(e,t,l);Dt(e,a,t,i,n,o,d,u);for(const s of m)bt(e,a,t,i,n,o,r,s);for(const r of c)bt(e,a,t,i,n,o,r,s)}function Dt(e,a,t,i,n,o,r,s){for(const[p,l]of Object.entries(r)){const r=s[p];if(r)for(const s of l)for(const l of r){const r=xt(e,t,i,n,o,p,s,l);r&&a.push(r)}}}function xt(e,a,t,i,n,o,r,s){const[l,d,c]=r,[u,m,f]=s,v=n||l!==u&&j(l)&&j(u);if(!v){const e=d.name.value,a=m.name.value;if(e!==a)return[[o,`"${e}" and "${a}" are different fields`],[d],[m]];if(!function(e,a){const t=e.arguments,i=a.arguments;if(void 0===t||0===t.length)return void 0===i||0===i.length;if(void 0===i||0===i.length)return!1;if(t.length!==i.length)return!1;const n=new Map(i.map(({name:e,value:a})=>[e.value,a]));return t.every(e=>{const a=e.value,t=n.get(e.name.value);return void 0!==t&&_t(a)===_t(t)})}(d,m))return[[o,"they have differing arguments"],[d],[m]]}const h=null==c?void 0:c.type,g=null==f?void 0:f.type;if(h&&g&&wt(h,g))return[[o,`they return conflicting types "${(0,p.N)(h)}" and "${(0,p.N)(g)}"`],[d],[m]];const y=d.selectionSet,b=m.selectionSet;if(y&&b){const n=function(e,a,t,i,n,o,r,s,p){const l=[],[d,c]=Et(e,a,o,r),[u,m]=Et(e,a,s,p);Dt(e,l,a,t,i,n,d,u);for(const o of m)yt(e,l,a,t,i,n,d,o);for(const o of c)yt(e,l,a,t,i,n,u,o);for(const o of c)for(const r of m)bt(e,l,a,t,i,n,o,r);return l}(e,a,t,i,v,he(h),y,he(g),b);return function(e,a,t,i){if(e.length>0)return[[a,e.map(([e])=>e)],[t,...e.map(([,e])=>e).flat()],[i,...e.map(([,,e])=>e).flat()]]}(n,o,d,m)}}function _t(e){return(0,O.y)(vt(e))}function wt(e,a){return Q(e)?!Q(a)||wt(e.ofType,a.ofType):!!Q(a)||(J(e)?!J(a)||wt(e.ofType,a.ofType):!!J(a)||!(!ae(e)&&!ae(a))&&e!==a)}function Et(e,a,t,i){const n=a.get(i);if(n)return n;const o=Object.create(null),r=Object.create(null);Nt(e,t,i,o,r);const s=[o,Object.keys(r)];return a.set(i,s),s}function Tt(e,a,t){const i=a.get(t.selectionSet);if(i)return i;const n=Qa(e.getSchema(),t.typeCondition);return Et(e,a,n,t.selectionSet)}function Nt(e,a,t,i,n){for(const o of t.selections)switch(o.kind){case F.b.FIELD:{const e=o.name.value;let t;(j(a)||L(a))&&(t=a.getFields()[e]);const n=o.alias?o.alias.value:e;i[n]||(i[n]=[]),i[n].push([a,o,t]);break}case F.b.FRAGMENT_SPREAD:n[o.name.value]=!0;break;case F.b.INLINE_FRAGMENT:{const t=o.typeCondition,r=t?Qa(e.getSchema(),t):a;Nt(e,r,o.selectionSet,i,n);break}}}class Ft{constructor(){this._data=new Map}has(e,a,t){var i;const n=null===(i=this._data.get(e))||void 0===i?void 0:i.get(a);return void 0!==n&&(!!t||t===n)}add(e,a,t){const i=this._data.get(e);void 0===i?this._data.set(e,new Map([[a,t]])):i.set(a,t)}}class Ot{constructor(){this._orderedPairSet=new Ft}has(e,a,t){return e<a?this._orderedPairSet.has(e,a,t):this._orderedPairSet.has(a,e,t)}add(e,a,t){e<a?this._orderedPairSet.add(e,a,t):this._orderedPairSet.add(a,e,t)}}function At(e){return{InlineFragment(a){const t=e.getType(),i=e.getParentType();if(ie(t)&&ie(i)&&!Le(e.getSchema(),t,i)){const n=(0,p.N)(i),o=(0,p.N)(t);e.reportError(new l.eO(`Fragment cannot be spread here as objects of type "${n}" can never be of type "${o}".`,{nodes:a}))}},FragmentSpread(a){const t=a.name.value,i=function(e,a){const t=e.getFragment(a);if(t){const a=Qa(e.getSchema(),t.typeCondition);if(ie(a))return a}}(e,t),n=e.getParentType();if(i&&n&&!Le(e.getSchema(),i,n)){const o=(0,p.N)(n),r=(0,p.N)(i);e.reportError(new l.eO(`Fragment "${t}" cannot be spread here as objects of type "${o}" can never be of type "${r}".`,{nodes:a}))}}}}function St(e){const a=e.getSchema(),t=Object.create(null);for(const a of e.getDocument().definitions)(0,Ka.a6)(a)&&(t[a.name.value]=a);return{ScalarTypeExtension:i,ObjectTypeExtension:i,InterfaceTypeExtension:i,UnionTypeExtension:i,EnumTypeExtension:i,InputObjectTypeExtension:i};function i(i){const n=i.name.value,o=t[n],r=null==a?void 0:a.getType(n);let s;if(o?s=Ct[o.kind]:r&&(s=function(e){if(V(e))return F.b.SCALAR_TYPE_EXTENSION;if(j(e))return F.b.OBJECT_TYPE_EXTENSION;if(L(e))return F.b.INTERFACE_TYPE_EXTENSION;if(M(e))return F.b.UNION_TYPE_EXTENSION;if(q(e))return F.b.ENUM_TYPE_EXTENSION;if(G(e))return F.b.INPUT_OBJECT_TYPE_EXTENSION;(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))}(r)),s){if(s!==i.kind){const a=function(e){switch(e){case F.b.SCALAR_TYPE_EXTENSION:return"scalar";case F.b.OBJECT_TYPE_EXTENSION:return"object";case F.b.INTERFACE_TYPE_EXTENSION:return"interface";case F.b.UNION_TYPE_EXTENSION:return"union";case F.b.ENUM_TYPE_EXTENSION:return"enum";case F.b.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,pa.V)(!1,"Unexpected kind: "+(0,p.N)(e))}}(i.kind);e.reportError(new l.eO(`Cannot extend non-${a} type "${n}".`,{nodes:o?[o,i]:i}))}}else{const o=w(n,Object.keys({...t,...null==a?void 0:a.getTypeMap()}));e.reportError(new l.eO(`Cannot extend type "${n}" because it is not defined.`+u(o),{nodes:i.name}))}}}const Ct={[F.b.SCALAR_TYPE_DEFINITION]:F.b.SCALAR_TYPE_EXTENSION,[F.b.OBJECT_TYPE_DEFINITION]:F.b.OBJECT_TYPE_EXTENSION,[F.b.INTERFACE_TYPE_DEFINITION]:F.b.INTERFACE_TYPE_EXTENSION,[F.b.UNION_TYPE_DEFINITION]:F.b.UNION_TYPE_EXTENSION,[F.b.ENUM_TYPE_DEFINITION]:F.b.ENUM_TYPE_EXTENSION,[F.b.INPUT_OBJECT_TYPE_DEFINITION]:F.b.INPUT_OBJECT_TYPE_EXTENSION};function kt(e){return{...It(e),Field:{leave(a){var t;const i=e.getFieldDef();if(!i)return!1;const n=new Set(null===(t=a.arguments)||void 0===t?void 0:t.map(e=>e.name.value));for(const t of i.args)if(!n.has(t.name)&&Fe(t)){const n=(0,p.N)(t.type);e.reportError(new l.eO(`Field "${i.name}" argument "${t.name}" of type "${n}" is required, but it was not provided.`,{nodes:a}))}}}}}function It(e){var a;const t=Object.create(null),i=e.getSchema(),n=null!==(a=null==i?void 0:i.getDirectives())&&void 0!==a?a:ra;for(const e of n)t[e.name]=h(e.args.filter(Fe),e=>e.name);const o=e.getDocument().definitions;for(const e of o)if(e.kind===F.b.DIRECTIVE_DEFINITION){var r;const a=null!==(r=e.arguments)&&void 0!==r?r:[];t[e.name.value]=h(a.filter($t),e=>e.name.value)}return{Directive:{leave(a){const i=a.name.value,n=t[i];if(n){var o;const t=null!==(o=a.arguments)&&void 0!==o?o:[],r=new Set(t.map(e=>e.name.value));for(const[t,o]of Object.entries(n))if(!r.has(t)){const n=I(o.type)?(0,p.N)(o.type):(0,O.y)(o.type);e.reportError(new l.eO(`Directive "@${i}" argument "${t}" of type "${n}" is required, but it was not provided.`,{nodes:a}))}}}}}}function $t(e){return e.type.kind===F.b.NON_NULL_TYPE&&null==e.defaultValue}function Vt(e){return{Field(a){const t=e.getType(),i=a.selectionSet;if(t)if(ae(he(t))){if(i){const n=a.name.value,o=(0,p.N)(t);e.reportError(new l.eO(`Field "${n}" must not have a selection since type "${o}" has no subfields.`,{nodes:i}))}}else if(i){if(0===i.selections.length){const i=a.name.value,n=(0,p.N)(t);e.reportError(new l.eO(`Field "${i}" of type "${n}" must have at least one field selected.`,{nodes:a}))}}else{const i=a.name.value,n=(0,p.N)(t);e.reportError(new l.eO(`Field "${i}" of type "${n}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:a}))}}}}function Rt(e){return e.map(e=>"number"==typeof e?"["+e.toString()+"]":"."+e).join("")}function jt(e,a,t){return{prev:e,key:a,typename:t}}function Pt(e){const a=[];let t=e;for(;t;)a.push(t.key),t=t.prev;return a.reverse()}function Lt(e,a,t=Bt){return Mt(e,a,t,void 0)}function Bt(e,a,t){let i="Invalid value "+(0,p.N)(a);throw e.length>0&&(i+=` at "value${Rt(e)}"`),t.message=i+": "+t.message,t}function Mt(e,a,t,i){if(J(a))return null!=e?Mt(e,a.ofType,t,i):void t(Pt(i),e,new l.eO(`Expected non-nullable type "${(0,p.N)(a)}" not to be null.`));if(null==e)return null;if(Q(a)){const n=a.ofType;return la(e)?Array.from(e,(e,a)=>{const o=jt(i,a,void 0);return Mt(e,n,t,o)}):[Mt(e,n,t,i)]}if(G(a)){if(!(0,v.Z)(e)||Array.isArray(e))return void t(Pt(i),e,new l.eO(`Expected type "${a.name}" to be an object.`));const n={},o=a.getFields();for(const r of Object.values(o)){const o=e[r.name];if(void 0!==o)n[r.name]=Mt(o,r.type,t,jt(i,r.name,a.name));else if(void 0!==r.defaultValue)n[r.name]=r.defaultValue;else if(J(r.type)){const a=(0,p.N)(r.type);t(Pt(i),e,new l.eO(`Field "${r.name}" of required type "${a}" was not provided.`))}}for(const n of Object.keys(e))if(!o[n]){const o=w(n,Object.keys(a.getFields()));t(Pt(i),e,new l.eO(`Field "${n}" is not defined by type "${a.name}".`+u(o)))}if(a.isOneOf){const o=Object.keys(n);1!==o.length&&t(Pt(i),e,new l.eO(`Exactly one key must be specified for OneOf type "${a.name}".`));const r=o[0],s=n[r];null===s&&t(Pt(i).concat(r),s,new l.eO(`Field "${r}" must be non-null.`))}return n}if(ae(a)){let n;try{n=a.parseValue(e)}catch(n){return void(n instanceof l.eO?t(Pt(i),e,n):t(Pt(i),e,new l.eO(`Expected type "${a.name}". `+n.message,{originalError:n})))}return void 0===n&&t(Pt(i),e,new l.eO(`Expected type "${a.name}".`)),n}(0,pa.V)(!1,"Unexpected input type: "+(0,p.N)(a))}function Ut(e,a,t){if(e){if(e.kind===F.b.VARIABLE){const i=e.name.value;if(null==t||void 0===t[i])return;const n=t[i];if(null===n&&J(a))return;return n}if(J(a)){if(e.kind===F.b.NULL)return;return Ut(e,a.ofType,t)}if(e.kind===F.b.NULL)return null;if(Q(a)){const i=a.ofType;if(e.kind===F.b.LIST){const a=[];for(const n of e.values)if(qt(n,t)){if(J(i))return;a.push(null)}else{const e=Ut(n,i,t);if(void 0===e)return;a.push(e)}return a}const n=Ut(e,i,t);if(void 0===n)return;return[n]}if(G(a)){if(e.kind!==F.b.OBJECT)return;const i=Object.create(null),n=h(e.fields,e=>e.name.value);for(const e of Object.values(a.getFields())){const a=n[e.name];if(!a||qt(a.value,t)){if(void 0!==e.defaultValue)i[e.name]=e.defaultValue;else if(J(e.type))return;continue}const o=Ut(a.value,e.type,t);if(void 0===o)return;i[e.name]=o}if(a.isOneOf){const e=Object.keys(i);if(1!==e.length)return;if(null===i[e[0]])return}return i}if(ae(a)){let i;try{i=a.parseLiteral(e,t)}catch(e){return}if(void 0===i)return;return i}(0,pa.V)(!1,"Unexpected input type: "+(0,p.N)(a))}}function qt(e,a){return e.kind===F.b.VARIABLE&&(null==a||void 0===a[e.name.value])}function zt(e,a,t,i){const n=[],o=null==i?void 0:i.maxErrors;try{const i=function(e,a,t,i){const n={};for(const o of a){const a=o.variable.name.value,r=Qa(e,o.type);if(!K(r)){const e=(0,O.y)(o.type);i(new l.eO(`Variable "$${a}" expected value of type "${e}" which cannot be used as an input type.`,{nodes:o.type}));continue}if(!Qt(t,a)){if(o.defaultValue)n[a]=Ut(o.defaultValue,r);else if(J(r)){const e=(0,p.N)(r);i(new l.eO(`Variable "$${a}" of required type "${e}" was not provided.`,{nodes:o}))}continue}const s=t[a];if(null===s&&J(r)){const e=(0,p.N)(r);i(new l.eO(`Variable "$${a}" of non-null type "${e}" must not be null.`,{nodes:o}));continue}n[a]=Lt(s,r,(e,t,n)=>{let r=`Variable "$${a}" got invalid value `+(0,p.N)(t);e.length>0&&(r+=` at "${a}${Rt(e)}"`),i(new l.eO(r+"; "+n.message,{nodes:o,originalError:n}))})}return n}(e,a,t,e=>{if(null!=o&&n.length>=o)throw new l.eO("Too many errors processing variables, error limit reached. Execution aborted.");n.push(e)});if(0===n.length)return{coerced:i}}catch(e){n.push(e)}return{errors:n}}function Gt(e,a,t){var i;const n={},o=h(null!==(i=a.arguments)&&void 0!==i?i:[],e=>e.name.value);for(const i of e.args){const e=i.name,r=i.type,s=o[e];if(!s){if(void 0!==i.defaultValue)n[e]=i.defaultValue;else if(J(r))throw new l.eO(`Argument "${e}" of required type "${(0,p.N)(r)}" was not provided.`,{nodes:a});continue}const d=s.value;let c=d.kind===F.b.NULL;if(d.kind===F.b.VARIABLE){const a=d.name.value;if(null==t||!Qt(t,a)){if(void 0!==i.defaultValue)n[e]=i.defaultValue;else if(J(r))throw new l.eO(`Argument "${e}" of required type "${(0,p.N)(r)}" was provided the variable "$${a}" which was not provided a runtime value.`,{nodes:d});continue}c=null==t[a]}if(c&&J(r))throw new l.eO(`Argument "${e}" of non-null type "${(0,p.N)(r)}" must not be null.`,{nodes:d});const u=Ut(d,r,t);if(void 0===u)throw new l.eO(`Argument "${e}" has invalid value ${(0,O.y)(d)}.`,{nodes:d});n[e]=u}return n}function Yt(e,a,t){var i;const n=null===(i=a.directives)||void 0===i?void 0:i.find(a=>a.name.value===e.name);if(n)return Gt(e,n,t)}function Qt(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function Ht(e,a,t,i,n){const o=new Map;return Jt(e,a,t,i,n,o,new Set),o}function Jt(e,a,t,i,n,o,r){for(const s of n.selections)switch(s.kind){case F.b.FIELD:{if(!Wt(t,s))continue;const e=Xt(s),a=o.get(e);void 0!==a?a.push(s):o.set(e,[s]);break}case F.b.INLINE_FRAGMENT:if(!Wt(t,s)||!Kt(e,s,i))continue;Jt(e,a,t,i,s.selectionSet,o,r);break;case F.b.FRAGMENT_SPREAD:{const n=s.name.value;if(r.has(n)||!Wt(t,s))continue;r.add(n);const p=a[n];if(!p||!Kt(e,p,i))continue;Jt(e,a,t,i,p.selectionSet,o,r);break}}}function Wt(e,a){const t=Yt(aa,a,e);if(!0===(null==t?void 0:t.if))return!1;const i=Yt(ea,a,e);return!1!==(null==i?void 0:i.if)}function Kt(e,a,t){const i=a.typeCondition;if(!i)return!0;const n=Qa(e,i);return n===t||!!oe(n)&&e.isSubType(n,t)}function Xt(e){return e.alias?e.alias.value:e.name.value}function Zt(e){return{OperationDefinition(a){if("subscription"===a.operation){const t=e.getSchema(),i=t.getSubscriptionType();if(i){const n=a.name?a.name.value:null,o=Object.create(null),r=e.getDocument(),s=Object.create(null);for(const e of r.definitions)e.kind===F.b.FRAGMENT_DEFINITION&&(s[e.name.value]=e);const p=Ht(t,s,o,i,a.selectionSet);if(p.size>1){const a=[...p.values()].slice(1).flat();e.reportError(new l.eO(null!=n?`Subscription "${n}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:a}))}for(const a of p.values()){a[0].name.value.startsWith("__")&&e.reportError(new l.eO(null!=n?`Subscription "${n}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:a}))}}}}}}function ei(e,a){const t=new Map;for(const i of e){const e=a(i),n=t.get(e);void 0===n?t.set(e,[i]):n.push(i)}return t}function ai(e){return{DirectiveDefinition(e){var a;const i=null!==(a=e.arguments)&&void 0!==a?a:[];return t(`@${e.name.value}`,i)},InterfaceTypeDefinition:a,InterfaceTypeExtension:a,ObjectTypeDefinition:a,ObjectTypeExtension:a};function a(e){var a;const i=e.name.value,n=null!==(a=e.fields)&&void 0!==a?a:[];for(const e of n){var o;t(`${i}.${e.name.value}`,null!==(o=e.arguments)&&void 0!==o?o:[])}return!1}function t(a,t){const i=ei(t,e=>e.name.value);for(const[t,n]of i)n.length>1&&e.reportError(new l.eO(`Argument "${a}(${t}:)" can only be defined once.`,{nodes:n.map(e=>e.name)}));return!1}}function ti(e){return{Field:a,Directive:a};function a(a){var t;const i=ei(null!==(t=a.arguments)&&void 0!==t?t:[],e=>e.name.value);for(const[a,t]of i)t.length>1&&e.reportError(new l.eO(`There can be only one argument named "${a}".`,{nodes:t.map(e=>e.name)}))}}function ii(e){const a=Object.create(null),t=e.getSchema();return{DirectiveDefinition(i){const n=i.name.value;if(null==t||!t.getDirective(n))return a[n]?e.reportError(new l.eO(`There can be only one directive named "@${n}".`,{nodes:[a[n],i.name]})):a[n]=i.name,!1;e.reportError(new l.eO(`Directive "@${n}" already exists in the schema. It cannot be redefined.`,{nodes:i.name}))}}}function ni(e){const a=Object.create(null),t=e.getSchema(),i=t?t.getDirectives():ra;for(const e of i)a[e.name]=!e.isRepeatable;const n=e.getDocument().definitions;for(const e of n)e.kind===F.b.DIRECTIVE_DEFINITION&&(a[e.name.value]=!e.repeatable);const o=Object.create(null),r=Object.create(null);return{enter(t){if(!("directives"in t)||!t.directives)return;let i;if(t.kind===F.b.SCHEMA_DEFINITION||t.kind===F.b.SCHEMA_EXTENSION)i=o;else if((0,Ka.a6)(t)||(0,Ka.i7)(t)){const e=t.name.value;i=r[e],void 0===i&&(r[e]=i=Object.create(null))}else i=Object.create(null);for(const n of t.directives){const t=n.name.value;a[t]&&(i[t]?e.reportError(new l.eO(`The directive "@${t}" can only be used once at this location.`,{nodes:[i[t],n]})):i[t]=n)}}}}function oi(e){const a=e.getSchema(),t=a?a.getTypeMap():Object.create(null),i=Object.create(null);return{EnumTypeDefinition:n,EnumTypeExtension:n};function n(a){var n;const o=a.name.value;i[o]||(i[o]=Object.create(null));const r=null!==(n=a.values)&&void 0!==n?n:[],s=i[o];for(const a of r){const i=a.name.value,n=t[o];q(n)&&n.getValue(i)?e.reportError(new l.eO(`Enum value "${o}.${i}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:a.name})):s[i]?e.reportError(new l.eO(`Enum value "${o}.${i}" can only be defined once.`,{nodes:[s[i],a.name]})):s[i]=a.name}return!1}}function ri(e){const a=e.getSchema(),t=a?a.getTypeMap():Object.create(null),i=Object.create(null);return{InputObjectTypeDefinition:n,InputObjectTypeExtension:n,InterfaceTypeDefinition:n,InterfaceTypeExtension:n,ObjectTypeDefinition:n,ObjectTypeExtension:n};function n(a){var n;const o=a.name.value;i[o]||(i[o]=Object.create(null));const r=null!==(n=a.fields)&&void 0!==n?n:[],s=i[o];for(const a of r){const i=a.name.value;si(t[o],i)?e.reportError(new l.eO(`Field "${o}.${i}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:a.name})):s[i]?e.reportError(new l.eO(`Field "${o}.${i}" can only be defined once.`,{nodes:[s[i],a.name]})):s[i]=a.name}return!1}}function si(e,a){return!!(j(e)||L(e)||G(e))&&null!=e.getFields()[a]}function pi(e){const a=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(t){const i=t.name.value;return a[i]?e.reportError(new l.eO(`There can be only one fragment named "${i}".`,{nodes:[a[i],t.name]})):a[i]=t.name,!1}}}function li(e){const a=[];let t=Object.create(null);return{ObjectValue:{enter(){a.push(t),t=Object.create(null)},leave(){const e=a.pop();e||(0,pa.V)(!1),t=e}},ObjectField(a){const i=a.name.value;t[i]?e.reportError(new l.eO(`There can be only one input field named "${i}".`,{nodes:[t[i],a.name]})):t[i]=a.name}}}function di(e){const a=Object.create(null);return{OperationDefinition(t){const i=t.name;return i&&(a[i.value]?e.reportError(new l.eO(`There can be only one operation named "${i.value}".`,{nodes:[a[i.value],i]})):a[i.value]=i),!1},FragmentDefinition:()=>!1}}function ci(e){const a=e.getSchema(),t=Object.create(null),i=a?{query:a.getQueryType(),mutation:a.getMutationType(),subscription:a.getSubscriptionType()}:{};return{SchemaDefinition:n,SchemaExtension:n};function n(a){var n;const o=null!==(n=a.operationTypes)&&void 0!==n?n:[];for(const a of o){const n=a.operation,o=t[n];i[n]?e.reportError(new l.eO(`Type for ${n} already defined in the schema. It cannot be redefined.`,{nodes:a})):o?e.reportError(new l.eO(`There can be only one ${n} type in schema.`,{nodes:[o,a]})):t[n]=a}return!1}}function ui(e){const a=Object.create(null),t=e.getSchema();return{ScalarTypeDefinition:i,ObjectTypeDefinition:i,InterfaceTypeDefinition:i,UnionTypeDefinition:i,EnumTypeDefinition:i,InputObjectTypeDefinition:i};function i(i){const n=i.name.value;if(null==t||!t.getType(n))return a[n]?e.reportError(new l.eO(`There can be only one type named "${n}".`,{nodes:[a[n],i.name]})):a[n]=i.name,!1;e.reportError(new l.eO(`Type "${n}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}))}}function mi(e){return{OperationDefinition(a){var t;const i=ei(null!==(t=a.variableDefinitions)&&void 0!==t?t:[],e=>e.variable.name.value);for(const[a,t]of i)t.length>1&&e.reportError(new l.eO(`There can be only one variable named "$${a}".`,{nodes:t.map(e=>e.variable.name)}))}}}function fi(e){let a={};return{OperationDefinition:{enter(){a={}}},VariableDefinition(e){a[e.variable.name.value]=e},ListValue(a){if(!Q(me(e.getParentInputType())))return vi(e,a),!1},ObjectValue(a){const t=he(e.getInputType());if(!G(t))return vi(e,a),!1;const i=h(a.fields,e=>e.name.value);for(const n of Object.values(t.getFields())){if(!i[n.name]&&Re(n)){const i=(0,p.N)(n.type);e.reportError(new l.eO(`Field "${t.name}.${n.name}" of required type "${i}" was not provided.`,{nodes:a}))}}t.isOneOf&&function(e,a,t,i){var n;const o=Object.keys(i);if(1!==o.length)return void e.reportError(new l.eO(`OneOf Input Object "${t.name}" must specify exactly one key.`,{nodes:[a]}));const r=null===(n=i[o[0]])||void 0===n?void 0:n.value;r&&r.kind!==F.b.NULL||e.reportError(new l.eO(`Field "${t.name}.${o[0]}" must be non-null.`,{nodes:[a]}))}(e,a,t,i)},ObjectField(a){const t=he(e.getParentInputType());if(!e.getInputType()&&G(t)){const i=w(a.name.value,Object.keys(t.getFields()));e.reportError(new l.eO(`Field "${a.name.value}" is not defined by type "${t.name}".`+u(i),{nodes:a}))}},NullValue(a){const t=e.getInputType();J(t)&&e.reportError(new l.eO(`Expected value of type "${(0,p.N)(t)}", found ${(0,O.y)(a)}.`,{nodes:a}))},EnumValue:a=>vi(e,a),IntValue:a=>vi(e,a),FloatValue:a=>vi(e,a),StringValue:a=>vi(e,a),BooleanValue:a=>vi(e,a)}}function vi(e,a){const t=e.getInputType();if(!t)return;const i=he(t);if(!ae(i)){const i=(0,p.N)(t);return void e.reportError(new l.eO(`Expected value of type "${i}", found ${(0,O.y)(a)}.`,{nodes:a}))}try{if(void 0===i.parseLiteral(a,void 0)){const i=(0,p.N)(t);e.reportError(new l.eO(`Expected value of type "${i}", found ${(0,O.y)(a)}.`,{nodes:a}))}}catch(i){const n=(0,p.N)(t);i instanceof l.eO?e.reportError(i):e.reportError(new l.eO(`Expected value of type "${n}", found ${(0,O.y)(a)}; `+i.message,{nodes:a,originalError:i}))}}function hi(e){return{VariableDefinition(a){const t=Qa(e.getSchema(),a.type);if(void 0!==t&&!K(t)){const t=a.variable.name.value,i=(0,O.y)(a.type);e.reportError(new l.eO(`Variable "$${t}" cannot be non-input type "${i}".`,{nodes:a.type}))}}}}function gi(e){let a=Object.create(null);return{OperationDefinition:{enter(){a=Object.create(null)},leave(t){const i=e.getRecursiveVariableUsages(t);for(const{node:t,type:n,defaultValue:o,parentType:r}of i){const i=t.name.value,s=a[i];if(s&&n){const a=e.getSchema(),d=Qa(a,s.type);if(d&&!yi(a,d,s.defaultValue,n,o)){const a=(0,p.N)(d),o=(0,p.N)(n);e.reportError(new l.eO(`Variable "$${i}" of type "${a}" used in position expecting type "${o}".`,{nodes:[s,t]}))}G(r)&&r.isOneOf&&ce(d)&&e.reportError(new l.eO(`Variable "$${i}" is of type "${d}" but must be non-nullable to be used for OneOf Input Object "${r}".`,{nodes:[s,t]}))}}}},VariableDefinition(e){a[e.variable.name.value]=e}}}function yi(e,a,t,i,n){if(J(i)&&!J(a)){if(!(null!=t&&t.kind!==F.b.NULL)&&!(void 0!==n))return!1;return Pe(e,a,i.ofType)}return Pe(e,a,i)}const bi=Object.freeze([dt]),Di=Object.freeze([Xa,di,st,Zt,ot,et,hi,Vt,Za,pi,nt,mt,At,ct,mi,ut,ft,it,ni,at,ti,fi,kt,gi,gt,li,...bi]),xi=Object.freeze([pt,ci,ui,oi,ri,ai,ii,ot,it,ni,St,tt,ti,li,It]);class _i{constructor(e,a){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=a}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let a;if(this._fragments)a=this._fragments;else{a=Object.create(null);for(const e of this.getDocument().definitions)e.kind===F.b.FRAGMENT_DEFINITION&&(a[e.name.value]=e);this._fragments=a}return a[e]}getFragmentSpreads(e){let a=this._fragmentSpreads.get(e);if(!a){a=[];const t=[e];let i;for(;i=t.pop();)for(const e of i.selections)e.kind===F.b.FRAGMENT_SPREAD?a.push(e):e.selectionSet&&t.push(e.selectionSet);this._fragmentSpreads.set(e,a)}return a}getRecursivelyReferencedFragments(e){let a=this._recursivelyReferencedFragments.get(e);if(!a){a=[];const t=Object.create(null),i=[e.selectionSet];let n;for(;n=i.pop();)for(const e of this.getFragmentSpreads(n)){const n=e.name.value;if(!0!==t[n]){t[n]=!0;const e=this.getFragment(n);e&&(a.push(e),i.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,a)}return a}}class wi extends _i{constructor(e,a,t){super(e,t),this._schema=a}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Ei extends _i{constructor(e,a,t,i){super(a,i),this._schema=e,this._typeInfo=t,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let a=this._variableUsages.get(e);if(!a){const t=[],i=new Ha(this._schema);(0,Ya.YR)(e,Wa(i,{VariableDefinition:()=>!1,Variable(e){t.push({node:e,type:i.getInputType(),defaultValue:i.getDefaultValue(),parentType:i.getParentInputType()})}})),a=t,this._variableUsages.set(e,a)}return a}getRecursiveVariableUsages(e){let a=this._recursiveVariableUsages.get(e);if(!a){a=this.getVariableUsages(e);for(const t of this.getRecursivelyReferencedFragments(e))a=a.concat(this.getVariableUsages(t));this._recursiveVariableUsages.set(e,a)}return a}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Ti(e,a,t=Di,i,n=new Ha(e)){var r;const s=null!==(r=null==i?void 0:i.maxErrors)&&void 0!==r?r:100;a||(0,o.U)(!1,"Must provide document."),Ca(e);const p=Object.freeze({}),d=[],c=new Ei(e,a,n,e=>{if(d.length>=s)throw d.push(new l.eO("Too many validation errors, error limit reached. Validation aborted.")),p;d.push(e)}),u=(0,Ya.oP)(t.map(e=>e(c)));try{(0,Ya.YR)(a,Wa(n,u))}catch(e){if(e!==p)throw e}return d}function Ni(e,a,t=xi){const i=[],n=new wi(e,a,e=>{i.push(e)}),o=t.map(e=>e(n));return(0,Ya.YR)(e,(0,Ya.oP)(o)),i}function Fi(e){return Promise.all(Object.values(e)).then(a=>{const t=Object.create(null);for(const[i,n]of Object.keys(e).entries())t[n]=a[i];return t})}class Oi extends Error{constructor(e){super("Unexpected error value: "+(0,p.N)(e)),this.name="NonErrorThrown",this.thrownValue=e}}function Ai(e,a,t){var i;const n=(o=e)instanceof Error?o:new Oi(o);var o,r;return r=n,Array.isArray(r.path)?n:new l.eO(n.message,{nodes:null!==(i=n.nodes)&&void 0!==i?i:a,source:n.source,positions:n.positions,path:t,originalError:n})}const Si=function(e){let a;return function(t,i,n){void 0===a&&(a=new WeakMap);let o=a.get(t);void 0===o&&(o=new WeakMap,a.set(t,o));let r=o.get(i);void 0===r&&(r=new WeakMap,o.set(i,r));let s=r.get(n);return void 0===s&&(s=e(t,i,n),r.set(n,s)),s}}((e,a,t)=>function(e,a,t,i,n){const o=new Map,r=new Set;for(const s of n)s.selectionSet&&Jt(e,a,t,i,s.selectionSet,o,r);return o}(e.schema,e.fragments,e.variableValues,a,t));function Ci(e){arguments.length<2||(0,o.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:a,document:t,variableValues:i,rootValue:n}=e;$i(a,t,i);const s=Vi(e);if(!("schema"in s))return{errors:s};try{const{operation:e}=s,a=function(e,a,t){const i=e.schema.getRootType(a.operation);if(null==i)throw new l.eO(`Schema is not configured to execute ${a.operation} operation.`,{nodes:a});const n=Ht(e.schema,e.fragments,e.variableValues,i,a.selectionSet),o=void 0;switch(a.operation){case d.cE.QUERY:return Ri(e,i,t,o,n);case d.cE.MUTATION:return function(e,a,t,i,n){return function(e,a,t){let i=t;for(const t of e)i=r(i)?i.then(e=>a(e,t)):a(i,t);return i}(n.entries(),(n,[o,s])=>{const p=jt(i,o,a.name),l=ji(e,a,t,s,p);return void 0===l?n:r(l)?l.then(e=>(n[o]=e,n)):(n[o]=l,n)},Object.create(null))}(e,i,t,o,n);case d.cE.SUBSCRIPTION:return Ri(e,i,t,o,n)}}(s,e,n);return r(a)?a.then(e=>Ii(e,s.errors),e=>(s.errors.push(e),Ii(null,s.errors))):Ii(a,s.errors)}catch(e){return s.errors.push(e),Ii(null,s.errors)}}function ki(e){const a=Ci(e);if(r(a))throw new Error("GraphQL execution failed to complete synchronously.");return a}function Ii(e,a){return 0===a.length?{data:e}:{errors:a,data:e}}function $i(e,a,t){a||(0,o.U)(!1,"Must provide document."),Ca(e),null==t||(0,v.Z)(t)||(0,o.U)(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function Vi(e){var a,t,i;const{schema:n,document:o,rootValue:r,contextValue:s,variableValues:p,operationName:d,fieldResolver:c,typeResolver:u,subscribeFieldResolver:m,options:f}=e;let v;const h=Object.create(null);for(const e of o.definitions)switch(e.kind){case F.b.OPERATION_DEFINITION:if(null==d){if(void 0!==v)return[new l.eO("Must provide operation name if query contains multiple operations.")];v=e}else(null===(a=e.name)||void 0===a?void 0:a.value)===d&&(v=e);break;case F.b.FRAGMENT_DEFINITION:h[e.name.value]=e}if(!v)return null!=d?[new l.eO(`Unknown operation named "${d}".`)]:[new l.eO("Must provide an operation.")];const g=zt(n,null!==(t=v.variableDefinitions)&&void 0!==t?t:[],null!=p?p:{},{maxErrors:null!==(i=null==f?void 0:f.maxCoercionErrors)&&void 0!==i?i:50});return g.errors?g.errors:{schema:n,fragments:h,rootValue:r,contextValue:s,operation:v,variableValues:g.coerced,fieldResolver:null!=c?c:Gi,typeResolver:null!=u?u:zi,subscribeFieldResolver:null!=m?m:Gi,errors:[]}}function Ri(e,a,t,i,n){const o=Object.create(null);let s=!1;try{for(const[p,l]of n.entries()){const n=ji(e,a,t,l,jt(i,p,a.name));void 0!==n&&(o[p]=n,r(n)&&(s=!0))}}catch(e){if(s)return Fi(o).finally(()=>{throw e});throw e}return s?Fi(o):o}function ji(e,a,t,i,n){var o;const s=Yi(e.schema,a,i[0]);if(!s)return;const p=s.type,l=null!==(o=s.resolve)&&void 0!==o?o:e.fieldResolver,d=Pi(e,s,i,a,n);try{const a=Gt(s,i[0],e.variableValues),o=l(t,a,e.contextValue,d);let c;return c=r(o)?o.then(a=>Bi(e,p,i,d,n,a)):Bi(e,p,i,d,n,o),r(c)?c.then(void 0,a=>Li(Ai(a,i,Pt(n)),p,e)):c}catch(a){return Li(Ai(a,i,Pt(n)),p,e)}}function Pi(e,a,t,i,n){return{fieldName:a.name,fieldNodes:t,returnType:a.type,parentType:i,path:n,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Li(e,a,t){if(J(a))throw e;return t.errors.push(e),null}function Bi(e,a,t,i,n,o){if(o instanceof Error)throw o;if(J(a)){const r=Bi(e,a.ofType,t,i,n,o);if(null===r)throw new Error(`Cannot return null for non-nullable field ${i.parentType.name}.${i.fieldName}.`);return r}return null==o?null:Q(a)?function(e,a,t,i,n,o){if(!la(o))throw new l.eO(`Expected Iterable, but did not find one for field "${i.parentType.name}.${i.fieldName}".`);const s=a.ofType;let p=!1;const d=Array.from(o,(a,o)=>{const l=jt(n,o,void 0);try{let n;return n=r(a)?a.then(a=>Bi(e,s,t,i,l,a)):Bi(e,s,t,i,l,a),r(n)?(p=!0,n.then(void 0,a=>Li(Ai(a,t,Pt(l)),s,e))):n}catch(a){return Li(Ai(a,t,Pt(l)),s,e)}});return p?Promise.all(d):d}(e,a,t,i,n,o):ae(a)?function(e,a){const t=e.serialize(a);if(null==t)throw new Error(`Expected \`${(0,p.N)(e)}.serialize(${(0,p.N)(a)})\` to return non-nullable value, returned: ${(0,p.N)(t)}`);return t}(a,o):oe(a)?function(e,a,t,i,n,o){var s;const p=null!==(s=a.resolveType)&&void 0!==s?s:e.typeResolver,l=e.contextValue,d=p(o,l,i,a);if(r(d))return d.then(r=>Ui(e,Mi(r,e,a,t,i,o),t,i,n,o));return Ui(e,Mi(d,e,a,t,i,o),t,i,n,o)}(e,a,t,i,n,o):j(a)?Ui(e,a,t,i,n,o):void(0,pa.V)(!1,"Cannot complete value of unexpected output type: "+(0,p.N)(a))}function Mi(e,a,t,i,n,o){if(null==e)throw new l.eO(`Abstract type "${t.name}" must resolve to an Object type at runtime for field "${n.parentType.name}.${n.fieldName}". Either the "${t.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,i);if(j(e))throw new l.eO("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if("string"!=typeof e)throw new l.eO(`Abstract type "${t.name}" must resolve to an Object type at runtime for field "${n.parentType.name}.${n.fieldName}" with value ${(0,p.N)(o)}, received "${(0,p.N)(e)}".`);const r=a.schema.getType(e);if(null==r)throw new l.eO(`Abstract type "${t.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:i});if(!j(r))throw new l.eO(`Abstract type "${t.name}" was resolved to a non-object type "${e}".`,{nodes:i});if(!a.schema.isSubType(t,r))throw new l.eO(`Runtime Object type "${r.name}" is not a possible type for "${t.name}".`,{nodes:i});return r}function Ui(e,a,t,i,n,o){const s=Si(e,a,t);if(a.isTypeOf){const p=a.isTypeOf(o,e.contextValue,i);if(r(p))return p.then(i=>{if(!i)throw qi(a,o,t);return Ri(e,a,o,n,s)});if(!p)throw qi(a,o,t)}return Ri(e,a,o,n,s)}function qi(e,a,t){return new l.eO(`Expected value of type "${e.name}" but got: ${(0,p.N)(a)}.`,{nodes:t})}const zi=function(e,a,t,i){if((0,v.Z)(e)&&"string"==typeof e.__typename)return e.__typename;const n=t.schema.getPossibleTypes(i),o=[];for(let i=0;i<n.length;i++){const s=n[i];if(s.isTypeOf){const n=s.isTypeOf(e,a,t);if(r(n))o[i]=n;else if(n)return o.length&&Promise.allSettled(o).catch(()=>{}),s.name}}return o.length?Promise.all(o).then(e=>{for(let a=0;a<e.length;a++)if(e[a])return n[a].name}):void 0},Gi=function(e,a,t,i){if((0,v.Z)(e)||"function"==typeof e){const n=e[i.fieldName];return"function"==typeof n?e[i.fieldName](a,t,i):n}};function Yi(e,a,t){const i=t.name.value;return i===xa.name&&e.getQueryType()===a?xa:i===_a.name&&e.getQueryType()===a?_a:i===wa.name?wa:a.getFields()[i]}function Qi(e){return new Promise(a=>a(Ji(e)))}function Hi(e){const a=Ji(e);if(r(a))throw new Error("GraphQL execution failed to complete synchronously.");return a}function Ji(e){arguments.length<2||(0,o.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:a,source:t,rootValue:i,contextValue:n,variableValues:r,operationName:p,fieldResolver:l,typeResolver:d}=e,c=Sa(a);if(c.length>0)return{errors:c};let u;try{u=(0,s.qg)(t)}catch(e){return{errors:[e]}}const m=Ti(a,u);return m.length>0?{errors:m}:Ci({schema:a,document:u,rootValue:i,contextValue:n,variableValues:r,operationName:p,fieldResolver:l,typeResolver:d})}var Wi=t(39537),Ki=t(73971),Xi=t(8238),Zi=t(98472),en=t(12039);function an(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}async function tn(e){arguments.length<2||(0,o.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const a=await nn(e);if(!an(a))return a;return function(e,a){const t=e[Symbol.asyncIterator]();async function i(e){if(e.done)return e;try{return{value:await a(e.value),done:!1}}catch(e){if("function"==typeof t.return)try{await t.return()}catch(e){}throw e}}return{next:async()=>i(await t.next()),return:async()=>"function"==typeof t.return?i(await t.return()):{value:void 0,done:!0},async throw(e){if("function"==typeof t.throw)return i(await t.throw(e));throw e},[Symbol.asyncIterator](){return this}}}(a,a=>Ci({...e,rootValue:a}))}async function nn(...e){const a=function(e){const a=e[0];return a&&"document"in a?a:{schema:a,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}(e),{schema:t,document:i,variableValues:n}=a;$i(t,i,n);const o=Vi(a);if(!("schema"in o))return{errors:o};try{const e=await async function(e){const{schema:a,fragments:t,operation:i,variableValues:n,rootValue:o}=e,r=a.getSubscriptionType();if(null==r)throw new l.eO("Schema is not configured to execute subscription operation.",{nodes:i});const s=Ht(a,t,n,r,i.selectionSet),[p,d]=[...s.entries()][0],c=Yi(a,r,d[0]);if(!c){const e=d[0].name.value;throw new l.eO(`The subscription field "${e}" is not defined.`,{nodes:d})}const u=jt(void 0,p,r.name),m=Pi(e,c,d,r,u);try{var f;const a=Gt(c,d[0],n),t=e.contextValue,i=null!==(f=c.subscribe)&&void 0!==f?f:e.subscribeFieldResolver,r=await i(o,a,t,m);if(r instanceof Error)throw r;return r}catch(e){throw Ai(e,d,Pt(u))}}(o);if(!an(e))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,p.N)(e)}.`);return e}catch(e){if(e instanceof l.eO)return{errors:[e]};throw e}}function on(e){return{Field(a){const t=e.getFieldDef(),i=null==t?void 0:t.deprecationReason;if(t&&null!=i){const n=e.getParentType();null!=n||(0,pa.V)(!1),e.reportError(new l.eO(`The field ${n.name}.${t.name} is deprecated. ${i}`,{nodes:a}))}},Argument(a){const t=e.getArgument(),i=null==t?void 0:t.deprecationReason;if(t&&null!=i){const n=e.getDirective();if(null!=n)e.reportError(new l.eO(`Directive "@${n.name}" argument "${t.name}" is deprecated. ${i}`,{nodes:a}));else{const n=e.getParentType(),o=e.getFieldDef();null!=n&&null!=o||(0,pa.V)(!1),e.reportError(new l.eO(`Field "${n.name}.${o.name}" argument "${t.name}" is deprecated. ${i}`,{nodes:a}))}}},ObjectField(a){const t=he(e.getParentInputType());if(G(t)){const i=t.getFields()[a.name.value],n=null==i?void 0:i.deprecationReason;null!=n&&e.reportError(new l.eO(`The input field ${t.name}.${i.name} is deprecated. ${n}`,{nodes:a}))}},EnumValue(a){const t=e.getEnumValue(),i=null==t?void 0:t.deprecationReason;if(t&&null!=i){const n=he(e.getInputType());null!=n||(0,pa.V)(!1),e.reportError(new l.eO(`The enum value "${n.name}.${t.name}" is deprecated. ${i}`,{nodes:a}))}}}}function rn(e){return{Field(a){const t=he(e.getType());t&&Ta(t)&&e.reportError(new l.eO(`GraphQL introspection has been disabled, but the requested query contained the field "${a.name.value}".`,{nodes:a}))}}}var sn=t(59841);function pn(e){const a={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},t=a.descriptions?"description":"",i=a.specifiedByUrl?"specifiedByURL":"",n=a.directiveIsRepeatable?"isRepeatable":"",o=a.schemaDescription?t:"";function r(e){return a.inputValueDeprecation?e:""}const s=a.oneOf?"isOneOf":"";return`\n query IntrospectionQuery {\n __schema {\n ${o}\n queryType { name kind }\n mutationType { name kind }\n subscriptionType { name kind }\n types {\n ...FullType\n }\n directives {\n name\n ${t}\n ${n}\n locations\n args${r("(includeDeprecated: true)")} {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ${t}\n ${i}\n ${s}\n fields(includeDeprecated: true) {\n name\n ${t}\n args${r("(includeDeprecated: true)")} {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields${r("(includeDeprecated: true)")} {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ${t}\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ${t}\n type { ...TypeRef }\n defaultValue\n ${r("isDeprecated")}\n ${r("deprecationReason")}\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n `}function ln(e,a){let t=null;for(const n of e.definitions){var i;if(n.kind===F.b.OPERATION_DEFINITION)if(null==a){if(t)return null;t=n}else if((null===(i=n.name)||void 0===i?void 0:i.value)===a)return n}return t}function dn(e,a){if("query"===a.operation){const t=e.getQueryType();if(!t)throw new l.eO("Schema does not define the required query root type.",{nodes:a});return t}if("mutation"===a.operation){const t=e.getMutationType();if(!t)throw new l.eO("Schema is not configured for mutations.",{nodes:a});return t}if("subscription"===a.operation){const t=e.getSubscriptionType();if(!t)throw new l.eO("Schema is not configured for subscriptions.",{nodes:a});return t}throw new l.eO("Can only have query, mutation and subscription operations.",{nodes:a})}function cn(e,a){const t={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...a},i=ki({schema:e,document:(0,s.qg)(pn(t))});return!i.errors&&i.data||(0,pa.V)(!1),i.data}function un(e,a){(0,v.Z)(e)&&(0,v.Z)(e.__schema)||(0,o.U)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,p.N)(e)}.`);const t=e.__schema,i=g(t.types,e=>e.name,e=>function(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case ba.SCALAR:return new be({name:(i=e).name,description:i.description,specifiedByURL:i.specifiedByURL});case ba.OBJECT:return new De({name:(t=e).name,description:t.description,interfaces:()=>h(t),fields:()=>y(t)});case ba.INTERFACE:return new Oe({name:(a=e).name,description:a.description,interfaces:()=>h(a),fields:()=>y(a)});case ba.UNION:return function(e){if(!e.possibleTypes){const a=(0,p.N)(e);throw new Error(`Introspection result missing possibleTypes: ${a}.`)}return new Ae({name:e.name,description:e.description,types:()=>e.possibleTypes.map(m)})}(e);case ba.ENUM:return function(e){if(!e.enumValues){const a=(0,p.N)(e);throw new Error(`Introspection result missing enumValues: ${a}.`)}return new Ce({name:e.name,description:e.description,values:g(e.enumValues,e=>e.name,e=>({description:e.description,deprecationReason:e.deprecationReason}))})}(e);case ba.INPUT_OBJECT:return function(e){if(!e.inputFields){const a=(0,p.N)(e);throw new Error(`Introspection result missing inputFields: ${a}.`)}return new $e({name:e.name,description:e.description,fields:()=>D(e.inputFields),isOneOf:e.isOneOf})}(e)}var a;var t;var i;const n=(0,p.N)(e);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${n}.`)}(e));for(const e of[...He,...Ea])i[e.name]&&(i[e.name]=e);const n=t.queryType?m(t.queryType):null,r=t.mutationType?m(t.mutationType):null,l=t.subscriptionType?m(t.subscriptionType):null,d=t.directives?t.directives.map(function(e){if(!e.args){const a=(0,p.N)(e);throw new Error(`Introspection result missing directive args: ${a}.`)}if(!e.locations){const a=(0,p.N)(e);throw new Error(`Introspection result missing directive locations: ${a}.`)}return new Ze({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:D(e.args)})}):[];return new Oa({description:t.description,query:n,mutation:r,subscription:l,types:Object.values(i),directives:d,assumeValid:null==a?void 0:a.assumeValid});function c(e){if(e.kind===ba.LIST){const a=e.ofType;if(!a)throw new Error("Decorated type deeper than introspection query.");return new se(c(a))}if(e.kind===ba.NON_NULL){const a=e.ofType;if(!a)throw new Error("Decorated type deeper than introspection query.");const t=c(a);return new pe(ue(t))}return u(e)}function u(e){const a=e.name;if(!a)throw new Error(`Unknown type reference: ${(0,p.N)(e)}.`);const t=i[a];if(!t)throw new Error(`Invalid or incomplete schema, unknown type: ${a}. Ensure that a full introspection query is used in order to build a client schema.`);return t}function m(e){return P(u(e))}function f(e){return B(u(e))}function h(e){if(null===e.interfaces&&e.kind===ba.INTERFACE)return[];if(!e.interfaces){const a=(0,p.N)(e);throw new Error(`Introspection result missing interfaces: ${a}.`)}return e.interfaces.map(f)}function y(e){if(!e.fields)throw new Error(`Introspection result missing fields: ${(0,p.N)(e)}.`);return g(e.fields,e=>e.name,b)}function b(e){const a=c(e.type);if(!Z(a)){const e=(0,p.N)(a);throw new Error(`Introspection must provide output type for fields, but received: ${e}.`)}if(!e.args){const a=(0,p.N)(e);throw new Error(`Introspection result missing field args: ${a}.`)}return{description:e.description,deprecationReason:e.deprecationReason,type:a,args:D(e.args)}}function D(e){return g(e,e=>e.name,x)}function x(e){const a=c(e.type);if(!K(a)){const e=(0,p.N)(a);throw new Error(`Introspection must provide input type for arguments, but received: ${e}.`)}const t=null!=e.defaultValue?Ut((0,s.$x)(e.defaultValue),a):void 0;return{description:e.description,type:a,defaultValue:t,deprecationReason:e.deprecationReason}}}function mn(e,a,t){Fa(e),null!=a&&a.kind===F.b.DOCUMENT||(0,o.U)(!1,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&function(e,a){const t=Ni(e,a);if(0!==t.length)throw new Error(t.map(e=>e.message).join("\n\n"))}(a,e);const i=e.toConfig(),n=fn(i,a,t);return i===n?e:new Oa(n)}function fn(e,a,t){var i,n,o,r;const s=[],l=Object.create(null),d=[];let c;const u=[];for(const e of a.definitions)if(e.kind===F.b.SCHEMA_DEFINITION)c=e;else if(e.kind===F.b.SCHEMA_EXTENSION)u.push(e);else if((0,Ka.a6)(e))s.push(e);else if((0,Ka.i7)(e)){const a=e.name.value,t=l[a];l[a]=t?t.concat([e]):[e]}else e.kind===F.b.DIRECTIVE_DEFINITION&&d.push(e);if(0===Object.keys(l).length&&0===s.length&&0===d.length&&0===u.length&&null==c)return e;const m=Object.create(null);for(const a of e.types)m[a.name]=b(a);for(const e of s){var f;const a=e.name.value;m[a]=null!==(f=vn[a])&&void 0!==f?f:k(e)}const v={query:e.query&&g(e.query),mutation:e.mutation&&g(e.mutation),subscription:e.subscription&&g(e.subscription),...c&&_([c]),..._(u)};return{description:null===(i=c)||void 0===i||null===(n=i.description)||void 0===n?void 0:n.value,...v,types:Object.values(m),directives:[...e.directives.map(function(e){const a=e.toConfig();return new Ze({...a,args:y(a.args,x)})}),...d.map(function(e){var a;return new Ze({name:e.name.value,description:null===(a=e.description)||void 0===a?void 0:a.value,locations:e.locations.map(({value:e})=>e),isRepeatable:e.repeatable,args:N(e.arguments),astNode:e})})],extensions:Object.create(null),astNode:null!==(o=c)&&void 0!==o?o:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(u),assumeValid:null!==(r=null==t?void 0:t.assumeValid)&&void 0!==r&&r};function h(e){return Q(e)?new se(h(e.ofType)):J(e)?new pe(h(e.ofType)):g(e)}function g(e){return m[e.name]}function b(e){return Ta(e)||Je(e)?e:V(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];let n=t.specifiedByURL;for(const e of i){var o;n=null!==(o=gn(e))&&void 0!==o?o:n}return new be({...t,specifiedByURL:n,extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):j(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];return new De({...t,interfaces:()=>[...e.getInterfaces().map(g),...S(i)],fields:()=>({...y(t.fields,D),...T(i)}),extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):L(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];return new Oe({...t,interfaces:()=>[...e.getInterfaces().map(g),...S(i)],fields:()=>({...y(t.fields,D),...T(i)}),extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):M(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];return new Ae({...t,types:()=>[...e.getTypes().map(g),...C(i)],extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):q(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[e.name])&&void 0!==a?a:[];return new Ce({...t,values:{...t.values,...A(i)},extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):G(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];return new $e({...t,fields:()=>({...y(t.fields,e=>({...e,type:h(e.type)})),...O(i)}),extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):void(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))}function D(e){return{...e,type:h(e.type),args:e.args&&y(e.args,x)}}function x(e){return{...e,type:h(e.type)}}function _(e){const a={};for(const i of e){var t;const e=null!==(t=i.operationTypes)&&void 0!==t?t:[];for(const t of e)a[t.operation]=w(t.type)}return a}function w(e){var a;const t=e.name.value,i=null!==(a=vn[t])&&void 0!==a?a:m[t];if(void 0===i)throw new Error(`Unknown type: "${t}".`);return i}function E(e){return e.kind===F.b.LIST_TYPE?new se(E(e.type)):e.kind===F.b.NON_NULL_TYPE?new pe(E(e.type)):w(e)}function T(e){const a=Object.create(null);for(const n of e){var t;const e=null!==(t=n.fields)&&void 0!==t?t:[];for(const t of e){var i;a[t.name.value]={type:E(t.type),description:null===(i=t.description)||void 0===i?void 0:i.value,args:N(t.arguments),deprecationReason:hn(t),astNode:t}}}return a}function N(e){const a=null!=e?e:[],t=Object.create(null);for(const e of a){var i;const a=E(e.type);t[e.name.value]={type:a,description:null===(i=e.description)||void 0===i?void 0:i.value,defaultValue:Ut(e.defaultValue,a),deprecationReason:hn(e),astNode:e}}return t}function O(e){const a=Object.create(null);for(const n of e){var t;const e=null!==(t=n.fields)&&void 0!==t?t:[];for(const t of e){var i;const e=E(t.type);a[t.name.value]={type:e,description:null===(i=t.description)||void 0===i?void 0:i.value,defaultValue:Ut(t.defaultValue,e),deprecationReason:hn(t),astNode:t}}}return a}function A(e){const a=Object.create(null);for(const n of e){var t;const e=null!==(t=n.values)&&void 0!==t?t:[];for(const t of e){var i;a[t.name.value]={description:null===(i=t.description)||void 0===i?void 0:i.value,deprecationReason:hn(t),astNode:t}}}return a}function S(e){return e.flatMap(e=>{var a,t;return null!==(a=null===(t=e.interfaces)||void 0===t?void 0:t.map(w))&&void 0!==a?a:[]})}function C(e){return e.flatMap(e=>{var a,t;return null!==(a=null===(t=e.types)||void 0===t?void 0:t.map(w))&&void 0!==a?a:[]})}function k(e){var a;const t=e.name.value,i=null!==(a=l[t])&&void 0!==a?a:[];switch(e.kind){case F.b.OBJECT_TYPE_DEFINITION:{var n;const a=[e,...i];return new De({name:t,description:null===(n=e.description)||void 0===n?void 0:n.value,interfaces:()=>S(a),fields:()=>T(a),astNode:e,extensionASTNodes:i})}case F.b.INTERFACE_TYPE_DEFINITION:{var o;const a=[e,...i];return new Oe({name:t,description:null===(o=e.description)||void 0===o?void 0:o.value,interfaces:()=>S(a),fields:()=>T(a),astNode:e,extensionASTNodes:i})}case F.b.ENUM_TYPE_DEFINITION:{var r;const a=[e,...i];return new Ce({name:t,description:null===(r=e.description)||void 0===r?void 0:r.value,values:A(a),astNode:e,extensionASTNodes:i})}case F.b.UNION_TYPE_DEFINITION:{var s;const a=[e,...i];return new Ae({name:t,description:null===(s=e.description)||void 0===s?void 0:s.value,types:()=>C(a),astNode:e,extensionASTNodes:i})}case F.b.SCALAR_TYPE_DEFINITION:var p;return new be({name:t,description:null===(p=e.description)||void 0===p?void 0:p.value,specifiedByURL:gn(e),astNode:e,extensionASTNodes:i});case F.b.INPUT_OBJECT_TYPE_DEFINITION:{var d;const a=[e,...i];return new $e({name:t,description:null===(d=e.description)||void 0===d?void 0:d.value,fields:()=>O(a),astNode:e,extensionASTNodes:i,isOneOf:(c=e,Boolean(Yt(oa,c)))})}}var c}}const vn=h([...He,...Ea],e=>e.name);function hn(e){const a=Yt(ia,e);return null==a?void 0:a.reason}function gn(e){const a=Yt(na,e);return null==a?void 0:a.url}function yn(e,a){null!=e&&e.kind===F.b.DOCUMENT||(0,o.U)(!1,"Must provide valid Document AST."),!0!==(null==a?void 0:a.assumeValid)&&!0!==(null==a?void 0:a.assumeValidSDL)&&function(e){const a=Ni(e);if(0!==a.length)throw new Error(a.map(e=>e.message).join("\n\n"))}(e);const t=fn({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,a);if(null==t.astNode)for(const e of t.types)switch(e.name){case"Query":t.query=e;break;case"Mutation":t.mutation=e;break;case"Subscription":t.subscription=e}const i=[...t.directives,...ra.filter(e=>t.directives.every(a=>a.name!==e.name))];return new Oa({...t,directives:i})}function bn(e,a){return yn((0,s.qg)(e,{noLocation:null==a?void 0:a.noLocation,allowLegacyFragmentVariables:null==a?void 0:a.allowLegacyFragmentVariables}),{assumeValidSDL:null==a?void 0:a.assumeValidSDL,assumeValid:null==a?void 0:a.assumeValid})}function Dn(e){const a=e.toConfig(),t=g(_n(a.types),e=>e.name,function(e){if(V(e)||Ta(e))return e;if(j(e)){const a=e.toConfig();return new De({...a,interfaces:()=>l(a.interfaces),fields:()=>s(a.fields)})}if(L(e)){const a=e.toConfig();return new Oe({...a,interfaces:()=>l(a.interfaces),fields:()=>s(a.fields)})}if(M(e)){const a=e.toConfig();return new Ae({...a,types:()=>l(a.types)})}if(q(e)){const a=e.toConfig();return new Ce({...a,values:xn(a.values,e=>e)})}if(G(e)){const a=e.toConfig();return new $e({...a,fields:()=>xn(a.fields,e=>({...e,type:i(e.type)}))})}(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))});return new Oa({...a,types:Object.values(t),directives:_n(a.directives).map(function(e){const a=e.toConfig();return new Ze({...a,locations:wn(a.locations,e=>e),args:r(a.args)})}),query:o(a.query),mutation:o(a.mutation),subscription:o(a.subscription)});function i(e){return Q(e)?new se(i(e.ofType)):J(e)?new pe(i(e.ofType)):n(e)}function n(e){return t[e.name]}function o(e){return e&&n(e)}function r(e){return xn(e,e=>({...e,type:i(e.type)}))}function s(e){return xn(e,e=>({...e,type:i(e.type),args:e.args&&r(e.args)}))}function l(e){return _n(e).map(n)}}function xn(e,a){const t=Object.create(null);for(const i of Object.keys(e).sort(b))t[i]=a(e[i]);return t}function _n(e){return wn(e,e=>e.name)}function wn(e,a){return e.slice().sort((e,t)=>b(a(e),a(t)))}var En,Tn,Nn=t(67714);function Fn(e){return Sn(e,e=>!sa(e),An)}function On(e){return Sn(e,sa,Ta)}function An(e){return!Je(e)&&!Ta(e)}function Sn(e,a,t){const i=e.getDirectives().filter(a),n=Object.values(e.getTypeMap()).filter(t);return[Cn(e),...i.map(e=>function(e){return Ln(e)+"directive @"+e.name+Rn(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}(e)),...n.map(e=>kn(e))].filter(Boolean).join("\n\n")}function Cn(e){if(null==e.description&&function(e){const a=e.getQueryType();if(a&&"Query"!==a.name)return!1;const t=e.getMutationType();if(t&&"Mutation"!==t.name)return!1;const i=e.getSubscriptionType();if(i&&"Subscription"!==i.name)return!1;return!0}(e))return;const a=[],t=e.getQueryType();t&&a.push(` query: ${t.name}`);const i=e.getMutationType();i&&a.push(` mutation: ${i.name}`);const n=e.getSubscriptionType();return n&&a.push(` subscription: ${n.name}`),Ln(e)+`schema {\n${a.join("\n")}\n}`}function kn(e){return V(e)?function(e){return Ln(e)+`scalar ${e.name}`+function(e){if(null==e.specifiedByURL)return"";return` @specifiedBy(url: ${(0,O.y)({kind:F.b.STRING,value:e.specifiedByURL})})`}(e)}(e):j(e)?function(e){return Ln(e)+`type ${e.name}`+In(e)+$n(e)}(e):L(e)?function(e){return Ln(e)+`interface ${e.name}`+In(e)+$n(e)}(e):M(e)?function(e){const a=e.getTypes(),t=a.length?" = "+a.join(" | "):"";return Ln(e)+"union "+e.name+t}(e):q(e)?function(e){const a=e.getValues().map((e,a)=>Ln(e," ",!a)+" "+e.name+Pn(e.deprecationReason));return Ln(e)+`enum ${e.name}`+Vn(a)}(e):G(e)?function(e){const a=Object.values(e.getFields()).map((e,a)=>Ln(e," ",!a)+" "+jn(e));return Ln(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Vn(a)}(e):void(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))}function In(e){const a=e.getInterfaces();return a.length?" implements "+a.map(e=>e.name).join(" & "):""}function $n(e){return Vn(Object.values(e.getFields()).map((e,a)=>Ln(e," ",!a)+" "+e.name+Rn(e.args," ")+": "+String(e.type)+Pn(e.deprecationReason)))}function Vn(e){return 0!==e.length?" {\n"+e.join("\n")+"\n}":""}function Rn(e,a=""){return 0===e.length?"":e.every(e=>!e.description)?"("+e.map(jn).join(", ")+")":"(\n"+e.map((e,t)=>Ln(e," "+a,!t)+" "+a+jn(e)).join("\n")+"\n"+a+")"}function jn(e){const a=da(e.defaultValue,e.type);let t=e.name+": "+String(e.type);return a&&(t+=` = ${(0,O.y)(a)}`),t+Pn(e.deprecationReason)}function Pn(e){if(null==e)return"";if(e!==ta){return` @deprecated(reason: ${(0,O.y)({kind:F.b.STRING,value:e})})`}return" @deprecated"}function Ln(e,a="",t=!0){const{description:i}=e;if(null==i)return"";return(a&&!t?"\n"+a:a)+(0,O.y)({kind:F.b.STRING,value:i,block:(0,Nn.CS)(i)}).replace(/\n/g,"\n"+a)+"\n"}function Bn(e){const a=[];for(const t of e)a.push(...t.definitions);return{kind:F.b.DOCUMENT,definitions:a}}function Mn(e){const a=[],t=Object.create(null);for(const i of e.definitions)switch(i.kind){case F.b.OPERATION_DEFINITION:a.push(i);break;case F.b.FRAGMENT_DEFINITION:t[i.name.value]=qn(i.selectionSet)}const i=Object.create(null);for(const n of a){const a=new Set;for(const e of qn(n.selectionSet))Un(a,t,e);i[n.name?n.name.value:""]={kind:F.b.DOCUMENT,definitions:e.definitions.filter(e=>e===n||e.kind===F.b.FRAGMENT_DEFINITION&&a.has(e.name.value))}}return i}function Un(e,a,t){if(!e.has(t)){e.add(t);const i=a[t];if(void 0!==i)for(const t of i)Un(e,a,t)}}function qn(e){const a=[];return(0,Ya.YR)(e,{FragmentSpread(e){a.push(e.name.value)}}),a}function zn(e){const a=(0,Wi._)(e)?e:new Wi.k(e),t=a.body,i=new Zi.JG(a);let n="",o=!1;for(;i.advance().kind!==en.Y.EOF;){const e=i.token,a=e.kind,r=!(0,Zi.Z_)(e.kind);o&&(r||e.kind===en.Y.SPREAD)&&(n+=" ");const s=t.slice(e.start,e.end);a===en.Y.BLOCK_STRING?n+=(0,Nn.yo)(e.value,{minimize:!0}):n+=s,o=r}return n}function Gn(e){const a=Yn(e);if(a)throw a;return e}function Yn(e){if("string"==typeof e||(0,o.U)(!1,"Expected name to be a string."),e.startsWith("__"))return new l.eO(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{C(e)}catch(e){return e}}function Qn(e,a){return Jn(e,a).filter(e=>e.type in En)}function Hn(e,a){return Jn(e,a).filter(e=>e.type in Tn)}function Jn(e,a){return[...Kn(e,a),...Wn(e,a)]}function Wn(e,a){const t=[],i=po(e.getDirectives(),a.getDirectives());for(const e of i.removed)t.push({type:En.DIRECTIVE_REMOVED,description:`${e.name} was removed.`});for(const[e,a]of i.persisted){const i=po(e.args,a.args);for(const a of i.added)Fe(a)&&t.push({type:En.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${a.name} on directive ${e.name} was added.`});for(const a of i.removed)t.push({type:En.DIRECTIVE_ARG_REMOVED,description:`${a.name} was removed from ${e.name}.`});e.isRepeatable&&!a.isRepeatable&&t.push({type:En.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${e.name}.`});for(const i of e.locations)a.locations.includes(i)||t.push({type:En.DIRECTIVE_LOCATION_REMOVED,description:`${i} was removed from ${e.name}.`})}return t}function Kn(e,a){const t=[],i=po(Object.values(e.getTypeMap()),Object.values(a.getTypeMap()));for(const e of i.removed)t.push({type:En.TYPE_REMOVED,description:Je(e)?`Standard scalar ${e.name} was removed because it is not referenced anymore.`:`${e.name} was removed.`});for(const[e,a]of i.persisted)q(e)&&q(a)?t.push(...eo(e,a)):M(e)&&M(a)?t.push(...Zn(e,a)):G(e)&&G(a)?t.push(...Xn(e,a)):j(e)&&j(a)||L(e)&&L(a)?t.push(...to(e,a),...ao(e,a)):e.constructor!==a.constructor&&t.push({type:En.TYPE_CHANGED_KIND,description:`${e.name} changed from ${ro(e)} to ${ro(a)}.`});return t}function Xn(e,a){const t=[],i=po(Object.values(e.getFields()),Object.values(a.getFields()));for(const a of i.added)Re(a)?t.push({type:En.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${a.name} on input type ${e.name} was added.`}):t.push({type:Tn.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${a.name} on input type ${e.name} was added.`});for(const a of i.removed)t.push({type:En.FIELD_REMOVED,description:`${e.name}.${a.name} was removed.`});for(const[a,n]of i.persisted){oo(a.type,n.type)||t.push({type:En.FIELD_CHANGED_KIND,description:`${e.name}.${a.name} changed type from ${String(a.type)} to ${String(n.type)}.`})}return t}function Zn(e,a){const t=[],i=po(e.getTypes(),a.getTypes());for(const a of i.added)t.push({type:Tn.TYPE_ADDED_TO_UNION,description:`${a.name} was added to union type ${e.name}.`});for(const a of i.removed)t.push({type:En.TYPE_REMOVED_FROM_UNION,description:`${a.name} was removed from union type ${e.name}.`});return t}function eo(e,a){const t=[],i=po(e.getValues(),a.getValues());for(const a of i.added)t.push({type:Tn.VALUE_ADDED_TO_ENUM,description:`${a.name} was added to enum type ${e.name}.`});for(const a of i.removed)t.push({type:En.VALUE_REMOVED_FROM_ENUM,description:`${a.name} was removed from enum type ${e.name}.`});return t}function ao(e,a){const t=[],i=po(e.getInterfaces(),a.getInterfaces());for(const a of i.added)t.push({type:Tn.IMPLEMENTED_INTERFACE_ADDED,description:`${a.name} added to interfaces implemented by ${e.name}.`});for(const a of i.removed)t.push({type:En.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${a.name}.`});return t}function to(e,a){const t=[],i=po(Object.values(e.getFields()),Object.values(a.getFields()));for(const a of i.removed)t.push({type:En.FIELD_REMOVED,description:`${e.name}.${a.name} was removed.`});for(const[a,n]of i.persisted){t.push(...io(e,a,n));no(a.type,n.type)||t.push({type:En.FIELD_CHANGED_KIND,description:`${e.name}.${a.name} changed type from ${String(a.type)} to ${String(n.type)}.`})}return t}function io(e,a,t){const i=[],n=po(a.args,t.args);for(const t of n.removed)i.push({type:En.ARG_REMOVED,description:`${e.name}.${a.name} arg ${t.name} was removed.`});for(const[t,o]of n.persisted){if(oo(t.type,o.type)){if(void 0!==t.defaultValue)if(void 0===o.defaultValue)i.push({type:Tn.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${a.name} arg ${t.name} defaultValue was removed.`});else{const n=so(t.defaultValue,t.type),r=so(o.defaultValue,o.type);n!==r&&i.push({type:Tn.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${a.name} arg ${t.name} has changed defaultValue from ${n} to ${r}.`})}}else i.push({type:En.ARG_CHANGED_KIND,description:`${e.name}.${a.name} arg ${t.name} has changed type from ${String(t.type)} to ${String(o.type)}.`})}for(const t of n.added)Fe(t)?i.push({type:En.REQUIRED_ARG_ADDED,description:`A required arg ${t.name} on ${e.name}.${a.name} was added.`}):i.push({type:Tn.OPTIONAL_ARG_ADDED,description:`An optional arg ${t.name} on ${e.name}.${a.name} was added.`});return i}function no(e,a){return Q(e)?Q(a)&&no(e.ofType,a.ofType)||J(a)&&no(e,a.ofType):J(e)?J(a)&&no(e.ofType,a.ofType):fe(a)&&e.name===a.name||J(a)&&no(e,a.ofType)}function oo(e,a){return Q(e)?Q(a)&&oo(e.ofType,a.ofType):J(e)?J(a)&&oo(e.ofType,a.ofType)||!J(a)&&oo(e.ofType,a):fe(a)&&e.name===a.name}function ro(e){return V(e)?"a Scalar type":j(e)?"an Object type":L(e)?"an Interface type":M(e)?"a Union type":q(e)?"an Enum type":G(e)?"an Input type":void(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))}function so(e,a){const t=da(e,a);return null!=t||(0,pa.V)(!1),(0,O.y)(vt(t))}function po(e,a){const t=[],i=[],n=[],o=h(e,({name:e})=>e),r=h(a,({name:e})=>e);for(const a of e){const e=r[a.name];void 0===e?i.push(a):n.push([a,e])}for(const e of a)void 0===o[e.name]&&t.push(e);return{added:t,persisted:n,removed:i}}function lo(e,a){return co(e,(0,s.Ng)(a))}function co(e,a){switch(a.kind){case F.b.TYPE_COORDINATE:return function(e,a){const t=a.name.value,i=e.getType(t);if(null!=i)return{kind:"NamedType",type:i}}(e,a);case F.b.MEMBER_COORDINATE:return function(e,a){const t=a.name.value,i=e.getType(t);if(!i)throw new Error(`Expected ${(0,p.N)(t)} to be defined as a type in the schema.`);if(!(q(i)||G(i)||j(i)||L(i)))throw new Error(`Expected ${(0,p.N)(t)} to be an Enum, Input Object, Object or Interface type.`);if(q(i)){const e=a.memberName.value,t=i.getValue(e);if(null==t)return;return{kind:"EnumValue",type:i,enumValue:t}}if(G(i)){const e=a.memberName.value,t=i.getFields()[e];if(null==t)return;return{kind:"InputField",type:i,inputField:t}}const n=a.memberName.value,o=i.getFields()[n];if(null!=o)return{kind:"Field",type:i,field:o}}(e,a);case F.b.ARGUMENT_COORDINATE:return function(e,a){const t=a.name.value,i=e.getType(t);if(null==i)throw new Error(`Expected ${(0,p.N)(t)} to be defined as a type in the schema.`);if(!j(i)&&!L(i))throw new Error(`Expected ${(0,p.N)(t)} to be an object type or interface type.`);const n=a.fieldName.value,o=i.getFields()[n];if(null==o)throw new Error(`Expected ${(0,p.N)(n)} to exist as a field of type ${(0,p.N)(t)} in the schema.`);const r=a.argumentName.value,s=o.args.find(e=>e.name===r);if(null!=s)return{kind:"FieldArgument",type:i,field:o,fieldArgument:s}}(e,a);case F.b.DIRECTIVE_COORDINATE:return function(e,a){const t=a.name.value,i=e.getDirective(t);if(i)return{kind:"Directive",directive:i}}(e,a);case F.b.DIRECTIVE_ARGUMENT_COORDINATE:return function(e,a){const t=a.name.value,i=e.getDirective(t);if(!i)throw new Error(`Expected ${(0,p.N)(t)} to be defined as a directive in the schema.`);const{argumentName:{value:n}}=a,o=i.args.find(e=>e.name===n);if(o)return{kind:"DirectiveArgument",directive:i,directiveArgument:o}}(e,a)}}!function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"}(En||(En={})),function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"}(Tn||(Tn={}))},4887:e=>{e.exports.mixin=function(e,a){const t=Object.getOwnPropertyNames(a);for(let i=0;i<t.length;++i)Object.defineProperty(e,t[i],Object.getOwnPropertyDescriptor(a,t[i]))},e.exports.wrapperSymbol=Symbol("wrapper"),e.exports.implSymbol=Symbol("impl"),e.exports.wrapperForImpl=function(a){return a[e.exports.wrapperSymbol]},e.exports.implForWrapper=function(a){return a[e.exports.implSymbol]}},5018:e=>{e.exports=function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},5523:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},5762:(e,a,t)=>{t.d(a,{x:()=>n});var i=t(36054);function n(e,a,t){return new i.c(function(i){var n={then:function(e){return new Promise(function(a){return a(e())})}};function o(e,a){return function(t){if(e){var o=function(){return i.closed?0:e(t)};n=n.then(o,o).then(function(e){return i.next(e)},function(e){return i.error(e)})}else i[a](t)}}var r={next:o(a,"next"),error:o(t,"error"),complete:function(){n.then(function(){return i.complete()})}},s=e.subscribe(r);return function(){return s.unsubscribe()}})}},7029:(e,a,t)=>{t.d(a,{AutoCleanedStrongCache:()=>Q.V,AutoCleanedWeakCache:()=>Q.A,Concast:()=>k.E,DEV:()=>i.DEV,DeepMerger:()=>h.ZI,DocumentTransform:()=>o.c,Observable:()=>_.c,addNonReactiveToNamedFragments:()=>d.x3,addTypenameToDocument:()=>d.XY,argumentsObjectFromField:()=>l.MB,asyncMap:()=>C.x,buildQueryFromSelectionSet:()=>d.zc,cacheSizes:()=>H.v,canUseAsyncIteratorSymbol:()=>j.uJ,canUseDOM:()=>j.Sw,canUseLayoutEffect:()=>j.JR,canUseSymbol:()=>j.ol,canUseWeakMap:()=>j.et,canUseWeakSet:()=>j.En,canonicalStringify:()=>q.M,checkDocument:()=>s.sw,cloneDeep:()=>O.m,compact:()=>P.o,concatPagination:()=>g,createFragmentMap:()=>r.JG,createFulfilledPromise:()=>w,createRejectedPromise:()=>E,fixObservableSubclass:()=>I.r,getDefaultValues:()=>s.wY,getDirectiveNames:()=>n.sx,getFragmentDefinition:()=>s.E4,getFragmentDefinitions:()=>s.zK,getFragmentFromSelection:()=>r.HQ,getFragmentMaskMode:()=>n.s7,getFragmentQueryDocument:()=>r.ct,getGraphQLErrorsFromResult:()=>R.M,getInclusionDirectives:()=>n.tY,getMainDefinition:()=>s.Vn,getOperationDefinition:()=>s.Vu,getOperationName:()=>s.n4,getQueryDefinition:()=>s.AT,getStoreKeyName:()=>l.o5,getTypenameFromResult:()=>l.D$,graphQLResultHasError:()=>R.t,hasAllDirectives:()=>n.I5,hasAnyDirectives:()=>n.hE,hasClientExports:()=>n.f2,hasDirectives:()=>n.d8,isApolloPayloadResult:()=>U.Nw,isArray:()=>$.c,isDocumentNode:()=>l.Kc,isExecutionPatchIncrementalResult:()=>U.ST,isExecutionPatchInitialResult:()=>U.EQ,isExecutionPatchResult:()=>U.YX,isField:()=>l.dt,isFullyUnmaskedOperation:()=>r.s6,isInlineFragment:()=>l.kd,isMutationOperation:()=>u,isNonEmptyArray:()=>$.E,isNonNullObject:()=>V.U,isPlainObject:()=>V.Q,isQueryOperation:()=>m,isReference:()=>l.A_,isStatefulPromise:()=>T,isSubscriptionOperation:()=>f,iterateObserversSafely:()=>S.w,makeReference:()=>l.WU,makeUniqueId:()=>L.v,maybe:()=>i.maybe,maybeDeepFreeze:()=>A.G,mergeDeep:()=>h.D9,mergeDeepArray:()=>h.IM,mergeIncrementalData:()=>U.bd,mergeOptions:()=>M.l,offsetLimitPagination:()=>y,omitDeep:()=>z,preventUnhandledRejection:()=>F.X,print:()=>p.y,relayStylePagination:()=>b,removeArgumentsFromDocument:()=>d.it,removeClientSetsFromDocument:()=>d.er,removeConnectionDirectiveFromDocument:()=>d.hX,removeDirectivesFromDocument:()=>d.iz,removeFragmentSpreadFromDocument:()=>d.TC,resultKeyNameFromField:()=>l.ue,shouldInclude:()=>n.MS,storeKeyNameFromField:()=>l.Ii,stringifyForDisplay:()=>B.p,stripTypename:()=>Y,valueToObjectRepresentation:()=>l.J,wrapPromiseWithState:()=>N}),t.r(a);var i=t(79212),n=t(82307),o=t(9354),r=t(2904),s=t(3777),p=t(38678),l=t(28907),d=t(53925);function c(e,a){var t;return(null===(t=(0,s.Vu)(e))||void 0===t?void 0:t.operation)===a}function u(e){return c(e,"mutation")}function m(e){return c(e,"query")}function f(e){return c(e,"subscription")}var v=t(85608),h=t(30671);function g(e){return void 0===e&&(e=!1),{keyArgs:e,merge:function(e,a){return e?(0,v.__spreadArray)((0,v.__spreadArray)([],e,!0),a,!0):a}}}function y(e){return void 0===e&&(e=!1),{keyArgs:e,merge:function(e,a,t){var i=t.args,n=e?e.slice(0):[];if(a)if(i)for(var o=i.offset,r=void 0===o?0:o,s=0;s<a.length;++s)n[r+s]=a[s];else n.push.apply(n,a);return n}}}function b(e){return void 0===e&&(e=!1),{keyArgs:e,read:function(e,a){var t=a.canRead,i=a.readField;if(!e)return e;var n=[],o="",r="";e.edges.forEach(function(e){t(i("node",e))&&(n.push(e),e.cursor&&(o=o||e.cursor||"",r=e.cursor||r))}),n.length>1&&o===r&&(o="");var s=e.pageInfo||{},p=s.startCursor,l=s.endCursor;return(0,v.__assign)((0,v.__assign)({},D(e)),{edges:n,pageInfo:(0,v.__assign)((0,v.__assign)({},e.pageInfo),{startCursor:p||o,endCursor:l||r})})},merge:function(e,a,t){var i=t.args,n=t.isReference,o=t.readField;if(e||(e={edges:[],pageInfo:{hasPreviousPage:!1,hasNextPage:!0,startCursor:"",endCursor:""}}),!a)return e;var r=a.edges?a.edges.map(function(e){return n(e=(0,v.__assign)({},e))&&(e.cursor=o("cursor",e)),e}):[];if(a.pageInfo){var s=a.pageInfo,p=s.startCursor,l=s.endCursor,d=r[0],c=r[r.length-1];d&&p&&(d.cursor=p),c&&l&&(c.cursor=l);var u=d&&d.cursor;u&&!p&&(a=(0,h.D9)(a,{pageInfo:{startCursor:u}}));var m=c&&c.cursor;m&&!l&&(a=(0,h.D9)(a,{pageInfo:{endCursor:m}}))}var f=e.edges,g=[];if(i&&i.after)(y=f.findIndex(function(e){return e.cursor===i.after}))>=0&&(f=f.slice(0,y+1));else if(i&&i.before){var y;g=(y=f.findIndex(function(e){return e.cursor===i.before}))<0?f:f.slice(y),f=[]}else a.edges&&(f=[]);var b=(0,v.__spreadArray)((0,v.__spreadArray)((0,v.__spreadArray)([],f,!0),r,!0),g,!0),x=(0,v.__assign)((0,v.__assign)({},a.pageInfo),e.pageInfo);if(a.pageInfo){var _=a.pageInfo,w=_.hasPreviousPage,E=_.hasNextPage,T=(p=_.startCursor,l=_.endCursor,(0,v.__rest)(_,["hasPreviousPage","hasNextPage","startCursor","endCursor"]));Object.assign(x,T),f.length||(void 0!==w&&(x.hasPreviousPage=w),void 0!==p&&(x.startCursor=p)),g.length||(void 0!==E&&(x.hasNextPage=E),void 0!==l&&(x.endCursor=l))}return(0,v.__assign)((0,v.__assign)((0,v.__assign)({},D(e)),D(a)),{edges:b,pageInfo:x})}}}var D=function(e){return(0,v.__rest)(e,x)},x=["edges","pageInfo"];var _=t(36054);function w(e){var a=Promise.resolve(e);return a.status="fulfilled",a.value=e,a}function E(e){var a=Promise.reject(e);return a.catch(function(){}),a.status="rejected",a.reason=e,a}function T(e){return"status"in e}function N(e){if(T(e))return e;var a=e;return a.status="pending",a.then(function(e){if("pending"===a.status){var t=a;t.status="fulfilled",t.value=e}},function(e){if("pending"===a.status){var t=a;t.status="rejected",t.reason=e}}),e}var F=t(30234),O=t(20906),A=t(57236),S=t(87613),C=t(5762),k=t(45637),I=t(35892),$=t(73767),V=t(21777),R=t(32710),j=t(51360),P=t(50492),L=t(21461),B=t(86563),M=t(31507),U=t(37396),q=t(44214);function z(e,a){return G(e,a)}function G(e,a,t){if(void 0===t&&(t=new Map),t.has(e))return t.get(e);var i=!1;if(Array.isArray(e)){var n=[];if(t.set(e,n),e.forEach(function(e,o){var r=G(e,a,t);i||(i=r!==e),n[o]=r}),i)return n}else if((0,V.Q)(e)){var o=Object.create(Object.getPrototypeOf(e));if(t.set(e,o),Object.keys(e).forEach(function(n){if(n!==a){var r=G(e[n],a,t);i||(i=r!==e[n]),o[n]=r}else i=!0}),i)return o}return e}function Y(e){return z(e,"__typename")}var Q=t(45078),H=t(555)},7066:e=>{e.exports=a("node:tty")},8238:(e,a,t)=>{t.d(a,{C:()=>o,V:()=>n});var i=t(73971);function n(e){return o(e.source,(0,i.g)(e.source,e.start))}function o(e,a){const t=e.locationOffset.column-1,i="".padStart(t)+e.body,n=a.line-1,o=e.locationOffset.line-1,s=a.line+o,p=1===a.line?t:0,l=a.column+p,d=`${e.name}:${s}:${l}\n`,c=i.split(/\r\n|[\n\r]/g),u=c[n];if(u.length>120){const e=Math.floor(l/80),a=l%80,t=[];for(let e=0;e<u.length;e+=80)t.push(u.slice(e,e+80));return d+r([[`${s} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(a)],["|",t[e+1]]])}return d+r([[s-1+" |",c[n-1]],[`${s} |`,u],["|","^".padStart(l)],[`${s+1} |`,c[n+1]]])}function r(e){const a=e.filter(([e,a])=>void 0!==a),t=Math.max(...a.map(([e])=>e.length));return a.map(([e,a])=>e.padStart(t)+(a?" "+a:"")).join("\n")}},8271:(e,a,t)=>{t.r(a),t.d(a,{application:()=>c,applicationProject:()=>x,applications:()=>u,checkBindDevicePasscode:()=>v,device:()=>r,deviceGroup:()=>p,deviceGroups:()=>l,devices:()=>s,devicesByGroup:()=>d,mediaBox:()=>b,mediaBoxes:()=>y,mediaFile:()=>D,mediaFiles:()=>h,mediaWorkspace:()=>g,module:()=>m,moduleProject:()=>_,modules:()=>f,workspace:()=>o});var i=t(94370),n=t(67370),o=i.default`
|
|
1
|
+
import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as t from"ink";import*as i from"ink-picture";import*as n from"prettier";import*as o from"react";import*as r from"react/jsx-runtime";import{default as s}from"conf";var p,l,d,c,u={555:(e,a,t)=>{t.d(a,{v:()=>r});var i=t(85608),n=t(79212),o=Symbol.for("apollo.cacheSize"),r=(0,i.__assign)({},n.global[o])},777:(e,a,t)=>{t.d(a,{MS:()=>p,UT:()=>l,WR:()=>s,bl:()=>n});var i=t(77634),n=new i.Slot,o=new WeakMap;function r(e){var a=o.get(e);return a||o.set(e,a={vars:new Set,dep:(0,i.dep)()}),a}function s(e){r(e).vars.forEach(function(a){return a.forgetCache(e)})}function p(e){r(e).vars.forEach(function(a){return a.attachCache(e)})}function l(e){var a=new Set,t=new Set,i=function(s){if(arguments.length>0){if(e!==s){e=s,a.forEach(function(e){r(e).dep.dirty(i),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)});var p=Array.from(t);t.clear(),p.forEach(function(a){return a(e)})}}else{var l=n.getValue();l&&(o(l),r(l).dep(i))}return e};i.onNextChange=function(e){return t.add(e),function(){t.delete(e)}};var o=i.attachCache=function(e){return a.add(e),r(e).vars.add(i),i};return i.forgetCache=function(e){return a.delete(e)},i}},1708:e=>{e.exports=a("node:process")},2203:e=>{e.exports=a("stream")},2904:(e,a,t)=>{t.d(a,{HQ:()=>p,JG:()=>s,ct:()=>r,s6:()=>l});var i=t(85608),n=t(79212),o=t(90424);function r(e,a){var t=a,o=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw(0,n.newInvariantError)(85,e.operation,e.name?" named '".concat(e.name.value,"'"):"");"FragmentDefinition"===e.kind&&o.push(e)}),void 0===t&&((0,n.invariant)(1===o.length,86,o.length),t=o[0].name.value),(0,i.__assign)((0,i.__assign)({},e),{definitions:(0,i.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}}],e.definitions,!0)})}function s(e){void 0===e&&(e=[]);var a={};return e.forEach(function(e){a[e.name.value]=e}),a}function p(e,a){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var t=e.name.value;if("function"==typeof a)return a(t);var i=a&&a[t];return(0,n.invariant)(i,87,t),i||null;default:return null}}function l(e){var a=!0;return(0,o.YR)(e,{FragmentSpread:function(e){if(!(a=!!e.directives&&e.directives.some(function(e){return"unmask"===e.name.value})))return o.sP}}),a}},3420:(e,a,t)=>{t.d(a,{MD:()=>n,TZ:()=>p,VK:()=>r,_m:()=>o,a6:()=>c,aR:()=>s,dI:()=>l,fT:()=>u,gj:()=>f,i7:()=>m,xu:()=>d});var i=t(42455);function n(e){return o(e)||d(e)||u(e)}function o(e){return e.kind===i.b.OPERATION_DEFINITION||e.kind===i.b.FRAGMENT_DEFINITION}function r(e){return e.kind===i.b.FIELD||e.kind===i.b.FRAGMENT_SPREAD||e.kind===i.b.INLINE_FRAGMENT}function s(e){return e.kind===i.b.VARIABLE||e.kind===i.b.INT||e.kind===i.b.FLOAT||e.kind===i.b.STRING||e.kind===i.b.BOOLEAN||e.kind===i.b.NULL||e.kind===i.b.ENUM||e.kind===i.b.LIST||e.kind===i.b.OBJECT}function p(e){return s(e)&&(e.kind===i.b.LIST?e.values.some(p):e.kind===i.b.OBJECT?e.fields.some(e=>p(e.value)):e.kind!==i.b.VARIABLE)}function l(e){return e.kind===i.b.NAMED_TYPE||e.kind===i.b.LIST_TYPE||e.kind===i.b.NON_NULL_TYPE}function d(e){return e.kind===i.b.SCHEMA_DEFINITION||c(e)||e.kind===i.b.DIRECTIVE_DEFINITION}function c(e){return e.kind===i.b.SCALAR_TYPE_DEFINITION||e.kind===i.b.OBJECT_TYPE_DEFINITION||e.kind===i.b.INTERFACE_TYPE_DEFINITION||e.kind===i.b.UNION_TYPE_DEFINITION||e.kind===i.b.ENUM_TYPE_DEFINITION||e.kind===i.b.INPUT_OBJECT_TYPE_DEFINITION}function u(e){return e.kind===i.b.SCHEMA_EXTENSION||m(e)}function m(e){return e.kind===i.b.SCALAR_TYPE_EXTENSION||e.kind===i.b.OBJECT_TYPE_EXTENSION||e.kind===i.b.INTERFACE_TYPE_EXTENSION||e.kind===i.b.UNION_TYPE_EXTENSION||e.kind===i.b.ENUM_TYPE_EXTENSION||e.kind===i.b.INPUT_OBJECT_TYPE_EXTENSION}function f(e){return e.kind===i.b.TYPE_COORDINATE||e.kind===i.b.MEMBER_COORDINATE||e.kind===i.b.ARGUMENT_COORDINATE||e.kind===i.b.DIRECTIVE_COORDINATE||e.kind===i.b.DIRECTIVE_ARGUMENT_COORDINATE}},3634:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},3680:(e,a,t)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=t(20124):e.exports=t(85038)},3777:(e,a,t)=>{t.d(a,{AT:()=>l,E4:()=>d,Vn:()=>c,Vu:()=>r,n4:()=>s,sw:()=>o,wY:()=>u,zK:()=>p});var i=t(79212),n=t(28907);function o(e){(0,i.invariant)(e&&"Document"===e.kind,88);var a=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw(0,i.newInvariantError)(89,e.kind);return e});return(0,i.invariant)(a.length<=1,90,a.length),e}function r(e){return o(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function s(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&!!e.name}).map(function(e){return e.name.value})[0]||null}function p(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function l(e){var a=r(e);return(0,i.invariant)(a&&"query"===a.operation,91),a}function d(e){(0,i.invariant)("Document"===e.kind,92),(0,i.invariant)(e.definitions.length<=1,93);var a=e.definitions[0];return(0,i.invariant)("FragmentDefinition"===a.kind,94),a}function c(e){var a;o(e);for(var t=0,n=e.definitions;t<n.length;t++){var r=n[t];if("OperationDefinition"===r.kind){var s=r.operation;if("query"===s||"mutation"===s||"subscription"===s)return r}"FragmentDefinition"!==r.kind||a||(a=r)}if(a)return a;throw(0,i.newInvariantError)(95)}function u(e){var a=Object.create(null),t=e&&e.variableDefinitions;return t&&t.length&&t.forEach(function(e){e.defaultValue&&(0,n.J)(a,e.variable.name,e.defaultValue)}),a}},3848:(e,a,t)=>{t.d(a,{A:()=>i});var i=function(e,a,t){var i=new Error(t);throw i.name="ServerError",i.response=e,i.statusCode=e.status,i.result=a,i}},3900:e=>{e.exports=JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","❤️ "]},"clock":{"interval":100,"frames":["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]},"grenade":{"interval":80,"frames":["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},"fistBump":{"interval":80,"frames":["🤜 🤛 ","🤜 🤛 ","🤜 🤛 "," 🤜 🤛 "," 🤜🤛 "," 🤜✨🤛 ","🤜 ✨ 🤛 "]},"soccerHeader":{"interval":80,"frames":[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},"mindblown":{"interval":160,"frames":["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ "," "," "," "]},"speaker":{"interval":160,"frames":["🔈 ","🔉 ","🔊 ","🔉 "]},"orangePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},"bluePulse":{"interval":100,"frames":["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"orangeBluePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"timeTravel":{"interval":100,"frames":["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}')},4649:(e,a,t)=>{t.d(a,{BREAK:()=>Ya.sP,BreakingChangeType:()=>En,DEFAULT_DEPRECATION_REASON:()=>ta,DangerousChangeType:()=>Tn,DirectiveLocation:()=>Be.H,ExecutableDefinitionsRule:()=>Xa,FieldsOnCorrectTypeRule:()=>Za,FragmentsOnCompositeTypesRule:()=>et,GRAPHQL_MAX_INT:()=>Me,GRAPHQL_MIN_INT:()=>Ue,GraphQLBoolean:()=>Ye,GraphQLDeprecatedDirective:()=>ia,GraphQLDirective:()=>Ze,GraphQLEnumType:()=>Ce,GraphQLError:()=>l.eO,GraphQLFloat:()=>ze,GraphQLID:()=>Qe,GraphQLIncludeDirective:()=>ea,GraphQLInputObjectType:()=>$e,GraphQLInt:()=>qe,GraphQLInterfaceType:()=>Oe,GraphQLList:()=>se,GraphQLNonNull:()=>pe,GraphQLObjectType:()=>De,GraphQLOneOfDirective:()=>oa,GraphQLScalarType:()=>be,GraphQLSchema:()=>Oa,GraphQLSkipDirective:()=>aa,GraphQLSpecifiedByDirective:()=>na,GraphQLString:()=>Ge,GraphQLUnionType:()=>Ae,Kind:()=>F.b,KnownArgumentNamesRule:()=>at,KnownDirectivesRule:()=>it,KnownFragmentNamesRule:()=>nt,KnownTypeNamesRule:()=>ot,Lexer:()=>Zi.JG,Location:()=>d.aZ,LoneAnonymousOperationRule:()=>st,LoneSchemaDefinitionRule:()=>pt,MaxIntrospectionDepthRule:()=>dt,NoDeprecatedCustomRule:()=>on,NoFragmentCyclesRule:()=>ct,NoSchemaIntrospectionCustomRule:()=>rn,NoUndefinedVariablesRule:()=>ut,NoUnusedFragmentsRule:()=>mt,NoUnusedVariablesRule:()=>ft,OperationTypeNode:()=>d.cE,OverlappingFieldsCanBeMergedRule:()=>gt,PossibleFragmentSpreadsRule:()=>At,PossibleTypeExtensionsRule:()=>St,ProvidedRequiredArgumentsRule:()=>kt,ScalarLeafsRule:()=>Vt,SchemaMetaFieldDef:()=>xa,SingleFieldSubscriptionsRule:()=>Zt,Source:()=>Wi.k,Token:()=>d.ou,TokenKind:()=>en.Y,TypeInfo:()=>Ha,TypeKind:()=>ba,TypeMetaFieldDef:()=>_a,TypeNameMetaFieldDef:()=>wa,UniqueArgumentDefinitionNamesRule:()=>ai,UniqueArgumentNamesRule:()=>ti,UniqueDirectiveNamesRule:()=>ii,UniqueDirectivesPerLocationRule:()=>ni,UniqueEnumValueNamesRule:()=>oi,UniqueFieldDefinitionNamesRule:()=>ri,UniqueFragmentNamesRule:()=>pi,UniqueInputFieldNamesRule:()=>li,UniqueOperationNamesRule:()=>di,UniqueOperationTypesRule:()=>ci,UniqueTypeNamesRule:()=>ui,UniqueVariableNamesRule:()=>mi,ValidationContext:()=>Ei,ValuesOfCorrectTypeRule:()=>fi,VariablesAreInputTypesRule:()=>hi,VariablesInAllowedPositionRule:()=>gi,__Directive:()=>ma,__DirectiveLocation:()=>fa,__EnumValue:()=>ya,__Field:()=>ha,__InputValue:()=>ga,__Schema:()=>ua,__Type:()=>va,__TypeKind:()=>Da,assertAbstractType:()=>re,assertCompositeType:()=>ne,assertDirective:()=>Xe,assertEnumType:()=>z,assertEnumValueName:()=>k,assertInputObjectType:()=>Y,assertInputType:()=>X,assertInterfaceType:()=>B,assertLeafType:()=>te,assertListType:()=>H,assertName:()=>C,assertNamedType:()=>ve,assertNonNullType:()=>W,assertNullableType:()=>ue,assertObjectType:()=>P,assertOutputType:()=>ee,assertScalarType:()=>R,assertSchema:()=>Fa,assertType:()=>$,assertUnionType:()=>U,assertValidName:()=>Gn,assertValidSchema:()=>Ca,assertWrappingType:()=>de,astFromValue:()=>da,buildASTSchema:()=>yn,buildClientSchema:()=>un,buildSchema:()=>bn,coerceInputValue:()=>Lt,concatAST:()=>Bn,createSourceEventStream:()=>nn,defaultFieldResolver:()=>Gi,defaultTypeResolver:()=>zi,doTypesOverlap:()=>Le,execute:()=>Ci,executeSync:()=>ki,extendSchema:()=>mn,findBreakingChanges:()=>Qn,findDangerousChanges:()=>Hn,formatError:()=>l.Wk,getArgumentValues:()=>Gt,getDirectiveValues:()=>Yt,getEnterLeaveForKind:()=>Ya.XO,getIntrospectionQuery:()=>pn,getLocation:()=>Ki.g,getNamedType:()=>he,getNullableType:()=>me,getOperationAST:()=>ln,getOperationRootType:()=>dn,getVariableValues:()=>zt,getVisitFn:()=>Ya.UY,graphql:()=>Qi,graphqlSync:()=>Hi,introspectionFromSchema:()=>cn,introspectionTypes:()=>Ea,isAbstractType:()=>oe,isCompositeType:()=>ie,isConstValueNode:()=>Ka.TZ,isDefinitionNode:()=>Ka.MD,isDirective:()=>Ke,isEnumType:()=>q,isEqualType:()=>je,isExecutableDefinitionNode:()=>Ka._m,isInputObjectType:()=>G,isInputType:()=>K,isInterfaceType:()=>L,isIntrospectionType:()=>Ta,isLeafType:()=>ae,isListType:()=>Q,isNamedType:()=>fe,isNonNullType:()=>J,isNullableType:()=>ce,isObjectType:()=>j,isOutputType:()=>Z,isRequiredArgument:()=>Fe,isRequiredInputField:()=>Re,isScalarType:()=>V,isSchema:()=>Na,isSchemaCoordinateNode:()=>Ka.gj,isSelectionNode:()=>Ka.VK,isSpecifiedDirective:()=>sa,isSpecifiedScalarType:()=>Je,isType:()=>I,isTypeDefinitionNode:()=>Ka.a6,isTypeExtensionNode:()=>Ka.i7,isTypeNode:()=>Ka.dI,isTypeSubTypeOf:()=>Pe,isTypeSystemDefinitionNode:()=>Ka.xu,isTypeSystemExtensionNode:()=>Ka.fT,isUnionType:()=>M,isValidNameError:()=>Yn,isValueNode:()=>Ka.aR,isWrappingType:()=>le,lexicographicSortSchema:()=>Dn,locatedError:()=>Ai,parse:()=>s.qg,parseConstValue:()=>s.u8,parseSchemaCoordinate:()=>s.Ng,parseType:()=>s.Mb,parseValue:()=>s.$x,print:()=>O.y,printError:()=>l.yJ,printIntrospectionSchema:()=>On,printLocation:()=>Xi.V,printSchema:()=>Fn,printSourceLocation:()=>Xi.C,printType:()=>kn,recommendedRules:()=>bi,resolveASTSchemaCoordinate:()=>co,resolveObjMapThunk:()=>ye,resolveReadonlyArrayThunk:()=>ge,resolveSchemaCoordinate:()=>lo,responsePathAsArray:()=>Pt,separateOperations:()=>Mn,specifiedDirectives:()=>ra,specifiedRules:()=>Di,specifiedScalarTypes:()=>He,stripIgnoredCharacters:()=>zn,subscribe:()=>tn,syntaxError:()=>sn.I,typeFromAST:()=>Qa,validate:()=>Ti,validateSchema:()=>Sa,valueFromAST:()=>Ut,valueFromASTUntyped:()=>A,version:()=>i,versionInfo:()=>n,visit:()=>Ya.YR,visitInParallel:()=>Ya.oP,visitWithTypeInfo:()=>Wa}),t.r(a);const i="16.12.0",n=Object.freeze({major:16,minor:12,patch:0,preReleaseTag:null});var o=t(93217);function r(e){return"function"==typeof(null==e?void 0:e.then)}var s=t(93367),p=t(35198),l=t(48255),d=t(59762);const c=5;function u(e,a){const[t,i]=a?[e,a]:[void 0,e];let n=" Did you mean ";t&&(n+=t+" ");const o=i.map(e=>`"${e}"`);switch(o.length){case 0:return"";case 1:return n+o[0]+"?";case 2:return n+o[0]+" or "+o[1]+"?"}const r=o.slice(0,c),s=r.pop();return n+r.join(", ")+", or "+s+"?"}function m(e){return e}var f=t(50792),v=t(91070);function h(e,a){const t=Object.create(null);for(const i of e)t[a(i)]=i;return t}function g(e,a,t){const i=Object.create(null);for(const n of e)i[a(n)]=t(n);return i}function y(e,a){const t=Object.create(null);for(const i of Object.keys(e))t[i]=a(e[i],i);return t}function b(e,a){let t=0,i=0;for(;t<e.length&&i<a.length;){let n=e.charCodeAt(t),o=a.charCodeAt(i);if(_(n)&&_(o)){let r=0;do{++t,r=10*r+n-D,n=e.charCodeAt(t)}while(_(n)&&r>0);let s=0;do{++i,s=10*s+o-D,o=a.charCodeAt(i)}while(_(o)&&s>0);if(r<s)return-1;if(r>s)return 1}else{if(n<o)return-1;if(n>o)return 1;++t,++i}}return e.length-a.length}const D=48,x=57;function _(e){return!isNaN(e)&&D<=e&&e<=x}function w(e,a){const t=Object.create(null),i=new E(e),n=Math.floor(.4*e.length)+1;for(const e of a){const a=i.measure(e,n);void 0!==a&&(t[e]=a)}return Object.keys(t).sort((e,a)=>{const i=t[e]-t[a];return 0!==i?i:b(e,a)})}class E{constructor(e){this._input=e,this._inputLowerCase=e.toLowerCase(),this._inputArray=T(this._inputLowerCase),this._rows=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)]}measure(e,a){if(this._input===e)return 0;const t=e.toLowerCase();if(this._inputLowerCase===t)return 1;let i=T(t),n=this._inputArray;if(i.length<n.length){const e=i;i=n,n=e}const o=i.length,r=n.length;if(o-r>a)return;const s=this._rows;for(let e=0;e<=r;e++)s[0][e]=e;for(let e=1;e<=o;e++){const t=s[(e-1)%3],o=s[e%3];let p=o[0]=e;for(let a=1;a<=r;a++){const r=i[e-1]===n[a-1]?0:1;let l=Math.min(t[a]+1,o[a-1]+1,t[a-1]+r);if(e>1&&a>1&&i[e-1]===n[a-2]&&i[e-2]===n[a-1]){const t=s[(e-2)%3][a-2];l=Math.min(l,t+1)}l<p&&(p=l),o[a]=l}if(p>a)return}const p=s[o%3][r];return p<=a?p:void 0}}function T(e){const a=e.length,t=new Array(a);for(let i=0;i<a;++i)t[i]=e.charCodeAt(i);return t}function N(e){if(null==e)return Object.create(null);if(null===Object.getPrototypeOf(e))return e;const a=Object.create(null);for(const[t,i]of Object.entries(e))a[t]=i;return a}var F=t(42455),O=t(92704);function A(e,a){switch(e.kind){case F.b.NULL:return null;case F.b.INT:return parseInt(e.value,10);case F.b.FLOAT:return parseFloat(e.value);case F.b.STRING:case F.b.ENUM:case F.b.BOOLEAN:return e.value;case F.b.LIST:return e.values.map(e=>A(e,a));case F.b.OBJECT:return g(e.fields,e=>e.name.value,e=>A(e.value,a));case F.b.VARIABLE:return null==a?void 0:a[e.name.value]}}var S=t(25881);function C(e){if(null!=e||(0,o.U)(!1,"Must provide name."),"string"==typeof e||(0,o.U)(!1,"Expected name to be a string."),0===e.length)throw new l.eO("Expected name to be a non-empty string.");for(let a=1;a<e.length;++a)if(!(0,S.xr)(e.charCodeAt(a)))throw new l.eO(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!(0,S.un)(e.charCodeAt(0)))throw new l.eO(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function k(e){if("true"===e||"false"===e||"null"===e)throw new l.eO(`Enum values cannot be named: ${e}`);return C(e)}function I(e){return V(e)||j(e)||L(e)||M(e)||q(e)||G(e)||Q(e)||J(e)}function $(e){if(!I(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL type.`);return e}function V(e){return(0,f.h)(e,be)}function R(e){if(!V(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Scalar type.`);return e}function j(e){return(0,f.h)(e,De)}function P(e){if(!j(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Object type.`);return e}function L(e){return(0,f.h)(e,Oe)}function B(e){if(!L(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Interface type.`);return e}function M(e){return(0,f.h)(e,Ae)}function U(e){if(!M(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Union type.`);return e}function q(e){return(0,f.h)(e,Ce)}function z(e){if(!q(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Enum type.`);return e}function G(e){return(0,f.h)(e,$e)}function Y(e){if(!G(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Input Object type.`);return e}function Q(e){return(0,f.h)(e,se)}function H(e){if(!Q(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL List type.`);return e}function J(e){return(0,f.h)(e,pe)}function W(e){if(!J(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL Non-Null type.`);return e}function K(e){return V(e)||q(e)||G(e)||le(e)&&K(e.ofType)}function X(e){if(!K(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL input type.`);return e}function Z(e){return V(e)||j(e)||L(e)||M(e)||q(e)||le(e)&&Z(e.ofType)}function ee(e){if(!Z(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL output type.`);return e}function ae(e){return V(e)||q(e)}function te(e){if(!ae(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL leaf type.`);return e}function ie(e){return j(e)||L(e)||M(e)}function ne(e){if(!ie(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL composite type.`);return e}function oe(e){return L(e)||M(e)}function re(e){if(!oe(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL abstract type.`);return e}class se{constructor(e){I(e)||(0,o.U)(!1,`Expected ${(0,p.N)(e)} to be a GraphQL type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class pe{constructor(e){ce(e)||(0,o.U)(!1,`Expected ${(0,p.N)(e)} to be a GraphQL nullable type.`),this.ofType=e}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function le(e){return Q(e)||J(e)}function de(e){if(!le(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL wrapping type.`);return e}function ce(e){return I(e)&&!J(e)}function ue(e){if(!ce(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL nullable type.`);return e}function me(e){if(e)return J(e)?e.ofType:e}function fe(e){return V(e)||j(e)||L(e)||M(e)||q(e)||G(e)}function ve(e){if(!fe(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL named type.`);return e}function he(e){if(e){let a=e;for(;le(a);)a=a.ofType;return a}}function ge(e){return"function"==typeof e?e():e}function ye(e){return"function"==typeof e?e():e}class be{constructor(e){var a,t,i,n;const r=null!==(a=e.parseValue)&&void 0!==a?a:m;this.name=C(e.name),this.description=e.description,this.specifiedByURL=e.specifiedByURL,this.serialize=null!==(t=e.serialize)&&void 0!==t?t:m,this.parseValue=r,this.parseLiteral=null!==(i=e.parseLiteral)&&void 0!==i?i:(e,a)=>r(A(e,a)),this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(n=e.extensionASTNodes)&&void 0!==n?n:[],null==e.specifiedByURL||"string"==typeof e.specifiedByURL||(0,o.U)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,p.N)(e.specifiedByURL)}.`),null==e.serialize||"function"==typeof e.serialize||(0,o.U)(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||(0,o.U)(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class De{constructor(e){var a;this.name=C(e.name),this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._fields=()=>_e(e),this._interfaces=()=>xe(e),null==e.isTypeOf||"function"==typeof e.isTypeOf||(0,o.U)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,p.N)(e.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Te(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function xe(e){var a;const t=ge(null!==(a=e.interfaces)&&void 0!==a?a:[]);return Array.isArray(t)||(0,o.U)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),t}function _e(e){const a=ye(e.fields);return Ee(a)||(0,o.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),y(a,(a,t)=>{var i;Ee(a)||(0,o.U)(!1,`${e.name}.${t} field config must be an object.`),null==a.resolve||"function"==typeof a.resolve||(0,o.U)(!1,`${e.name}.${t} field resolver must be a function if provided, but got: ${(0,p.N)(a.resolve)}.`);const n=null!==(i=a.args)&&void 0!==i?i:{};return Ee(n)||(0,o.U)(!1,`${e.name}.${t} args must be an object with argument names as keys.`),{name:C(t),description:a.description,type:a.type,args:we(n),resolve:a.resolve,subscribe:a.subscribe,deprecationReason:a.deprecationReason,extensions:N(a.extensions),astNode:a.astNode}})}function we(e){return Object.entries(e).map(([e,a])=>({name:C(e),description:a.description,type:a.type,defaultValue:a.defaultValue,deprecationReason:a.deprecationReason,extensions:N(a.extensions),astNode:a.astNode}))}function Ee(e){return(0,v.Z)(e)&&!Array.isArray(e)}function Te(e){return y(e,e=>({description:e.description,type:e.type,args:Ne(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function Ne(e){return g(e,e=>e.name,e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}))}function Fe(e){return J(e.type)&&void 0===e.defaultValue}class Oe{constructor(e){var a;this.name=C(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._fields=_e.bind(void 0,e),this._interfaces=xe.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,o.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,p.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}getInterfaces(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Te(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Ae{constructor(e){var a;this.name=C(e.name),this.description=e.description,this.resolveType=e.resolveType,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._types=Se.bind(void 0,e),null==e.resolveType||"function"==typeof e.resolveType||(0,o.U)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,p.N)(e.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return"function"==typeof this._types&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Se(e){const a=ge(e.types);return Array.isArray(a)||(0,o.U)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),a}class Ce{constructor(e){var a;this.name=C(e.name),this.description=e.description,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._values="function"==typeof e.values?e.values:Ie(this.name,e.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return"function"==typeof this._values&&(this._values=Ie(this.name,this._values())),this._values}getValue(e){return null===this._nameLookup&&(this._nameLookup=h(this.getValues(),e=>e.name)),this._nameLookup[e]}serialize(e){null===this._valueLookup&&(this._valueLookup=new Map(this.getValues().map(e=>[e.value,e])));const a=this._valueLookup.get(e);if(void 0===a)throw new l.eO(`Enum "${this.name}" cannot represent value: ${(0,p.N)(e)}`);return a.name}parseValue(e){if("string"!=typeof e){const a=(0,p.N)(e);throw new l.eO(`Enum "${this.name}" cannot represent non-string value: ${a}.`+ke(this,a))}const a=this.getValue(e);if(null==a)throw new l.eO(`Value "${e}" does not exist in "${this.name}" enum.`+ke(this,e));return a.value}parseLiteral(e,a){if(e.kind!==F.b.ENUM){const a=(0,O.y)(e);throw new l.eO(`Enum "${this.name}" cannot represent non-enum value: ${a}.`+ke(this,a),{nodes:e})}const t=this.getValue(e.value);if(null==t){const a=(0,O.y)(e);throw new l.eO(`Value "${a}" does not exist in "${this.name}" enum.`+ke(this,a),{nodes:e})}return t.value}toConfig(){const e=g(this.getValues(),e=>e.name,e=>({description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,values:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function ke(e,a){return u("the enum value",w(a,e.getValues().map(e=>e.name)))}function Ie(e,a){return Ee(a)||(0,o.U)(!1,`${e} values must be an object with value names as keys.`),Object.entries(a).map(([a,t])=>(Ee(t)||(0,o.U)(!1,`${e}.${a} must refer to an object with a "value" key representing an internal value but got: ${(0,p.N)(t)}.`),{name:k(a),description:t.description,value:void 0!==t.value?t.value:a,deprecationReason:t.deprecationReason,extensions:N(t.extensions),astNode:t.astNode}))}class $e{constructor(e){var a,t;this.name=C(e.name),this.description=e.description,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this.isOneOf=null!==(t=e.isOneOf)&&void 0!==t&&t,this._fields=Ve.bind(void 0,e)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields}toConfig(){const e=y(this.getFields(),e=>({description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}));return{name:this.name,description:this.description,fields:e,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function Ve(e){const a=ye(e.fields);return Ee(a)||(0,o.U)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),y(a,(a,t)=>(!("resolve"in a)||(0,o.U)(!1,`${e.name}.${t} field has a resolve property, but Input Types cannot define resolvers.`),{name:C(t),description:a.description,type:a.type,defaultValue:a.defaultValue,deprecationReason:a.deprecationReason,extensions:N(a.extensions),astNode:a.astNode}))}function Re(e){return J(e.type)&&void 0===e.defaultValue}function je(e,a){return e===a||(J(e)&&J(a)||!(!Q(e)||!Q(a)))&&je(e.ofType,a.ofType)}function Pe(e,a,t){return a===t||(J(t)?!!J(a)&&Pe(e,a.ofType,t.ofType):J(a)?Pe(e,a.ofType,t):Q(t)?!!Q(a)&&Pe(e,a.ofType,t.ofType):!Q(a)&&(oe(t)&&(L(a)||j(a))&&e.isSubType(t,a)))}function Le(e,a,t){return a===t||(oe(a)?oe(t)?e.getPossibleTypes(a).some(a=>e.isSubType(t,a)):e.isSubType(a,t):!!oe(t)&&e.isSubType(t,a))}var Be=t(42868);const Me=2147483647,Ue=-2147483648,qe=new be({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const a=We(e);if("boolean"==typeof a)return a?1:0;let t=a;if("string"==typeof a&&""!==a&&(t=Number(a)),"number"!=typeof t||!Number.isInteger(t))throw new l.eO(`Int cannot represent non-integer value: ${(0,p.N)(a)}`);if(t>Me||t<Ue)throw new l.eO("Int cannot represent non 32-bit signed integer value: "+(0,p.N)(a));return t},parseValue(e){if("number"!=typeof e||!Number.isInteger(e))throw new l.eO(`Int cannot represent non-integer value: ${(0,p.N)(e)}`);if(e>Me||e<Ue)throw new l.eO(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==F.b.INT)throw new l.eO(`Int cannot represent non-integer value: ${(0,O.y)(e)}`,{nodes:e});const a=parseInt(e.value,10);if(a>Me||a<Ue)throw new l.eO(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return a}}),ze=new be({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const a=We(e);if("boolean"==typeof a)return a?1:0;let t=a;if("string"==typeof a&&""!==a&&(t=Number(a)),"number"!=typeof t||!Number.isFinite(t))throw new l.eO(`Float cannot represent non numeric value: ${(0,p.N)(a)}`);return t},parseValue(e){if("number"!=typeof e||!Number.isFinite(e))throw new l.eO(`Float cannot represent non numeric value: ${(0,p.N)(e)}`);return e},parseLiteral(e){if(e.kind!==F.b.FLOAT&&e.kind!==F.b.INT)throw new l.eO(`Float cannot represent non numeric value: ${(0,O.y)(e)}`,e);return parseFloat(e.value)}}),Ge=new be({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const a=We(e);if("string"==typeof a)return a;if("boolean"==typeof a)return a?"true":"false";if("number"==typeof a&&Number.isFinite(a))return a.toString();throw new l.eO(`String cannot represent value: ${(0,p.N)(e)}`)},parseValue(e){if("string"!=typeof e)throw new l.eO(`String cannot represent a non string value: ${(0,p.N)(e)}`);return e},parseLiteral(e){if(e.kind!==F.b.STRING)throw new l.eO(`String cannot represent a non string value: ${(0,O.y)(e)}`,{nodes:e});return e.value}}),Ye=new be({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const a=We(e);if("boolean"==typeof a)return a;if(Number.isFinite(a))return 0!==a;throw new l.eO(`Boolean cannot represent a non boolean value: ${(0,p.N)(a)}`)},parseValue(e){if("boolean"!=typeof e)throw new l.eO(`Boolean cannot represent a non boolean value: ${(0,p.N)(e)}`);return e},parseLiteral(e){if(e.kind!==F.b.BOOLEAN)throw new l.eO(`Boolean cannot represent a non boolean value: ${(0,O.y)(e)}`,{nodes:e});return e.value}}),Qe=new be({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const a=We(e);if("string"==typeof a)return a;if(Number.isInteger(a))return String(a);throw new l.eO(`ID cannot represent value: ${(0,p.N)(e)}`)},parseValue(e){if("string"==typeof e)return e;if("number"==typeof e&&Number.isInteger(e))return e.toString();throw new l.eO(`ID cannot represent value: ${(0,p.N)(e)}`)},parseLiteral(e){if(e.kind!==F.b.STRING&&e.kind!==F.b.INT)throw new l.eO("ID cannot represent a non-string and non-integer value: "+(0,O.y)(e),{nodes:e});return e.value}}),He=Object.freeze([Ge,qe,ze,Ye,Qe]);function Je(e){return He.some(({name:a})=>e.name===a)}function We(e){if((0,v.Z)(e)){if("function"==typeof e.valueOf){const a=e.valueOf();if(!(0,v.Z)(a))return a}if("function"==typeof e.toJSON)return e.toJSON()}return e}function Ke(e){return(0,f.h)(e,Ze)}function Xe(e){if(!Ke(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL directive.`);return e}class Ze{constructor(e){var a,t;this.name=C(e.name),this.description=e.description,this.locations=e.locations,this.isRepeatable=null!==(a=e.isRepeatable)&&void 0!==a&&a,this.extensions=N(e.extensions),this.astNode=e.astNode,Array.isArray(e.locations)||(0,o.U)(!1,`@${e.name} locations must be an Array.`);const i=null!==(t=e.args)&&void 0!==t?t:{};(0,v.Z)(i)&&!Array.isArray(i)||(0,o.U)(!1,`@${e.name} args must be an object with argument names as keys.`),this.args=we(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Ne(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const ea=new Ze({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Be.H.FIELD,Be.H.FRAGMENT_SPREAD,Be.H.INLINE_FRAGMENT],args:{if:{type:new pe(Ye),description:"Included when true."}}}),aa=new Ze({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Be.H.FIELD,Be.H.FRAGMENT_SPREAD,Be.H.INLINE_FRAGMENT],args:{if:{type:new pe(Ye),description:"Skipped when true."}}}),ta="No longer supported",ia=new Ze({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Be.H.FIELD_DEFINITION,Be.H.ARGUMENT_DEFINITION,Be.H.INPUT_FIELD_DEFINITION,Be.H.ENUM_VALUE],args:{reason:{type:Ge,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:ta}}}),na=new Ze({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Be.H.SCALAR],args:{url:{type:new pe(Ge),description:"The URL that specifies the behavior of this scalar."}}}),oa=new Ze({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Be.H.INPUT_OBJECT],args:{}}),ra=Object.freeze([ea,aa,ia,na,oa]);function sa(e){return ra.some(({name:a})=>a===e.name)}var pa=t(71306);function la(e){return"object"==typeof e&&"function"==typeof(null==e?void 0:e[Symbol.iterator])}function da(e,a){if(J(a)){const t=da(e,a.ofType);return(null==t?void 0:t.kind)===F.b.NULL?null:t}if(null===e)return{kind:F.b.NULL};if(void 0===e)return null;if(Q(a)){const t=a.ofType;if(la(e)){const a=[];for(const i of e){const e=da(i,t);null!=e&&a.push(e)}return{kind:F.b.LIST,values:a}}return da(e,t)}if(G(a)){if(!(0,v.Z)(e))return null;const t=[];for(const i of Object.values(a.getFields())){const a=da(e[i.name],i.type);a&&t.push({kind:F.b.OBJECT_FIELD,name:{kind:F.b.NAME,value:i.name},value:a})}return{kind:F.b.OBJECT,fields:t}}if(ae(a)){const t=a.serialize(e);if(null==t)return null;if("boolean"==typeof t)return{kind:F.b.BOOLEAN,value:t};if("number"==typeof t&&Number.isFinite(t)){const e=String(t);return ca.test(e)?{kind:F.b.INT,value:e}:{kind:F.b.FLOAT,value:e}}if("string"==typeof t)return q(a)?{kind:F.b.ENUM,value:t}:a===Qe&&ca.test(t)?{kind:F.b.INT,value:t}:{kind:F.b.STRING,value:t};throw new TypeError(`Cannot convert value to AST: ${(0,p.N)(t)}.`)}(0,pa.V)(!1,"Unexpected input type: "+(0,p.N)(a))}const ca=/^-?(?:0|[1-9][0-9]*)$/,ua=new De({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Ge,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new pe(new se(new pe(va))),resolve:e=>Object.values(e.getTypeMap())},queryType:{description:"The type that query operations will be rooted at.",type:new pe(va),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:va,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:va,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new pe(new se(new pe(ma))),resolve:e=>e.getDirectives()}})}),ma=new De({name:"__Directive",description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:()=>({name:{type:new pe(Ge),resolve:e=>e.name},description:{type:Ge,resolve:e=>e.description},isRepeatable:{type:new pe(Ye),resolve:e=>e.isRepeatable},locations:{type:new pe(new se(new pe(fa))),resolve:e=>e.locations},args:{type:new pe(new se(new pe(ga))),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve:(e,{includeDeprecated:a})=>a?e.args:e.args.filter(e=>null==e.deprecationReason)}})}),fa=new Ce({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:Be.H.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Be.H.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Be.H.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Be.H.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Be.H.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Be.H.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Be.H.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Be.H.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Be.H.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Be.H.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Be.H.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Be.H.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Be.H.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Be.H.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Be.H.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Be.H.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Be.H.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Be.H.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Be.H.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),va=new De({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new pe(Da),resolve:e=>V(e)?ba.SCALAR:j(e)?ba.OBJECT:L(e)?ba.INTERFACE:M(e)?ba.UNION:q(e)?ba.ENUM:G(e)?ba.INPUT_OBJECT:Q(e)?ba.LIST:J(e)?ba.NON_NULL:void(0,pa.V)(!1,`Unexpected type: "${(0,p.N)(e)}".`)},name:{type:Ge,resolve:e=>"name"in e?e.name:void 0},description:{type:Ge,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Ge,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new se(new pe(ha)),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve(e,{includeDeprecated:a}){if(j(e)||L(e)){const t=Object.values(e.getFields());return a?t:t.filter(e=>null==e.deprecationReason)}}},interfaces:{type:new se(new pe(va)),resolve(e){if(j(e)||L(e))return e.getInterfaces()}},possibleTypes:{type:new se(new pe(va)),resolve(e,a,t,{schema:i}){if(oe(e))return i.getPossibleTypes(e)}},enumValues:{type:new se(new pe(ya)),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve(e,{includeDeprecated:a}){if(q(e)){const t=e.getValues();return a?t:t.filter(e=>null==e.deprecationReason)}}},inputFields:{type:new se(new pe(ga)),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve(e,{includeDeprecated:a}){if(G(e)){const t=Object.values(e.getFields());return a?t:t.filter(e=>null==e.deprecationReason)}}},ofType:{type:va,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:Ye,resolve:e=>{if(G(e))return e.isOneOf}}})}),ha=new De({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new pe(Ge),resolve:e=>e.name},description:{type:Ge,resolve:e=>e.description},args:{type:new pe(new se(new pe(ga))),args:{includeDeprecated:{type:Ye,defaultValue:!1}},resolve:(e,{includeDeprecated:a})=>a?e.args:e.args.filter(e=>null==e.deprecationReason)},type:{type:new pe(va),resolve:e=>e.type},isDeprecated:{type:new pe(Ye),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ge,resolve:e=>e.deprecationReason}})}),ga=new De({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new pe(Ge),resolve:e=>e.name},description:{type:Ge,resolve:e=>e.description},type:{type:new pe(va),resolve:e=>e.type},defaultValue:{type:Ge,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:a,defaultValue:t}=e,i=da(t,a);return i?(0,O.y)(i):null}},isDeprecated:{type:new pe(Ye),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ge,resolve:e=>e.deprecationReason}})}),ya=new De({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new pe(Ge),resolve:e=>e.name},description:{type:Ge,resolve:e=>e.description},isDeprecated:{type:new pe(Ye),resolve:e=>null!=e.deprecationReason},deprecationReason:{type:Ge,resolve:e=>e.deprecationReason}})});var ba;!function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"}(ba||(ba={}));const Da=new Ce({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:ba.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:ba.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:ba.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:ba.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:ba.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:ba.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:ba.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:ba.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),xa={name:"__schema",type:new pe(ua),description:"Access the current type schema of this server.",args:[],resolve:(e,a,t,{schema:i})=>i,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},_a={name:"__type",type:va,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new pe(Ge),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:a},t,{schema:i})=>i.getType(a),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},wa={name:"__typename",type:new pe(Ge),description:"The name of the current Object type at runtime.",args:[],resolve:(e,a,t,{parentType:i})=>i.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Ea=Object.freeze([ua,ma,fa,va,ha,ga,ya,Da]);function Ta(e){return Ea.some(({name:a})=>e.name===a)}function Na(e){return(0,f.h)(e,Oa)}function Fa(e){if(!Na(e))throw new Error(`Expected ${(0,p.N)(e)} to be a GraphQL schema.`);return e}class Oa{constructor(e){var a,t;this.__validationErrors=!0===e.assumeValid?[]:void 0,(0,v.Z)(e)||(0,o.U)(!1,"Must provide configuration object."),!e.types||Array.isArray(e.types)||(0,o.U)(!1,`"types" must be Array if provided but got: ${(0,p.N)(e.types)}.`),!e.directives||Array.isArray(e.directives)||(0,o.U)(!1,`"directives" must be Array if provided but got: ${(0,p.N)(e.directives)}.`),this.description=e.description,this.extensions=N(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=null!==(a=e.extensionASTNodes)&&void 0!==a?a:[],this._queryType=e.query,this._mutationType=e.mutation,this._subscriptionType=e.subscription,this._directives=null!==(t=e.directives)&&void 0!==t?t:ra;const i=new Set(e.types);if(null!=e.types)for(const a of e.types)i.delete(a),Aa(a,i);null!=this._queryType&&Aa(this._queryType,i),null!=this._mutationType&&Aa(this._mutationType,i),null!=this._subscriptionType&&Aa(this._subscriptionType,i);for(const e of this._directives)if(Ke(e))for(const a of e.args)Aa(a.type,i);Aa(ua,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const e of i){if(null==e)continue;const a=e.name;if(a||(0,o.U)(!1,"One of the provided types for building the Schema is missing a name."),void 0!==this._typeMap[a])throw new Error(`Schema must contain uniquely named types but contains multiple types named "${a}".`);if(this._typeMap[a]=e,L(e)){for(const a of e.getInterfaces())if(L(a)){let t=this._implementationsMap[a.name];void 0===t&&(t=this._implementationsMap[a.name]={objects:[],interfaces:[]}),t.interfaces.push(e)}}else if(j(e))for(const a of e.getInterfaces())if(L(a)){let t=this._implementationsMap[a.name];void 0===t&&(t=this._implementationsMap[a.name]={objects:[],interfaces:[]}),t.objects.push(e)}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(e){switch(e){case d.cE.QUERY:return this.getQueryType();case d.cE.MUTATION:return this.getMutationType();case d.cE.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(e){return this.getTypeMap()[e]}getPossibleTypes(e){return M(e)?e.getTypes():this.getImplementations(e).objects}getImplementations(e){const a=this._implementationsMap[e.name];return null!=a?a:{objects:[],interfaces:[]}}isSubType(e,a){let t=this._subTypeMap[e.name];if(void 0===t){if(t=Object.create(null),M(e))for(const a of e.getTypes())t[a.name]=!0;else{const a=this.getImplementations(e);for(const e of a.objects)t[e.name]=!0;for(const e of a.interfaces)t[e.name]=!0}this._subTypeMap[e.name]=t}return void 0!==t[a.name]}getDirectives(){return this._directives}getDirective(e){return this.getDirectives().find(a=>a.name===e)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:void 0!==this.__validationErrors}}}function Aa(e,a){const t=he(e);if(!a.has(t))if(a.add(t),M(t))for(const e of t.getTypes())Aa(e,a);else if(j(t)||L(t)){for(const e of t.getInterfaces())Aa(e,a);for(const e of Object.values(t.getFields())){Aa(e.type,a);for(const t of e.args)Aa(t.type,a)}}else if(G(t))for(const e of Object.values(t.getFields()))Aa(e.type,a);return a}function Sa(e){if(Fa(e),e.__validationErrors)return e.__validationErrors;const a=new ka(e);!function(e){const a=e.schema,t=a.getQueryType();if(t){if(!j(t)){var i;e.reportError(`Query root type must be Object type, it cannot be ${(0,p.N)(t)}.`,null!==(i=Ia(a,d.cE.QUERY))&&void 0!==i?i:t.astNode)}}else e.reportError("Query root type must be provided.",a.astNode);const n=a.getMutationType();var o;n&&!j(n)&&e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,p.N)(n)}.`,null!==(o=Ia(a,d.cE.MUTATION))&&void 0!==o?o:n.astNode);const r=a.getSubscriptionType();var s;r&&!j(r)&&e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,p.N)(r)}.`,null!==(s=Ia(a,d.cE.SUBSCRIPTION))&&void 0!==s?s:r.astNode)}(a),function(e){for(const t of e.schema.getDirectives())if(Ke(t)){$a(e,t),0===t.locations.length&&e.reportError(`Directive @${t.name} must include 1 or more locations.`,t.astNode);for(const i of t.args){var a;if($a(e,i),K(i.type)||e.reportError(`The type of @${t.name}(${i.name}:) must be Input Type but got: ${(0,p.N)(i.type)}.`,i.astNode),Fe(i)&&null!=i.deprecationReason)e.reportError(`Required argument @${t.name}(${i.name}:) cannot be deprecated.`,[Ga(i.astNode),null===(a=i.astNode)||void 0===a?void 0:a.type])}}else e.reportError(`Expected directive but got: ${(0,p.N)(t)}.`,null==t?void 0:t.astNode)}(a),function(e){const a=function(e){const a=Object.create(null),t=[],i=Object.create(null);return n;function n(o){if(a[o.name])return;a[o.name]=!0,i[o.name]=t.length;const r=Object.values(o.getFields());for(const a of r)if(J(a.type)&&G(a.type.ofType)){const o=a.type.ofType,r=i[o.name];if(t.push(a),void 0===r)n(o);else{const a=t.slice(r),i=a.map(e=>e.name).join(".");e.reportError(`Cannot reference Input Object "${o.name}" within itself through a series of non-null fields: "${i}".`,a.map(e=>e.astNode))}t.pop()}i[o.name]=void 0}}(e),t=e.schema.getTypeMap();for(const i of Object.values(t))fe(i)?(Ta(i)||$a(e,i),j(i)||L(i)?(Va(e,i),Ra(e,i)):M(i)?La(e,i):q(i)?Ba(e,i):G(i)&&(Ma(e,i),a(i))):e.reportError(`Expected GraphQL named type but got: ${(0,p.N)(i)}.`,i.astNode)}(a);const t=a.getErrors();return e.__validationErrors=t,t}function Ca(e){const a=Sa(e);if(0!==a.length)throw new Error(a.map(e=>e.message).join("\n\n"))}class ka{constructor(e){this._errors=[],this.schema=e}reportError(e,a){const t=Array.isArray(a)?a.filter(Boolean):a;this._errors.push(new l.eO(e,{nodes:t}))}getErrors(){return this._errors}}function Ia(e,a){var t;return null===(t=[e.astNode,...e.extensionASTNodes].flatMap(e=>{var a;return null!==(a=null==e?void 0:e.operationTypes)&&void 0!==a?a:[]}).find(e=>e.operation===a))||void 0===t?void 0:t.type}function $a(e,a){a.name.startsWith("__")&&e.reportError(`Name "${a.name}" must not begin with "__", which is reserved by GraphQL introspection.`,a.astNode)}function Va(e,a){const t=Object.values(a.getFields());0===t.length&&e.reportError(`Type ${a.name} must define one or more fields.`,[a.astNode,...a.extensionASTNodes]);for(const r of t){var i;if($a(e,r),!Z(r.type))e.reportError(`The type of ${a.name}.${r.name} must be Output Type but got: ${(0,p.N)(r.type)}.`,null===(i=r.astNode)||void 0===i?void 0:i.type);for(const t of r.args){const i=t.name;var n,o;if($a(e,t),!K(t.type))e.reportError(`The type of ${a.name}.${r.name}(${i}:) must be Input Type but got: ${(0,p.N)(t.type)}.`,null===(n=t.astNode)||void 0===n?void 0:n.type);if(Fe(t)&&null!=t.deprecationReason)e.reportError(`Required argument ${a.name}.${r.name}(${i}:) cannot be deprecated.`,[Ga(t.astNode),null===(o=t.astNode)||void 0===o?void 0:o.type])}}}function Ra(e,a){const t=Object.create(null);for(const i of a.getInterfaces())L(i)?a!==i?t[i.name]?e.reportError(`Type ${a.name} can only implement ${i.name} once.`,qa(a,i)):(t[i.name]=!0,Pa(e,a,i),ja(e,a,i)):e.reportError(`Type ${a.name} cannot implement itself because it would create a circular reference.`,qa(a,i)):e.reportError(`Type ${(0,p.N)(a)} must only implement Interface types, it cannot implement ${(0,p.N)(i)}.`,qa(a,i))}function ja(e,a,t){const i=a.getFields();for(const l of Object.values(t.getFields())){const d=l.name,c=i[d];if(c){var n,o;if(!Pe(e.schema,c.type,l.type))e.reportError(`Interface field ${t.name}.${d} expects type ${(0,p.N)(l.type)} but ${a.name}.${d} is type ${(0,p.N)(c.type)}.`,[null===(n=l.astNode)||void 0===n?void 0:n.type,null===(o=c.astNode)||void 0===o?void 0:o.type]);for(const i of l.args){const n=i.name,o=c.args.find(e=>e.name===n);var r,s;if(o){if(!je(i.type,o.type))e.reportError(`Interface field argument ${t.name}.${d}(${n}:) expects type ${(0,p.N)(i.type)} but ${a.name}.${d}(${n}:) is type ${(0,p.N)(o.type)}.`,[null===(r=i.astNode)||void 0===r?void 0:r.type,null===(s=o.astNode)||void 0===s?void 0:s.type])}else e.reportError(`Interface field argument ${t.name}.${d}(${n}:) expected but ${a.name}.${d} does not provide it.`,[i.astNode,c.astNode])}for(const i of c.args){const n=i.name;!l.args.find(e=>e.name===n)&&Fe(i)&&e.reportError(`Object field ${a.name}.${d} includes required argument ${n} that is missing from the Interface field ${t.name}.${d}.`,[i.astNode,l.astNode])}}else e.reportError(`Interface field ${t.name}.${d} expected but ${a.name} does not provide it.`,[l.astNode,a.astNode,...a.extensionASTNodes])}}function Pa(e,a,t){const i=a.getInterfaces();for(const n of t.getInterfaces())i.includes(n)||e.reportError(n===a?`Type ${a.name} cannot implement ${t.name} because it would create a circular reference.`:`Type ${a.name} must implement ${n.name} because it is implemented by ${t.name}.`,[...qa(t,n),...qa(a,t)])}function La(e,a){const t=a.getTypes();0===t.length&&e.reportError(`Union type ${a.name} must define one or more member types.`,[a.astNode,...a.extensionASTNodes]);const i=Object.create(null);for(const n of t)i[n.name]?e.reportError(`Union type ${a.name} can only include type ${n.name} once.`,za(a,n.name)):(i[n.name]=!0,j(n)||e.reportError(`Union type ${a.name} can only include Object types, it cannot include ${(0,p.N)(n)}.`,za(a,String(n))))}function Ba(e,a){const t=a.getValues();0===t.length&&e.reportError(`Enum type ${a.name} must define one or more values.`,[a.astNode,...a.extensionASTNodes]);for(const a of t)$a(e,a)}function Ma(e,a){const t=Object.values(a.getFields());0===t.length&&e.reportError(`Input Object type ${a.name} must define one or more fields.`,[a.astNode,...a.extensionASTNodes]);for(const o of t){var i,n;if($a(e,o),!K(o.type))e.reportError(`The type of ${a.name}.${o.name} must be Input Type but got: ${(0,p.N)(o.type)}.`,null===(i=o.astNode)||void 0===i?void 0:i.type);if(Re(o)&&null!=o.deprecationReason)e.reportError(`Required input field ${a.name}.${o.name} cannot be deprecated.`,[Ga(o.astNode),null===(n=o.astNode)||void 0===n?void 0:n.type]);a.isOneOf&&Ua(a,o,e)}}function Ua(e,a,t){var i;J(a.type)&&t.reportError(`OneOf input field ${e.name}.${a.name} must be nullable.`,null===(i=a.astNode)||void 0===i?void 0:i.type);void 0!==a.defaultValue&&t.reportError(`OneOf input field ${e.name}.${a.name} cannot have a default value.`,a.astNode)}function qa(e,a){const{astNode:t,extensionASTNodes:i}=e;return(null!=t?[t,...i]:i).flatMap(e=>{var a;return null!==(a=e.interfaces)&&void 0!==a?a:[]}).filter(e=>e.name.value===a.name)}function za(e,a){const{astNode:t,extensionASTNodes:i}=e;return(null!=t?[t,...i]:i).flatMap(e=>{var a;return null!==(a=e.types)&&void 0!==a?a:[]}).filter(e=>e.name.value===a)}function Ga(e){var a;return null==e||null===(a=e.directives)||void 0===a?void 0:a.find(e=>e.name.value===ia.name)}var Ya=t(90424);function Qa(e,a){switch(a.kind){case F.b.LIST_TYPE:{const t=Qa(e,a.type);return t&&new se(t)}case F.b.NON_NULL_TYPE:{const t=Qa(e,a.type);return t&&new pe(t)}case F.b.NAMED_TYPE:return e.getType(a.name.value)}}class Ha{constructor(e,a,t){this._schema=e,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=null!=t?t:Ja,a&&(K(a)&&this._inputTypeStack.push(a),ie(a)&&this._parentTypeStack.push(a),Z(a)&&this._typeStack.push(a))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(e){const a=this._schema;switch(e.kind){case F.b.SELECTION_SET:{const e=he(this.getType());this._parentTypeStack.push(ie(e)?e:void 0);break}case F.b.FIELD:{const t=this.getParentType();let i,n;t&&(i=this._getFieldDef(a,t,e),i&&(n=i.type)),this._fieldDefStack.push(i),this._typeStack.push(Z(n)?n:void 0);break}case F.b.DIRECTIVE:this._directive=a.getDirective(e.name.value);break;case F.b.OPERATION_DEFINITION:{const t=a.getRootType(e.operation);this._typeStack.push(j(t)?t:void 0);break}case F.b.INLINE_FRAGMENT:case F.b.FRAGMENT_DEFINITION:{const t=e.typeCondition,i=t?Qa(a,t):he(this.getType());this._typeStack.push(Z(i)?i:void 0);break}case F.b.VARIABLE_DEFINITION:{const t=Qa(a,e.type);this._inputTypeStack.push(K(t)?t:void 0);break}case F.b.ARGUMENT:{var t;let a,i;const n=null!==(t=this.getDirective())&&void 0!==t?t:this.getFieldDef();n&&(a=n.args.find(a=>a.name===e.name.value),a&&(i=a.type)),this._argument=a,this._defaultValueStack.push(a?a.defaultValue:void 0),this._inputTypeStack.push(K(i)?i:void 0);break}case F.b.LIST:{const e=me(this.getInputType()),a=Q(e)?e.ofType:e;this._defaultValueStack.push(void 0),this._inputTypeStack.push(K(a)?a:void 0);break}case F.b.OBJECT_FIELD:{const a=he(this.getInputType());let t,i;G(a)&&(i=a.getFields()[e.name.value],i&&(t=i.type)),this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(K(t)?t:void 0);break}case F.b.ENUM:{const a=he(this.getInputType());let t;q(a)&&(t=a.getValue(e.value)),this._enumValue=t;break}}}leave(e){switch(e.kind){case F.b.SELECTION_SET:this._parentTypeStack.pop();break;case F.b.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case F.b.DIRECTIVE:this._directive=null;break;case F.b.OPERATION_DEFINITION:case F.b.INLINE_FRAGMENT:case F.b.FRAGMENT_DEFINITION:this._typeStack.pop();break;case F.b.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case F.b.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case F.b.LIST:case F.b.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case F.b.ENUM:this._enumValue=null}}}function Ja(e,a,t){const i=t.name.value;return i===xa.name&&e.getQueryType()===a?xa:i===_a.name&&e.getQueryType()===a?_a:i===wa.name&&ie(a)?wa:j(a)||L(a)?a.getFields()[i]:void 0}function Wa(e,a){return{enter(...t){const i=t[0];e.enter(i);const n=(0,Ya.XO)(a,i.kind).enter;if(n){const o=n.apply(a,t);return void 0!==o&&(e.leave(i),(0,d.Ll)(o)&&e.enter(o)),o}},leave(...t){const i=t[0],n=(0,Ya.XO)(a,i.kind).leave;let o;return n&&(o=n.apply(a,t)),e.leave(i),o}}}var Ka=t(3420);function Xa(e){return{Document(a){for(const t of a.definitions)if(!(0,Ka._m)(t)){const a=t.kind===F.b.SCHEMA_DEFINITION||t.kind===F.b.SCHEMA_EXTENSION?"schema":'"'+t.name.value+'"';e.reportError(new l.eO(`The ${a} definition is not executable.`,{nodes:t}))}return!1}}}function Za(e){return{Field(a){const t=e.getParentType();if(t){if(!e.getFieldDef()){const i=e.getSchema(),n=a.name.value;let o=u("to use an inline fragment on",function(e,a,t){if(!oe(a))return[];const i=new Set,n=Object.create(null);for(const r of e.getPossibleTypes(a))if(r.getFields()[t]){i.add(r),n[r.name]=1;for(const e of r.getInterfaces()){var o;e.getFields()[t]&&(i.add(e),n[e.name]=(null!==(o=n[e.name])&&void 0!==o?o:0)+1)}}return[...i].sort((a,t)=>{const i=n[t.name]-n[a.name];return 0!==i?i:L(a)&&e.isSubType(a,t)?-1:L(t)&&e.isSubType(t,a)?1:b(a.name,t.name)}).map(e=>e.name)}(i,t,n));""===o&&(o=u(function(e,a){if(j(e)||L(e)){return w(a,Object.keys(e.getFields()))}return[]}(t,n))),e.reportError(new l.eO(`Cannot query field "${n}" on type "${t.name}".`+o,{nodes:a}))}}}}}function et(e){return{InlineFragment(a){const t=a.typeCondition;if(t){const a=Qa(e.getSchema(),t);if(a&&!ie(a)){const a=(0,O.y)(t);e.reportError(new l.eO(`Fragment cannot condition on non composite type "${a}".`,{nodes:t}))}}},FragmentDefinition(a){const t=Qa(e.getSchema(),a.typeCondition);if(t&&!ie(t)){const t=(0,O.y)(a.typeCondition);e.reportError(new l.eO(`Fragment "${a.name.value}" cannot condition on non composite type "${t}".`,{nodes:a.typeCondition}))}}}}function at(e){return{...tt(e),Argument(a){const t=e.getArgument(),i=e.getFieldDef(),n=e.getParentType();if(!t&&i&&n){const t=a.name.value,o=w(t,i.args.map(e=>e.name));e.reportError(new l.eO(`Unknown argument "${t}" on field "${n.name}.${i.name}".`+u(o),{nodes:a}))}}}}function tt(e){const a=Object.create(null),t=e.getSchema(),i=t?t.getDirectives():ra;for(const e of i)a[e.name]=e.args.map(e=>e.name);const n=e.getDocument().definitions;for(const e of n)if(e.kind===F.b.DIRECTIVE_DEFINITION){var o;const t=null!==(o=e.arguments)&&void 0!==o?o:[];a[e.name.value]=t.map(e=>e.name.value)}return{Directive(t){const i=t.name.value,n=a[i];if(t.arguments&&n)for(const a of t.arguments){const t=a.name.value;if(!n.includes(t)){const o=w(t,n);e.reportError(new l.eO(`Unknown argument "${t}" on directive "@${i}".`+u(o),{nodes:a}))}}return!1}}}function it(e){const a=Object.create(null),t=e.getSchema(),i=t?t.getDirectives():ra;for(const e of i)a[e.name]=e.locations;const n=e.getDocument().definitions;for(const e of n)e.kind===F.b.DIRECTIVE_DEFINITION&&(a[e.name.value]=e.locations.map(e=>e.value));return{Directive(t,i,n,o,r){const s=t.name.value,c=a[s];if(!c)return void e.reportError(new l.eO(`Unknown directive "@${s}".`,{nodes:t}));const u=function(e){const a=e[e.length-1];switch("kind"in a||(0,pa.V)(!1),a.kind){case F.b.OPERATION_DEFINITION:return function(e){switch(e){case d.cE.QUERY:return Be.H.QUERY;case d.cE.MUTATION:return Be.H.MUTATION;case d.cE.SUBSCRIPTION:return Be.H.SUBSCRIPTION}}(a.operation);case F.b.FIELD:return Be.H.FIELD;case F.b.FRAGMENT_SPREAD:return Be.H.FRAGMENT_SPREAD;case F.b.INLINE_FRAGMENT:return Be.H.INLINE_FRAGMENT;case F.b.FRAGMENT_DEFINITION:return Be.H.FRAGMENT_DEFINITION;case F.b.VARIABLE_DEFINITION:return Be.H.VARIABLE_DEFINITION;case F.b.SCHEMA_DEFINITION:case F.b.SCHEMA_EXTENSION:return Be.H.SCHEMA;case F.b.SCALAR_TYPE_DEFINITION:case F.b.SCALAR_TYPE_EXTENSION:return Be.H.SCALAR;case F.b.OBJECT_TYPE_DEFINITION:case F.b.OBJECT_TYPE_EXTENSION:return Be.H.OBJECT;case F.b.FIELD_DEFINITION:return Be.H.FIELD_DEFINITION;case F.b.INTERFACE_TYPE_DEFINITION:case F.b.INTERFACE_TYPE_EXTENSION:return Be.H.INTERFACE;case F.b.UNION_TYPE_DEFINITION:case F.b.UNION_TYPE_EXTENSION:return Be.H.UNION;case F.b.ENUM_TYPE_DEFINITION:case F.b.ENUM_TYPE_EXTENSION:return Be.H.ENUM;case F.b.ENUM_VALUE_DEFINITION:return Be.H.ENUM_VALUE;case F.b.INPUT_OBJECT_TYPE_DEFINITION:case F.b.INPUT_OBJECT_TYPE_EXTENSION:return Be.H.INPUT_OBJECT;case F.b.INPUT_VALUE_DEFINITION:{const a=e[e.length-3];return"kind"in a||(0,pa.V)(!1),a.kind===F.b.INPUT_OBJECT_TYPE_DEFINITION?Be.H.INPUT_FIELD_DEFINITION:Be.H.ARGUMENT_DEFINITION}default:(0,pa.V)(!1,"Unexpected kind: "+(0,p.N)(a.kind))}}(r);u&&!c.includes(u)&&e.reportError(new l.eO(`Directive "@${s}" may not be used on ${u}.`,{nodes:t}))}}}function nt(e){return{FragmentSpread(a){const t=a.name.value;e.getFragment(t)||e.reportError(new l.eO(`Unknown fragment "${t}".`,{nodes:a.name}))}}}function ot(e){const a=e.getSchema(),t=a?a.getTypeMap():Object.create(null),i=Object.create(null);for(const a of e.getDocument().definitions)(0,Ka.a6)(a)&&(i[a.name.value]=!0);const n=[...Object.keys(t),...Object.keys(i)];return{NamedType(a,o,r,s,p){const d=a.name.value;if(!t[d]&&!i[d]){var c;const t=null!==(c=p[2])&&void 0!==c?c:r,i=null!=t&&("kind"in(m=t)&&((0,Ka.xu)(m)||(0,Ka.fT)(m)));if(i&&rt.includes(d))return;const o=w(d,i?rt.concat(n):n);e.reportError(new l.eO(`Unknown type "${d}".`+u(o),{nodes:a}))}var m}}}const rt=[...He,...Ea].map(e=>e.name);function st(e){let a=0;return{Document(e){a=e.definitions.filter(e=>e.kind===F.b.OPERATION_DEFINITION).length},OperationDefinition(t){!t.name&&a>1&&e.reportError(new l.eO("This anonymous operation must be the only defined operation.",{nodes:t}))}}}function pt(e){var a,t,i;const n=e.getSchema(),o=null!==(a=null!==(t=null!==(i=null==n?void 0:n.astNode)&&void 0!==i?i:null==n?void 0:n.getQueryType())&&void 0!==t?t:null==n?void 0:n.getMutationType())&&void 0!==a?a:null==n?void 0:n.getSubscriptionType();let r=0;return{SchemaDefinition(a){o?e.reportError(new l.eO("Cannot define a new schema within a schema extension.",{nodes:a})):(r>0&&e.reportError(new l.eO("Must provide only one schema definition.",{nodes:a})),++r)}}}const lt=3;function dt(e){function a(t,i=Object.create(null),n=0){if(t.kind===F.b.FRAGMENT_SPREAD){const o=t.name.value;if(!0===i[o])return!1;const r=e.getFragment(o);if(!r)return!1;try{return i[o]=!0,a(r,i,n)}finally{i[o]=void 0}}if(t.kind===F.b.FIELD&&("fields"===t.name.value||"interfaces"===t.name.value||"possibleTypes"===t.name.value||"inputFields"===t.name.value)&&++n>=lt)return!0;if("selectionSet"in t&&t.selectionSet)for(const e of t.selectionSet.selections)if(a(e,i,n))return!0;return!1}return{Field(t){if(("__schema"===t.name.value||"__type"===t.name.value)&&a(t))return e.reportError(new l.eO("Maximum introspection depth exceeded",{nodes:[t]})),!1}}}function ct(e){const a=Object.create(null),t=[],i=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>(n(e),!1)};function n(o){if(a[o.name.value])return;const r=o.name.value;a[r]=!0;const s=e.getFragmentSpreads(o.selectionSet);if(0!==s.length){i[r]=t.length;for(const a of s){const o=a.name.value,r=i[o];if(t.push(a),void 0===r){const a=e.getFragment(o);a&&n(a)}else{const a=t.slice(r),i=a.slice(0,-1).map(e=>'"'+e.name.value+'"').join(", ");e.reportError(new l.eO(`Cannot spread fragment "${o}" within itself`+(""!==i?` via ${i}.`:"."),{nodes:a}))}t.pop()}i[r]=void 0}}}function ut(e){let a=Object.create(null);return{OperationDefinition:{enter(){a=Object.create(null)},leave(t){const i=e.getRecursiveVariableUsages(t);for(const{node:n}of i){const i=n.name.value;!0!==a[i]&&e.reportError(new l.eO(t.name?`Variable "$${i}" is not defined by operation "${t.name.value}".`:`Variable "$${i}" is not defined.`,{nodes:[n,t]}))}}},VariableDefinition(e){a[e.variable.name.value]=!0}}}function mt(e){const a=[],t=[];return{OperationDefinition:e=>(a.push(e),!1),FragmentDefinition:e=>(t.push(e),!1),Document:{leave(){const i=Object.create(null);for(const t of a)for(const a of e.getRecursivelyReferencedFragments(t))i[a.name.value]=!0;for(const a of t){const t=a.name.value;!0!==i[t]&&e.reportError(new l.eO(`Fragment "${t}" is never used.`,{nodes:a}))}}}}}function ft(e){let a=[];return{OperationDefinition:{enter(){a=[]},leave(t){const i=Object.create(null),n=e.getRecursiveVariableUsages(t);for(const{node:e}of n)i[e.name.value]=!0;for(const n of a){const a=n.variable.name.value;!0!==i[a]&&e.reportError(new l.eO(t.name?`Variable "$${a}" is never used in operation "${t.name.value}".`:`Variable "$${a}" is never used.`,{nodes:n}))}}},VariableDefinition(e){a.push(e)}}}function vt(e){switch(e.kind){case F.b.OBJECT:return{...e,fields:(a=e.fields,a.map(e=>({...e,value:vt(e.value)})).sort((e,a)=>b(e.name.value,a.name.value)))};case F.b.LIST:return{...e,values:e.values.map(vt)};case F.b.INT:case F.b.FLOAT:case F.b.STRING:case F.b.BOOLEAN:case F.b.NULL:case F.b.ENUM:case F.b.VARIABLE:return e}var a}function ht(e){return Array.isArray(e)?e.map(([e,a])=>`subfields "${e}" conflict because `+ht(a)).join(" and "):e}function gt(e){const a=new Ft,t=new Ot,i=new Map;return{SelectionSet(n){const o=function(e,a,t,i,n,o){const r=[],[s,p]=Et(e,a,n,o);if(function(e,a,t,i,n,o){for(const[r,s]of Object.entries(o))if(s.length>1)for(let o=0;o<s.length;o++)for(let p=o+1;p<s.length;p++){const l=xt(e,t,i,n,!1,r,s[o],s[p]);l&&a.push(l)}}(e,r,a,t,i,s),0!==p.length)for(let n=0;n<p.length;n++){yt(e,r,a,t,i,!1,s,p[n]);for(let o=n+1;o<p.length;o++)bt(e,r,a,t,i,!1,p[n],p[o])}return r}(e,i,a,t,e.getParentType(),n);for(const[[a,t],i,n]of o){const o=ht(t);e.reportError(new l.eO(`Fields "${a}" conflict because ${o}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:i.concat(n)}))}}}}function yt(e,a,t,i,n,o,r,s){if(i.has(r,s,o))return;i.add(r,s,o);const p=e.getFragment(s);if(!p)return;const[l,d]=Tt(e,t,p);if(r!==l){Dt(e,a,t,i,n,o,r,l);for(const s of d)yt(e,a,t,i,n,o,r,s)}}function bt(e,a,t,i,n,o,r,s){if(r===s)return;if(n.has(r,s,o))return;n.add(r,s,o);const p=e.getFragment(r),l=e.getFragment(s);if(!p||!l)return;const[d,c]=Tt(e,t,p),[u,m]=Tt(e,t,l);Dt(e,a,t,i,n,o,d,u);for(const s of m)bt(e,a,t,i,n,o,r,s);for(const r of c)bt(e,a,t,i,n,o,r,s)}function Dt(e,a,t,i,n,o,r,s){for(const[p,l]of Object.entries(r)){const r=s[p];if(r)for(const s of l)for(const l of r){const r=xt(e,t,i,n,o,p,s,l);r&&a.push(r)}}}function xt(e,a,t,i,n,o,r,s){const[l,d,c]=r,[u,m,f]=s,v=n||l!==u&&j(l)&&j(u);if(!v){const e=d.name.value,a=m.name.value;if(e!==a)return[[o,`"${e}" and "${a}" are different fields`],[d],[m]];if(!function(e,a){const t=e.arguments,i=a.arguments;if(void 0===t||0===t.length)return void 0===i||0===i.length;if(void 0===i||0===i.length)return!1;if(t.length!==i.length)return!1;const n=new Map(i.map(({name:e,value:a})=>[e.value,a]));return t.every(e=>{const a=e.value,t=n.get(e.name.value);return void 0!==t&&_t(a)===_t(t)})}(d,m))return[[o,"they have differing arguments"],[d],[m]]}const h=null==c?void 0:c.type,g=null==f?void 0:f.type;if(h&&g&&wt(h,g))return[[o,`they return conflicting types "${(0,p.N)(h)}" and "${(0,p.N)(g)}"`],[d],[m]];const y=d.selectionSet,b=m.selectionSet;if(y&&b){const n=function(e,a,t,i,n,o,r,s,p){const l=[],[d,c]=Et(e,a,o,r),[u,m]=Et(e,a,s,p);Dt(e,l,a,t,i,n,d,u);for(const o of m)yt(e,l,a,t,i,n,d,o);for(const o of c)yt(e,l,a,t,i,n,u,o);for(const o of c)for(const r of m)bt(e,l,a,t,i,n,o,r);return l}(e,a,t,i,v,he(h),y,he(g),b);return function(e,a,t,i){if(e.length>0)return[[a,e.map(([e])=>e)],[t,...e.map(([,e])=>e).flat()],[i,...e.map(([,,e])=>e).flat()]]}(n,o,d,m)}}function _t(e){return(0,O.y)(vt(e))}function wt(e,a){return Q(e)?!Q(a)||wt(e.ofType,a.ofType):!!Q(a)||(J(e)?!J(a)||wt(e.ofType,a.ofType):!!J(a)||!(!ae(e)&&!ae(a))&&e!==a)}function Et(e,a,t,i){const n=a.get(i);if(n)return n;const o=Object.create(null),r=Object.create(null);Nt(e,t,i,o,r);const s=[o,Object.keys(r)];return a.set(i,s),s}function Tt(e,a,t){const i=a.get(t.selectionSet);if(i)return i;const n=Qa(e.getSchema(),t.typeCondition);return Et(e,a,n,t.selectionSet)}function Nt(e,a,t,i,n){for(const o of t.selections)switch(o.kind){case F.b.FIELD:{const e=o.name.value;let t;(j(a)||L(a))&&(t=a.getFields()[e]);const n=o.alias?o.alias.value:e;i[n]||(i[n]=[]),i[n].push([a,o,t]);break}case F.b.FRAGMENT_SPREAD:n[o.name.value]=!0;break;case F.b.INLINE_FRAGMENT:{const t=o.typeCondition,r=t?Qa(e.getSchema(),t):a;Nt(e,r,o.selectionSet,i,n);break}}}class Ft{constructor(){this._data=new Map}has(e,a,t){var i;const n=null===(i=this._data.get(e))||void 0===i?void 0:i.get(a);return void 0!==n&&(!!t||t===n)}add(e,a,t){const i=this._data.get(e);void 0===i?this._data.set(e,new Map([[a,t]])):i.set(a,t)}}class Ot{constructor(){this._orderedPairSet=new Ft}has(e,a,t){return e<a?this._orderedPairSet.has(e,a,t):this._orderedPairSet.has(a,e,t)}add(e,a,t){e<a?this._orderedPairSet.add(e,a,t):this._orderedPairSet.add(a,e,t)}}function At(e){return{InlineFragment(a){const t=e.getType(),i=e.getParentType();if(ie(t)&&ie(i)&&!Le(e.getSchema(),t,i)){const n=(0,p.N)(i),o=(0,p.N)(t);e.reportError(new l.eO(`Fragment cannot be spread here as objects of type "${n}" can never be of type "${o}".`,{nodes:a}))}},FragmentSpread(a){const t=a.name.value,i=function(e,a){const t=e.getFragment(a);if(t){const a=Qa(e.getSchema(),t.typeCondition);if(ie(a))return a}}(e,t),n=e.getParentType();if(i&&n&&!Le(e.getSchema(),i,n)){const o=(0,p.N)(n),r=(0,p.N)(i);e.reportError(new l.eO(`Fragment "${t}" cannot be spread here as objects of type "${o}" can never be of type "${r}".`,{nodes:a}))}}}}function St(e){const a=e.getSchema(),t=Object.create(null);for(const a of e.getDocument().definitions)(0,Ka.a6)(a)&&(t[a.name.value]=a);return{ScalarTypeExtension:i,ObjectTypeExtension:i,InterfaceTypeExtension:i,UnionTypeExtension:i,EnumTypeExtension:i,InputObjectTypeExtension:i};function i(i){const n=i.name.value,o=t[n],r=null==a?void 0:a.getType(n);let s;if(o?s=Ct[o.kind]:r&&(s=function(e){if(V(e))return F.b.SCALAR_TYPE_EXTENSION;if(j(e))return F.b.OBJECT_TYPE_EXTENSION;if(L(e))return F.b.INTERFACE_TYPE_EXTENSION;if(M(e))return F.b.UNION_TYPE_EXTENSION;if(q(e))return F.b.ENUM_TYPE_EXTENSION;if(G(e))return F.b.INPUT_OBJECT_TYPE_EXTENSION;(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))}(r)),s){if(s!==i.kind){const a=function(e){switch(e){case F.b.SCALAR_TYPE_EXTENSION:return"scalar";case F.b.OBJECT_TYPE_EXTENSION:return"object";case F.b.INTERFACE_TYPE_EXTENSION:return"interface";case F.b.UNION_TYPE_EXTENSION:return"union";case F.b.ENUM_TYPE_EXTENSION:return"enum";case F.b.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,pa.V)(!1,"Unexpected kind: "+(0,p.N)(e))}}(i.kind);e.reportError(new l.eO(`Cannot extend non-${a} type "${n}".`,{nodes:o?[o,i]:i}))}}else{const o=w(n,Object.keys({...t,...null==a?void 0:a.getTypeMap()}));e.reportError(new l.eO(`Cannot extend type "${n}" because it is not defined.`+u(o),{nodes:i.name}))}}}const Ct={[F.b.SCALAR_TYPE_DEFINITION]:F.b.SCALAR_TYPE_EXTENSION,[F.b.OBJECT_TYPE_DEFINITION]:F.b.OBJECT_TYPE_EXTENSION,[F.b.INTERFACE_TYPE_DEFINITION]:F.b.INTERFACE_TYPE_EXTENSION,[F.b.UNION_TYPE_DEFINITION]:F.b.UNION_TYPE_EXTENSION,[F.b.ENUM_TYPE_DEFINITION]:F.b.ENUM_TYPE_EXTENSION,[F.b.INPUT_OBJECT_TYPE_DEFINITION]:F.b.INPUT_OBJECT_TYPE_EXTENSION};function kt(e){return{...It(e),Field:{leave(a){var t;const i=e.getFieldDef();if(!i)return!1;const n=new Set(null===(t=a.arguments)||void 0===t?void 0:t.map(e=>e.name.value));for(const t of i.args)if(!n.has(t.name)&&Fe(t)){const n=(0,p.N)(t.type);e.reportError(new l.eO(`Field "${i.name}" argument "${t.name}" of type "${n}" is required, but it was not provided.`,{nodes:a}))}}}}}function It(e){var a;const t=Object.create(null),i=e.getSchema(),n=null!==(a=null==i?void 0:i.getDirectives())&&void 0!==a?a:ra;for(const e of n)t[e.name]=h(e.args.filter(Fe),e=>e.name);const o=e.getDocument().definitions;for(const e of o)if(e.kind===F.b.DIRECTIVE_DEFINITION){var r;const a=null!==(r=e.arguments)&&void 0!==r?r:[];t[e.name.value]=h(a.filter($t),e=>e.name.value)}return{Directive:{leave(a){const i=a.name.value,n=t[i];if(n){var o;const t=null!==(o=a.arguments)&&void 0!==o?o:[],r=new Set(t.map(e=>e.name.value));for(const[t,o]of Object.entries(n))if(!r.has(t)){const n=I(o.type)?(0,p.N)(o.type):(0,O.y)(o.type);e.reportError(new l.eO(`Directive "@${i}" argument "${t}" of type "${n}" is required, but it was not provided.`,{nodes:a}))}}}}}}function $t(e){return e.type.kind===F.b.NON_NULL_TYPE&&null==e.defaultValue}function Vt(e){return{Field(a){const t=e.getType(),i=a.selectionSet;if(t)if(ae(he(t))){if(i){const n=a.name.value,o=(0,p.N)(t);e.reportError(new l.eO(`Field "${n}" must not have a selection since type "${o}" has no subfields.`,{nodes:i}))}}else if(i){if(0===i.selections.length){const i=a.name.value,n=(0,p.N)(t);e.reportError(new l.eO(`Field "${i}" of type "${n}" must have at least one field selected.`,{nodes:a}))}}else{const i=a.name.value,n=(0,p.N)(t);e.reportError(new l.eO(`Field "${i}" of type "${n}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:a}))}}}}function Rt(e){return e.map(e=>"number"==typeof e?"["+e.toString()+"]":"."+e).join("")}function jt(e,a,t){return{prev:e,key:a,typename:t}}function Pt(e){const a=[];let t=e;for(;t;)a.push(t.key),t=t.prev;return a.reverse()}function Lt(e,a,t=Bt){return Mt(e,a,t,void 0)}function Bt(e,a,t){let i="Invalid value "+(0,p.N)(a);throw e.length>0&&(i+=` at "value${Rt(e)}"`),t.message=i+": "+t.message,t}function Mt(e,a,t,i){if(J(a))return null!=e?Mt(e,a.ofType,t,i):void t(Pt(i),e,new l.eO(`Expected non-nullable type "${(0,p.N)(a)}" not to be null.`));if(null==e)return null;if(Q(a)){const n=a.ofType;return la(e)?Array.from(e,(e,a)=>{const o=jt(i,a,void 0);return Mt(e,n,t,o)}):[Mt(e,n,t,i)]}if(G(a)){if(!(0,v.Z)(e)||Array.isArray(e))return void t(Pt(i),e,new l.eO(`Expected type "${a.name}" to be an object.`));const n={},o=a.getFields();for(const r of Object.values(o)){const o=e[r.name];if(void 0!==o)n[r.name]=Mt(o,r.type,t,jt(i,r.name,a.name));else if(void 0!==r.defaultValue)n[r.name]=r.defaultValue;else if(J(r.type)){const a=(0,p.N)(r.type);t(Pt(i),e,new l.eO(`Field "${r.name}" of required type "${a}" was not provided.`))}}for(const n of Object.keys(e))if(!o[n]){const o=w(n,Object.keys(a.getFields()));t(Pt(i),e,new l.eO(`Field "${n}" is not defined by type "${a.name}".`+u(o)))}if(a.isOneOf){const o=Object.keys(n);1!==o.length&&t(Pt(i),e,new l.eO(`Exactly one key must be specified for OneOf type "${a.name}".`));const r=o[0],s=n[r];null===s&&t(Pt(i).concat(r),s,new l.eO(`Field "${r}" must be non-null.`))}return n}if(ae(a)){let n;try{n=a.parseValue(e)}catch(n){return void(n instanceof l.eO?t(Pt(i),e,n):t(Pt(i),e,new l.eO(`Expected type "${a.name}". `+n.message,{originalError:n})))}return void 0===n&&t(Pt(i),e,new l.eO(`Expected type "${a.name}".`)),n}(0,pa.V)(!1,"Unexpected input type: "+(0,p.N)(a))}function Ut(e,a,t){if(e){if(e.kind===F.b.VARIABLE){const i=e.name.value;if(null==t||void 0===t[i])return;const n=t[i];if(null===n&&J(a))return;return n}if(J(a)){if(e.kind===F.b.NULL)return;return Ut(e,a.ofType,t)}if(e.kind===F.b.NULL)return null;if(Q(a)){const i=a.ofType;if(e.kind===F.b.LIST){const a=[];for(const n of e.values)if(qt(n,t)){if(J(i))return;a.push(null)}else{const e=Ut(n,i,t);if(void 0===e)return;a.push(e)}return a}const n=Ut(e,i,t);if(void 0===n)return;return[n]}if(G(a)){if(e.kind!==F.b.OBJECT)return;const i=Object.create(null),n=h(e.fields,e=>e.name.value);for(const e of Object.values(a.getFields())){const a=n[e.name];if(!a||qt(a.value,t)){if(void 0!==e.defaultValue)i[e.name]=e.defaultValue;else if(J(e.type))return;continue}const o=Ut(a.value,e.type,t);if(void 0===o)return;i[e.name]=o}if(a.isOneOf){const e=Object.keys(i);if(1!==e.length)return;if(null===i[e[0]])return}return i}if(ae(a)){let i;try{i=a.parseLiteral(e,t)}catch(e){return}if(void 0===i)return;return i}(0,pa.V)(!1,"Unexpected input type: "+(0,p.N)(a))}}function qt(e,a){return e.kind===F.b.VARIABLE&&(null==a||void 0===a[e.name.value])}function zt(e,a,t,i){const n=[],o=null==i?void 0:i.maxErrors;try{const i=function(e,a,t,i){const n={};for(const o of a){const a=o.variable.name.value,r=Qa(e,o.type);if(!K(r)){const e=(0,O.y)(o.type);i(new l.eO(`Variable "$${a}" expected value of type "${e}" which cannot be used as an input type.`,{nodes:o.type}));continue}if(!Qt(t,a)){if(o.defaultValue)n[a]=Ut(o.defaultValue,r);else if(J(r)){const e=(0,p.N)(r);i(new l.eO(`Variable "$${a}" of required type "${e}" was not provided.`,{nodes:o}))}continue}const s=t[a];if(null===s&&J(r)){const e=(0,p.N)(r);i(new l.eO(`Variable "$${a}" of non-null type "${e}" must not be null.`,{nodes:o}));continue}n[a]=Lt(s,r,(e,t,n)=>{let r=`Variable "$${a}" got invalid value `+(0,p.N)(t);e.length>0&&(r+=` at "${a}${Rt(e)}"`),i(new l.eO(r+"; "+n.message,{nodes:o,originalError:n}))})}return n}(e,a,t,e=>{if(null!=o&&n.length>=o)throw new l.eO("Too many errors processing variables, error limit reached. Execution aborted.");n.push(e)});if(0===n.length)return{coerced:i}}catch(e){n.push(e)}return{errors:n}}function Gt(e,a,t){var i;const n={},o=h(null!==(i=a.arguments)&&void 0!==i?i:[],e=>e.name.value);for(const i of e.args){const e=i.name,r=i.type,s=o[e];if(!s){if(void 0!==i.defaultValue)n[e]=i.defaultValue;else if(J(r))throw new l.eO(`Argument "${e}" of required type "${(0,p.N)(r)}" was not provided.`,{nodes:a});continue}const d=s.value;let c=d.kind===F.b.NULL;if(d.kind===F.b.VARIABLE){const a=d.name.value;if(null==t||!Qt(t,a)){if(void 0!==i.defaultValue)n[e]=i.defaultValue;else if(J(r))throw new l.eO(`Argument "${e}" of required type "${(0,p.N)(r)}" was provided the variable "$${a}" which was not provided a runtime value.`,{nodes:d});continue}c=null==t[a]}if(c&&J(r))throw new l.eO(`Argument "${e}" of non-null type "${(0,p.N)(r)}" must not be null.`,{nodes:d});const u=Ut(d,r,t);if(void 0===u)throw new l.eO(`Argument "${e}" has invalid value ${(0,O.y)(d)}.`,{nodes:d});n[e]=u}return n}function Yt(e,a,t){var i;const n=null===(i=a.directives)||void 0===i?void 0:i.find(a=>a.name.value===e.name);if(n)return Gt(e,n,t)}function Qt(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function Ht(e,a,t,i,n){const o=new Map;return Jt(e,a,t,i,n,o,new Set),o}function Jt(e,a,t,i,n,o,r){for(const s of n.selections)switch(s.kind){case F.b.FIELD:{if(!Wt(t,s))continue;const e=Xt(s),a=o.get(e);void 0!==a?a.push(s):o.set(e,[s]);break}case F.b.INLINE_FRAGMENT:if(!Wt(t,s)||!Kt(e,s,i))continue;Jt(e,a,t,i,s.selectionSet,o,r);break;case F.b.FRAGMENT_SPREAD:{const n=s.name.value;if(r.has(n)||!Wt(t,s))continue;r.add(n);const p=a[n];if(!p||!Kt(e,p,i))continue;Jt(e,a,t,i,p.selectionSet,o,r);break}}}function Wt(e,a){const t=Yt(aa,a,e);if(!0===(null==t?void 0:t.if))return!1;const i=Yt(ea,a,e);return!1!==(null==i?void 0:i.if)}function Kt(e,a,t){const i=a.typeCondition;if(!i)return!0;const n=Qa(e,i);return n===t||!!oe(n)&&e.isSubType(n,t)}function Xt(e){return e.alias?e.alias.value:e.name.value}function Zt(e){return{OperationDefinition(a){if("subscription"===a.operation){const t=e.getSchema(),i=t.getSubscriptionType();if(i){const n=a.name?a.name.value:null,o=Object.create(null),r=e.getDocument(),s=Object.create(null);for(const e of r.definitions)e.kind===F.b.FRAGMENT_DEFINITION&&(s[e.name.value]=e);const p=Ht(t,s,o,i,a.selectionSet);if(p.size>1){const a=[...p.values()].slice(1).flat();e.reportError(new l.eO(null!=n?`Subscription "${n}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:a}))}for(const a of p.values()){a[0].name.value.startsWith("__")&&e.reportError(new l.eO(null!=n?`Subscription "${n}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:a}))}}}}}}function ei(e,a){const t=new Map;for(const i of e){const e=a(i),n=t.get(e);void 0===n?t.set(e,[i]):n.push(i)}return t}function ai(e){return{DirectiveDefinition(e){var a;const i=null!==(a=e.arguments)&&void 0!==a?a:[];return t(`@${e.name.value}`,i)},InterfaceTypeDefinition:a,InterfaceTypeExtension:a,ObjectTypeDefinition:a,ObjectTypeExtension:a};function a(e){var a;const i=e.name.value,n=null!==(a=e.fields)&&void 0!==a?a:[];for(const e of n){var o;t(`${i}.${e.name.value}`,null!==(o=e.arguments)&&void 0!==o?o:[])}return!1}function t(a,t){const i=ei(t,e=>e.name.value);for(const[t,n]of i)n.length>1&&e.reportError(new l.eO(`Argument "${a}(${t}:)" can only be defined once.`,{nodes:n.map(e=>e.name)}));return!1}}function ti(e){return{Field:a,Directive:a};function a(a){var t;const i=ei(null!==(t=a.arguments)&&void 0!==t?t:[],e=>e.name.value);for(const[a,t]of i)t.length>1&&e.reportError(new l.eO(`There can be only one argument named "${a}".`,{nodes:t.map(e=>e.name)}))}}function ii(e){const a=Object.create(null),t=e.getSchema();return{DirectiveDefinition(i){const n=i.name.value;if(null==t||!t.getDirective(n))return a[n]?e.reportError(new l.eO(`There can be only one directive named "@${n}".`,{nodes:[a[n],i.name]})):a[n]=i.name,!1;e.reportError(new l.eO(`Directive "@${n}" already exists in the schema. It cannot be redefined.`,{nodes:i.name}))}}}function ni(e){const a=Object.create(null),t=e.getSchema(),i=t?t.getDirectives():ra;for(const e of i)a[e.name]=!e.isRepeatable;const n=e.getDocument().definitions;for(const e of n)e.kind===F.b.DIRECTIVE_DEFINITION&&(a[e.name.value]=!e.repeatable);const o=Object.create(null),r=Object.create(null);return{enter(t){if(!("directives"in t)||!t.directives)return;let i;if(t.kind===F.b.SCHEMA_DEFINITION||t.kind===F.b.SCHEMA_EXTENSION)i=o;else if((0,Ka.a6)(t)||(0,Ka.i7)(t)){const e=t.name.value;i=r[e],void 0===i&&(r[e]=i=Object.create(null))}else i=Object.create(null);for(const n of t.directives){const t=n.name.value;a[t]&&(i[t]?e.reportError(new l.eO(`The directive "@${t}" can only be used once at this location.`,{nodes:[i[t],n]})):i[t]=n)}}}}function oi(e){const a=e.getSchema(),t=a?a.getTypeMap():Object.create(null),i=Object.create(null);return{EnumTypeDefinition:n,EnumTypeExtension:n};function n(a){var n;const o=a.name.value;i[o]||(i[o]=Object.create(null));const r=null!==(n=a.values)&&void 0!==n?n:[],s=i[o];for(const a of r){const i=a.name.value,n=t[o];q(n)&&n.getValue(i)?e.reportError(new l.eO(`Enum value "${o}.${i}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:a.name})):s[i]?e.reportError(new l.eO(`Enum value "${o}.${i}" can only be defined once.`,{nodes:[s[i],a.name]})):s[i]=a.name}return!1}}function ri(e){const a=e.getSchema(),t=a?a.getTypeMap():Object.create(null),i=Object.create(null);return{InputObjectTypeDefinition:n,InputObjectTypeExtension:n,InterfaceTypeDefinition:n,InterfaceTypeExtension:n,ObjectTypeDefinition:n,ObjectTypeExtension:n};function n(a){var n;const o=a.name.value;i[o]||(i[o]=Object.create(null));const r=null!==(n=a.fields)&&void 0!==n?n:[],s=i[o];for(const a of r){const i=a.name.value;si(t[o],i)?e.reportError(new l.eO(`Field "${o}.${i}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:a.name})):s[i]?e.reportError(new l.eO(`Field "${o}.${i}" can only be defined once.`,{nodes:[s[i],a.name]})):s[i]=a.name}return!1}}function si(e,a){return!!(j(e)||L(e)||G(e))&&null!=e.getFields()[a]}function pi(e){const a=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(t){const i=t.name.value;return a[i]?e.reportError(new l.eO(`There can be only one fragment named "${i}".`,{nodes:[a[i],t.name]})):a[i]=t.name,!1}}}function li(e){const a=[];let t=Object.create(null);return{ObjectValue:{enter(){a.push(t),t=Object.create(null)},leave(){const e=a.pop();e||(0,pa.V)(!1),t=e}},ObjectField(a){const i=a.name.value;t[i]?e.reportError(new l.eO(`There can be only one input field named "${i}".`,{nodes:[t[i],a.name]})):t[i]=a.name}}}function di(e){const a=Object.create(null);return{OperationDefinition(t){const i=t.name;return i&&(a[i.value]?e.reportError(new l.eO(`There can be only one operation named "${i.value}".`,{nodes:[a[i.value],i]})):a[i.value]=i),!1},FragmentDefinition:()=>!1}}function ci(e){const a=e.getSchema(),t=Object.create(null),i=a?{query:a.getQueryType(),mutation:a.getMutationType(),subscription:a.getSubscriptionType()}:{};return{SchemaDefinition:n,SchemaExtension:n};function n(a){var n;const o=null!==(n=a.operationTypes)&&void 0!==n?n:[];for(const a of o){const n=a.operation,o=t[n];i[n]?e.reportError(new l.eO(`Type for ${n} already defined in the schema. It cannot be redefined.`,{nodes:a})):o?e.reportError(new l.eO(`There can be only one ${n} type in schema.`,{nodes:[o,a]})):t[n]=a}return!1}}function ui(e){const a=Object.create(null),t=e.getSchema();return{ScalarTypeDefinition:i,ObjectTypeDefinition:i,InterfaceTypeDefinition:i,UnionTypeDefinition:i,EnumTypeDefinition:i,InputObjectTypeDefinition:i};function i(i){const n=i.name.value;if(null==t||!t.getType(n))return a[n]?e.reportError(new l.eO(`There can be only one type named "${n}".`,{nodes:[a[n],i.name]})):a[n]=i.name,!1;e.reportError(new l.eO(`Type "${n}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}))}}function mi(e){return{OperationDefinition(a){var t;const i=ei(null!==(t=a.variableDefinitions)&&void 0!==t?t:[],e=>e.variable.name.value);for(const[a,t]of i)t.length>1&&e.reportError(new l.eO(`There can be only one variable named "$${a}".`,{nodes:t.map(e=>e.variable.name)}))}}}function fi(e){let a={};return{OperationDefinition:{enter(){a={}}},VariableDefinition(e){a[e.variable.name.value]=e},ListValue(a){if(!Q(me(e.getParentInputType())))return vi(e,a),!1},ObjectValue(a){const t=he(e.getInputType());if(!G(t))return vi(e,a),!1;const i=h(a.fields,e=>e.name.value);for(const n of Object.values(t.getFields())){if(!i[n.name]&&Re(n)){const i=(0,p.N)(n.type);e.reportError(new l.eO(`Field "${t.name}.${n.name}" of required type "${i}" was not provided.`,{nodes:a}))}}t.isOneOf&&function(e,a,t,i){var n;const o=Object.keys(i);if(1!==o.length)return void e.reportError(new l.eO(`OneOf Input Object "${t.name}" must specify exactly one key.`,{nodes:[a]}));const r=null===(n=i[o[0]])||void 0===n?void 0:n.value;r&&r.kind!==F.b.NULL||e.reportError(new l.eO(`Field "${t.name}.${o[0]}" must be non-null.`,{nodes:[a]}))}(e,a,t,i)},ObjectField(a){const t=he(e.getParentInputType());if(!e.getInputType()&&G(t)){const i=w(a.name.value,Object.keys(t.getFields()));e.reportError(new l.eO(`Field "${a.name.value}" is not defined by type "${t.name}".`+u(i),{nodes:a}))}},NullValue(a){const t=e.getInputType();J(t)&&e.reportError(new l.eO(`Expected value of type "${(0,p.N)(t)}", found ${(0,O.y)(a)}.`,{nodes:a}))},EnumValue:a=>vi(e,a),IntValue:a=>vi(e,a),FloatValue:a=>vi(e,a),StringValue:a=>vi(e,a),BooleanValue:a=>vi(e,a)}}function vi(e,a){const t=e.getInputType();if(!t)return;const i=he(t);if(!ae(i)){const i=(0,p.N)(t);return void e.reportError(new l.eO(`Expected value of type "${i}", found ${(0,O.y)(a)}.`,{nodes:a}))}try{if(void 0===i.parseLiteral(a,void 0)){const i=(0,p.N)(t);e.reportError(new l.eO(`Expected value of type "${i}", found ${(0,O.y)(a)}.`,{nodes:a}))}}catch(i){const n=(0,p.N)(t);i instanceof l.eO?e.reportError(i):e.reportError(new l.eO(`Expected value of type "${n}", found ${(0,O.y)(a)}; `+i.message,{nodes:a,originalError:i}))}}function hi(e){return{VariableDefinition(a){const t=Qa(e.getSchema(),a.type);if(void 0!==t&&!K(t)){const t=a.variable.name.value,i=(0,O.y)(a.type);e.reportError(new l.eO(`Variable "$${t}" cannot be non-input type "${i}".`,{nodes:a.type}))}}}}function gi(e){let a=Object.create(null);return{OperationDefinition:{enter(){a=Object.create(null)},leave(t){const i=e.getRecursiveVariableUsages(t);for(const{node:t,type:n,defaultValue:o,parentType:r}of i){const i=t.name.value,s=a[i];if(s&&n){const a=e.getSchema(),d=Qa(a,s.type);if(d&&!yi(a,d,s.defaultValue,n,o)){const a=(0,p.N)(d),o=(0,p.N)(n);e.reportError(new l.eO(`Variable "$${i}" of type "${a}" used in position expecting type "${o}".`,{nodes:[s,t]}))}G(r)&&r.isOneOf&&ce(d)&&e.reportError(new l.eO(`Variable "$${i}" is of type "${d}" but must be non-nullable to be used for OneOf Input Object "${r}".`,{nodes:[s,t]}))}}}},VariableDefinition(e){a[e.variable.name.value]=e}}}function yi(e,a,t,i,n){if(J(i)&&!J(a)){if(!(null!=t&&t.kind!==F.b.NULL)&&!(void 0!==n))return!1;return Pe(e,a,i.ofType)}return Pe(e,a,i)}const bi=Object.freeze([dt]),Di=Object.freeze([Xa,di,st,Zt,ot,et,hi,Vt,Za,pi,nt,mt,At,ct,mi,ut,ft,it,ni,at,ti,fi,kt,gi,gt,li,...bi]),xi=Object.freeze([pt,ci,ui,oi,ri,ai,ii,ot,it,ni,St,tt,ti,li,It]);class _i{constructor(e,a){this._ast=e,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=a}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(e){this._onError(e)}getDocument(){return this._ast}getFragment(e){let a;if(this._fragments)a=this._fragments;else{a=Object.create(null);for(const e of this.getDocument().definitions)e.kind===F.b.FRAGMENT_DEFINITION&&(a[e.name.value]=e);this._fragments=a}return a[e]}getFragmentSpreads(e){let a=this._fragmentSpreads.get(e);if(!a){a=[];const t=[e];let i;for(;i=t.pop();)for(const e of i.selections)e.kind===F.b.FRAGMENT_SPREAD?a.push(e):e.selectionSet&&t.push(e.selectionSet);this._fragmentSpreads.set(e,a)}return a}getRecursivelyReferencedFragments(e){let a=this._recursivelyReferencedFragments.get(e);if(!a){a=[];const t=Object.create(null),i=[e.selectionSet];let n;for(;n=i.pop();)for(const e of this.getFragmentSpreads(n)){const n=e.name.value;if(!0!==t[n]){t[n]=!0;const e=this.getFragment(n);e&&(a.push(e),i.push(e.selectionSet))}}this._recursivelyReferencedFragments.set(e,a)}return a}}class wi extends _i{constructor(e,a,t){super(e,t),this._schema=a}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Ei extends _i{constructor(e,a,t,i){super(a,i),this._schema=e,this._typeInfo=t,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(e){let a=this._variableUsages.get(e);if(!a){const t=[],i=new Ha(this._schema);(0,Ya.YR)(e,Wa(i,{VariableDefinition:()=>!1,Variable(e){t.push({node:e,type:i.getInputType(),defaultValue:i.getDefaultValue(),parentType:i.getParentInputType()})}})),a=t,this._variableUsages.set(e,a)}return a}getRecursiveVariableUsages(e){let a=this._recursiveVariableUsages.get(e);if(!a){a=this.getVariableUsages(e);for(const t of this.getRecursivelyReferencedFragments(e))a=a.concat(this.getVariableUsages(t));this._recursiveVariableUsages.set(e,a)}return a}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Ti(e,a,t=Di,i,n=new Ha(e)){var r;const s=null!==(r=null==i?void 0:i.maxErrors)&&void 0!==r?r:100;a||(0,o.U)(!1,"Must provide document."),Ca(e);const p=Object.freeze({}),d=[],c=new Ei(e,a,n,e=>{if(d.length>=s)throw d.push(new l.eO("Too many validation errors, error limit reached. Validation aborted.")),p;d.push(e)}),u=(0,Ya.oP)(t.map(e=>e(c)));try{(0,Ya.YR)(a,Wa(n,u))}catch(e){if(e!==p)throw e}return d}function Ni(e,a,t=xi){const i=[],n=new wi(e,a,e=>{i.push(e)}),o=t.map(e=>e(n));return(0,Ya.YR)(e,(0,Ya.oP)(o)),i}function Fi(e){return Promise.all(Object.values(e)).then(a=>{const t=Object.create(null);for(const[i,n]of Object.keys(e).entries())t[n]=a[i];return t})}class Oi extends Error{constructor(e){super("Unexpected error value: "+(0,p.N)(e)),this.name="NonErrorThrown",this.thrownValue=e}}function Ai(e,a,t){var i;const n=(o=e)instanceof Error?o:new Oi(o);var o,r;return r=n,Array.isArray(r.path)?n:new l.eO(n.message,{nodes:null!==(i=n.nodes)&&void 0!==i?i:a,source:n.source,positions:n.positions,path:t,originalError:n})}const Si=function(e){let a;return function(t,i,n){void 0===a&&(a=new WeakMap);let o=a.get(t);void 0===o&&(o=new WeakMap,a.set(t,o));let r=o.get(i);void 0===r&&(r=new WeakMap,o.set(i,r));let s=r.get(n);return void 0===s&&(s=e(t,i,n),r.set(n,s)),s}}((e,a,t)=>function(e,a,t,i,n){const o=new Map,r=new Set;for(const s of n)s.selectionSet&&Jt(e,a,t,i,s.selectionSet,o,r);return o}(e.schema,e.fragments,e.variableValues,a,t));function Ci(e){arguments.length<2||(0,o.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:a,document:t,variableValues:i,rootValue:n}=e;$i(a,t,i);const s=Vi(e);if(!("schema"in s))return{errors:s};try{const{operation:e}=s,a=function(e,a,t){const i=e.schema.getRootType(a.operation);if(null==i)throw new l.eO(`Schema is not configured to execute ${a.operation} operation.`,{nodes:a});const n=Ht(e.schema,e.fragments,e.variableValues,i,a.selectionSet),o=void 0;switch(a.operation){case d.cE.QUERY:return Ri(e,i,t,o,n);case d.cE.MUTATION:return function(e,a,t,i,n){return function(e,a,t){let i=t;for(const t of e)i=r(i)?i.then(e=>a(e,t)):a(i,t);return i}(n.entries(),(n,[o,s])=>{const p=jt(i,o,a.name),l=ji(e,a,t,s,p);return void 0===l?n:r(l)?l.then(e=>(n[o]=e,n)):(n[o]=l,n)},Object.create(null))}(e,i,t,o,n);case d.cE.SUBSCRIPTION:return Ri(e,i,t,o,n)}}(s,e,n);return r(a)?a.then(e=>Ii(e,s.errors),e=>(s.errors.push(e),Ii(null,s.errors))):Ii(a,s.errors)}catch(e){return s.errors.push(e),Ii(null,s.errors)}}function ki(e){const a=Ci(e);if(r(a))throw new Error("GraphQL execution failed to complete synchronously.");return a}function Ii(e,a){return 0===a.length?{data:e}:{errors:a,data:e}}function $i(e,a,t){a||(0,o.U)(!1,"Must provide document."),Ca(e),null==t||(0,v.Z)(t)||(0,o.U)(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function Vi(e){var a,t,i;const{schema:n,document:o,rootValue:r,contextValue:s,variableValues:p,operationName:d,fieldResolver:c,typeResolver:u,subscribeFieldResolver:m,options:f}=e;let v;const h=Object.create(null);for(const e of o.definitions)switch(e.kind){case F.b.OPERATION_DEFINITION:if(null==d){if(void 0!==v)return[new l.eO("Must provide operation name if query contains multiple operations.")];v=e}else(null===(a=e.name)||void 0===a?void 0:a.value)===d&&(v=e);break;case F.b.FRAGMENT_DEFINITION:h[e.name.value]=e}if(!v)return null!=d?[new l.eO(`Unknown operation named "${d}".`)]:[new l.eO("Must provide an operation.")];const g=zt(n,null!==(t=v.variableDefinitions)&&void 0!==t?t:[],null!=p?p:{},{maxErrors:null!==(i=null==f?void 0:f.maxCoercionErrors)&&void 0!==i?i:50});return g.errors?g.errors:{schema:n,fragments:h,rootValue:r,contextValue:s,operation:v,variableValues:g.coerced,fieldResolver:null!=c?c:Gi,typeResolver:null!=u?u:zi,subscribeFieldResolver:null!=m?m:Gi,errors:[]}}function Ri(e,a,t,i,n){const o=Object.create(null);let s=!1;try{for(const[p,l]of n.entries()){const n=ji(e,a,t,l,jt(i,p,a.name));void 0!==n&&(o[p]=n,r(n)&&(s=!0))}}catch(e){if(s)return Fi(o).finally(()=>{throw e});throw e}return s?Fi(o):o}function ji(e,a,t,i,n){var o;const s=Yi(e.schema,a,i[0]);if(!s)return;const p=s.type,l=null!==(o=s.resolve)&&void 0!==o?o:e.fieldResolver,d=Pi(e,s,i,a,n);try{const a=Gt(s,i[0],e.variableValues),o=l(t,a,e.contextValue,d);let c;return c=r(o)?o.then(a=>Bi(e,p,i,d,n,a)):Bi(e,p,i,d,n,o),r(c)?c.then(void 0,a=>Li(Ai(a,i,Pt(n)),p,e)):c}catch(a){return Li(Ai(a,i,Pt(n)),p,e)}}function Pi(e,a,t,i,n){return{fieldName:a.name,fieldNodes:t,returnType:a.type,parentType:i,path:n,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Li(e,a,t){if(J(a))throw e;return t.errors.push(e),null}function Bi(e,a,t,i,n,o){if(o instanceof Error)throw o;if(J(a)){const r=Bi(e,a.ofType,t,i,n,o);if(null===r)throw new Error(`Cannot return null for non-nullable field ${i.parentType.name}.${i.fieldName}.`);return r}return null==o?null:Q(a)?function(e,a,t,i,n,o){if(!la(o))throw new l.eO(`Expected Iterable, but did not find one for field "${i.parentType.name}.${i.fieldName}".`);const s=a.ofType;let p=!1;const d=Array.from(o,(a,o)=>{const l=jt(n,o,void 0);try{let n;return n=r(a)?a.then(a=>Bi(e,s,t,i,l,a)):Bi(e,s,t,i,l,a),r(n)?(p=!0,n.then(void 0,a=>Li(Ai(a,t,Pt(l)),s,e))):n}catch(a){return Li(Ai(a,t,Pt(l)),s,e)}});return p?Promise.all(d):d}(e,a,t,i,n,o):ae(a)?function(e,a){const t=e.serialize(a);if(null==t)throw new Error(`Expected \`${(0,p.N)(e)}.serialize(${(0,p.N)(a)})\` to return non-nullable value, returned: ${(0,p.N)(t)}`);return t}(a,o):oe(a)?function(e,a,t,i,n,o){var s;const p=null!==(s=a.resolveType)&&void 0!==s?s:e.typeResolver,l=e.contextValue,d=p(o,l,i,a);if(r(d))return d.then(r=>Ui(e,Mi(r,e,a,t,i,o),t,i,n,o));return Ui(e,Mi(d,e,a,t,i,o),t,i,n,o)}(e,a,t,i,n,o):j(a)?Ui(e,a,t,i,n,o):void(0,pa.V)(!1,"Cannot complete value of unexpected output type: "+(0,p.N)(a))}function Mi(e,a,t,i,n,o){if(null==e)throw new l.eO(`Abstract type "${t.name}" must resolve to an Object type at runtime for field "${n.parentType.name}.${n.fieldName}". Either the "${t.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,i);if(j(e))throw new l.eO("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if("string"!=typeof e)throw new l.eO(`Abstract type "${t.name}" must resolve to an Object type at runtime for field "${n.parentType.name}.${n.fieldName}" with value ${(0,p.N)(o)}, received "${(0,p.N)(e)}".`);const r=a.schema.getType(e);if(null==r)throw new l.eO(`Abstract type "${t.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:i});if(!j(r))throw new l.eO(`Abstract type "${t.name}" was resolved to a non-object type "${e}".`,{nodes:i});if(!a.schema.isSubType(t,r))throw new l.eO(`Runtime Object type "${r.name}" is not a possible type for "${t.name}".`,{nodes:i});return r}function Ui(e,a,t,i,n,o){const s=Si(e,a,t);if(a.isTypeOf){const p=a.isTypeOf(o,e.contextValue,i);if(r(p))return p.then(i=>{if(!i)throw qi(a,o,t);return Ri(e,a,o,n,s)});if(!p)throw qi(a,o,t)}return Ri(e,a,o,n,s)}function qi(e,a,t){return new l.eO(`Expected value of type "${e.name}" but got: ${(0,p.N)(a)}.`,{nodes:t})}const zi=function(e,a,t,i){if((0,v.Z)(e)&&"string"==typeof e.__typename)return e.__typename;const n=t.schema.getPossibleTypes(i),o=[];for(let i=0;i<n.length;i++){const s=n[i];if(s.isTypeOf){const n=s.isTypeOf(e,a,t);if(r(n))o[i]=n;else if(n)return o.length&&Promise.allSettled(o).catch(()=>{}),s.name}}return o.length?Promise.all(o).then(e=>{for(let a=0;a<e.length;a++)if(e[a])return n[a].name}):void 0},Gi=function(e,a,t,i){if((0,v.Z)(e)||"function"==typeof e){const n=e[i.fieldName];return"function"==typeof n?e[i.fieldName](a,t,i):n}};function Yi(e,a,t){const i=t.name.value;return i===xa.name&&e.getQueryType()===a?xa:i===_a.name&&e.getQueryType()===a?_a:i===wa.name?wa:a.getFields()[i]}function Qi(e){return new Promise(a=>a(Ji(e)))}function Hi(e){const a=Ji(e);if(r(a))throw new Error("GraphQL execution failed to complete synchronously.");return a}function Ji(e){arguments.length<2||(0,o.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:a,source:t,rootValue:i,contextValue:n,variableValues:r,operationName:p,fieldResolver:l,typeResolver:d}=e,c=Sa(a);if(c.length>0)return{errors:c};let u;try{u=(0,s.qg)(t)}catch(e){return{errors:[e]}}const m=Ti(a,u);return m.length>0?{errors:m}:Ci({schema:a,document:u,rootValue:i,contextValue:n,variableValues:r,operationName:p,fieldResolver:l,typeResolver:d})}var Wi=t(39537),Ki=t(73971),Xi=t(8238),Zi=t(98472),en=t(12039);function an(e){return"function"==typeof(null==e?void 0:e[Symbol.asyncIterator])}async function tn(e){arguments.length<2||(0,o.U)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const a=await nn(e);if(!an(a))return a;return function(e,a){const t=e[Symbol.asyncIterator]();async function i(e){if(e.done)return e;try{return{value:await a(e.value),done:!1}}catch(e){if("function"==typeof t.return)try{await t.return()}catch(e){}throw e}}return{next:async()=>i(await t.next()),return:async()=>"function"==typeof t.return?i(await t.return()):{value:void 0,done:!0},async throw(e){if("function"==typeof t.throw)return i(await t.throw(e));throw e},[Symbol.asyncIterator](){return this}}}(a,a=>Ci({...e,rootValue:a}))}async function nn(...e){const a=function(e){const a=e[0];return a&&"document"in a?a:{schema:a,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}(e),{schema:t,document:i,variableValues:n}=a;$i(t,i,n);const o=Vi(a);if(!("schema"in o))return{errors:o};try{const e=await async function(e){const{schema:a,fragments:t,operation:i,variableValues:n,rootValue:o}=e,r=a.getSubscriptionType();if(null==r)throw new l.eO("Schema is not configured to execute subscription operation.",{nodes:i});const s=Ht(a,t,n,r,i.selectionSet),[p,d]=[...s.entries()][0],c=Yi(a,r,d[0]);if(!c){const e=d[0].name.value;throw new l.eO(`The subscription field "${e}" is not defined.`,{nodes:d})}const u=jt(void 0,p,r.name),m=Pi(e,c,d,r,u);try{var f;const a=Gt(c,d[0],n),t=e.contextValue,i=null!==(f=c.subscribe)&&void 0!==f?f:e.subscribeFieldResolver,r=await i(o,a,t,m);if(r instanceof Error)throw r;return r}catch(e){throw Ai(e,d,Pt(u))}}(o);if(!an(e))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,p.N)(e)}.`);return e}catch(e){if(e instanceof l.eO)return{errors:[e]};throw e}}function on(e){return{Field(a){const t=e.getFieldDef(),i=null==t?void 0:t.deprecationReason;if(t&&null!=i){const n=e.getParentType();null!=n||(0,pa.V)(!1),e.reportError(new l.eO(`The field ${n.name}.${t.name} is deprecated. ${i}`,{nodes:a}))}},Argument(a){const t=e.getArgument(),i=null==t?void 0:t.deprecationReason;if(t&&null!=i){const n=e.getDirective();if(null!=n)e.reportError(new l.eO(`Directive "@${n.name}" argument "${t.name}" is deprecated. ${i}`,{nodes:a}));else{const n=e.getParentType(),o=e.getFieldDef();null!=n&&null!=o||(0,pa.V)(!1),e.reportError(new l.eO(`Field "${n.name}.${o.name}" argument "${t.name}" is deprecated. ${i}`,{nodes:a}))}}},ObjectField(a){const t=he(e.getParentInputType());if(G(t)){const i=t.getFields()[a.name.value],n=null==i?void 0:i.deprecationReason;null!=n&&e.reportError(new l.eO(`The input field ${t.name}.${i.name} is deprecated. ${n}`,{nodes:a}))}},EnumValue(a){const t=e.getEnumValue(),i=null==t?void 0:t.deprecationReason;if(t&&null!=i){const n=he(e.getInputType());null!=n||(0,pa.V)(!1),e.reportError(new l.eO(`The enum value "${n.name}.${t.name}" is deprecated. ${i}`,{nodes:a}))}}}}function rn(e){return{Field(a){const t=he(e.getType());t&&Ta(t)&&e.reportError(new l.eO(`GraphQL introspection has been disabled, but the requested query contained the field "${a.name.value}".`,{nodes:a}))}}}var sn=t(59841);function pn(e){const a={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,oneOf:!1,...e},t=a.descriptions?"description":"",i=a.specifiedByUrl?"specifiedByURL":"",n=a.directiveIsRepeatable?"isRepeatable":"",o=a.schemaDescription?t:"";function r(e){return a.inputValueDeprecation?e:""}const s=a.oneOf?"isOneOf":"";return`\n query IntrospectionQuery {\n __schema {\n ${o}\n queryType { name kind }\n mutationType { name kind }\n subscriptionType { name kind }\n types {\n ...FullType\n }\n directives {\n name\n ${t}\n ${n}\n locations\n args${r("(includeDeprecated: true)")} {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ${t}\n ${i}\n ${s}\n fields(includeDeprecated: true) {\n name\n ${t}\n args${r("(includeDeprecated: true)")} {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields${r("(includeDeprecated: true)")} {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ${t}\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ${t}\n type { ...TypeRef }\n defaultValue\n ${r("isDeprecated")}\n ${r("deprecationReason")}\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n `}function ln(e,a){let t=null;for(const n of e.definitions){var i;if(n.kind===F.b.OPERATION_DEFINITION)if(null==a){if(t)return null;t=n}else if((null===(i=n.name)||void 0===i?void 0:i.value)===a)return n}return t}function dn(e,a){if("query"===a.operation){const t=e.getQueryType();if(!t)throw new l.eO("Schema does not define the required query root type.",{nodes:a});return t}if("mutation"===a.operation){const t=e.getMutationType();if(!t)throw new l.eO("Schema is not configured for mutations.",{nodes:a});return t}if("subscription"===a.operation){const t=e.getSubscriptionType();if(!t)throw new l.eO("Schema is not configured for subscriptions.",{nodes:a});return t}throw new l.eO("Can only have query, mutation and subscription operations.",{nodes:a})}function cn(e,a){const t={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0,...a},i=ki({schema:e,document:(0,s.qg)(pn(t))});return!i.errors&&i.data||(0,pa.V)(!1),i.data}function un(e,a){(0,v.Z)(e)&&(0,v.Z)(e.__schema)||(0,o.U)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,p.N)(e)}.`);const t=e.__schema,i=g(t.types,e=>e.name,e=>function(e){if(null!=e&&null!=e.name&&null!=e.kind)switch(e.kind){case ba.SCALAR:return new be({name:(i=e).name,description:i.description,specifiedByURL:i.specifiedByURL});case ba.OBJECT:return new De({name:(t=e).name,description:t.description,interfaces:()=>h(t),fields:()=>y(t)});case ba.INTERFACE:return new Oe({name:(a=e).name,description:a.description,interfaces:()=>h(a),fields:()=>y(a)});case ba.UNION:return function(e){if(!e.possibleTypes){const a=(0,p.N)(e);throw new Error(`Introspection result missing possibleTypes: ${a}.`)}return new Ae({name:e.name,description:e.description,types:()=>e.possibleTypes.map(m)})}(e);case ba.ENUM:return function(e){if(!e.enumValues){const a=(0,p.N)(e);throw new Error(`Introspection result missing enumValues: ${a}.`)}return new Ce({name:e.name,description:e.description,values:g(e.enumValues,e=>e.name,e=>({description:e.description,deprecationReason:e.deprecationReason}))})}(e);case ba.INPUT_OBJECT:return function(e){if(!e.inputFields){const a=(0,p.N)(e);throw new Error(`Introspection result missing inputFields: ${a}.`)}return new $e({name:e.name,description:e.description,fields:()=>D(e.inputFields),isOneOf:e.isOneOf})}(e)}var a;var t;var i;const n=(0,p.N)(e);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${n}.`)}(e));for(const e of[...He,...Ea])i[e.name]&&(i[e.name]=e);const n=t.queryType?m(t.queryType):null,r=t.mutationType?m(t.mutationType):null,l=t.subscriptionType?m(t.subscriptionType):null,d=t.directives?t.directives.map(function(e){if(!e.args){const a=(0,p.N)(e);throw new Error(`Introspection result missing directive args: ${a}.`)}if(!e.locations){const a=(0,p.N)(e);throw new Error(`Introspection result missing directive locations: ${a}.`)}return new Ze({name:e.name,description:e.description,isRepeatable:e.isRepeatable,locations:e.locations.slice(),args:D(e.args)})}):[];return new Oa({description:t.description,query:n,mutation:r,subscription:l,types:Object.values(i),directives:d,assumeValid:null==a?void 0:a.assumeValid});function c(e){if(e.kind===ba.LIST){const a=e.ofType;if(!a)throw new Error("Decorated type deeper than introspection query.");return new se(c(a))}if(e.kind===ba.NON_NULL){const a=e.ofType;if(!a)throw new Error("Decorated type deeper than introspection query.");const t=c(a);return new pe(ue(t))}return u(e)}function u(e){const a=e.name;if(!a)throw new Error(`Unknown type reference: ${(0,p.N)(e)}.`);const t=i[a];if(!t)throw new Error(`Invalid or incomplete schema, unknown type: ${a}. Ensure that a full introspection query is used in order to build a client schema.`);return t}function m(e){return P(u(e))}function f(e){return B(u(e))}function h(e){if(null===e.interfaces&&e.kind===ba.INTERFACE)return[];if(!e.interfaces){const a=(0,p.N)(e);throw new Error(`Introspection result missing interfaces: ${a}.`)}return e.interfaces.map(f)}function y(e){if(!e.fields)throw new Error(`Introspection result missing fields: ${(0,p.N)(e)}.`);return g(e.fields,e=>e.name,b)}function b(e){const a=c(e.type);if(!Z(a)){const e=(0,p.N)(a);throw new Error(`Introspection must provide output type for fields, but received: ${e}.`)}if(!e.args){const a=(0,p.N)(e);throw new Error(`Introspection result missing field args: ${a}.`)}return{description:e.description,deprecationReason:e.deprecationReason,type:a,args:D(e.args)}}function D(e){return g(e,e=>e.name,x)}function x(e){const a=c(e.type);if(!K(a)){const e=(0,p.N)(a);throw new Error(`Introspection must provide input type for arguments, but received: ${e}.`)}const t=null!=e.defaultValue?Ut((0,s.$x)(e.defaultValue),a):void 0;return{description:e.description,type:a,defaultValue:t,deprecationReason:e.deprecationReason}}}function mn(e,a,t){Fa(e),null!=a&&a.kind===F.b.DOCUMENT||(0,o.U)(!1,"Must provide valid Document AST."),!0!==(null==t?void 0:t.assumeValid)&&!0!==(null==t?void 0:t.assumeValidSDL)&&function(e,a){const t=Ni(e,a);if(0!==t.length)throw new Error(t.map(e=>e.message).join("\n\n"))}(a,e);const i=e.toConfig(),n=fn(i,a,t);return i===n?e:new Oa(n)}function fn(e,a,t){var i,n,o,r;const s=[],l=Object.create(null),d=[];let c;const u=[];for(const e of a.definitions)if(e.kind===F.b.SCHEMA_DEFINITION)c=e;else if(e.kind===F.b.SCHEMA_EXTENSION)u.push(e);else if((0,Ka.a6)(e))s.push(e);else if((0,Ka.i7)(e)){const a=e.name.value,t=l[a];l[a]=t?t.concat([e]):[e]}else e.kind===F.b.DIRECTIVE_DEFINITION&&d.push(e);if(0===Object.keys(l).length&&0===s.length&&0===d.length&&0===u.length&&null==c)return e;const m=Object.create(null);for(const a of e.types)m[a.name]=b(a);for(const e of s){var f;const a=e.name.value;m[a]=null!==(f=vn[a])&&void 0!==f?f:k(e)}const v={query:e.query&&g(e.query),mutation:e.mutation&&g(e.mutation),subscription:e.subscription&&g(e.subscription),...c&&_([c]),..._(u)};return{description:null===(i=c)||void 0===i||null===(n=i.description)||void 0===n?void 0:n.value,...v,types:Object.values(m),directives:[...e.directives.map(function(e){const a=e.toConfig();return new Ze({...a,args:y(a.args,x)})}),...d.map(function(e){var a;return new Ze({name:e.name.value,description:null===(a=e.description)||void 0===a?void 0:a.value,locations:e.locations.map(({value:e})=>e),isRepeatable:e.repeatable,args:N(e.arguments),astNode:e})})],extensions:Object.create(null),astNode:null!==(o=c)&&void 0!==o?o:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(u),assumeValid:null!==(r=null==t?void 0:t.assumeValid)&&void 0!==r&&r};function h(e){return Q(e)?new se(h(e.ofType)):J(e)?new pe(h(e.ofType)):g(e)}function g(e){return m[e.name]}function b(e){return Ta(e)||Je(e)?e:V(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];let n=t.specifiedByURL;for(const e of i){var o;n=null!==(o=gn(e))&&void 0!==o?o:n}return new be({...t,specifiedByURL:n,extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):j(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];return new De({...t,interfaces:()=>[...e.getInterfaces().map(g),...S(i)],fields:()=>({...y(t.fields,D),...T(i)}),extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):L(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];return new Oe({...t,interfaces:()=>[...e.getInterfaces().map(g),...S(i)],fields:()=>({...y(t.fields,D),...T(i)}),extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):M(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];return new Ae({...t,types:()=>[...e.getTypes().map(g),...C(i)],extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):q(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[e.name])&&void 0!==a?a:[];return new Ce({...t,values:{...t.values,...A(i)},extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):G(e)?function(e){var a;const t=e.toConfig(),i=null!==(a=l[t.name])&&void 0!==a?a:[];return new $e({...t,fields:()=>({...y(t.fields,e=>({...e,type:h(e.type)})),...O(i)}),extensionASTNodes:t.extensionASTNodes.concat(i)})}(e):void(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))}function D(e){return{...e,type:h(e.type),args:e.args&&y(e.args,x)}}function x(e){return{...e,type:h(e.type)}}function _(e){const a={};for(const i of e){var t;const e=null!==(t=i.operationTypes)&&void 0!==t?t:[];for(const t of e)a[t.operation]=w(t.type)}return a}function w(e){var a;const t=e.name.value,i=null!==(a=vn[t])&&void 0!==a?a:m[t];if(void 0===i)throw new Error(`Unknown type: "${t}".`);return i}function E(e){return e.kind===F.b.LIST_TYPE?new se(E(e.type)):e.kind===F.b.NON_NULL_TYPE?new pe(E(e.type)):w(e)}function T(e){const a=Object.create(null);for(const n of e){var t;const e=null!==(t=n.fields)&&void 0!==t?t:[];for(const t of e){var i;a[t.name.value]={type:E(t.type),description:null===(i=t.description)||void 0===i?void 0:i.value,args:N(t.arguments),deprecationReason:hn(t),astNode:t}}}return a}function N(e){const a=null!=e?e:[],t=Object.create(null);for(const e of a){var i;const a=E(e.type);t[e.name.value]={type:a,description:null===(i=e.description)||void 0===i?void 0:i.value,defaultValue:Ut(e.defaultValue,a),deprecationReason:hn(e),astNode:e}}return t}function O(e){const a=Object.create(null);for(const n of e){var t;const e=null!==(t=n.fields)&&void 0!==t?t:[];for(const t of e){var i;const e=E(t.type);a[t.name.value]={type:e,description:null===(i=t.description)||void 0===i?void 0:i.value,defaultValue:Ut(t.defaultValue,e),deprecationReason:hn(t),astNode:t}}}return a}function A(e){const a=Object.create(null);for(const n of e){var t;const e=null!==(t=n.values)&&void 0!==t?t:[];for(const t of e){var i;a[t.name.value]={description:null===(i=t.description)||void 0===i?void 0:i.value,deprecationReason:hn(t),astNode:t}}}return a}function S(e){return e.flatMap(e=>{var a,t;return null!==(a=null===(t=e.interfaces)||void 0===t?void 0:t.map(w))&&void 0!==a?a:[]})}function C(e){return e.flatMap(e=>{var a,t;return null!==(a=null===(t=e.types)||void 0===t?void 0:t.map(w))&&void 0!==a?a:[]})}function k(e){var a;const t=e.name.value,i=null!==(a=l[t])&&void 0!==a?a:[];switch(e.kind){case F.b.OBJECT_TYPE_DEFINITION:{var n;const a=[e,...i];return new De({name:t,description:null===(n=e.description)||void 0===n?void 0:n.value,interfaces:()=>S(a),fields:()=>T(a),astNode:e,extensionASTNodes:i})}case F.b.INTERFACE_TYPE_DEFINITION:{var o;const a=[e,...i];return new Oe({name:t,description:null===(o=e.description)||void 0===o?void 0:o.value,interfaces:()=>S(a),fields:()=>T(a),astNode:e,extensionASTNodes:i})}case F.b.ENUM_TYPE_DEFINITION:{var r;const a=[e,...i];return new Ce({name:t,description:null===(r=e.description)||void 0===r?void 0:r.value,values:A(a),astNode:e,extensionASTNodes:i})}case F.b.UNION_TYPE_DEFINITION:{var s;const a=[e,...i];return new Ae({name:t,description:null===(s=e.description)||void 0===s?void 0:s.value,types:()=>C(a),astNode:e,extensionASTNodes:i})}case F.b.SCALAR_TYPE_DEFINITION:var p;return new be({name:t,description:null===(p=e.description)||void 0===p?void 0:p.value,specifiedByURL:gn(e),astNode:e,extensionASTNodes:i});case F.b.INPUT_OBJECT_TYPE_DEFINITION:{var d;const a=[e,...i];return new $e({name:t,description:null===(d=e.description)||void 0===d?void 0:d.value,fields:()=>O(a),astNode:e,extensionASTNodes:i,isOneOf:(c=e,Boolean(Yt(oa,c)))})}}var c}}const vn=h([...He,...Ea],e=>e.name);function hn(e){const a=Yt(ia,e);return null==a?void 0:a.reason}function gn(e){const a=Yt(na,e);return null==a?void 0:a.url}function yn(e,a){null!=e&&e.kind===F.b.DOCUMENT||(0,o.U)(!1,"Must provide valid Document AST."),!0!==(null==a?void 0:a.assumeValid)&&!0!==(null==a?void 0:a.assumeValidSDL)&&function(e){const a=Ni(e);if(0!==a.length)throw new Error(a.map(e=>e.message).join("\n\n"))}(e);const t=fn({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,a);if(null==t.astNode)for(const e of t.types)switch(e.name){case"Query":t.query=e;break;case"Mutation":t.mutation=e;break;case"Subscription":t.subscription=e}const i=[...t.directives,...ra.filter(e=>t.directives.every(a=>a.name!==e.name))];return new Oa({...t,directives:i})}function bn(e,a){return yn((0,s.qg)(e,{noLocation:null==a?void 0:a.noLocation,allowLegacyFragmentVariables:null==a?void 0:a.allowLegacyFragmentVariables}),{assumeValidSDL:null==a?void 0:a.assumeValidSDL,assumeValid:null==a?void 0:a.assumeValid})}function Dn(e){const a=e.toConfig(),t=g(_n(a.types),e=>e.name,function(e){if(V(e)||Ta(e))return e;if(j(e)){const a=e.toConfig();return new De({...a,interfaces:()=>l(a.interfaces),fields:()=>s(a.fields)})}if(L(e)){const a=e.toConfig();return new Oe({...a,interfaces:()=>l(a.interfaces),fields:()=>s(a.fields)})}if(M(e)){const a=e.toConfig();return new Ae({...a,types:()=>l(a.types)})}if(q(e)){const a=e.toConfig();return new Ce({...a,values:xn(a.values,e=>e)})}if(G(e)){const a=e.toConfig();return new $e({...a,fields:()=>xn(a.fields,e=>({...e,type:i(e.type)}))})}(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))});return new Oa({...a,types:Object.values(t),directives:_n(a.directives).map(function(e){const a=e.toConfig();return new Ze({...a,locations:wn(a.locations,e=>e),args:r(a.args)})}),query:o(a.query),mutation:o(a.mutation),subscription:o(a.subscription)});function i(e){return Q(e)?new se(i(e.ofType)):J(e)?new pe(i(e.ofType)):n(e)}function n(e){return t[e.name]}function o(e){return e&&n(e)}function r(e){return xn(e,e=>({...e,type:i(e.type)}))}function s(e){return xn(e,e=>({...e,type:i(e.type),args:e.args&&r(e.args)}))}function l(e){return _n(e).map(n)}}function xn(e,a){const t=Object.create(null);for(const i of Object.keys(e).sort(b))t[i]=a(e[i]);return t}function _n(e){return wn(e,e=>e.name)}function wn(e,a){return e.slice().sort((e,t)=>b(a(e),a(t)))}var En,Tn,Nn=t(67714);function Fn(e){return Sn(e,e=>!sa(e),An)}function On(e){return Sn(e,sa,Ta)}function An(e){return!Je(e)&&!Ta(e)}function Sn(e,a,t){const i=e.getDirectives().filter(a),n=Object.values(e.getTypeMap()).filter(t);return[Cn(e),...i.map(e=>function(e){return Ln(e)+"directive @"+e.name+Rn(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}(e)),...n.map(e=>kn(e))].filter(Boolean).join("\n\n")}function Cn(e){if(null==e.description&&function(e){const a=e.getQueryType();if(a&&"Query"!==a.name)return!1;const t=e.getMutationType();if(t&&"Mutation"!==t.name)return!1;const i=e.getSubscriptionType();if(i&&"Subscription"!==i.name)return!1;return!0}(e))return;const a=[],t=e.getQueryType();t&&a.push(` query: ${t.name}`);const i=e.getMutationType();i&&a.push(` mutation: ${i.name}`);const n=e.getSubscriptionType();return n&&a.push(` subscription: ${n.name}`),Ln(e)+`schema {\n${a.join("\n")}\n}`}function kn(e){return V(e)?function(e){return Ln(e)+`scalar ${e.name}`+function(e){if(null==e.specifiedByURL)return"";return` @specifiedBy(url: ${(0,O.y)({kind:F.b.STRING,value:e.specifiedByURL})})`}(e)}(e):j(e)?function(e){return Ln(e)+`type ${e.name}`+In(e)+$n(e)}(e):L(e)?function(e){return Ln(e)+`interface ${e.name}`+In(e)+$n(e)}(e):M(e)?function(e){const a=e.getTypes(),t=a.length?" = "+a.join(" | "):"";return Ln(e)+"union "+e.name+t}(e):q(e)?function(e){const a=e.getValues().map((e,a)=>Ln(e," ",!a)+" "+e.name+Pn(e.deprecationReason));return Ln(e)+`enum ${e.name}`+Vn(a)}(e):G(e)?function(e){const a=Object.values(e.getFields()).map((e,a)=>Ln(e," ",!a)+" "+jn(e));return Ln(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Vn(a)}(e):void(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))}function In(e){const a=e.getInterfaces();return a.length?" implements "+a.map(e=>e.name).join(" & "):""}function $n(e){return Vn(Object.values(e.getFields()).map((e,a)=>Ln(e," ",!a)+" "+e.name+Rn(e.args," ")+": "+String(e.type)+Pn(e.deprecationReason)))}function Vn(e){return 0!==e.length?" {\n"+e.join("\n")+"\n}":""}function Rn(e,a=""){return 0===e.length?"":e.every(e=>!e.description)?"("+e.map(jn).join(", ")+")":"(\n"+e.map((e,t)=>Ln(e," "+a,!t)+" "+a+jn(e)).join("\n")+"\n"+a+")"}function jn(e){const a=da(e.defaultValue,e.type);let t=e.name+": "+String(e.type);return a&&(t+=` = ${(0,O.y)(a)}`),t+Pn(e.deprecationReason)}function Pn(e){if(null==e)return"";if(e!==ta){return` @deprecated(reason: ${(0,O.y)({kind:F.b.STRING,value:e})})`}return" @deprecated"}function Ln(e,a="",t=!0){const{description:i}=e;if(null==i)return"";return(a&&!t?"\n"+a:a)+(0,O.y)({kind:F.b.STRING,value:i,block:(0,Nn.CS)(i)}).replace(/\n/g,"\n"+a)+"\n"}function Bn(e){const a=[];for(const t of e)a.push(...t.definitions);return{kind:F.b.DOCUMENT,definitions:a}}function Mn(e){const a=[],t=Object.create(null);for(const i of e.definitions)switch(i.kind){case F.b.OPERATION_DEFINITION:a.push(i);break;case F.b.FRAGMENT_DEFINITION:t[i.name.value]=qn(i.selectionSet)}const i=Object.create(null);for(const n of a){const a=new Set;for(const e of qn(n.selectionSet))Un(a,t,e);i[n.name?n.name.value:""]={kind:F.b.DOCUMENT,definitions:e.definitions.filter(e=>e===n||e.kind===F.b.FRAGMENT_DEFINITION&&a.has(e.name.value))}}return i}function Un(e,a,t){if(!e.has(t)){e.add(t);const i=a[t];if(void 0!==i)for(const t of i)Un(e,a,t)}}function qn(e){const a=[];return(0,Ya.YR)(e,{FragmentSpread(e){a.push(e.name.value)}}),a}function zn(e){const a=(0,Wi._)(e)?e:new Wi.k(e),t=a.body,i=new Zi.JG(a);let n="",o=!1;for(;i.advance().kind!==en.Y.EOF;){const e=i.token,a=e.kind,r=!(0,Zi.Z_)(e.kind);o&&(r||e.kind===en.Y.SPREAD)&&(n+=" ");const s=t.slice(e.start,e.end);a===en.Y.BLOCK_STRING?n+=(0,Nn.yo)(e.value,{minimize:!0}):n+=s,o=r}return n}function Gn(e){const a=Yn(e);if(a)throw a;return e}function Yn(e){if("string"==typeof e||(0,o.U)(!1,"Expected name to be a string."),e.startsWith("__"))return new l.eO(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{C(e)}catch(e){return e}}function Qn(e,a){return Jn(e,a).filter(e=>e.type in En)}function Hn(e,a){return Jn(e,a).filter(e=>e.type in Tn)}function Jn(e,a){return[...Kn(e,a),...Wn(e,a)]}function Wn(e,a){const t=[],i=po(e.getDirectives(),a.getDirectives());for(const e of i.removed)t.push({type:En.DIRECTIVE_REMOVED,description:`${e.name} was removed.`});for(const[e,a]of i.persisted){const i=po(e.args,a.args);for(const a of i.added)Fe(a)&&t.push({type:En.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${a.name} on directive ${e.name} was added.`});for(const a of i.removed)t.push({type:En.DIRECTIVE_ARG_REMOVED,description:`${a.name} was removed from ${e.name}.`});e.isRepeatable&&!a.isRepeatable&&t.push({type:En.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${e.name}.`});for(const i of e.locations)a.locations.includes(i)||t.push({type:En.DIRECTIVE_LOCATION_REMOVED,description:`${i} was removed from ${e.name}.`})}return t}function Kn(e,a){const t=[],i=po(Object.values(e.getTypeMap()),Object.values(a.getTypeMap()));for(const e of i.removed)t.push({type:En.TYPE_REMOVED,description:Je(e)?`Standard scalar ${e.name} was removed because it is not referenced anymore.`:`${e.name} was removed.`});for(const[e,a]of i.persisted)q(e)&&q(a)?t.push(...eo(e,a)):M(e)&&M(a)?t.push(...Zn(e,a)):G(e)&&G(a)?t.push(...Xn(e,a)):j(e)&&j(a)||L(e)&&L(a)?t.push(...to(e,a),...ao(e,a)):e.constructor!==a.constructor&&t.push({type:En.TYPE_CHANGED_KIND,description:`${e.name} changed from ${ro(e)} to ${ro(a)}.`});return t}function Xn(e,a){const t=[],i=po(Object.values(e.getFields()),Object.values(a.getFields()));for(const a of i.added)Re(a)?t.push({type:En.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${a.name} on input type ${e.name} was added.`}):t.push({type:Tn.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${a.name} on input type ${e.name} was added.`});for(const a of i.removed)t.push({type:En.FIELD_REMOVED,description:`${e.name}.${a.name} was removed.`});for(const[a,n]of i.persisted){oo(a.type,n.type)||t.push({type:En.FIELD_CHANGED_KIND,description:`${e.name}.${a.name} changed type from ${String(a.type)} to ${String(n.type)}.`})}return t}function Zn(e,a){const t=[],i=po(e.getTypes(),a.getTypes());for(const a of i.added)t.push({type:Tn.TYPE_ADDED_TO_UNION,description:`${a.name} was added to union type ${e.name}.`});for(const a of i.removed)t.push({type:En.TYPE_REMOVED_FROM_UNION,description:`${a.name} was removed from union type ${e.name}.`});return t}function eo(e,a){const t=[],i=po(e.getValues(),a.getValues());for(const a of i.added)t.push({type:Tn.VALUE_ADDED_TO_ENUM,description:`${a.name} was added to enum type ${e.name}.`});for(const a of i.removed)t.push({type:En.VALUE_REMOVED_FROM_ENUM,description:`${a.name} was removed from enum type ${e.name}.`});return t}function ao(e,a){const t=[],i=po(e.getInterfaces(),a.getInterfaces());for(const a of i.added)t.push({type:Tn.IMPLEMENTED_INTERFACE_ADDED,description:`${a.name} added to interfaces implemented by ${e.name}.`});for(const a of i.removed)t.push({type:En.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${a.name}.`});return t}function to(e,a){const t=[],i=po(Object.values(e.getFields()),Object.values(a.getFields()));for(const a of i.removed)t.push({type:En.FIELD_REMOVED,description:`${e.name}.${a.name} was removed.`});for(const[a,n]of i.persisted){t.push(...io(e,a,n));no(a.type,n.type)||t.push({type:En.FIELD_CHANGED_KIND,description:`${e.name}.${a.name} changed type from ${String(a.type)} to ${String(n.type)}.`})}return t}function io(e,a,t){const i=[],n=po(a.args,t.args);for(const t of n.removed)i.push({type:En.ARG_REMOVED,description:`${e.name}.${a.name} arg ${t.name} was removed.`});for(const[t,o]of n.persisted){if(oo(t.type,o.type)){if(void 0!==t.defaultValue)if(void 0===o.defaultValue)i.push({type:Tn.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${a.name} arg ${t.name} defaultValue was removed.`});else{const n=so(t.defaultValue,t.type),r=so(o.defaultValue,o.type);n!==r&&i.push({type:Tn.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${a.name} arg ${t.name} has changed defaultValue from ${n} to ${r}.`})}}else i.push({type:En.ARG_CHANGED_KIND,description:`${e.name}.${a.name} arg ${t.name} has changed type from ${String(t.type)} to ${String(o.type)}.`})}for(const t of n.added)Fe(t)?i.push({type:En.REQUIRED_ARG_ADDED,description:`A required arg ${t.name} on ${e.name}.${a.name} was added.`}):i.push({type:Tn.OPTIONAL_ARG_ADDED,description:`An optional arg ${t.name} on ${e.name}.${a.name} was added.`});return i}function no(e,a){return Q(e)?Q(a)&&no(e.ofType,a.ofType)||J(a)&&no(e,a.ofType):J(e)?J(a)&&no(e.ofType,a.ofType):fe(a)&&e.name===a.name||J(a)&&no(e,a.ofType)}function oo(e,a){return Q(e)?Q(a)&&oo(e.ofType,a.ofType):J(e)?J(a)&&oo(e.ofType,a.ofType)||!J(a)&&oo(e.ofType,a):fe(a)&&e.name===a.name}function ro(e){return V(e)?"a Scalar type":j(e)?"an Object type":L(e)?"an Interface type":M(e)?"a Union type":q(e)?"an Enum type":G(e)?"an Input type":void(0,pa.V)(!1,"Unexpected type: "+(0,p.N)(e))}function so(e,a){const t=da(e,a);return null!=t||(0,pa.V)(!1),(0,O.y)(vt(t))}function po(e,a){const t=[],i=[],n=[],o=h(e,({name:e})=>e),r=h(a,({name:e})=>e);for(const a of e){const e=r[a.name];void 0===e?i.push(a):n.push([a,e])}for(const e of a)void 0===o[e.name]&&t.push(e);return{added:t,persisted:n,removed:i}}function lo(e,a){return co(e,(0,s.Ng)(a))}function co(e,a){switch(a.kind){case F.b.TYPE_COORDINATE:return function(e,a){const t=a.name.value,i=e.getType(t);if(null!=i)return{kind:"NamedType",type:i}}(e,a);case F.b.MEMBER_COORDINATE:return function(e,a){const t=a.name.value,i=e.getType(t);if(!i)throw new Error(`Expected ${(0,p.N)(t)} to be defined as a type in the schema.`);if(!(q(i)||G(i)||j(i)||L(i)))throw new Error(`Expected ${(0,p.N)(t)} to be an Enum, Input Object, Object or Interface type.`);if(q(i)){const e=a.memberName.value,t=i.getValue(e);if(null==t)return;return{kind:"EnumValue",type:i,enumValue:t}}if(G(i)){const e=a.memberName.value,t=i.getFields()[e];if(null==t)return;return{kind:"InputField",type:i,inputField:t}}const n=a.memberName.value,o=i.getFields()[n];if(null!=o)return{kind:"Field",type:i,field:o}}(e,a);case F.b.ARGUMENT_COORDINATE:return function(e,a){const t=a.name.value,i=e.getType(t);if(null==i)throw new Error(`Expected ${(0,p.N)(t)} to be defined as a type in the schema.`);if(!j(i)&&!L(i))throw new Error(`Expected ${(0,p.N)(t)} to be an object type or interface type.`);const n=a.fieldName.value,o=i.getFields()[n];if(null==o)throw new Error(`Expected ${(0,p.N)(n)} to exist as a field of type ${(0,p.N)(t)} in the schema.`);const r=a.argumentName.value,s=o.args.find(e=>e.name===r);if(null!=s)return{kind:"FieldArgument",type:i,field:o,fieldArgument:s}}(e,a);case F.b.DIRECTIVE_COORDINATE:return function(e,a){const t=a.name.value,i=e.getDirective(t);if(i)return{kind:"Directive",directive:i}}(e,a);case F.b.DIRECTIVE_ARGUMENT_COORDINATE:return function(e,a){const t=a.name.value,i=e.getDirective(t);if(!i)throw new Error(`Expected ${(0,p.N)(t)} to be defined as a directive in the schema.`);const{argumentName:{value:n}}=a,o=i.args.find(e=>e.name===n);if(o)return{kind:"DirectiveArgument",directive:i,directiveArgument:o}}(e,a)}}!function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"}(En||(En={})),function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"}(Tn||(Tn={}))},4887:e=>{e.exports.mixin=function(e,a){const t=Object.getOwnPropertyNames(a);for(let i=0;i<t.length;++i)Object.defineProperty(e,t[i],Object.getOwnPropertyDescriptor(a,t[i]))},e.exports.wrapperSymbol=Symbol("wrapper"),e.exports.implSymbol=Symbol("impl"),e.exports.wrapperForImpl=function(a){return a[e.exports.wrapperSymbol]},e.exports.implForWrapper=function(a){return a[e.exports.implSymbol]}},5018:e=>{e.exports=function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},5523:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},5762:(e,a,t)=>{t.d(a,{x:()=>n});var i=t(36054);function n(e,a,t){return new i.c(function(i){var n={then:function(e){return new Promise(function(a){return a(e())})}};function o(e,a){return function(t){if(e){var o=function(){return i.closed?0:e(t)};n=n.then(o,o).then(function(e){return i.next(e)},function(e){return i.error(e)})}else i[a](t)}}var r={next:o(a,"next"),error:o(t,"error"),complete:function(){n.then(function(){return i.complete()})}},s=e.subscribe(r);return function(){return s.unsubscribe()}})}},7029:(e,a,t)=>{t.d(a,{AutoCleanedStrongCache:()=>Q.V,AutoCleanedWeakCache:()=>Q.A,Concast:()=>k.E,DEV:()=>i.DEV,DeepMerger:()=>h.ZI,DocumentTransform:()=>o.c,Observable:()=>_.c,addNonReactiveToNamedFragments:()=>d.x3,addTypenameToDocument:()=>d.XY,argumentsObjectFromField:()=>l.MB,asyncMap:()=>C.x,buildQueryFromSelectionSet:()=>d.zc,cacheSizes:()=>H.v,canUseAsyncIteratorSymbol:()=>j.uJ,canUseDOM:()=>j.Sw,canUseLayoutEffect:()=>j.JR,canUseSymbol:()=>j.ol,canUseWeakMap:()=>j.et,canUseWeakSet:()=>j.En,canonicalStringify:()=>q.M,checkDocument:()=>s.sw,cloneDeep:()=>O.m,compact:()=>P.o,concatPagination:()=>g,createFragmentMap:()=>r.JG,createFulfilledPromise:()=>w,createRejectedPromise:()=>E,fixObservableSubclass:()=>I.r,getDefaultValues:()=>s.wY,getDirectiveNames:()=>n.sx,getFragmentDefinition:()=>s.E4,getFragmentDefinitions:()=>s.zK,getFragmentFromSelection:()=>r.HQ,getFragmentMaskMode:()=>n.s7,getFragmentQueryDocument:()=>r.ct,getGraphQLErrorsFromResult:()=>R.M,getInclusionDirectives:()=>n.tY,getMainDefinition:()=>s.Vn,getOperationDefinition:()=>s.Vu,getOperationName:()=>s.n4,getQueryDefinition:()=>s.AT,getStoreKeyName:()=>l.o5,getTypenameFromResult:()=>l.D$,graphQLResultHasError:()=>R.t,hasAllDirectives:()=>n.I5,hasAnyDirectives:()=>n.hE,hasClientExports:()=>n.f2,hasDirectives:()=>n.d8,isApolloPayloadResult:()=>U.Nw,isArray:()=>$.c,isDocumentNode:()=>l.Kc,isExecutionPatchIncrementalResult:()=>U.ST,isExecutionPatchInitialResult:()=>U.EQ,isExecutionPatchResult:()=>U.YX,isField:()=>l.dt,isFullyUnmaskedOperation:()=>r.s6,isInlineFragment:()=>l.kd,isMutationOperation:()=>u,isNonEmptyArray:()=>$.E,isNonNullObject:()=>V.U,isPlainObject:()=>V.Q,isQueryOperation:()=>m,isReference:()=>l.A_,isStatefulPromise:()=>T,isSubscriptionOperation:()=>f,iterateObserversSafely:()=>S.w,makeReference:()=>l.WU,makeUniqueId:()=>L.v,maybe:()=>i.maybe,maybeDeepFreeze:()=>A.G,mergeDeep:()=>h.D9,mergeDeepArray:()=>h.IM,mergeIncrementalData:()=>U.bd,mergeOptions:()=>M.l,offsetLimitPagination:()=>y,omitDeep:()=>z,preventUnhandledRejection:()=>F.X,print:()=>p.y,relayStylePagination:()=>b,removeArgumentsFromDocument:()=>d.it,removeClientSetsFromDocument:()=>d.er,removeConnectionDirectiveFromDocument:()=>d.hX,removeDirectivesFromDocument:()=>d.iz,removeFragmentSpreadFromDocument:()=>d.TC,resultKeyNameFromField:()=>l.ue,shouldInclude:()=>n.MS,storeKeyNameFromField:()=>l.Ii,stringifyForDisplay:()=>B.p,stripTypename:()=>Y,valueToObjectRepresentation:()=>l.J,wrapPromiseWithState:()=>N}),t.r(a);var i=t(79212),n=t(82307),o=t(9354),r=t(2904),s=t(3777),p=t(38678),l=t(28907),d=t(53925);function c(e,a){var t;return(null===(t=(0,s.Vu)(e))||void 0===t?void 0:t.operation)===a}function u(e){return c(e,"mutation")}function m(e){return c(e,"query")}function f(e){return c(e,"subscription")}var v=t(85608),h=t(30671);function g(e){return void 0===e&&(e=!1),{keyArgs:e,merge:function(e,a){return e?(0,v.__spreadArray)((0,v.__spreadArray)([],e,!0),a,!0):a}}}function y(e){return void 0===e&&(e=!1),{keyArgs:e,merge:function(e,a,t){var i=t.args,n=e?e.slice(0):[];if(a)if(i)for(var o=i.offset,r=void 0===o?0:o,s=0;s<a.length;++s)n[r+s]=a[s];else n.push.apply(n,a);return n}}}function b(e){return void 0===e&&(e=!1),{keyArgs:e,read:function(e,a){var t=a.canRead,i=a.readField;if(!e)return e;var n=[],o="",r="";e.edges.forEach(function(e){t(i("node",e))&&(n.push(e),e.cursor&&(o=o||e.cursor||"",r=e.cursor||r))}),n.length>1&&o===r&&(o="");var s=e.pageInfo||{},p=s.startCursor,l=s.endCursor;return(0,v.__assign)((0,v.__assign)({},D(e)),{edges:n,pageInfo:(0,v.__assign)((0,v.__assign)({},e.pageInfo),{startCursor:p||o,endCursor:l||r})})},merge:function(e,a,t){var i=t.args,n=t.isReference,o=t.readField;if(e||(e={edges:[],pageInfo:{hasPreviousPage:!1,hasNextPage:!0,startCursor:"",endCursor:""}}),!a)return e;var r=a.edges?a.edges.map(function(e){return n(e=(0,v.__assign)({},e))&&(e.cursor=o("cursor",e)),e}):[];if(a.pageInfo){var s=a.pageInfo,p=s.startCursor,l=s.endCursor,d=r[0],c=r[r.length-1];d&&p&&(d.cursor=p),c&&l&&(c.cursor=l);var u=d&&d.cursor;u&&!p&&(a=(0,h.D9)(a,{pageInfo:{startCursor:u}}));var m=c&&c.cursor;m&&!l&&(a=(0,h.D9)(a,{pageInfo:{endCursor:m}}))}var f=e.edges,g=[];if(i&&i.after)(y=f.findIndex(function(e){return e.cursor===i.after}))>=0&&(f=f.slice(0,y+1));else if(i&&i.before){var y;g=(y=f.findIndex(function(e){return e.cursor===i.before}))<0?f:f.slice(y),f=[]}else a.edges&&(f=[]);var b=(0,v.__spreadArray)((0,v.__spreadArray)((0,v.__spreadArray)([],f,!0),r,!0),g,!0),x=(0,v.__assign)((0,v.__assign)({},a.pageInfo),e.pageInfo);if(a.pageInfo){var _=a.pageInfo,w=_.hasPreviousPage,E=_.hasNextPage,T=(p=_.startCursor,l=_.endCursor,(0,v.__rest)(_,["hasPreviousPage","hasNextPage","startCursor","endCursor"]));Object.assign(x,T),f.length||(void 0!==w&&(x.hasPreviousPage=w),void 0!==p&&(x.startCursor=p)),g.length||(void 0!==E&&(x.hasNextPage=E),void 0!==l&&(x.endCursor=l))}return(0,v.__assign)((0,v.__assign)((0,v.__assign)({},D(e)),D(a)),{edges:b,pageInfo:x})}}}var D=function(e){return(0,v.__rest)(e,x)},x=["edges","pageInfo"];var _=t(36054);function w(e){var a=Promise.resolve(e);return a.status="fulfilled",a.value=e,a}function E(e){var a=Promise.reject(e);return a.catch(function(){}),a.status="rejected",a.reason=e,a}function T(e){return"status"in e}function N(e){if(T(e))return e;var a=e;return a.status="pending",a.then(function(e){if("pending"===a.status){var t=a;t.status="fulfilled",t.value=e}},function(e){if("pending"===a.status){var t=a;t.status="rejected",t.reason=e}}),e}var F=t(30234),O=t(20906),A=t(57236),S=t(87613),C=t(5762),k=t(45637),I=t(35892),$=t(73767),V=t(21777),R=t(32710),j=t(51360),P=t(50492),L=t(21461),B=t(86563),M=t(31507),U=t(37396),q=t(44214);function z(e,a){return G(e,a)}function G(e,a,t){if(void 0===t&&(t=new Map),t.has(e))return t.get(e);var i=!1;if(Array.isArray(e)){var n=[];if(t.set(e,n),e.forEach(function(e,o){var r=G(e,a,t);i||(i=r!==e),n[o]=r}),i)return n}else if((0,V.Q)(e)){var o=Object.create(Object.getPrototypeOf(e));if(t.set(e,o),Object.keys(e).forEach(function(n){if(n!==a){var r=G(e[n],a,t);i||(i=r!==e[n]),o[n]=r}else i=!0}),i)return o}return e}function Y(e){return z(e,"__typename")}var Q=t(45078),H=t(555)},7066:e=>{e.exports=a("node:tty")},8238:(e,a,t)=>{t.d(a,{C:()=>o,V:()=>n});var i=t(73971);function n(e){return o(e.source,(0,i.g)(e.source,e.start))}function o(e,a){const t=e.locationOffset.column-1,i="".padStart(t)+e.body,n=a.line-1,o=e.locationOffset.line-1,s=a.line+o,p=1===a.line?t:0,l=a.column+p,d=`${e.name}:${s}:${l}\n`,c=i.split(/\r\n|[\n\r]/g),u=c[n];if(u.length>120){const e=Math.floor(l/80),a=l%80,t=[];for(let e=0;e<u.length;e+=80)t.push(u.slice(e,e+80));return d+r([[`${s} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(a)],["|",t[e+1]]])}return d+r([[s-1+" |",c[n-1]],[`${s} |`,u],["|","^".padStart(l)],[`${s+1} |`,c[n+1]]])}function r(e){const a=e.filter(([e,a])=>void 0!==a),t=Math.max(...a.map(([e])=>e.length));return a.map(([e,a])=>e.padStart(t)+(a?" "+a:"")).join("\n")}},8271:(e,a,t)=>{t.r(a),t.d(a,{application:()=>c,applicationProject:()=>_,applications:()=>u,checkBindDevicePasscode:()=>h,device:()=>r,deviceGroup:()=>p,deviceGroups:()=>l,devices:()=>s,devicesByGroup:()=>d,mediaBox:()=>D,mediaBoxes:()=>b,mediaFile:()=>x,mediaFiles:()=>g,mediaWorkspace:()=>y,module:()=>m,moduleProject:()=>w,modules:()=>f,publicModules:()=>v,workspace:()=>o});var i=t(94370),n=t(67370),o=i.default`
|
|
2
2
|
query CLI_workspace {
|
|
3
3
|
workspace {
|
|
4
4
|
...cliWorkspaceArguments
|
|
@@ -81,10 +81,17 @@ import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as
|
|
|
81
81
|
}
|
|
82
82
|
${n.J6}
|
|
83
83
|
`,v=i.default`
|
|
84
|
+
query CLI_publicModules($keyword: String!, $limit: Int) {
|
|
85
|
+
publicModules(keyword: $keyword, paginate: { limit: $limit }) {
|
|
86
|
+
...cliModuleShortArguments
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
${n.J6}
|
|
90
|
+
`,h=i.default`
|
|
84
91
|
query CLI_checkBindDevicePasscode($passcode: String!) {
|
|
85
92
|
checkBindDevicePasscode(passcode: $passcode)
|
|
86
93
|
}
|
|
87
|
-
`,
|
|
94
|
+
`,g=i.default`
|
|
88
95
|
query CLI_mediaFiles(
|
|
89
96
|
$boxId: ID!
|
|
90
97
|
$includeTypes: [String]
|
|
@@ -127,7 +134,7 @@ import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as
|
|
|
127
134
|
}
|
|
128
135
|
}
|
|
129
136
|
}
|
|
130
|
-
`,
|
|
137
|
+
`,y=i.default`
|
|
131
138
|
query CLI_mediaWorkspace {
|
|
132
139
|
mediaWorkspace {
|
|
133
140
|
id
|
|
@@ -140,7 +147,7 @@ import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as
|
|
|
140
147
|
updatedAt
|
|
141
148
|
}
|
|
142
149
|
}
|
|
143
|
-
`,
|
|
150
|
+
`,b=i.default`
|
|
144
151
|
query CLI_mediaBoxes {
|
|
145
152
|
mediaBoxes {
|
|
146
153
|
id
|
|
@@ -161,7 +168,7 @@ import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as
|
|
|
161
168
|
}
|
|
162
169
|
}
|
|
163
170
|
}
|
|
164
|
-
`,
|
|
171
|
+
`,D=i.default`
|
|
165
172
|
query CLI_mediaBox($id: ID!) {
|
|
166
173
|
mediaBox(id: $id) {
|
|
167
174
|
id
|
|
@@ -182,7 +189,7 @@ import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as
|
|
|
182
189
|
}
|
|
183
190
|
}
|
|
184
191
|
}
|
|
185
|
-
`,
|
|
192
|
+
`,x=i.default`
|
|
186
193
|
query CLI_mediaFile($id: ID!) {
|
|
187
194
|
mediaFile(id: $id) {
|
|
188
195
|
id
|
|
@@ -213,7 +220,7 @@ import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as
|
|
|
213
220
|
}
|
|
214
221
|
}
|
|
215
222
|
}
|
|
216
|
-
`,
|
|
223
|
+
`,_=i.default`
|
|
217
224
|
query CLI_applicationProject(
|
|
218
225
|
$id: ID!
|
|
219
226
|
$buildApplicationOnly: Boolean
|
|
@@ -231,7 +238,7 @@ import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as
|
|
|
231
238
|
setupGeminiCLI: $setupGeminiCLI
|
|
232
239
|
)
|
|
233
240
|
}
|
|
234
|
-
`,
|
|
241
|
+
`,w=i.default`
|
|
235
242
|
query CLI_moduleProject(
|
|
236
243
|
$id: ID!
|
|
237
244
|
$buildApplicationOnly: Boolean
|
|
@@ -723,4 +730,4 @@ import{createRequire as e}from"node:module";const a=e(import.meta.url);import*as
|
|
|
723
730
|
name
|
|
724
731
|
}
|
|
725
732
|
}
|
|
726
|
-
`},94370:(e,a,t)=>{t.r(a),t.d(a,{default:()=>w,disableExperimentalFragmentVariables:()=>h,disableFragmentWarnings:()=>f,enableExperimentalFragmentVariables:()=>v,gql:()=>u,resetCaches:()=>m});var i=t(85608),n=t(93367),o=new Map,r=new Map,s=!0,p=!1;function l(e){return e.replace(/[\s,]+/g," ").trim()}function d(e){var a=new Set,t=[];return e.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var i=e.name.value,n=l((p=e.loc).source.body.substring(p.start,p.end)),o=r.get(i);o&&!o.has(n)?s&&console.warn("Warning: fragment with name "+i+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||r.set(i,o=new Set),o.add(n),a.has(n)||(a.add(n),t.push(e))}else t.push(e);var p}),(0,i.__assign)((0,i.__assign)({},e),{definitions:t})}function c(e){var a=l(e);if(!o.has(a)){var t=(0,n.qg)(e,{experimentalFragmentVariables:p,allowLegacyFragmentVariables:p});if(!t||"Document"!==t.kind)throw new Error("Not a valid GraphQL document.");o.set(a,function(e){var a=new Set(e.definitions);a.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var i=e[t];i&&"object"==typeof i&&a.add(i)})});var t=e.loc;return t&&(delete t.startToken,delete t.endToken),e}(d(t)))}return o.get(a)}function u(e){for(var a=[],t=1;t<arguments.length;t++)a[t-1]=arguments[t];"string"==typeof e&&(e=[e]);var i=e[0];return a.forEach(function(a,t){a&&"Document"===a.kind?i+=a.loc.source.body:i+=a,i+=e[t+1]}),c(i)}function m(){o.clear(),r.clear()}function f(){s=!1}function v(){p=!0}function h(){p=!1}var g,y=u,b=m,D=f,x=v,_=h;(g=u||(u={})).gql=y,g.resetCaches=b,g.disableFragmentWarnings=D,g.enableExperimentalFragmentVariables=x,g.disableExperimentalFragmentVariables=_,u.default=u;const w=u},96525:e=>{e.exports=function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,n,o,r,s=[],p=!0,l=!1;try{if(o=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;p=!1}else for(;!(p=(i=o.call(t)).done)&&(s.push(i.value),s.length!==a);p=!0);}catch(e){l=!0,n=e}finally{try{if(!p&&null!=t.return&&(r=t.return(),Object(r)!==r))return}finally{if(l)throw n}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},98438:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},98472:(e,a,t)=>{t.d(a,{Ey:()=>v,JG:()=>p,MQ:()=>F,Z_:()=>l,qA:()=>f});var i=t(59841),n=t(59762),o=t(67714),r=t(25881),s=t(12039);class p{constructor(e){const a=new n.ou(s.Y.SOF,0,0,0,0);this.source=e,this.lastToken=a,this.token=a,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==s.Y.EOF)do{if(e.next)e=e.next;else{const a=h(this,e.end);e.next=a,a.prev=e,e=a}}while(e.kind===s.Y.COMMENT);return e}}function l(e){return e===s.Y.BANG||e===s.Y.DOLLAR||e===s.Y.AMP||e===s.Y.PAREN_L||e===s.Y.PAREN_R||e===s.Y.DOT||e===s.Y.SPREAD||e===s.Y.COLON||e===s.Y.EQUALS||e===s.Y.AT||e===s.Y.BRACKET_L||e===s.Y.BRACKET_R||e===s.Y.BRACE_L||e===s.Y.PIPE||e===s.Y.BRACE_R}function d(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function c(e,a){return u(e.charCodeAt(a))&&m(e.charCodeAt(a+1))}function u(e){return e>=55296&&e<=56319}function m(e){return e>=56320&&e<=57343}function f(e,a){const t=e.source.body.codePointAt(a);if(void 0===t)return s.Y.EOF;if(t>=32&&t<=126){const e=String.fromCodePoint(t);return'"'===e?"'\"'":`"${e}"`}return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function v(e,a,t,i,o){const r=e.line,s=1+t-e.lineStart;return new n.ou(a,t,i,r,s,o)}function h(e,a){const t=e.source.body,n=t.length;let o=a;for(;o<n;){const a=t.charCodeAt(o);switch(a){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===t.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return g(e,o);case 33:return v(e,s.Y.BANG,o,o+1);case 36:return v(e,s.Y.DOLLAR,o,o+1);case 38:return v(e,s.Y.AMP,o,o+1);case 40:return v(e,s.Y.PAREN_L,o,o+1);case 41:return v(e,s.Y.PAREN_R,o,o+1);case 46:if(46===t.charCodeAt(o+1)&&46===t.charCodeAt(o+2))return v(e,s.Y.SPREAD,o,o+3);break;case 58:return v(e,s.Y.COLON,o,o+1);case 61:return v(e,s.Y.EQUALS,o,o+1);case 64:return v(e,s.Y.AT,o,o+1);case 91:return v(e,s.Y.BRACKET_L,o,o+1);case 93:return v(e,s.Y.BRACKET_R,o,o+1);case 123:return v(e,s.Y.BRACE_L,o,o+1);case 124:return v(e,s.Y.PIPE,o,o+1);case 125:return v(e,s.Y.BRACE_R,o,o+1);case 34:return 34===t.charCodeAt(o+1)&&34===t.charCodeAt(o+2)?N(e,o):D(e,o)}if((0,r.yp)(a)||45===a)return y(e,o,a);if((0,r.un)(a))return F(e,o);throw(0,i.I)(e.source,o,39===a?"Unexpected single quote character ('), did you mean to use a double quote (\")?":d(a)||c(t,o)?`Unexpected character: ${f(e,o)}.`:`Invalid character: ${f(e,o)}.`)}return v(e,s.Y.EOF,n,n)}function g(e,a){const t=e.source.body,i=t.length;let n=a+1;for(;n<i;){const e=t.charCodeAt(n);if(10===e||13===e)break;if(d(e))++n;else{if(!c(t,n))break;n+=2}}return v(e,s.Y.COMMENT,a,n,t.slice(a+1,n))}function y(e,a,t){const n=e.source.body;let o=a,p=t,l=!1;if(45===p&&(p=n.charCodeAt(++o)),48===p){if(p=n.charCodeAt(++o),(0,r.yp)(p))throw(0,i.I)(e.source,o,`Invalid number, unexpected digit after 0: ${f(e,o)}.`)}else o=b(e,o,p),p=n.charCodeAt(o);if(46===p&&(l=!0,p=n.charCodeAt(++o),o=b(e,o,p),p=n.charCodeAt(o)),69!==p&&101!==p||(l=!0,p=n.charCodeAt(++o),43!==p&&45!==p||(p=n.charCodeAt(++o)),o=b(e,o,p),p=n.charCodeAt(o)),46===p||(0,r.un)(p))throw(0,i.I)(e.source,o,`Invalid number, expected digit but got: ${f(e,o)}.`);return v(e,l?s.Y.FLOAT:s.Y.INT,a,o,n.slice(a,o))}function b(e,a,t){if(!(0,r.yp)(t))throw(0,i.I)(e.source,a,`Invalid number, expected digit but got: ${f(e,a)}.`);const n=e.source.body;let o=a+1;for(;(0,r.yp)(n.charCodeAt(o));)++o;return o}function D(e,a){const t=e.source.body,n=t.length;let o=a+1,r=o,p="";for(;o<n;){const n=t.charCodeAt(o);if(34===n)return p+=t.slice(r,o),v(e,s.Y.STRING,a,o+1,p);if(92===n){p+=t.slice(r,o);const a=117===t.charCodeAt(o+1)?123===t.charCodeAt(o+2)?x(e,o):_(e,o):T(e,o);p+=a.value,o+=a.size,r=o;continue}if(10===n||13===n)break;if(d(n))++o;else{if(!c(t,o))throw(0,i.I)(e.source,o,`Invalid character within String: ${f(e,o)}.`);o+=2}}throw(0,i.I)(e.source,o,"Unterminated string.")}function x(e,a){const t=e.source.body;let n=0,o=3;for(;o<12;){const e=t.charCodeAt(a+o++);if(125===e){if(o<5||!d(n))break;return{value:String.fromCodePoint(n),size:o}}if(n=n<<4|E(e),n<0)break}throw(0,i.I)(e.source,a,`Invalid Unicode escape sequence: "${t.slice(a,a+o)}".`)}function _(e,a){const t=e.source.body,n=w(t,a+2);if(d(n))return{value:String.fromCodePoint(n),size:6};if(u(n)&&92===t.charCodeAt(a+6)&&117===t.charCodeAt(a+7)){const e=w(t,a+8);if(m(e))return{value:String.fromCodePoint(n,e),size:12}}throw(0,i.I)(e.source,a,`Invalid Unicode escape sequence: "${t.slice(a,a+6)}".`)}function w(e,a){return E(e.charCodeAt(a))<<12|E(e.charCodeAt(a+1))<<8|E(e.charCodeAt(a+2))<<4|E(e.charCodeAt(a+3))}function E(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function T(e,a){const t=e.source.body;switch(t.charCodeAt(a+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw(0,i.I)(e.source,a,`Invalid character escape sequence: "${t.slice(a,a+2)}".`)}function N(e,a){const t=e.source.body,n=t.length;let r=e.lineStart,p=a+3,l=p,u="";const m=[];for(;p<n;){const n=t.charCodeAt(p);if(34===n&&34===t.charCodeAt(p+1)&&34===t.charCodeAt(p+2)){u+=t.slice(l,p),m.push(u);const i=v(e,s.Y.BLOCK_STRING,a,p+3,(0,o.OC)(m).join("\n"));return e.line+=m.length-1,e.lineStart=r,i}if(92!==n||34!==t.charCodeAt(p+1)||34!==t.charCodeAt(p+2)||34!==t.charCodeAt(p+3))if(10!==n&&13!==n)if(d(n))++p;else{if(!c(t,p))throw(0,i.I)(e.source,p,`Invalid character within String: ${f(e,p)}.`);p+=2}else u+=t.slice(l,p),m.push(u),13===n&&10===t.charCodeAt(p+1)?p+=2:++p,u="",l=p,r=p;else u+=t.slice(l,p),l=p+1,p+=4}throw(0,i.I)(e.source,p,"Unterminated string.")}function F(e,a){const t=e.source.body,i=t.length;let n=a+1;for(;n<i;){const e=t.charCodeAt(n);if(!(0,r.xr)(e))break;++n}return v(e,s.Y.NAME,a,n,t.slice(a,n))}},98706:(e,a,t)=>{const i=t(78323);a.implementation=class{constructor(e){const a=e[0],t=e[1];let n=null;if(void 0!==t&&(n=i.basicURLParse(t),"failure"===n))throw new TypeError("Invalid base URL");const o=i.basicURLParse(a,{baseURL:n});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return i.serializeURL(this._url)}set href(e){const a=i.basicURLParse(e);if("failure"===a)throw new TypeError("Invalid URL");this._url=a}get origin(){return i.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){i.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){i.cannotHaveAUsernamePasswordPort(this._url)||i.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){i.cannotHaveAUsernamePasswordPort(this._url)||i.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?i.serializeHost(e.host):i.serializeHost(e.host)+":"+i.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||i.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":i.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||i.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":i.serializeInteger(this._url.port)}set port(e){i.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:i.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(e){this._url.cannotBeABaseURL||(this._url.path=[],i.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(e){const a=this._url;if(""===e)return void(a.query=null);const t="?"===e[0]?e.substring(1):e;a.query="",i.basicURLParse(t,{url:a,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(e){if(""===e)return void(this._url.fragment=null);const a="#"===e[0]?e.substring(1):e;this._url.fragment="",i.basicURLParse(a,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},99436:e=>{function a(e,a,t,i,n,o,r){try{var s=e[o](r),p=s.value}catch(e){return void t(e)}s.done?a(p):Promise.resolve(p).then(i,n)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise(function(n,o){var r=e.apply(t,i);function s(e){a(r,n,o,s,p,"next",e)}function p(e){a(r,n,o,s,p,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},99690:(e,a,t)=>{const{humanReadableArgName:i}=t(41762);a.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const a=e.commands.filter(e=>!e._hidden),t=e._getHelpCommand();return t&&!t._hidden&&a.push(t),this.sortSubcommands&&a.sort((e,a)=>e.name().localeCompare(a.name())),a}compareOptions(e,a){const t=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return t(e).localeCompare(t(a))}visibleOptions(e){const a=e.options.filter(e=>!e.hidden),t=e._getHelpOption();if(t&&!t.hidden){const i=t.short&&e._findOption(t.short),n=t.long&&e._findOption(t.long);i||n?t.long&&!n?a.push(e.createOption(t.long,t.description)):t.short&&!i&&a.push(e.createOption(t.short,t.description)):a.push(t)}return this.sortOptions&&a.sort(this.compareOptions),a}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const a=[];for(let t=e.parent;t;t=t.parent){const e=t.options.filter(e=>!e.hidden);a.push(...e)}return this.sortOptions&&a.sort(this.compareOptions),a}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(a=>{a.description=a.description||e._argsDescription[a.name()]||""}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){const a=e.registeredArguments.map(e=>i(e)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(a?" "+a:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,a){return a.visibleCommands(e).reduce((e,t)=>Math.max(e,a.subcommandTerm(t).length),0)}longestOptionTermLength(e,a){return a.visibleOptions(e).reduce((e,t)=>Math.max(e,a.optionTerm(t).length),0)}longestGlobalOptionTermLength(e,a){return a.visibleGlobalOptions(e).reduce((e,t)=>Math.max(e,a.optionTerm(t).length),0)}longestArgumentTermLength(e,a){return a.visibleArguments(e).reduce((e,t)=>Math.max(e,a.argumentTerm(t).length),0)}commandUsage(e){let a=e._name;e._aliases[0]&&(a=a+"|"+e._aliases[0]);let t="";for(let a=e.parent;a;a=a.parent)t=a.name()+" "+t;return t+a+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const a=[];if(e.argChoices&&a.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&a.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&a.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&a.push(`env: ${e.envVar}`),a.length>0?`${e.description} (${a.join(", ")})`:e.description}argumentDescription(e){const a=[];if(e.argChoices&&a.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue&&a.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),a.length>0){const t=`(${a.join(", ")})`;return e.description?`${e.description} ${t}`:t}return e.description}formatHelp(e,a){const t=a.padWidth(e,a),i=a.helpWidth||80;function n(e,n){if(n){const o=`${e.padEnd(t+2)}${n}`;return a.wrap(o,i-2,t+2)}return e}function o(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let r=[`Usage: ${a.commandUsage(e)}`,""];const s=a.commandDescription(e);s.length>0&&(r=r.concat([a.wrap(s,i,0),""]));const p=a.visibleArguments(e).map(e=>n(a.argumentTerm(e),a.argumentDescription(e)));p.length>0&&(r=r.concat(["Arguments:",o(p),""]));const l=a.visibleOptions(e).map(e=>n(a.optionTerm(e),a.optionDescription(e)));if(l.length>0&&(r=r.concat(["Options:",o(l),""])),this.showGlobalOptions){const t=a.visibleGlobalOptions(e).map(e=>n(a.optionTerm(e),a.optionDescription(e)));t.length>0&&(r=r.concat(["Global Options:",o(t),""]))}const d=a.visibleCommands(e).map(e=>n(a.subcommandTerm(e),a.subcommandDescription(e)));return d.length>0&&(r=r.concat(["Commands:",o(d),""])),r.join("\n")}padWidth(e,a){return Math.max(a.longestOptionTermLength(e,a),a.longestGlobalOptionTermLength(e,a),a.longestSubcommandTermLength(e,a),a.longestArgumentTermLength(e,a))}wrap(e,a,t,i=40){const n=new RegExp("[\\n][ \\f\\t\\v - \ufeff]+");if(e.match(n))return e;const o=a-t;if(o<i)return e;const r=e.slice(0,t),s=e.slice(t).replace("\r\n","\n"),p=" ".repeat(t),l="\\s",d=new RegExp(`\n|.{1,${o-1}}([${l}]|$)|[^${l}]+?([${l}]|$)`,"g");return r+(s.match(d)||[]).map((e,a)=>"\n"===e?"":(a>0?p:"")+e.trimEnd()).join("\n")}}}},m={};function f(e){var a=m[e];if(void 0!==a)return a.exports;var t=m[e]={id:e,loaded:!1,exports:{}};return u[e].call(t.exports,t,t.exports,f),t.loaded=!0,t.exports}f.m=u,f.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return f.d(a,{a}),a},l=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var t=Object.create(null);f.r(t);var i={};p=p||[null,l({}),l([]),l(l)];for(var n=2&a&&e;("object"==typeof n||"function"==typeof n)&&!~p.indexOf(n);n=l(n))Object.getOwnPropertyNames(n).forEach(a=>i[a]=()=>e[a]);return i.default=()=>e,f.d(t,i),t},f.d=(e,a)=>{for(var t in a)f.o(a,t)&&!f.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((a,t)=>(f.f[t](e,a),a),[])),f.u=e=>e+".js",f.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),d={57:0},c=e=>{var a,t,{__webpack_esm_ids__:i,__webpack_esm_modules__:n,__webpack_esm_runtime__:o}=e,r=0;for(a in n)f.o(n,a)&&(f.m[a]=n[a]);for(o&&o(f);r<i.length;r++)t=i[r],f.o(d,t)&&d[t]&&d[t][0](),d[i[r]]=0},f.f.j=(e,a)=>{var t=f.o(d,e)?d[e]:void 0;if(0!==t)if(t)a.push(t[1]);else{var i=import("./"+f.u(e)).then(c,a=>{throw 0!==d[e]&&(d[e]=void 0),a});i=Promise.race([i,new Promise(a=>t=d[e]=[a])]),a.push(t[1]=i)}};var v=f(99436),h=f(65181);const{DM:g,gu:y,er:b,Ww:D,b7:x,Di:_,a2:w,uB:E,ef:T,c$:N,_V:F}=h;var O=f(88568),A=f(74752),S=f(29790);const C=a("readline");var k,I,$,V=f(50700),R=new E("auth").description("Authentication and token management");R.command("login").description("Login with a one-time passcode from BRICKS Controller (recommended)").argument("[passcode]","One-time passcode from BRICKS Controller").option("-p, --profile <profile>","Profile name to save the token").option("-n, --name <name>","Profile display name").action((k=v(function*(e,a){var t,i,n=a.profile||(0,A.getCurrentProfile)(),o=a.name,r=e;r||(console.log(O.Ay.cyan("Generate a one-time passcode from BRICKS Controller:")),console.log(O.Ay.gray(" 1. Open the link below (or select your workspace first)")),console.log(` ${O.Ay.underline.blue("https://control.bricks.tools/#/?action=manage-tokens")}`),console.log(O.Ay.gray(' 2. Click "Generate OTP" to create a one-time passcode\n')),(r=yield(t="Enter passcode: ",i=C.createInterface({input:process.stdin,output:process.stdout}),new Promise(function(e){i.question(t,function(a){i.close(),e(a.trim())})})))||(console.log(O.Ay.red("Passcode is required")),process.exit(1)));var s=(0,S.default)("Validating passcode...").start();try{var p=(0,V.createPublicClient)((0,A.getBaseUrl)()),l=yield p.checkWorkspaceOTP(r);l.valid||(s.fail(`Invalid passcode: ${l.error||"Unknown error"}`),process.exit(1)),s.text=`Exchanging passcode for token (workspace: ${l.workspaceName})...`;var d=yield p.exchangeWorkspaceOTP(r);d.token||(s.fail("Failed to obtain token"),process.exit(1));var c=(0,V.createClient)((0,A.getBaseUrl)(),d.token),u=yield c.workspace();u||(s.fail("Token validation failed"),process.exit(1)),(0,A.setToken)(n,{token:d.token,name:o||u.name,workspaceId:u._id,workspaceName:u.name}),(0,A.setCurrentProfile)(n),s.succeed(`Logged in to workspace: ${O.Ay.green(u.name)} (profile: ${O.Ay.cyan(n)})`)}catch(e){s.fail(`Login failed: ${e.message}`),process.exit(1)}}),function(e,a){return k.apply(this,arguments)})),R.command("login-token").description("Login with a workspace token directly").option("-t, --token <token>","Workspace token").option("-p, --profile <profile>","Profile name to save the token").option("-n, --name <name>","Profile display name").action((I=v(function*(e){var a=e.profile||(0,A.getCurrentProfile)(),t=e.token,i=e.name;t||(console.error(O.Ay.red("Error: Token is required. Use -t or --token to provide it.")),console.log(O.Ay.gray("\nYou can get a workspace token from BRICKS Controller:")+O.Ay.underline.blue("https://control.bricks.tools/#/?action=manage-tokens")),console.log(` ${O.Ay.underline.blue("https://control.bricks.tools/#/?action=manage-tokens")}`),console.log(O.Ay.gray("Select your workspace and create a new token.\n")),console.log(O.Ay.yellow("Tip: Use `bricks auth login` for a simpler OTP-based login.")),process.exit(1));var n=(0,S.default)("Validating token...").start();try{var o=(0,V.createClient)((0,A.getBaseUrl)(),t),r=yield o.workspace();r||(n.fail("Invalid token or unable to access workspace"),process.exit(1)),(0,A.setToken)(a,{token:t,name:i||r.name,workspaceId:r._id,workspaceName:r.name}),(0,A.setCurrentProfile)(a),n.succeed(`Logged in to workspace: ${O.Ay.green(r.name)} (profile: ${O.Ay.cyan(a)})`)}catch(e){n.fail(`Login failed: ${e.message}`),process.exit(1)}}),function(e){return I.apply(this,arguments)})),R.command("logout").description("Remove saved token").option("-p, --profile <profile>","Profile to remove").option("-a, --all","Remove all profiles").action(($=v(function*(e){var a=e.profile;if(e.all)return(0,A.listProfiles)().forEach(function(e){return(0,A.removeToken)(e.name)}),void console.log(O.Ay.green("All profiles removed"));var t=a||(0,A.getCurrentProfile)();(0,A.getTokenInfo)(t)?((0,A.removeToken)(t),console.log(O.Ay.green(`Logged out from profile: ${t}`))):console.log(O.Ay.yellow(`No token found for profile: ${t}`))}),function(e){return $.apply(this,arguments)})),R.command("status").description("Show current authentication status").action(v(function*(){var e=(0,A.getCurrentProfile)(),a=(0,A.getTokenInfo)(e);if(!a)return console.log(O.Ay.yellow("Not logged in")),void console.log(O.Ay.gray("Use `bricks auth login` to login"));var t=(0,S.default)("Checking connection...").start();try{var i=(0,V.createClient)((0,A.getBaseUrl)(),a.token),n=yield i.workspace();t.stop(),console.log(O.Ay.bold("\nAuthentication Status")),console.log("─".repeat(40)),console.log(`Profile: ${O.Ay.cyan(e)}`),console.log(`Workspace: ${O.Ay.green(n.name)}`),console.log(`Workspace ID: ${O.Ay.gray(n._id)}`);var o=(0,A.getBaseUrl)(),r=a.baseUrl;console.log(`Base URL: ${O.Ay.gray(o)}${r?"":O.Ay.gray(" (global)")}`),console.log(`Logged in: ${O.Ay.gray(a.createdAt)}`),console.log("─".repeat(40))}catch(e){t.fail(`Connection failed: ${e.message}`)}})),R.command("list").description("List all saved profiles").action(function(){var e=(0,A.listProfiles)();if(0===e.length)return console.log(O.Ay.yellow("No saved profiles")),void console.log(O.Ay.gray("Use `bricks auth login` to login"));console.log(O.Ay.bold("\nSaved Profiles")),console.log("─".repeat(60)),e.forEach(function(e){var a=e.current?O.Ay.green("● "):" ",t=e.current?O.Ay.green(e.name):e.name,i=e.baseUrl?O.Ay.gray(` [${e.baseUrl}]`):"";console.log(`${a}${t.padEnd(15)} ${O.Ay.gray(e.workspaceName||"Unknown")}${i}`)}),console.log("─".repeat(60))}),R.command("use <profile>").description("Switch to a different profile").action(function(e){var a=(0,A.getTokenInfo)(e);if(!a)return console.log(O.Ay.red(`Profile not found: ${e}`)),void console.log(O.Ay.gray("Use `bricks auth list` to see available profiles"));(0,A.setCurrentProfile)(e),console.log(O.Ay.green(`Switched to profile: ${e}`)),a.workspaceName&&console.log(O.Ay.gray(`Workspace: ${a.workspaceName}`))}),R.command("set-url <url>").description("Set the base URL for the current profile").option("-g, --global","Set the global base URL instead of per-profile").action(function(e,a){if(a.global)(0,A.setBaseUrl)(e),console.log(O.Ay.green(`Global base URL set to: ${e}`));else{var t=(0,A.getCurrentProfile)();(0,A.setBaseUrl)(e,t),console.log(O.Ay.green(`Base URL for profile ${O.Ay.cyan(t)} set to: ${e}`))}});var j,P,L,B,M,U,q=f(68832),z=f(47336),G=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},Y=function(e){if(!e)return O.Ay.gray("○ Unknown");var a=Date.now()-new Date(e).getTime();if(a<=3e5)return O.Ay.green("● Online");var t=Math.floor(a/6e4);if(t<60)return O.Ay.yellow(`○ Offline (${t}m ago)`);var i=Math.floor(t/60);if(i<24)return O.Ay.red(`○ Offline (${i}h ago)`);var n=Math.floor(i/24);return O.Ay.red(`○ Offline (${n}d ago)`)},Q=new E("device").description("Device management");Q.command("list").description("List all devices").option("-k, --keyword <keyword>","Filter by keyword").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=G(),t=(0,S.default)("Fetching devices...").start();try{var i=yield a.devices({keyword:e.keyword});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No devices found"));console.log(O.Ay.bold("\nDevices")),console.log("─".repeat(80)),i.forEach(function(e){var a,t,i=null==(a=e.entry_detail)||null==(a=a.watch_dog_timer)?void 0:a.last_alive_time,n=Y(i),o=(null==(t=e.entry_detail)||null==(t=t.application)?void 0:t.name)||O.Ay.gray("No app bound");console.log(`${n} ${O.Ay.cyan(e.name||e.device_name)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),console.log(` App: ${o}`),console.log()})}catch(e){t.fail(`Failed to list devices: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),Q.command("get <id>").description("Get device details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=G(),i=(0,S.default)("Fetching device...").start();try{var n,o,r,s=yield t.device({id:e});if(i.stop(),s||(console.log(O.Ay.red("Device not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(s,null,2));var p=null==(n=s.entry_detail)||null==(n=n.watch_dog_timer)?void 0:n.last_alive_time,l=Y(p);if(console.log(O.Ay.bold(`\nDevice: ${s.name||s.device_name}`)),console.log("─".repeat(60)),console.log(`Status: ${l}`),console.log(`ID: ${O.Ay.gray(s._id)}`),console.log(`Device Name: ${s.device_name||O.Ay.gray("N/A")}`),console.log(`Description: ${s.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(o=s.tags)?void 0:o.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(s.create_datetime||"N/A")}`),console.log(`Modified: ${O.Ay.gray(s.last_modify_datetime||"N/A")}`),s.entry_detail){var d,c,u,m,f=s.entry_detail;if(console.log(`\n${O.Ay.bold("Entry Details")}`),console.log(`Type: ${f.type||O.Ay.gray("N/A")}`),console.log(`Unique ID: ${O.Ay.gray(f.unique_id||"N/A")}`),console.log(`Version: ${f.operation_version||O.Ay.gray("N/A")}`),console.log(`Mode: ${f.operation_mode||O.Ay.gray("N/A")}`),Array.isArray(f.screen)&&f.screen.length>0)console.log(`\n${O.Ay.bold("Screens")} (${f.screen.length})`),f.screen.forEach(function(e,a){var t,i=e.resolution,n=i?`${i.width}x${i.height} @${i.scale}x`:"N/A",o=e.master?O.Ay.green(" (master)"):"",r=e.orientation?` [${e.orientation}]`:"",s=null!=(t=e.touch)&&t.available?O.Ay.cyan(` touch:${e.touch.touch_point}pt`):"";console.log(` ${a+1}. ${e.title||"Screen"}${o}${r} - ${n}${s}`)});else if(null!=(d=f.screen)&&d.resolution){var v=f.screen.resolution;console.log(`Resolution: ${v.width}x${v.height} @${v.scale}x`)}var h=null!=f.memory_usage,g=null!=f.disk_usage;if(h||g){if(console.log(`\n${O.Ay.bold("System Resources")}`),h){var y=Array.isArray(f.memory_usage)?f.memory_usage[0]:f.memory_usage,b=Math.round(100*y),D=O.Ay.green;b>80?D=O.Ay.red:b>60&&(D=O.Ay.yellow),console.log(`Memory: ${D(`${b}%`)}`)}if(g){var x=Array.isArray(f.disk_usage)?f.disk_usage[0]:f.disk_usage,_=Math.round(100*x),w=O.Ay.green;_>90?w=O.Ay.red:_>75&&(w=O.Ay.yellow),console.log(`Disk: ${w(`${_}%`)}`)}}var E,T=[];if(null!=(c=f.sound)&&c.available&&T.push("Sound"),null!=(u=f.camera)&&u.available&&T.push("Camera"),null!=(m=f.audio_in)&&m.available&&T.push("Audio Input"),T.length>0)console.log(`\n${O.Ay.bold("Capabilities")}`),console.log(`Available: ${T.join(", ")}`),(null==(E=f.camera)||null==(E=E.channel)?void 0:E.length)>0&&f.camera.channel.forEach(function(e){var a=e.resolution?`${e.resolution.width}x${e.resolution.height}`:"";console.log(` Camera: ${e.title||"Camera"} ${a} [${e.orientation||"N/A"}]`)});if(f.local_sync){var N=f.local_sync;console.log(`\n${O.Ay.bold("Local Sync")}`),console.log(`Role: ${N.is_main?O.Ay.cyan("Main"):"Secondary"}`),null!=N.peer_count&&console.log(`Peers: ${N.peer_count}`),null!=N.mean_latency&&console.log(`Latency: ${N.mean_latency.toFixed(2)}ms`)}if(f.update){var F=f.update;console.log(`\n${O.Ay.bold("Update Status")}`),console.log(`Needs Update: ${F.need_update?O.Ay.yellow("Yes"):O.Ay.green("No")}`),F.current_version&&console.log(`App Version: ${F.current_version}`),F.running_mode&&console.log(`Running Mode: ${F.running_mode}`),F.last_update_at&&console.log(`Last Update: ${O.Ay.gray(F.last_update_at)}`)}if(f.watch_dog_timer){var A=f.watch_dog_timer;console.log(`\n${O.Ay.bold("Watchdog")}`),console.log(`Alive: ${A.alive?O.Ay.green("Yes"):O.Ay.red("No")}`),A.last_launch_time&&console.log(`Last Launch: ${O.Ay.gray(A.last_launch_time)}`),A.last_alive_time&&console.log(`Last Alive: ${O.Ay.gray(A.last_alive_time)}`)}}s.bound_application&&(console.log(`\n${O.Ay.bold("Bound Application")}`),console.log(`Name: ${s.bound_application.name}`),console.log(`ID: ${O.Ay.gray(s.bound_application._id)}`)),null!=(r=s.env)&&r.variables&&Object.keys(s.env.variables).length>0&&(console.log(`\n${O.Ay.bold("Environment Variables")}`),Object.entries(s.env.variables).forEach(function(e){var a=q(e,2),t=a[0],i=a[1];console.log(` ${O.Ay.cyan(t)}: ${i}`)})),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get device: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),Q.command("bind <passcode>").description("Bind a new device using passcode").option("-n, --name <name>","Device name").action((j=v(function*(e,a){var t=G(),i=(0,S.default)("Checking passcode...").start();try{var n,o,r=yield t.checkBindDevicePasscode({passcode:e});r||(i.fail("Invalid passcode or expired"),process.exit(1)),i.text="Binding device...";var s=yield t.createDevice({bindPasscode:e,name:a.name||(null==(n=r.payload)?void 0:n.deviceName)||"CLI Device",deviceName:null==(o=r.payload)?void 0:o.deviceName});i.succeed(`Device bound successfully: ${O.Ay.green(s.name)}`),console.log(O.Ay.gray(`Device ID: ${s._id}`))}catch(e){i.fail(`Failed to bind device: ${e.message}`),process.exit(1)}}),function(e,a){return j.apply(this,arguments)})),Q.command("control <id> <type>").description("Control a device").option("-p, --payload <json>","Event payload as JSON").action((P=v(function*(e,a,t){var i=G(),n=(0,S.default)(`Sending ${a} to device...`).start();try{var o;t.payload&&(o=JSON.parse(t.payload)),yield i.controlDevice({id:e,type:a,eventPayload:o}),n.succeed(`Control event sent: ${O.Ay.green(a)}`)}catch(e){n.fail(`Failed to control device: ${e.message}`),process.exit(1)}}),function(e,a,t){return P.apply(this,arguments)})),Q.command("refresh <id>").description("Refresh device application").action((L=v(function*(e){var a=G(),t=(0,S.default)("Refreshing device...").start();try{yield a.controlDevice({id:e,type:"refresh"}),t.succeed("Device refreshed")}catch(e){t.fail(`Failed to refresh device: ${e.message}`),process.exit(1)}}),function(e){return L.apply(this,arguments)})),Q.command("clear-cache <id>").description("Clear device cache").action((B=v(function*(e){var a=G(),t=(0,S.default)("Clearing cache...").start();try{yield a.controlDevice({id:e,type:"clear-cache"}),t.succeed("Cache cleared")}catch(e){t.fail(`Failed to clear cache: ${e.message}`),process.exit(1)}}),function(e){return B.apply(this,arguments)})),Q.command("screenshot <id>").description("Take device screenshot and save to file").option("-o, --output <path>","Output file path").option("--no-take","Only fetch existing screenshot without taking a new one").action((M=v(function*(e,a){var t=G(),i=(0,S.default)("Fetching workspace info...").start();try{var n,o,r,s=yield t.workspace();null!=s&&null!=(n=s.media_resource)&&n.enable_media_workspace||(i.fail("Media workspace is not enabled for this workspace"),process.exit(1)),s.media_resource.system_media_box_id||(i.fail("No media box configured for this workspace"),process.exit(1)),!1!==a.take&&(i.text="Sending screenshot request to device...",yield t.controlDevice({id:e,type:"take-screenshot"}),i.text="Waiting for device to capture screenshot...",yield new Promise(function(e){return setTimeout(e,3e3)})),i.text="Fetching screenshot...";var p=yield(0,z.he)(t,s,e,a.output);if(p.error&&(i.fail(p.error),process.exit(1)),i.succeed("Screenshot saved"),console.log(),console.log(O.Ay.bold("Screenshot saved to:")),console.log(O.Ay.cyan(p.path)),console.log(),null!=(o=p.file)&&o.meta){var l=p.file.meta,d=l.originalWidth,c=l.originalHeight,u=l.originalFileSize;if(d&&c&&console.log(`${O.Ay.gray("Size:")} ${d}x${c}`),u){var m=(u/1024).toFixed(1);console.log(`${O.Ay.gray("File:")} ${m} KB`)}}null!=(r=p.file)&&r.updatedAt&&console.log(`${O.Ay.gray("Updated:")} ${new Date(p.file.updatedAt).toLocaleString()}`)}catch(e){i.fail(`Failed to get screenshot: ${e.message}`),process.exit(1)}}),function(e,a){return M.apply(this,arguments)})),Q.command("monitor").description("Monitor device status (polls every 60s)").option("-g, --group <id>","Monitor devices in a group").option("-i, --interval <seconds>","Polling interval in seconds","60").action((U=v(function*(e){var a=G(),t=1e3*parseInt(e.interval,10);console.log(O.Ay.bold("\nDevice Monitor")),console.log(O.Ay.gray(`Polling every ${e.interval}s. Press Ctrl+C to stop.\n`));var i,n=(i=v(function*(){try{var t;if(t=e.group?yield a.devicesByGroup({id:e.group}):yield a.devices({}),process.stdout.write("[2J[0f"),console.log(O.Ay.bold("Device Monitor")+O.Ay.gray(` - ${(new Date).toLocaleTimeString()}`)),console.log("─".repeat(80)),!t||0===t.length)return void console.log(O.Ay.yellow("No devices found"));t.forEach(function(e){var a,t,i=null==(a=e.entry_detail)||null==(a=a.watch_dog_timer)?void 0:a.last_alive_time,n=Y(i),o=e.name||e.device_name||e.device_target_name,r=(null==(t=e.entry_detail)||null==(t=t.application)?void 0:t.name)||O.Ay.gray("No app");console.log(`${n} ${O.Ay.cyan(o.padEnd(25))} ${r}`)}),console.log(`\n${O.Ay.gray("Press Ctrl+C to stop")}`)}catch(e){console.error(O.Ay.red(`Error: ${e.message}`))}}),function(){return i.apply(this,arguments)});yield n(),setInterval(n,t)}),function(e){return U.apply(this,arguments)}));var H,J,W,K,X=f(79896),Z=f(35704),ee=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},ae=new E("app").description("Application management");ae.command("new").description("Create a new application").requiredOption("-n, --name <name>","Application name").option("-d, --description <description>","Application description").option("--layout-width <width>","Layout width",parseInt).option("--layout-height <height>","Layout height",parseInt).option("--example <key>","Create from example template").option("--init","Initialize a BRICKS Project after creation").option("-o, --output <dir>","Output directory for --init (default: current directory)").option("-y, --yes","Skip prompts for --init").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=ee(),t=e.json?null:(0,S.default)("Creating application...").start();try{var i={name:e.name};e.description&&(i.description=e.description),e.layoutWidth&&(i.layoutWidth=e.layoutWidth),e.layoutHeight&&(i.layoutHeight=e.layoutHeight),e.example&&(i.createExampleKey=e.example);var n=yield a.createApplication(i);if(e.json&&!e.init?console.log(JSON.stringify(n,null,2)):e.json||(t.succeed(`Application created: ${O.Ay.green(n.name)}`),console.log(` ID: ${O.Ay.gray(n._id)}`),n.description&&console.log(` ${O.Ay.gray(n.description)}`)),e.init){t&&t.stop();var o=(yield Promise.all([f.e(356),f.e(465)]).then(f.bind(f,16465))).initProject;yield o("application",n._id,{output:e.output,yes:e.yes,json:e.json})}}catch(a){e.json?console.error(JSON.stringify({error:a.message})):t.fail(`Failed to create application: ${a.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ae.command("list").description("List all applications").option("-k, --keyword <keyword>","Filter by keyword").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=ee(),t=(0,S.default)("Fetching applications...").start();try{var i=yield a.applications({keyword:e.keyword});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No applications found"));console.log(O.Ay.bold("\nApplications")),console.log("─".repeat(80)),i.forEach(function(e){var a=e.has_unreleased_changes?O.Ay.yellow("●"):O.Ay.green("●"),t=e.current_version?`v${e.current_version}`:O.Ay.gray("no version");console.log(`${a} ${O.Ay.cyan(e.name)} ${O.Ay.gray(t)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),e.description&&console.log(` ${O.Ay.gray(e.description)}`),console.log()})}catch(e){t.fail(`Failed to list applications: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ae.command("get <id>").description("Get application details").option("-c, --composed","Get composed configuration").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ee(),i=(0,S.default)("Fetching application...").start();try{var n,o,r,s,p,l,d=yield t.application({id:e,composed:a.composed});if(i.stop(),d||(console.log(O.Ay.red("Application not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(d,null,2));if(console.log(O.Ay.bold(`\nApplication: ${d.name}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(d._id)}`),console.log(`Description: ${d.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=d.tags)?void 0:n.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(d.create_datetime)}`),console.log(`Modified: ${O.Ay.gray(d.last_modify_datetime)}`),console.log(`\n${O.Ay.bold("Version")}`),d.current_version){if(console.log(`Current: v${d.current_version}`),d.current_version_details){var c=d.current_version_details;c.name&&console.log(`Release Name: ${c.name}`),c.note&&console.log(`Release Note: ${O.Ay.gray(c.note)}`),c.create_datetime&&console.log(`Released At: ${O.Ay.gray(c.create_datetime)}`)}}else console.log(`Current: ${O.Ay.gray("No version")}`);if(console.log(`Unreleased: ${d.has_unreleased_changes?O.Ay.yellow("Yes"):O.Ay.green("No")}`),console.log(`\n${O.Ay.bold("Features")}`),console.log(`Short Edit: ${null!=(o=d.short_edit)&&o.enabled?O.Ay.green("Enabled"):O.Ay.gray("Disabled")}`),null!=(r=d.short_edit)&&r.enabled&&d.short_edit.ref_map){var u=Object.keys(d.short_edit.ref_map).length;console.log(` References: ${u} editable properties`)}console.log(`Automation: ${null!=(s=d.canvas_control)&&s.enable_schedule?O.Ay.green("Scheduled"):O.Ay.gray("No schedule")}`),null!=(p=d.lock)&&p.locked&&console.log(`Locked: ${O.Ay.yellow("Yes")} (at ${d.lock.locked_at||"N/A"})`),d.sync_key&&console.log(`Sync Key: ${O.Ay.gray(d.sync_key)}`),(null==(l=d.devices)?void 0:l.length)>0?(console.log(`\n${O.Ay.bold("Bound Devices")} (${d.devices.length})`),d.devices.forEach(function(e){var a="active"===e.status?O.Ay.green("●"):O.Ay.gray("○"),t=e.frame?O.Ay.gray(` [${e.frame.x||0},${e.frame.y||0} ${e.frame.width}x${e.frame.height}]`):"";console.log(` ${a} ${e.device_id}${t}`)})):console.log(`\n${O.Ay.bold("Bound Devices")}: ${O.Ay.gray("None")}`),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get application: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("update <id>").description("Update application").option("-n, --name <name>","Application name").option("-d, --description <description>","Application description").option("-c, --config <json>","Application config as JSON string").option("-f, --file <path>","Application config from file").option("--validate","Validate configuration").action((H=v(function*(e,a){var t=ee(),i=(0,S.default)("Updating application...").start();try{var n={id:e};a.name&&(n.name=a.name),a.description&&(n.description=a.description),a.validate&&(n.validateConfig=!0),a.config?n.config=a.config:a.file&&(n.config=X.readFileSync(a.file,"utf-8"));var o=yield t.updateApplication(n);i.succeed(`Application updated: ${O.Ay.green(o.name)}`),o.has_unreleased_changes&&console.log(O.Ay.yellow("Note: Application has unreleased changes"))}catch(e){i.fail(`Failed to update application: ${e.message}`),process.exit(1)}}),function(e,a){return H.apply(this,arguments)})),ae.command("short-edit <id>").description("Short edit application properties").requiredOption("-l, --list <json>","Short edit list as JSON array").action(function(){var e=v(function*(e,a){var t=ee(),i=(0,S.default)("Applying short edit...").start();try{var n=JSON.parse(a.list);Array.isArray(n)||(i.fail("List must be a JSON array"),process.exit(1));var o=yield t.shortEditApplication({id:e,list:n});i.succeed(`Short edit applied to: ${O.Ay.green(o.name)}`)}catch(e){i.fail(`Failed to apply short edit: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("short-refs <id>").description("List short edit references for an application").option("-k, --keyword <keyword>","Filter by shortId or title").option("-t, --types <types>","Comma-separated shortId prefixes to include (e.g. B,C,S)").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ee(),i=(0,S.default)("Fetching short edit references...").start();try{var n,o=yield t.application({id:e});if(i.stop(),null==o||null==(n=o.short_edit)||!n.enabled)return void console.log(O.Ay.yellow("Short Edit is not enabled for this application"));var r=a.types?a.types.split(",").map(function(e){return e.trim()}).filter(Boolean):[],s=(0,Z.V)(o.short_edit.ref_map,{keyword:a.keyword,types:r});if(a.json)return void console.log(JSON.stringify(s,null,2));if(0===s.length)return void console.log(O.Ay.yellow("No short edit references found"));console.log(O.Ay.bold(`\nShort Edit References: ${o.name}`)),s.forEach(function(e){console.log(O.Ay.cyan(`\n${e.label} (${e.prefix}_)`)),e.refs.forEach(function(e){var a=e.shortId,t=e.ref,i=null!=t&&t.title?O.Ay.gray(`- ${t.title}`):"";console.log(` ${O.Ay.green(a)} ${i}`)})}),console.log()}catch(e){i.fail(`Failed to fetch short edit references: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("bind <id>").description("Bind devices to application").option("-b, --bind <devices>","Device IDs to bind (comma-separated)").option("-u, --unbind <devices>","Device IDs to unbind (comma-separated)").action(function(){var e=v(function*(e,a){var t=ee(),i=(0,S.default)("Updating device bindings...").start();try{var n={id:e};a.bind&&(n.bindDevices=a.bind.split(",").map(function(e){return e.trim()})),a.unbind&&(n.unbindDevices=a.unbind.split(",").map(function(e){return e.trim()})),yield t.bindApplication(n),i.succeed("Device bindings updated")}catch(e){i.fail(`Failed to update bindings: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("trigger <id> <testId>").description("Trigger automation test on application").option("--play","Play the test",!0).option("--stop","Stop the test").option("--setup-at-launch","Setup to run at app launch").option("-g, --match-group <group>","Match group").action(function(){var e=v(function*(e,a,t){var i=ee(),n=(0,S.default)("Triggering automation...").start();try{yield i.triggerApplicationCanvasControl({id:e,testId:a,play:!t.stop&&t.play,setupAtLaunch:t.setupAtLaunch,matchGroup:t.matchGroup}),n.succeed(`Automation triggered: ${O.Ay.green(a)}`)}catch(e){n.fail(`Failed to trigger automation: ${e.message}`),process.exit(1)}});return function(a,t,i){return e.apply(this,arguments)}}()),ae.command("release <id>").description("Release application to BRICKS platform").requiredOption("-c, --config <path|json>","Application config file path or JSON string").option("--version <version>","Version name").option("--changelogs <text>","Release changelogs").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ee(),i=a.json?null:(0,S.default)("Releasing application...").start();try{var n,o=a.config;(a.config.endsWith(".json")||a.config.includes("/"))&&(X.existsSync(a.config)||(i?i.fail(`Config file not found: ${a.config}`):console.error(JSON.stringify({error:`Config file not found: ${a.config}`})),process.exit(1)),o=X.readFileSync(a.config,"utf-8"));var r=yield t.application({id:e});r||(i?i.fail("Application not found"):console.error(JSON.stringify({error:"Application not found"})),process.exit(1)),null!=(n=r.lock)&&n.enabled&&(i?i.fail("Application is locked"):console.error(JSON.stringify({error:"Application is locked"})),process.exit(1));var s=a.version||r.name||"Untitled",p=a.changelogs?`${a.changelogs}\n\nRelease by BRICKS CLI`:"Release by BRICKS CLI";yield t.releaseApplication({id:e,config:o,releaseCurrentVersion:s,releaseCurrentVersionNote:p}),a.json?console.log(JSON.stringify({success:!0,name:r.name})):i.succeed(`Application released: ${O.Ay.green(r.name)}`)}catch(e){a.json?console.error(JSON.stringify({error:e.message})):i.fail(`Failed to release application: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("project-pull <id>").description("Pull application source files from BRICKS platform").option("-j, --json","Output as JSON (for programmatic use)").action((J=v(function*(e,a){var t=ee(),i=a.json?null:(0,S.default)("Pulling application project...").start();try{var n,o=yield t.applicationProject({id:e,buildApplicationOnly:!0});o||(i?i.fail("Application project not found"):console.error(JSON.stringify({error:"Application project not found"})),process.exit(1)),a.json?console.log(JSON.stringify(o)):(i.succeed(`Application project fetched: ${O.Ay.green((null==(n=o.files)?void 0:n.length)||0)} files`),console.log(JSON.stringify(o,null,2)))}catch(e){a.json?console.error(JSON.stringify({error:e.message})):i.fail(`Failed to pull application project: ${e.message}`),process.exit(1)}}),function(e,a){return J.apply(this,arguments)})),ae.command("check-config <path>").description("Validate application config against BRICKS schema").option("-j, --json","Output as JSON").action((W=v(function*(e,a){X.existsSync(e)||(console.error(O.Ay.red(`Config file not found: ${e}`)),process.exit(1));var t=(0,S.default)("Validating config...").start();try{var i=X.readFileSync(e,"utf-8"),n=JSON.parse(i),o=yield Promise.all([f.e(428),f.e(425),f.e(890)]).then(f.t.bind(f,38890,19)),r=o.checkConfig,s=o.checkConfigDeprecatedFeatures,p=r(n),l=s(n);if(t.stop(),a.json)return console.log(JSON.stringify(Object.assign({},p,{deprecations:l}),null,2)),void(p.valid||process.exit(1));if(p.valid&&0===l.length)return void console.log(O.Ay.green("✓ Config is valid"));console.log(O.Ay.bold("\nConfig Validation Report")),console.log("─".repeat(60)),p.schema.length>0&&(console.log(O.Ay.red(`\n Schema Errors (${p.schema.length})\n`)),p.schema.forEach(function(e,a){var t,i=e.instancePath||e.dataPath||"/";console.log(` ${O.Ay.red(`${a+1}.`)} ${O.Ay.bold(i)}`),console.log(` ${e.message}`),null!=(t=e.params)&&t.pattern&&console.log(` ${O.Ay.gray(`pattern: ${e.params.pattern}`)}`)})),p.ref.length>0&&(console.log(O.Ay.red(`\n Reference Errors (${p.ref.length})\n`)),p.ref.forEach(function(e,a){console.log(` ${O.Ay.red(`${a+1}.`)} ${O.Ay.bold(e.field)}`),console.log(` ${e.message}`)})),l.length>0&&(console.log(O.Ay.yellow(`\n Deprecation Warnings (${l.length})\n`)),l.forEach(function(e,a){console.log(` ${O.Ay.yellow(`${a+1}.`)} ${O.Ay.bold(e.id)}`),console.log(` ${e.data}`)})),console.log(`\n${"─".repeat(60)}`);var d=p.schema.length+p.ref.length;p.valid?console.log(O.Ay.yellow(`⚠ ${l.length} warning(s)`)):console.log(O.Ay.red(`✗ ${d} error(s)`)+(l.length>0?O.Ay.yellow(`, ${l.length} warning(s)`):"")),p.valid||process.exit(1)}catch(e){t.fail(`Failed to validate config: ${e.message}`),process.exit(1)}}),function(e,a){return W.apply(this,arguments)})),ae.command("project-init <id>").description("Initialize a BRICKS Project from an application").option("-o, --output <dir>","Output directory (default: current directory)").option("--github-actions","Include GitHub Actions workflow (default: true)").option("--no-github-actions","Skip GitHub Actions workflow setup").option("--agents","Include AGENTS.md (default: true)").option("--no-agents","Skip AGENTS.md setup").option("--claude","Include CLAUDE.md (default: true)").option("--no-claude","Skip CLAUDE.md setup").option("--gemini","Include GEMINI.md (default: false)").option("--no-gemini","Skip GEMINI.md setup").option("--install","Run bun install after generation (default: true)").option("--no-install","Skip bun install after generation").option("--git","Initialize git repository (default: true)").option("--no-git","Skip git initialization").option("-y, --yes","Skip prompts and use defaults/flags").option("-j, --json","Output as JSON (for programmatic use)").action((K=v(function*(e,a){var t=(yield Promise.all([f.e(356),f.e(465)]).then(f.bind(f,16465))).initProject;yield t("application",e,a)}),function(e,a){return K.apply(this,arguments)}));var te=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},ie=new E("module").description("Module management");ie.command("new").description("Create a new module").requiredOption("-n, --name <name>","Module name").option("-d, --description <description>","Module description").option("--layout-width <width>","Layout width",parseInt).option("--layout-height <height>","Layout height",parseInt).option("--public","Make module available to all users").option("--allow-modify","Allow users to modify imported module config").option("--init","Initialize a BRICKS Project after creation").option("-o, --output <dir>","Output directory for --init (default: current directory)").option("-y, --yes","Skip prompts for --init").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=te(),t=e.json?null:(0,S.default)("Creating module...").start();try{var i={name:e.name};e.description&&(i.description=e.description),e.layoutWidth&&(i.layoutWidth=e.layoutWidth),e.layoutHeight&&(i.layoutHeight=e.layoutHeight),e.public&&(i.isPublic=!0),e.allowModify&&(i.isAllowModify=!0);var n=yield a.createModule(i);if(e.json&&!e.init?console.log(JSON.stringify(n,null,2)):e.json||(t.succeed(`Module created: ${O.Ay.green(n.name)}`),console.log(` ID: ${O.Ay.gray(n._id)}`),n.description&&console.log(` ${O.Ay.gray(n.description)}`),console.log(` Public: ${n.is_public?O.Ay.green("Yes"):O.Ay.gray("No")}`),console.log(` Allow Modify: ${n.is_allow_modify?O.Ay.green("Yes"):O.Ay.gray("No")}`)),e.init){t&&t.stop();var o=(yield Promise.all([f.e(356),f.e(465)]).then(f.bind(f,16465))).initProject;yield o("module",n._id,{output:e.output,yes:e.yes,json:e.json})}}catch(a){e.json?console.error(JSON.stringify({error:a.message})):t.fail(`Failed to create module: ${a.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ie.command("list").description("List all modules").option("-k, --keyword <keyword>","Filter by keyword").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=te(),t=(0,S.default)("Fetching modules...").start();try{var i=yield a.modules({keyword:e.keyword});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No modules found"));console.log(O.Ay.bold("\nModules")),console.log("─".repeat(80)),i.forEach(function(e){var a=e.current_version?`v${e.current_version}`:O.Ay.gray("no version");console.log(`● ${O.Ay.cyan(e.name)} ${O.Ay.gray(a)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),e.description&&console.log(` ${O.Ay.gray(e.description)}`),console.log()})}catch(e){t.fail(`Failed to list modules: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ie.command("get <id>").description("Get module details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=te(),i=(0,S.default)("Fetching module...").start();try{var n,o,r,s,p,l=yield t.module({id:e});if(i.stop(),l||(console.log(O.Ay.red("Module not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(l,null,2));if(console.log(O.Ay.bold(`\nModule: ${l.name}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(l._id)}`),console.log(`Description: ${l.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=l.tags)?void 0:n.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(l.create_datetime)}`),console.log(`Modified: ${O.Ay.gray(l.last_modify_datetime)}`),console.log(`\n${O.Ay.bold("Version")}`),console.log(`Current: ${l.current_version?`v${l.current_version}`:O.Ay.gray("No version")}`),console.log(`Unreleased: ${l.has_unreleased_changes?O.Ay.yellow("Yes"):O.Ay.green("No")}`),console.log(`\n${O.Ay.bold("Settings")}`),console.log(`Public: ${l.is_public?O.Ay.green("Yes"):O.Ay.gray("No")}`),console.log(`Allow Modify: ${l.is_allow_modify?O.Ay.green("Yes"):O.Ay.gray("No")}`),console.log(`Short Edit: ${null!=(o=l.short_edit)&&o.enabled?O.Ay.green("Enabled"):O.Ay.gray("Disabled")}`),null!=(r=l.short_edit)&&r.enabled&&l.short_edit.ref_map){var d=Object.keys(l.short_edit.ref_map).length;console.log(` References: ${d} editable properties`)}null!=(null==(s=l.use_count)?void 0:s.total_count)&&(console.log(`\n${O.Ay.bold("Usage")}`),console.log(`Used In: ${l.use_count.total_count} application(s)`)),(null==(p=l.expose_properties)?void 0:p.length)>0&&(console.log(`\n${O.Ay.bold("Exposed Properties")} (${l.expose_properties.length})`),l.expose_properties.forEach(function(e){console.log(` - ${O.Ay.cyan(e)}`)})),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get module: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("update <id>").description("Update module").option("-n, --name <name>","Module name").option("-d, --description <description>","Module description").option("-c, --config <json>","Module config as JSON string").option("-f, --file <path>","Module config from file").option("--validate","Validate configuration").action(function(){var e=v(function*(e,a){var t=te(),i=(0,S.default)("Updating module...").start();try{var n={id:e};a.name&&(n.name=a.name),a.description&&(n.description=a.description),a.validate&&(n.validateConfig=!0),a.config?n.config=a.config:a.file&&(n.config=X.readFileSync(a.file,"utf-8"));var o=yield t.updateModule(n);i.succeed(`Module updated: ${O.Ay.green(o.name)}`)}catch(e){i.fail(`Failed to update module: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("short-edit <id>").description("Short edit module properties").requiredOption("-l, --list <json>","Short edit list as JSON array").action(function(){var e=v(function*(e,a){var t=te(),i=(0,S.default)("Applying short edit...").start();try{var n=JSON.parse(a.list);Array.isArray(n)||(i.fail("List must be a JSON array"),process.exit(1));var o=yield t.shortEditModule({id:e,list:n});i.succeed(`Short edit applied to: ${O.Ay.green(o.name)}`)}catch(e){i.fail(`Failed to apply short edit: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("short-refs <id>").description("List short edit references for a module").option("-k, --keyword <keyword>","Filter by shortId or title").option("-t, --types <types>","Comma-separated shortId prefixes to include (e.g. B,C,S)").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=te(),i=(0,S.default)("Fetching short edit references...").start();try{var n,o=yield t.module({id:e});if(i.stop(),null==o||null==(n=o.short_edit)||!n.enabled)return void console.log(O.Ay.yellow("Short Edit is not enabled for this module"));var r=a.types?a.types.split(",").map(function(e){return e.trim()}).filter(Boolean):[],s=(0,Z.V)(o.short_edit.ref_map,{keyword:a.keyword,types:r});if(a.json)return void console.log(JSON.stringify(s,null,2));if(0===s.length)return void console.log(O.Ay.yellow("No short edit references found"));console.log(O.Ay.bold(`\nShort Edit References: ${o.name}`)),s.forEach(function(e){console.log(O.Ay.cyan(`\n${e.label} (${e.prefix}_)`)),e.refs.forEach(function(e){var a=e.shortId,t=e.ref,i=null!=t&&t.title?O.Ay.gray(`- ${t.title}`):"";console.log(` ${O.Ay.green(a)} ${i}`)})}),console.log()}catch(e){i.fail(`Failed to fetch short edit references: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("release <id>").description("Release module to BRICKS platform").requiredOption("-c, --config <path|json>","Module config file path or JSON string").option("--version <version>","Version name").option("--changelogs <text>","Release changelogs").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=te(),i=a.json?null:(0,S.default)("Releasing module...").start();try{var n=a.config;(a.config.endsWith(".json")||a.config.includes("/"))&&(X.existsSync(a.config)||(i?i.fail(`Config file not found: ${a.config}`):console.error(JSON.stringify({error:`Config file not found: ${a.config}`})),process.exit(1)),n=X.readFileSync(a.config,"utf-8"));var o=yield t.module({id:e});o||(i?i.fail("Module not found"):console.error(JSON.stringify({error:"Module not found"})),process.exit(1)),o.is_public&&(i?i.fail("Public module deployment is temporarily not recommended"):console.error(JSON.stringify({error:"Public module deployment is temporarily not recommended"})),process.exit(1));var r=a.version||o.name||"Untitled",s=a.changelogs?`${a.changelogs}\n\nRelease by BRICKS CLI`:"Release by BRICKS CLI";yield t.releaseModule({id:e,config:n,releaseCurrentVersion:r,releaseCurrentVersionNote:s}),a.json?console.log(JSON.stringify({success:!0,name:o.name})):i.succeed(`Module released: ${O.Ay.green(o.name)}`)}catch(e){a.json?console.error(JSON.stringify({error:e.message})):i.fail(`Failed to release module: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("project-pull <id>").description("Pull module source files from BRICKS platform").option("-j, --json","Output as JSON (for programmatic use)").action(function(){var e=v(function*(e,a){var t=te(),i=a.json?null:(0,S.default)("Pulling module project...").start();try{var n,o=yield t.moduleProject({id:e,buildApplicationOnly:!0});if(o||(i?i.fail("Module project not found"):console.error(JSON.stringify({error:"Module project not found"})),process.exit(1)),a.json)console.log(JSON.stringify(o));else i.succeed(`Module project fetched: ${O.Ay.green((null==(n=o.files)?void 0:n.length)||0)} files`),console.log(JSON.stringify(o,null,2))}catch(e){a.json?console.error(JSON.stringify({error:e.message})):i.fail(`Failed to pull module project: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("project-init <id>").description("Initialize a BRICKS Project from a module").option("-o, --output <dir>","Output directory (default: current directory)").option("--github-actions","Include GitHub Actions workflow (default: true)").option("--no-github-actions","Skip GitHub Actions workflow setup").option("--agents","Include AGENTS.md (default: true)").option("--no-agents","Skip AGENTS.md setup").option("--claude","Include CLAUDE.md (default: true)").option("--no-claude","Skip CLAUDE.md setup").option("--gemini","Include GEMINI.md (default: false)").option("--no-gemini","Skip GEMINI.md setup").option("--install","Run bun install after generation (default: true)").option("--no-install","Skip bun install after generation").option("--git","Initialize git repository (default: true)").option("--no-git","Skip git initialization").option("-y, --yes","Skip prompts and use defaults/flags").option("-j, --json","Output as JSON (for programmatic use)").action(function(){var e=v(function*(e,a){var t=(yield Promise.all([f.e(356),f.e(465)]).then(f.bind(f,16465))).initProject;yield t("module",e,a)});return function(a,t){return e.apply(this,arguments)}}());var ne=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},oe=3e5,re=function(e){if(!e)return O.Ay.gray("○");var a=Date.now()-new Date(e).getTime();return a<=oe?O.Ay.green("●"):Math.floor(a/6e4)<60?O.Ay.yellow("○"):O.Ay.red("○")},se=new E("group").description("Device Group management");se.command("list").description("List all device groups").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=ne(),t=(0,S.default)("Fetching device groups...").start();try{var i=yield a.deviceGroups({});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No device groups found"));console.log(O.Ay.bold("\nDevice Groups")),console.log("─".repeat(80)),i.forEach(function(e){var a,t=(null==(a=e.devices)?void 0:a.length)||0;console.log(`● ${O.Ay.cyan(e.name)} ${O.Ay.gray(`(${t} devices)`)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),e.description&&console.log(` ${O.Ay.gray(e.description)}`),console.log()})}catch(e){t.fail(`Failed to list groups: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),se.command("get <id>").description("Get device group details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ne(),i=(0,S.default)("Fetching device group...").start();try{var n,o,r=yield t.deviceGroup({id:e});if(i.stop(),r||(console.log(O.Ay.red("Device group not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(r,null,2));console.log(O.Ay.bold(`\nDevice Group: ${r.name}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(r._id)}`),console.log(`Description: ${r.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=r.tags)?void 0:n.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(r.create_datetime)}`),console.log(`Modified: ${O.Ay.gray(r.last_modify_datetime)}`),(null==(o=r.devices)?void 0:o.length)>0&&(console.log(`\n${O.Ay.bold("Devices")} (${r.devices.length})`),r.devices.forEach(function(e){var a=e.device_target_name||e.device_id;console.log(` - ${a} ${O.Ay.gray(`(${e.device_id})`)}`)})),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get group: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),se.command("devices <id>").description("List devices in a group with status").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ne(),i=(0,S.default)("Fetching devices...").start();try{var n=yield t.devicesByGroup({id:e});if(i.stop(),a.json)return void console.log(JSON.stringify(n,null,2));if(!n||0===n.length)return void console.log(O.Ay.yellow("No devices in this group"));console.log(O.Ay.bold("\nDevices in Group")),console.log("─".repeat(80)),n.forEach(function(e){var a,t,i=null==(a=e.entry_detail)||null==(a=a.watch_dog_timer)?void 0:a.last_alive_time,n=re(i),o=e.name||e.device_name||e.device_target_name,r=(null==(t=e.entry_detail)||null==(t=t.application)?void 0:t.name)||O.Ay.gray("No app");console.log(`${n} ${O.Ay.cyan(o.padEnd(30))} ${r}`)}),console.log("─".repeat(80))}catch(e){i.fail(`Failed to get devices: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),se.command("dispatch <id> <action>").description("Dispatch action to all devices in group").action(function(){var e=v(function*(e,a){var t=ne(),i=(0,S.default)(`Dispatching ${a}...`).start(),n=["refresh","clear-cache","system-menu-open","system-menu-close","system-info-open","system-info-close","local-sync-panel-open","local-sync-panel-close","debug-panel-open","debug-panel-close","logging-on","logging-off","test-panel-open","test-panel-close"];n.includes(a)||(i.fail(`Invalid action. Valid actions: ${n.join(", ")}`),process.exit(1));try{var o=yield t.dispatchDeviceGroupAction({id:e,action:a});i.succeed(`Action dispatched: ${O.Ay.green(a)}`),o&&(console.log(`Success: ${O.Ay.green(o.success||0)}`),console.log(`Failed: ${O.Ay.red(o.failed||0)}`))}catch(e){i.fail(`Failed to dispatch action: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),se.command("refresh <id>").description("Refresh all devices in group").action(function(){var e=v(function*(e){var a=ne(),t=(0,S.default)("Refreshing devices...").start();try{var i=yield a.dispatchDeviceGroupAction({id:e,action:"refresh"});t.succeed("Devices refreshed"),i&&(console.log(`Success: ${O.Ay.green(i.success||0)}`),console.log(`Failed: ${O.Ay.red(i.failed||0)}`))}catch(e){t.fail(`Failed to refresh: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),se.command("monitor <id>").description("Monitor devices in group (polls every 60s)").option("-i, --interval <seconds>","Polling interval in seconds","60").action(function(){var e=v(function*(e,a){var t=ne(),i=1e3*parseInt(a.interval,10);console.log(O.Ay.bold("\nDevice Group Monitor")),console.log(O.Ay.gray(`Polling every ${a.interval}s. Press Ctrl+C to stop.\n`));var n=function(){var a=v(function*(){try{var a=yield Promise.all([t.deviceGroup({id:e}),t.devicesByGroup({id:e})]),i=q(a,2),n=i[0],o=i[1];if(process.stdout.write("[2J[0f"),console.log(O.Ay.bold(`Device Group: ${n.name}`)+O.Ay.gray(` - ${(new Date).toLocaleTimeString()}`)),console.log("─".repeat(80)),!o||0===o.length)return void console.log(O.Ay.yellow("No devices in this group"));var r=0,s=0;o.forEach(function(e){var a,t,i=null==(a=e.entry_detail)||null==(a=a.watch_dog_timer)?void 0:a.last_alive_time,n=re(i),o=e.name||e.device_name||e.device_target_name,p=(null==(t=e.entry_detail)||null==(t=t.application)?void 0:t.name)||O.Ay.gray("No app");i&&Date.now()-new Date(i).getTime()<=oe?r++:s++,console.log(`${n} ${O.Ay.cyan(o.padEnd(30))} ${p}`)}),console.log("─".repeat(80)),console.log(`Online: ${O.Ay.green(r)} Offline: ${O.Ay.red(s)}`),console.log(`\n${O.Ay.gray("Press Ctrl+C to stop")}`)}catch(e){console.error(O.Ay.red(`Error: ${e.message}`))}});return function(){return a.apply(this,arguments)}}();yield n(),setInterval(n,i)});return function(a,t){return e.apply(this,arguments)}}());var pe=f(90147);const le=a("fs/promises");var de=f(16928),ce=f(86090),ue=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},me=function(){var e=v(function*(e){var a=yield e.workspace();if(!(0,z.wR)(a))throw new Error("Media workspace not enabled for this workspace")});return function(a){return e.apply(this,arguments)}}(),fe=function(e){var a=e.meta||{};if(!a.originalFileUploaded)return{ready:!1,label:"Uploading"};if("Video"===e.fileType){if(!a.videoThumbOriginalFileKey)return{ready:!1,label:"Processing"};if(!a.convertedFileUploaded)return{ready:!1,label:"Transcoding"}}return{ready:!0,label:"Ready"}},ve=function(e){return e.ready?O.Ay.green(e.label):O.Ay.yellow(e.label)},he=new E("media").description("Media Flow support");he.command("boxes").description("List Media Flow boxes").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=ue(),t=(0,S.default)("Fetching media boxes...").start();try{yield me(a);var i=yield a.mediaBoxes();if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No media boxes found"));console.log(O.Ay.bold("\nMedia Boxes")),console.log("─".repeat(80)),i.forEach(function(e){var a;console.log(`${O.Ay.cyan(e.name||"Unnamed")} ${O.Ay.gray(e.id)}`),e.description&&console.log(` ${e.description}`),null!=(a=e.tags)&&a.length&&console.log(` Tags: ${e.tags.join(", ")}`),null!=e.size&&console.log(` Size: ${e.size}`),console.log()})}catch(e){t.fail(`Failed to list media boxes: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),he.command("box <id>").description("Get Media Flow box details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ue(),i=(0,S.default)("Fetching media box...").start();try{var n,o;yield me(t);var r=yield t.mediaBox({id:e});if(i.stop(),r||(console.log(O.Ay.red("Media box not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(r,null,2));console.log(O.Ay.bold(`\nMedia Box: ${r.name||"Unnamed"}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(r.id)}`),console.log(`Description: ${r.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=r.tags)?void 0:n.join(", "))||O.Ay.gray("None")}`),null!=r.size&&console.log(`Size: ${r.size}`),null!=(o=r.passcodes)&&o.length&&(console.log(`\n${O.Ay.bold("Passcodes")}`),r.passcodes.forEach(function(e){console.log(`- ${e.name||"Passcode"}: ${e.code}`)})),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get media box: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),he.command("files <boxId>").description("List Media Flow files in a box").option("-t, --types <types>","Comma-separated file types to include").option("-u, --user-tag <tag>","Filter by user tag (repeatable)",function(e,a){return[].concat(pe(a),[e])},[]).option("-l, --limit <limit>","Limit results",function(e){return Number.parseInt(e,10)}).option("-o, --offset <offset>","Offset results",function(e){return Number.parseInt(e,10)}).option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ue(),i=(0,S.default)("Fetching media files...").start();try{var n;yield me(t);var o=a.types?a.types.split(",").map(function(e){return e.trim()}).filter(Boolean):void 0,r=null!=(n=a.userTag)&&n.length?a.userTag:void 0,s=yield t.mediaFiles({boxId:e,includeTypes:o,userTags:r,limit:a.limit,offset:a.offset});if(i.stop(),a.json)return void console.log(JSON.stringify(s,null,2));if(!s||0===s.length)return void console.log(O.Ay.yellow("No media files found"));console.log(O.Ay.bold(`\nMedia Files (${s.length})`)),console.log("─".repeat(100)),s.forEach(function(e){var a,t=fe(e);console.log(`${O.Ay.cyan(e.name||"Unnamed")} ${O.Ay.gray(e.id)}`),console.log(` Type: ${e.fileType} Status: ${ve(t)}`),null!=(a=e.userTags)&&a.length&&console.log(` Tags: ${e.userTags.join(", ")}`),e.updatedAt&&console.log(` Updated: ${new Date(e.updatedAt).toLocaleString()}`),console.log()})}catch(e){i.fail(`Failed to list media files: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),he.command("file <id>").description("Get Media Flow file details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ue(),i=(0,S.default)("Fetching media file...").start();try{var n,o;yield me(t);var r=yield t.mediaFile({id:e});if(i.stop(),r||(console.log(O.Ay.red("Media file not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(r,null,2));var s=fe(r);console.log(O.Ay.bold(`\nMedia File: ${r.name||"Unnamed"}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(r.id)}`),console.log(`Box ID: ${O.Ay.gray(r.boxId)}`),console.log(`Type: ${r.fileType}`),console.log(`Status: ${ve(s)}`),console.log(`Description: ${r.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=r.userTags)?void 0:n.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(r.createdAt||"N/A")}`),console.log(`Updated: ${O.Ay.gray(r.updatedAt||"N/A")}`);var p=(0,z.Gu)(r),l=(0,z.Gu)(r,{preferThumbnail:!0});null!=(o=r.meta)&&o.originalFileKey&&console.log(`Original Key: ${O.Ay.gray(r.meta.originalFileKey)}`),p&&console.log(`Original URL: ${O.Ay.gray(p)}`),l&&l!==p&&console.log(`Thumbnail URL: ${O.Ay.gray(l)}`),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get media file: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}());var ge=function(e){var a=e.match(/^(\d+)x(\d+)(?::(\w+))?$/);if(!a)throw new Error(`Invalid image version spec: "${e}". Expected format: WxH or WxH:STRATEGY`);return{width:parseInt(a[1],10),height:parseInt(a[2],10),strategy:(a[3]||"FILL").toUpperCase(),copypreview:!1}},ye=function(){var e=v(function*(e,a,t,i,n){var o=new FormData;Object.entries(a).forEach(function(e){var a=q(e,2),t=a[0],i=a[1];o.append(t,i)}),o.append("file",new Blob([t],{type:n}),i);var r=yield fetch(e,{method:"POST",body:o});if(!r.ok&&204!==r.status){var s=yield r.text().catch(function(){return""});throw new Error(`S3 upload failed (${r.status}): ${s}`)}});return function(a,t,i,n,o){return e.apply(this,arguments)}}(),be=function(){var e=v(function*(e,a,t){var i=[],n=0,o=function(){var a=v(function*(){for(;n<e.length;){var a=n;n+=1,i[a]=yield t(e[a],a)}});return function(){return a.apply(this,arguments)}}(),r=Array.from({length:Math.min(a,e.length)},function(){return o()});return yield Promise.all(r),i});return function(a,t,i){return e.apply(this,arguments)}}();he.command("upload <boxId> <files...>").description("Upload file(s) to a Media Flow box").option("-d, --description <text>","File description","").option("-t, --user-tag <tag>","User tag (repeatable, max 15)",function(e,a){return[].concat(pe(a),[e])},[]).option("--image-version <spec>","Image resize spec as WxH or WxH:STRATEGY (repeatable)",function(e,a){return[].concat(pe(a),[e])},[]).option("--image-version-type <type>","Image output format: jpg or png").option("--enable-ai-analysis","Enable AI analysis on uploaded files").option("--ai-instruction <text>","Custom AI analysis instruction").option("--concurrency <n>","Max concurrent uploads",function(e){return parseInt(e,10)},3).option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a,t){var i=ue(),n=(0,S.default)("Preparing upload...").start();try{if(yield me(i),t.userTag.length>15)throw new Error("Maximum 15 user tags allowed");var o=t.imageVersion.map(ge),r=t.enableAiAnalysis||!!t.aiInstruction,s=yield Promise.all(a.map(function(){var e=v(function*(e){var a=(0,de.resolve)(e),t=yield(0,le.stat)(a).catch(function(){return null});if(!t||!t.isFile())throw new Error(`Not a file: ${e}`);var i=(0,de.basename)(a);return{filePath:a,fileName:i,contentType:(0,ce.lookup)(i)||"application/octet-stream",size:t.size}});return function(a){return e.apply(this,arguments)}}()));n.stop();var p=s.length;console.log(O.Ay.bold(`\nUploading ${p} file${p>1?"s":""} to box ${O.Ay.gray(e)}...\n`));var l=[];yield be(s,t.concurrency,function(){var a=v(function*(a,n){var s,d,c=`[${n+1}/${p}] ${a.fileName}`,u=(0,S.default)(`${c} — requesting upload...`).start();try{var m=(d=a.contentType)?"image/svg+xml"===d?"FILE":d.startsWith("image/")?"IMAGE":d.startsWith("video/")?"VIDEO":d.startsWith("audio/")?"AUDIO":"FILE":"FILE",f={imageVersions:"IMAGE"===m?o:[],imageVersionType:"IMAGE"===m?t.imageVersionType:void 0,enableAiAnalysis:r,aiCustomInstruction:t.aiInstruction||void 0},v=yield i.createMediaFileUploadRequest({name:a.fileName,description:t.description,boxId:e,fileType:m,contentType:a.contentType,userTags:t.userTag.length>0?t.userTag:[],meta:f});u.text=`${c} — uploading to storage...`;var h=JSON.parse(v.meta.uploadInfo),g=yield(0,le.readFile)(a.filePath);yield ye(h.url,{AWSAccessKeyId:h.AWSAccessKeyId,"Content-Type":h["Content-Type"],key:h.key,Signature:h.Signature,Policy:h.Policy,acl:h.acl},g,a.fileName,a.contentType),u.succeed(`${c} ${O.Ay.green("✓")} ${O.Ay.gray(`(${m}, ${s=a.size,s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:s<1073741824?`${(s/1048576).toFixed(1)} MB`:`${(s/1073741824).toFixed(1)} GB`})`)}`),l.push({file:a.fileName,id:v.id,status:"success",fileType:m,size:a.size})}catch(e){u.fail(`${c} — ${e.message}`),l.push({file:a.fileName,id:null,status:"failed",error:e.message})}});return function(e,t){return a.apply(this,arguments)}}());var d=l.filter(function(e){return"success"===e.status}).length,c=l.filter(function(e){return"failed"===e.status}).length;t.json?console.log(JSON.stringify({boxId:e,results:l,summary:{total:p,success:d,failed:c}},null,2)):(console.log(),0===c?console.log(O.Ay.green(`Uploaded ${d}/${p} files`)):console.log(O.Ay.yellow(`Uploaded ${d}/${p} files (${c} failed)`))),c>0&&process.exit(1)}catch(e){n.fail(`Upload failed: ${e.message}`),process.exit(1)}});return function(a,t,i){return e.apply(this,arguments)}}());var De={prod:"https://display.bricks.tools",beta:"https://display-beta.bricks.tools",dev:"http://localhost:3001"},xe=function(e){var a=Object.entries(De).find(function(a){var t=q(a,2)[1];return e===t});return a?a[0]:null},_e=new E("config").description("CLI configuration management");_e.command("endpoint").argument("[environment]","Environment to use (prod, beta, dev)").description("Show or set the API endpoint environment").option("-p, --profile","Set for current profile instead of global").action(function(e,a){var t=(0,A.getBaseUrl)(),i=xe(t);if(!e)return console.log(O.Ay.bold("\nAPI Endpoint Configuration")),console.log("─".repeat(50)),console.log(`Current URL: ${O.Ay.cyan(t)}`),i?console.log(`Environment: ${O.Ay.green(i)}`):console.log(`Environment: ${O.Ay.yellow("custom")}`),console.log("─".repeat(50)),console.log(O.Ay.gray("\nAvailable environments:")),Object.entries(De).forEach(function(e){var a=q(e,2),i=a[0],n=a[1],o=t===n?O.Ay.green("● "):" ",r=t===n?O.Ay.green(i):i;console.log(`${o}${r.padEnd(8)} ${O.Ay.gray(n)}`)}),console.log(""),void console.log(O.Ay.gray("Usage: bricks config endpoint <prod|beta|dev>"));var n=Object.keys(De);n.includes(e)||(console.error(O.Ay.red(`Invalid environment: ${e}`)),console.log(O.Ay.gray(`Valid options: ${n.join(", ")}`)),process.exit(1));var o=De[e];if(t!==o){if(a.profile){var r=(0,A.getCurrentProfile)();(0,A.setBaseUrl)(o,r),console.log(O.Ay.green(`✓ Endpoint changed to ${e}: ${o} (profile: ${r})`))}else(0,A.setBaseUrl)(o),console.log(O.Ay.green(`✓ Endpoint changed to ${e}: ${o}`));console.log(O.Ay.yellow("\nNote: You may need to re-authenticate if your token is for a different environment.")),console.log(O.Ay.gray("Use `bricks auth status` to check your connection."))}else console.log(O.Ay.yellow(`Already using ${e} environment: ${o}`))}),_e.command("show").description("Show current configuration").option("-j, --json","Output as JSON").action(function(e){var a=(0,A.getBaseUrl)(),t=xe(a);e.json?console.log(JSON.stringify({endpoint:a,environment:t||"custom"},null,2)):(console.log(O.Ay.bold("\nBRICKS CLI Configuration")),console.log("─".repeat(50)),console.log(`API Endpoint: ${O.Ay.cyan(a)}`),t?console.log(`Environment: ${O.Ay.green(t)}`):console.log(`Environment: ${O.Ay.yellow("custom")}`),console.log("─".repeat(50)))});var we=new E("mcp").description("MCP server management");we.command("start").description("Start the BRICKS MCP server in STDIO mode").option("-t, --token <token>","API token (overrides saved token)").action(function(){var e=v(function*(e){var a=(0,A.getCurrentProfile)(),t=e.token||(0,A.getToken)(a);t||(console.error(O.Ay.red("Error: No API token found.")),console.error(O.Ay.gray("Please login first with: bricks auth login <passcode>")),console.error(O.Ay.gray("Or provide a token with: bricks mcp start --token <token>")),process.exit(1));try{var i=(yield Promise.all([f.e(428),f.e(300),f.e(425),f.e(232)]).then(f.bind(f,18232))).startStdioServer;yield i({token:t})}catch(e){console.error(O.Ay.red(`Failed to start MCP server: ${e.message}`)),process.exit(1)}});return function(a){return e.apply(this,arguments)}}());var Ee=new E("devtools").description("DevTools server discovery and connection");Ee.command("scan").description("Scan LAN for DevTools servers via UDP + HTTP").option("-t, --timeout <ms>","Scan timeout in milliseconds","3000").option("-j, --json","Output as JSON").option("--verify","Verify each discovered server via HTTP").option("--udp-only","Skip HTTP subnet probe (UDP only)").option("-p, --port <port>","Port for HTTP probe","19851").action(function(){var e=v(function*(e){var a=(yield Promise.resolve().then(f.bind(f,29790))).default,t=yield f.e(44).then(f.bind(f,12044)),i=t.discoverDevToolsServers,n=t.verifyDevToolsServer,o=t.httpProbeSubnet,r=yield Promise.resolve().then(f.bind(f,74752)),s=r.getCurrentProfile,p=r.getTokenInfo,l=parseInt(e.timeout,10),d=a(`Scanning for DevTools servers (${l}ms)...`).start();try{var c,u=i({timeout:l,idleTimeout:800}),m=e.udpOnly?Promise.resolve([]):(d.text="Scanning via UDP + HTTP probe...",o({port:parseInt(e.port,10),timeout:l})),h=yield Promise.all([u,m]),g=q(h,2),y=g[0],b=g[1],D=[].concat(pe(y),pe(b)),x=new Map;D.forEach(function(e){var a=e.deviceId||`${e.address}:${e.port}`,t=x.get(a);t?(t.addresses.includes(e.address)||t.addresses.push(e.address),"127.0.0.1"===t.address&&"127.0.0.1"!==e.address&&(t.address=e.address),(e.protocols||[]).forEach(function(e){var a,i;null!=(a=t.protocols)&&a.includes(e)||null==(i=t.protocols)||i.push(e)})):x.set(a,Object.assign({},e,{addresses:[e.address]}))});var _=pe(x.values());if(0===_.length)return e.json?(d.stop(),console.log(JSON.stringify([],null,2))):d.info("No DevTools servers found on the network."),void process.exit(0);if(e.verify){d.text=`Verifying ${_.length} server(s)...`;var w=yield Promise.all(_.map(function(){var e=v(function*(e){var a=yield n(e.address,e.port);return Object.assign({},e,{verified:!!a})});return function(a){return e.apply(this,arguments)}}()));_.splice.apply(_,[0,_.length].concat(pe(w)))}if(d.stop(),e.json)return d.stop(),void console.log(JSON.stringify(_,null,2));var E=p(s()),T=(null==E?void 0:E.workspaceId)||null;console.log(O.Ay.bold(`\nFound ${_.length} DevTools server(s)`)),console.log("─".repeat(80)),_.forEach(function(e){var a=!1===e.verified?O.Ay.red("unverified"):O.Ay.green("online"),t=e.hasPasscode?O.Ay.yellow("passcode"):O.Ay.gray("open"),i=(e.protocols||[]).map(function(e){return O.Ay.cyan(e)}).join(", "),n=e.workspaceId&&T&&e.workspaceId===T,o=e.addresses||[e.address],r=o.filter(function(a){return a!==e.address}),s=r.length>0?`${e.address}:${e.port} +${r.length} more`:`${e.address}:${e.port}`;console.log(` ${O.Ay.bold(e.name||"Unknown")} ${O.Ay.gray(`(${s})`)} [${a}]`),r.length>0&&console.log(` Addresses: ${o.map(function(e){return O.Ay.gray(e)}).join(", ")}`);var p=` Protocols: ${i||O.Ay.gray("none")} Auth: ${t}`;if(e.deviceId&&(p+=` Device: ${O.Ay.gray(e.deviceId)}`),console.log(p),e.workspaceId){var l=n?O.Ay.green(`${e.workspaceId} (current profile)`):O.Ay.gray(e.workspaceId);console.log(` Workspace: ${l}`)}}),console.log("─".repeat(80)),console.log(O.Ay.gray(`\nConnect via: devtools://devtools/bundled/js_app.html?ws=<address>:${(null==(c=_[0])?void 0:c.port)||19851}/ws?p=<passcode>`)),process.exit(0)}catch(e){throw d.fail(`Scan failed: ${e.message}`),e}});return function(a){return e.apply(this,arguments)}}()),Ee.command("open <address>").description("Show connection URLs for a DevTools server").option("-p, --port <port>","Server port","19851").option("--verify","Verify server is reachable first").action(function(){var e=v(function*(e,a){var t=parseInt(a.port,10),i=`${e}:${t}`;if(a.verify){var n=(yield Promise.resolve().then(f.bind(f,29790))).default,o=(yield f.e(44).then(f.bind(f,12044))).verifyDevToolsServer,r=n(`Verifying ${i}...`).start(),s=yield o(e,t);s||(r.fail(`Could not reach DevTools server at ${i}`),process.exit(1)),r.succeed(`${s.name||"DevTools"} is reachable`),console.log()}console.log(O.Ay.bold("Connection URLs")),console.log("─".repeat(60)),console.log(` Web UI: ${O.Ay.cyan(`http://${i}`)}`),console.log(` CDP: ${O.Ay.cyan(`devtools://devtools/bundled/js_app.html?ws=${i}/ws?p=<passcode>`)}`),console.log(` MCP: ${O.Ay.cyan(`http://${i}/mcp`)}`),console.log(` MCP SSE: ${O.Ay.cyan(`http://${i}/sse`)}`),console.log(` Info: ${O.Ay.cyan(`http://${i}/devtools/info`)}`),console.log("─".repeat(60)),console.log(),console.log(O.Ay.bold("Authorization")),console.log(" MCP and MCP SSE require a Bearer token header with the device passcode:"),console.log(` ${O.Ay.gray("Authorization: Bearer <passcode>")}`)});return function(a,t){return e.apply(this,arguments)}}());var Te=f(69278),Ne=f(70857),Fe=process.env.BRICKS_PROJECT_DESKTOP_DATA_DIR||de.join(Ne.homedir(),".bricks-project-desktop"),Oe=de.join(Fe,"acp.sock"),Ae=new E("desktop-acp-bridge").description("ACP bridge — connects acpx to the running BRICKS Project Desktop app").action(function(){var e=Te.connect(Oe);e.on("connect",function(){process.stdin.pipe(e),e.pipe(process.stdout)}),e.on("error",function(e){"ENOENT"===e.code||"ECONNREFUSED"===e.code?process.stderr.write(`[acp] Cannot connect to BRICKS Project Desktop.\n Make sure the desktop app is running and ACP is enabled in Settings.\n Socket: ${Oe}\n`):process.stderr.write(`[acp] Connection error: ${e.message}\n`),process.exit(1)}),e.on("close",function(){process.exit(0)})}),Se=function(){var e=v(function*(){var e=process.argv.findIndex(function(e){return"--auth-profile"===e||"-ap"===e});if(-1!==e&&process.argv[e+1]&&((0,A.setProfileOverride)(process.argv[e+1]),process.argv.splice(e,2)),g.name("bricks").description("BRICKS CLI - Command-line interface for BRICKS Workspace API").version("2.23.8").enablePositionalOptions(),g.addCommand(R),g.addCommand(Q),g.addCommand(ae),g.addCommand(ie),g.addCommand(se),g.addCommand(he),g.addCommand(_e),g.addCommand(we),g.addCommand(Ee),g.addCommand(Ae),g.command("interactive").alias("i").description("Start interactive mode with Ink UI").action(v(function*(){try{(0,(yield Promise.all([f.e(63),f.e(775)]).then(f.bind(f,76775))).runInteractiveMode)()}catch(e){console.error(O.Ay.red(`Failed to start interactive mode: ${e.message}`)),process.exit(1)}})),g.command("workspace").alias("ws").description("Show current workspace information").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=yield Promise.resolve().then(f.bind(f,74752)),t=a.getToken,i=a.getBaseUrl,n=a.getCurrentProfile,o=(yield Promise.resolve().then(f.bind(f,50700))).createClient,r=(yield Promise.resolve().then(f.bind(f,29790))).default,s=t(n());s||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1));var p=r("Fetching workspace info...").start();try{var l,d,c=o(i(),s),u=yield c.workspace();if(p.stop(),e.json)return void console.log(JSON.stringify(u,null,2));console.log(O.Ay.bold("\nWorkspace Information")),console.log("─".repeat(60)),console.log(`Name: ${O.Ay.green(u.name)}`),console.log(`ID: ${O.Ay.gray(u._id)}`),console.log(`Description: ${u.description||O.Ay.gray("N/A")}`),console.log(`\n${O.Ay.bold("Data")}`),console.log(`Remote Update: ${null!=(l=u.bank)&&l.enable_remote_update?O.Ay.green("Enabled"):O.Ay.gray("Disabled")}`),console.log(`Spacename: ${(null==(d=u.bank)?void 0:d.spacename)||O.Ay.gray("N/A")}`),console.log("─".repeat(60))}catch(e){p.fail(`Failed to get workspace: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),g.on("--help",function(){console.log(""),console.log(O.Ay.bold("Examples:")),console.log(""),console.log(O.Ay.gray(" # Login with a one-time passcode (recommended)")),console.log(" $ bricks auth login <passcode>"),console.log(""),console.log(O.Ay.gray(" # List all devices")),console.log(" $ bricks device list"),console.log(""),console.log(O.Ay.gray(" # Monitor devices in real-time")),console.log(" $ bricks device monitor"),console.log(""),console.log(O.Ay.gray(" # Control a device")),console.log(" $ bricks device refresh <device-id>"),console.log(" $ bricks device control <device-id> clear-cache"),console.log(""),console.log(O.Ay.gray(" # Bind a new device")),console.log(' $ bricks device bind <passcode> -n "My Device"'),console.log(""),console.log(O.Ay.gray(" # List applications")),console.log(" $ bricks app list"),console.log(""),console.log(O.Ay.gray(" # Start interactive mode")),console.log(" $ bricks interactive"),console.log(""),console.log(O.Ay.gray(" # Change API endpoint")),console.log(" $ bricks config endpoint beta"),console.log(""),console.log(O.Ay.gray("Get workspace token from BRICKS Controller:")),console.log(O.Ay.cyan(" https://control.bricks.tools")),console.log(O.Ay.gray(" Go to Workspace Settings > API Token"))}),0===process.argv.slice(2).length)try{return void(0,(yield Promise.all([f.e(63),f.e(775)]).then(f.bind(f,76775))).runInteractiveMode)()}catch(e){console.error(O.Ay.red(`Failed to start interactive mode: ${e.message}`)),process.exit(1)}yield g.parseAsync(process.argv)});return function(){return e.apply(this,arguments)}}();const Ce=Se;export{Ce as default,Se as run};
|
|
733
|
+
`},94370:(e,a,t)=>{t.r(a),t.d(a,{default:()=>w,disableExperimentalFragmentVariables:()=>h,disableFragmentWarnings:()=>f,enableExperimentalFragmentVariables:()=>v,gql:()=>u,resetCaches:()=>m});var i=t(85608),n=t(93367),o=new Map,r=new Map,s=!0,p=!1;function l(e){return e.replace(/[\s,]+/g," ").trim()}function d(e){var a=new Set,t=[];return e.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var i=e.name.value,n=l((p=e.loc).source.body.substring(p.start,p.end)),o=r.get(i);o&&!o.has(n)?s&&console.warn("Warning: fragment with name "+i+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||r.set(i,o=new Set),o.add(n),a.has(n)||(a.add(n),t.push(e))}else t.push(e);var p}),(0,i.__assign)((0,i.__assign)({},e),{definitions:t})}function c(e){var a=l(e);if(!o.has(a)){var t=(0,n.qg)(e,{experimentalFragmentVariables:p,allowLegacyFragmentVariables:p});if(!t||"Document"!==t.kind)throw new Error("Not a valid GraphQL document.");o.set(a,function(e){var a=new Set(e.definitions);a.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var i=e[t];i&&"object"==typeof i&&a.add(i)})});var t=e.loc;return t&&(delete t.startToken,delete t.endToken),e}(d(t)))}return o.get(a)}function u(e){for(var a=[],t=1;t<arguments.length;t++)a[t-1]=arguments[t];"string"==typeof e&&(e=[e]);var i=e[0];return a.forEach(function(a,t){a&&"Document"===a.kind?i+=a.loc.source.body:i+=a,i+=e[t+1]}),c(i)}function m(){o.clear(),r.clear()}function f(){s=!1}function v(){p=!0}function h(){p=!1}var g,y=u,b=m,D=f,x=v,_=h;(g=u||(u={})).gql=y,g.resetCaches=b,g.disableFragmentWarnings=D,g.enableExperimentalFragmentVariables=x,g.disableExperimentalFragmentVariables=_,u.default=u;const w=u},96525:e=>{e.exports=function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,n,o,r,s=[],p=!0,l=!1;try{if(o=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;p=!1}else for(;!(p=(i=o.call(t)).done)&&(s.push(i.value),s.length!==a);p=!0);}catch(e){l=!0,n=e}finally{try{if(!p&&null!=t.return&&(r=t.return(),Object(r)!==r))return}finally{if(l)throw n}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},98438:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},98472:(e,a,t)=>{t.d(a,{Ey:()=>v,JG:()=>p,MQ:()=>F,Z_:()=>l,qA:()=>f});var i=t(59841),n=t(59762),o=t(67714),r=t(25881),s=t(12039);class p{constructor(e){const a=new n.ou(s.Y.SOF,0,0,0,0);this.source=e,this.lastToken=a,this.token=a,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==s.Y.EOF)do{if(e.next)e=e.next;else{const a=h(this,e.end);e.next=a,a.prev=e,e=a}}while(e.kind===s.Y.COMMENT);return e}}function l(e){return e===s.Y.BANG||e===s.Y.DOLLAR||e===s.Y.AMP||e===s.Y.PAREN_L||e===s.Y.PAREN_R||e===s.Y.DOT||e===s.Y.SPREAD||e===s.Y.COLON||e===s.Y.EQUALS||e===s.Y.AT||e===s.Y.BRACKET_L||e===s.Y.BRACKET_R||e===s.Y.BRACE_L||e===s.Y.PIPE||e===s.Y.BRACE_R}function d(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function c(e,a){return u(e.charCodeAt(a))&&m(e.charCodeAt(a+1))}function u(e){return e>=55296&&e<=56319}function m(e){return e>=56320&&e<=57343}function f(e,a){const t=e.source.body.codePointAt(a);if(void 0===t)return s.Y.EOF;if(t>=32&&t<=126){const e=String.fromCodePoint(t);return'"'===e?"'\"'":`"${e}"`}return"U+"+t.toString(16).toUpperCase().padStart(4,"0")}function v(e,a,t,i,o){const r=e.line,s=1+t-e.lineStart;return new n.ou(a,t,i,r,s,o)}function h(e,a){const t=e.source.body,n=t.length;let o=a;for(;o<n;){const a=t.charCodeAt(o);switch(a){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===t.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return g(e,o);case 33:return v(e,s.Y.BANG,o,o+1);case 36:return v(e,s.Y.DOLLAR,o,o+1);case 38:return v(e,s.Y.AMP,o,o+1);case 40:return v(e,s.Y.PAREN_L,o,o+1);case 41:return v(e,s.Y.PAREN_R,o,o+1);case 46:if(46===t.charCodeAt(o+1)&&46===t.charCodeAt(o+2))return v(e,s.Y.SPREAD,o,o+3);break;case 58:return v(e,s.Y.COLON,o,o+1);case 61:return v(e,s.Y.EQUALS,o,o+1);case 64:return v(e,s.Y.AT,o,o+1);case 91:return v(e,s.Y.BRACKET_L,o,o+1);case 93:return v(e,s.Y.BRACKET_R,o,o+1);case 123:return v(e,s.Y.BRACE_L,o,o+1);case 124:return v(e,s.Y.PIPE,o,o+1);case 125:return v(e,s.Y.BRACE_R,o,o+1);case 34:return 34===t.charCodeAt(o+1)&&34===t.charCodeAt(o+2)?N(e,o):D(e,o)}if((0,r.yp)(a)||45===a)return y(e,o,a);if((0,r.un)(a))return F(e,o);throw(0,i.I)(e.source,o,39===a?"Unexpected single quote character ('), did you mean to use a double quote (\")?":d(a)||c(t,o)?`Unexpected character: ${f(e,o)}.`:`Invalid character: ${f(e,o)}.`)}return v(e,s.Y.EOF,n,n)}function g(e,a){const t=e.source.body,i=t.length;let n=a+1;for(;n<i;){const e=t.charCodeAt(n);if(10===e||13===e)break;if(d(e))++n;else{if(!c(t,n))break;n+=2}}return v(e,s.Y.COMMENT,a,n,t.slice(a+1,n))}function y(e,a,t){const n=e.source.body;let o=a,p=t,l=!1;if(45===p&&(p=n.charCodeAt(++o)),48===p){if(p=n.charCodeAt(++o),(0,r.yp)(p))throw(0,i.I)(e.source,o,`Invalid number, unexpected digit after 0: ${f(e,o)}.`)}else o=b(e,o,p),p=n.charCodeAt(o);if(46===p&&(l=!0,p=n.charCodeAt(++o),o=b(e,o,p),p=n.charCodeAt(o)),69!==p&&101!==p||(l=!0,p=n.charCodeAt(++o),43!==p&&45!==p||(p=n.charCodeAt(++o)),o=b(e,o,p),p=n.charCodeAt(o)),46===p||(0,r.un)(p))throw(0,i.I)(e.source,o,`Invalid number, expected digit but got: ${f(e,o)}.`);return v(e,l?s.Y.FLOAT:s.Y.INT,a,o,n.slice(a,o))}function b(e,a,t){if(!(0,r.yp)(t))throw(0,i.I)(e.source,a,`Invalid number, expected digit but got: ${f(e,a)}.`);const n=e.source.body;let o=a+1;for(;(0,r.yp)(n.charCodeAt(o));)++o;return o}function D(e,a){const t=e.source.body,n=t.length;let o=a+1,r=o,p="";for(;o<n;){const n=t.charCodeAt(o);if(34===n)return p+=t.slice(r,o),v(e,s.Y.STRING,a,o+1,p);if(92===n){p+=t.slice(r,o);const a=117===t.charCodeAt(o+1)?123===t.charCodeAt(o+2)?x(e,o):_(e,o):T(e,o);p+=a.value,o+=a.size,r=o;continue}if(10===n||13===n)break;if(d(n))++o;else{if(!c(t,o))throw(0,i.I)(e.source,o,`Invalid character within String: ${f(e,o)}.`);o+=2}}throw(0,i.I)(e.source,o,"Unterminated string.")}function x(e,a){const t=e.source.body;let n=0,o=3;for(;o<12;){const e=t.charCodeAt(a+o++);if(125===e){if(o<5||!d(n))break;return{value:String.fromCodePoint(n),size:o}}if(n=n<<4|E(e),n<0)break}throw(0,i.I)(e.source,a,`Invalid Unicode escape sequence: "${t.slice(a,a+o)}".`)}function _(e,a){const t=e.source.body,n=w(t,a+2);if(d(n))return{value:String.fromCodePoint(n),size:6};if(u(n)&&92===t.charCodeAt(a+6)&&117===t.charCodeAt(a+7)){const e=w(t,a+8);if(m(e))return{value:String.fromCodePoint(n,e),size:12}}throw(0,i.I)(e.source,a,`Invalid Unicode escape sequence: "${t.slice(a,a+6)}".`)}function w(e,a){return E(e.charCodeAt(a))<<12|E(e.charCodeAt(a+1))<<8|E(e.charCodeAt(a+2))<<4|E(e.charCodeAt(a+3))}function E(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function T(e,a){const t=e.source.body;switch(t.charCodeAt(a+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw(0,i.I)(e.source,a,`Invalid character escape sequence: "${t.slice(a,a+2)}".`)}function N(e,a){const t=e.source.body,n=t.length;let r=e.lineStart,p=a+3,l=p,u="";const m=[];for(;p<n;){const n=t.charCodeAt(p);if(34===n&&34===t.charCodeAt(p+1)&&34===t.charCodeAt(p+2)){u+=t.slice(l,p),m.push(u);const i=v(e,s.Y.BLOCK_STRING,a,p+3,(0,o.OC)(m).join("\n"));return e.line+=m.length-1,e.lineStart=r,i}if(92!==n||34!==t.charCodeAt(p+1)||34!==t.charCodeAt(p+2)||34!==t.charCodeAt(p+3))if(10!==n&&13!==n)if(d(n))++p;else{if(!c(t,p))throw(0,i.I)(e.source,p,`Invalid character within String: ${f(e,p)}.`);p+=2}else u+=t.slice(l,p),m.push(u),13===n&&10===t.charCodeAt(p+1)?p+=2:++p,u="",l=p,r=p;else u+=t.slice(l,p),l=p+1,p+=4}throw(0,i.I)(e.source,p,"Unterminated string.")}function F(e,a){const t=e.source.body,i=t.length;let n=a+1;for(;n<i;){const e=t.charCodeAt(n);if(!(0,r.xr)(e))break;++n}return v(e,s.Y.NAME,a,n,t.slice(a,n))}},98706:(e,a,t)=>{const i=t(78323);a.implementation=class{constructor(e){const a=e[0],t=e[1];let n=null;if(void 0!==t&&(n=i.basicURLParse(t),"failure"===n))throw new TypeError("Invalid base URL");const o=i.basicURLParse(a,{baseURL:n});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return i.serializeURL(this._url)}set href(e){const a=i.basicURLParse(e);if("failure"===a)throw new TypeError("Invalid URL");this._url=a}get origin(){return i.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){i.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){i.cannotHaveAUsernamePasswordPort(this._url)||i.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){i.cannotHaveAUsernamePasswordPort(this._url)||i.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?i.serializeHost(e.host):i.serializeHost(e.host)+":"+i.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||i.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":i.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||i.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":i.serializeInteger(this._url.port)}set port(e){i.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:i.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(e){this._url.cannotBeABaseURL||(this._url.path=[],i.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(e){const a=this._url;if(""===e)return void(a.query=null);const t="?"===e[0]?e.substring(1):e;a.query="",i.basicURLParse(t,{url:a,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(e){if(""===e)return void(this._url.fragment=null);const a="#"===e[0]?e.substring(1):e;this._url.fragment="",i.basicURLParse(a,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},99436:e=>{function a(e,a,t,i,n,o,r){try{var s=e[o](r),p=s.value}catch(e){return void t(e)}s.done?a(p):Promise.resolve(p).then(i,n)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise(function(n,o){var r=e.apply(t,i);function s(e){a(r,n,o,s,p,"next",e)}function p(e){a(r,n,o,s,p,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},99690:(e,a,t)=>{const{humanReadableArgName:i}=t(41762);a.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const a=e.commands.filter(e=>!e._hidden),t=e._getHelpCommand();return t&&!t._hidden&&a.push(t),this.sortSubcommands&&a.sort((e,a)=>e.name().localeCompare(a.name())),a}compareOptions(e,a){const t=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return t(e).localeCompare(t(a))}visibleOptions(e){const a=e.options.filter(e=>!e.hidden),t=e._getHelpOption();if(t&&!t.hidden){const i=t.short&&e._findOption(t.short),n=t.long&&e._findOption(t.long);i||n?t.long&&!n?a.push(e.createOption(t.long,t.description)):t.short&&!i&&a.push(e.createOption(t.short,t.description)):a.push(t)}return this.sortOptions&&a.sort(this.compareOptions),a}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const a=[];for(let t=e.parent;t;t=t.parent){const e=t.options.filter(e=>!e.hidden);a.push(...e)}return this.sortOptions&&a.sort(this.compareOptions),a}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(a=>{a.description=a.description||e._argsDescription[a.name()]||""}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){const a=e.registeredArguments.map(e=>i(e)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(a?" "+a:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,a){return a.visibleCommands(e).reduce((e,t)=>Math.max(e,a.subcommandTerm(t).length),0)}longestOptionTermLength(e,a){return a.visibleOptions(e).reduce((e,t)=>Math.max(e,a.optionTerm(t).length),0)}longestGlobalOptionTermLength(e,a){return a.visibleGlobalOptions(e).reduce((e,t)=>Math.max(e,a.optionTerm(t).length),0)}longestArgumentTermLength(e,a){return a.visibleArguments(e).reduce((e,t)=>Math.max(e,a.argumentTerm(t).length),0)}commandUsage(e){let a=e._name;e._aliases[0]&&(a=a+"|"+e._aliases[0]);let t="";for(let a=e.parent;a;a=a.parent)t=a.name()+" "+t;return t+a+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const a=[];if(e.argChoices&&a.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&a.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&a.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&a.push(`env: ${e.envVar}`),a.length>0?`${e.description} (${a.join(", ")})`:e.description}argumentDescription(e){const a=[];if(e.argChoices&&a.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(", ")}`),void 0!==e.defaultValue&&a.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),a.length>0){const t=`(${a.join(", ")})`;return e.description?`${e.description} ${t}`:t}return e.description}formatHelp(e,a){const t=a.padWidth(e,a),i=a.helpWidth||80;function n(e,n){if(n){const o=`${e.padEnd(t+2)}${n}`;return a.wrap(o,i-2,t+2)}return e}function o(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let r=[`Usage: ${a.commandUsage(e)}`,""];const s=a.commandDescription(e);s.length>0&&(r=r.concat([a.wrap(s,i,0),""]));const p=a.visibleArguments(e).map(e=>n(a.argumentTerm(e),a.argumentDescription(e)));p.length>0&&(r=r.concat(["Arguments:",o(p),""]));const l=a.visibleOptions(e).map(e=>n(a.optionTerm(e),a.optionDescription(e)));if(l.length>0&&(r=r.concat(["Options:",o(l),""])),this.showGlobalOptions){const t=a.visibleGlobalOptions(e).map(e=>n(a.optionTerm(e),a.optionDescription(e)));t.length>0&&(r=r.concat(["Global Options:",o(t),""]))}const d=a.visibleCommands(e).map(e=>n(a.subcommandTerm(e),a.subcommandDescription(e)));return d.length>0&&(r=r.concat(["Commands:",o(d),""])),r.join("\n")}padWidth(e,a){return Math.max(a.longestOptionTermLength(e,a),a.longestGlobalOptionTermLength(e,a),a.longestSubcommandTermLength(e,a),a.longestArgumentTermLength(e,a))}wrap(e,a,t,i=40){const n=new RegExp("[\\n][ \\f\\t\\v - \ufeff]+");if(e.match(n))return e;const o=a-t;if(o<i)return e;const r=e.slice(0,t),s=e.slice(t).replace("\r\n","\n"),p=" ".repeat(t),l="\\s",d=new RegExp(`\n|.{1,${o-1}}([${l}]|$)|[^${l}]+?([${l}]|$)`,"g");return r+(s.match(d)||[]).map((e,a)=>"\n"===e?"":(a>0?p:"")+e.trimEnd()).join("\n")}}}},m={};function f(e){var a=m[e];if(void 0!==a)return a.exports;var t=m[e]={id:e,loaded:!1,exports:{}};return u[e].call(t.exports,t,t.exports,f),t.loaded=!0,t.exports}f.m=u,f.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return f.d(a,{a}),a},l=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var t=Object.create(null);f.r(t);var i={};p=p||[null,l({}),l([]),l(l)];for(var n=2&a&&e;("object"==typeof n||"function"==typeof n)&&!~p.indexOf(n);n=l(n))Object.getOwnPropertyNames(n).forEach(a=>i[a]=()=>e[a]);return i.default=()=>e,f.d(t,i),t},f.d=(e,a)=>{for(var t in a)f.o(a,t)&&!f.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((a,t)=>(f.f[t](e,a),a),[])),f.u=e=>e+".js",f.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),d={57:0},c=e=>{var a,t,{__webpack_esm_ids__:i,__webpack_esm_modules__:n,__webpack_esm_runtime__:o}=e,r=0;for(a in n)f.o(n,a)&&(f.m[a]=n[a]);for(o&&o(f);r<i.length;r++)t=i[r],f.o(d,t)&&d[t]&&d[t][0](),d[i[r]]=0},f.f.j=(e,a)=>{var t=f.o(d,e)?d[e]:void 0;if(0!==t)if(t)a.push(t[1]);else{var i=import("./"+f.u(e)).then(c,a=>{throw 0!==d[e]&&(d[e]=void 0),a});i=Promise.race([i,new Promise(a=>t=d[e]=[a])]),a.push(t[1]=i)}};var v=f(99436),h=f(65181);const{DM:g,gu:y,er:b,Ww:D,b7:x,Di:_,a2:w,uB:E,ef:T,c$:N,_V:F}=h;var O=f(88568),A=f(74752),S=f(29790);const C=a("readline");var k,I,$,V=f(50700),R=new E("auth").description("Authentication and token management");R.command("login").description("Login with a one-time passcode from BRICKS Controller (recommended)").argument("[passcode]","One-time passcode from BRICKS Controller").option("-p, --profile <profile>","Profile name to save the token").option("-n, --name <name>","Profile display name").action((k=v(function*(e,a){var t,i,n=a.profile||(0,A.getCurrentProfile)(),o=a.name,r=e;r||(console.log(O.Ay.cyan("Generate a one-time passcode from BRICKS Controller:")),console.log(O.Ay.gray(" 1. Open the link below (or select your workspace first)")),console.log(` ${O.Ay.underline.blue("https://control.bricks.tools/#/?action=manage-tokens")}`),console.log(O.Ay.gray(' 2. Click "Generate OTP" to create a one-time passcode\n')),(r=yield(t="Enter passcode: ",i=C.createInterface({input:process.stdin,output:process.stdout}),new Promise(function(e){i.question(t,function(a){i.close(),e(a.trim())})})))||(console.log(O.Ay.red("Passcode is required")),process.exit(1)));var s=(0,S.default)("Validating passcode...").start();try{var p=(0,V.createPublicClient)((0,A.getBaseUrl)()),l=yield p.checkWorkspaceOTP(r);l.valid||(s.fail(`Invalid passcode: ${l.error||"Unknown error"}`),process.exit(1)),s.text=`Exchanging passcode for token (workspace: ${l.workspaceName})...`;var d=yield p.exchangeWorkspaceOTP(r);d.token||(s.fail("Failed to obtain token"),process.exit(1));var c=(0,V.createClient)((0,A.getBaseUrl)(),d.token),u=yield c.workspace();u||(s.fail("Token validation failed"),process.exit(1)),(0,A.setToken)(n,{token:d.token,name:o||u.name,workspaceId:u._id,workspaceName:u.name}),(0,A.setCurrentProfile)(n),s.succeed(`Logged in to workspace: ${O.Ay.green(u.name)} (profile: ${O.Ay.cyan(n)})`)}catch(e){s.fail(`Login failed: ${e.message}`),process.exit(1)}}),function(e,a){return k.apply(this,arguments)})),R.command("login-token").description("Login with a workspace token directly").option("-t, --token <token>","Workspace token").option("-p, --profile <profile>","Profile name to save the token").option("-n, --name <name>","Profile display name").action((I=v(function*(e){var a=e.profile||(0,A.getCurrentProfile)(),t=e.token,i=e.name;t||(console.error(O.Ay.red("Error: Token is required. Use -t or --token to provide it.")),console.log(O.Ay.gray("\nYou can get a workspace token from BRICKS Controller:")+O.Ay.underline.blue("https://control.bricks.tools/#/?action=manage-tokens")),console.log(` ${O.Ay.underline.blue("https://control.bricks.tools/#/?action=manage-tokens")}`),console.log(O.Ay.gray("Select your workspace and create a new token.\n")),console.log(O.Ay.yellow("Tip: Use `bricks auth login` for a simpler OTP-based login.")),process.exit(1));var n=(0,S.default)("Validating token...").start();try{var o=(0,V.createClient)((0,A.getBaseUrl)(),t),r=yield o.workspace();r||(n.fail("Invalid token or unable to access workspace"),process.exit(1)),(0,A.setToken)(a,{token:t,name:i||r.name,workspaceId:r._id,workspaceName:r.name}),(0,A.setCurrentProfile)(a),n.succeed(`Logged in to workspace: ${O.Ay.green(r.name)} (profile: ${O.Ay.cyan(a)})`)}catch(e){n.fail(`Login failed: ${e.message}`),process.exit(1)}}),function(e){return I.apply(this,arguments)})),R.command("logout").description("Remove saved token").option("-p, --profile <profile>","Profile to remove").option("-a, --all","Remove all profiles").action(($=v(function*(e){var a=e.profile;if(e.all)return(0,A.listProfiles)().forEach(function(e){return(0,A.removeToken)(e.name)}),void console.log(O.Ay.green("All profiles removed"));var t=a||(0,A.getCurrentProfile)();(0,A.getTokenInfo)(t)?((0,A.removeToken)(t),console.log(O.Ay.green(`Logged out from profile: ${t}`))):console.log(O.Ay.yellow(`No token found for profile: ${t}`))}),function(e){return $.apply(this,arguments)})),R.command("status").description("Show current authentication status").action(v(function*(){var e=(0,A.getCurrentProfile)(),a=(0,A.getTokenInfo)(e);if(!a)return console.log(O.Ay.yellow("Not logged in")),void console.log(O.Ay.gray("Use `bricks auth login` to login"));var t=(0,S.default)("Checking connection...").start();try{var i=(0,V.createClient)((0,A.getBaseUrl)(),a.token),n=yield i.workspace();t.stop(),console.log(O.Ay.bold("\nAuthentication Status")),console.log("─".repeat(40)),console.log(`Profile: ${O.Ay.cyan(e)}`),console.log(`Workspace: ${O.Ay.green(n.name)}`),console.log(`Workspace ID: ${O.Ay.gray(n._id)}`);var o=(0,A.getBaseUrl)(),r=a.baseUrl;console.log(`Base URL: ${O.Ay.gray(o)}${r?"":O.Ay.gray(" (global)")}`),console.log(`Logged in: ${O.Ay.gray(a.createdAt)}`),console.log("─".repeat(40))}catch(e){t.fail(`Connection failed: ${e.message}`)}})),R.command("list").description("List all saved profiles").action(function(){var e=(0,A.listProfiles)();if(0===e.length)return console.log(O.Ay.yellow("No saved profiles")),void console.log(O.Ay.gray("Use `bricks auth login` to login"));console.log(O.Ay.bold("\nSaved Profiles")),console.log("─".repeat(60)),e.forEach(function(e){var a=e.current?O.Ay.green("● "):" ",t=e.current?O.Ay.green(e.name):e.name,i=e.baseUrl?O.Ay.gray(` [${e.baseUrl}]`):"";console.log(`${a}${t.padEnd(15)} ${O.Ay.gray(e.workspaceName||"Unknown")}${i}`)}),console.log("─".repeat(60))}),R.command("use <profile>").description("Switch to a different profile").action(function(e){var a=(0,A.getTokenInfo)(e);if(!a)return console.log(O.Ay.red(`Profile not found: ${e}`)),void console.log(O.Ay.gray("Use `bricks auth list` to see available profiles"));(0,A.setCurrentProfile)(e),console.log(O.Ay.green(`Switched to profile: ${e}`)),a.workspaceName&&console.log(O.Ay.gray(`Workspace: ${a.workspaceName}`))}),R.command("set-url <url>").description("Set the base URL for the current profile").option("-g, --global","Set the global base URL instead of per-profile").action(function(e,a){if(a.global)(0,A.setBaseUrl)(e),console.log(O.Ay.green(`Global base URL set to: ${e}`));else{var t=(0,A.getCurrentProfile)();(0,A.setBaseUrl)(e,t),console.log(O.Ay.green(`Base URL for profile ${O.Ay.cyan(t)} set to: ${e}`))}});var j,P,L,B,M,U,q=f(68832),z=f(47336),G=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},Y=function(e){if(!e)return O.Ay.gray("○ Unknown");var a=Date.now()-new Date(e).getTime();if(a<=3e5)return O.Ay.green("● Online");var t=Math.floor(a/6e4);if(t<60)return O.Ay.yellow(`○ Offline (${t}m ago)`);var i=Math.floor(t/60);if(i<24)return O.Ay.red(`○ Offline (${i}h ago)`);var n=Math.floor(i/24);return O.Ay.red(`○ Offline (${n}d ago)`)},Q=new E("device").description("Device management");Q.command("list").description("List all devices").option("-k, --keyword <keyword>","Filter by keyword").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=G(),t=(0,S.default)("Fetching devices...").start();try{var i=yield a.devices({keyword:e.keyword});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No devices found"));console.log(O.Ay.bold("\nDevices")),console.log("─".repeat(80)),i.forEach(function(e){var a,t,i=null==(a=e.entry_detail)||null==(a=a.watch_dog_timer)?void 0:a.last_alive_time,n=Y(i),o=(null==(t=e.entry_detail)||null==(t=t.application)?void 0:t.name)||O.Ay.gray("No app bound");console.log(`${n} ${O.Ay.cyan(e.name||e.device_name)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),console.log(` App: ${o}`),console.log()})}catch(e){t.fail(`Failed to list devices: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),Q.command("get <id>").description("Get device details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=G(),i=(0,S.default)("Fetching device...").start();try{var n,o,r,s=yield t.device({id:e});if(i.stop(),s||(console.log(O.Ay.red("Device not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(s,null,2));var p=null==(n=s.entry_detail)||null==(n=n.watch_dog_timer)?void 0:n.last_alive_time,l=Y(p);if(console.log(O.Ay.bold(`\nDevice: ${s.name||s.device_name}`)),console.log("─".repeat(60)),console.log(`Status: ${l}`),console.log(`ID: ${O.Ay.gray(s._id)}`),console.log(`Device Name: ${s.device_name||O.Ay.gray("N/A")}`),console.log(`Description: ${s.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(o=s.tags)?void 0:o.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(s.create_datetime||"N/A")}`),console.log(`Modified: ${O.Ay.gray(s.last_modify_datetime||"N/A")}`),s.entry_detail){var d,c,u,m,f=s.entry_detail;if(console.log(`\n${O.Ay.bold("Entry Details")}`),console.log(`Type: ${f.type||O.Ay.gray("N/A")}`),console.log(`Unique ID: ${O.Ay.gray(f.unique_id||"N/A")}`),console.log(`Version: ${f.operation_version||O.Ay.gray("N/A")}`),console.log(`Mode: ${f.operation_mode||O.Ay.gray("N/A")}`),Array.isArray(f.screen)&&f.screen.length>0)console.log(`\n${O.Ay.bold("Screens")} (${f.screen.length})`),f.screen.forEach(function(e,a){var t,i=e.resolution,n=i?`${i.width}x${i.height} @${i.scale}x`:"N/A",o=e.master?O.Ay.green(" (master)"):"",r=e.orientation?` [${e.orientation}]`:"",s=null!=(t=e.touch)&&t.available?O.Ay.cyan(` touch:${e.touch.touch_point}pt`):"";console.log(` ${a+1}. ${e.title||"Screen"}${o}${r} - ${n}${s}`)});else if(null!=(d=f.screen)&&d.resolution){var v=f.screen.resolution;console.log(`Resolution: ${v.width}x${v.height} @${v.scale}x`)}var h=null!=f.memory_usage,g=null!=f.disk_usage;if(h||g){if(console.log(`\n${O.Ay.bold("System Resources")}`),h){var y=Array.isArray(f.memory_usage)?f.memory_usage[0]:f.memory_usage,b=Math.round(100*y),D=O.Ay.green;b>80?D=O.Ay.red:b>60&&(D=O.Ay.yellow),console.log(`Memory: ${D(`${b}%`)}`)}if(g){var x=Array.isArray(f.disk_usage)?f.disk_usage[0]:f.disk_usage,_=Math.round(100*x),w=O.Ay.green;_>90?w=O.Ay.red:_>75&&(w=O.Ay.yellow),console.log(`Disk: ${w(`${_}%`)}`)}}var E,T=[];if(null!=(c=f.sound)&&c.available&&T.push("Sound"),null!=(u=f.camera)&&u.available&&T.push("Camera"),null!=(m=f.audio_in)&&m.available&&T.push("Audio Input"),T.length>0)console.log(`\n${O.Ay.bold("Capabilities")}`),console.log(`Available: ${T.join(", ")}`),(null==(E=f.camera)||null==(E=E.channel)?void 0:E.length)>0&&f.camera.channel.forEach(function(e){var a=e.resolution?`${e.resolution.width}x${e.resolution.height}`:"";console.log(` Camera: ${e.title||"Camera"} ${a} [${e.orientation||"N/A"}]`)});if(f.local_sync){var N=f.local_sync;console.log(`\n${O.Ay.bold("Local Sync")}`),console.log(`Role: ${N.is_main?O.Ay.cyan("Main"):"Secondary"}`),null!=N.peer_count&&console.log(`Peers: ${N.peer_count}`),null!=N.mean_latency&&console.log(`Latency: ${N.mean_latency.toFixed(2)}ms`)}if(f.update){var F=f.update;console.log(`\n${O.Ay.bold("Update Status")}`),console.log(`Needs Update: ${F.need_update?O.Ay.yellow("Yes"):O.Ay.green("No")}`),F.current_version&&console.log(`App Version: ${F.current_version}`),F.running_mode&&console.log(`Running Mode: ${F.running_mode}`),F.last_update_at&&console.log(`Last Update: ${O.Ay.gray(F.last_update_at)}`)}if(f.watch_dog_timer){var A=f.watch_dog_timer;console.log(`\n${O.Ay.bold("Watchdog")}`),console.log(`Alive: ${A.alive?O.Ay.green("Yes"):O.Ay.red("No")}`),A.last_launch_time&&console.log(`Last Launch: ${O.Ay.gray(A.last_launch_time)}`),A.last_alive_time&&console.log(`Last Alive: ${O.Ay.gray(A.last_alive_time)}`)}}s.bound_application&&(console.log(`\n${O.Ay.bold("Bound Application")}`),console.log(`Name: ${s.bound_application.name}`),console.log(`ID: ${O.Ay.gray(s.bound_application._id)}`)),null!=(r=s.env)&&r.variables&&Object.keys(s.env.variables).length>0&&(console.log(`\n${O.Ay.bold("Environment Variables")}`),Object.entries(s.env.variables).forEach(function(e){var a=q(e,2),t=a[0],i=a[1];console.log(` ${O.Ay.cyan(t)}: ${i}`)})),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get device: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),Q.command("bind <passcode>").description("Bind a new device using passcode").option("-n, --name <name>","Device name").action((j=v(function*(e,a){var t=G(),i=(0,S.default)("Checking passcode...").start();try{var n,o,r=yield t.checkBindDevicePasscode({passcode:e});r||(i.fail("Invalid passcode or expired"),process.exit(1)),i.text="Binding device...";var s=yield t.createDevice({bindPasscode:e,name:a.name||(null==(n=r.payload)?void 0:n.deviceName)||"CLI Device",deviceName:null==(o=r.payload)?void 0:o.deviceName});i.succeed(`Device bound successfully: ${O.Ay.green(s.name)}`),console.log(O.Ay.gray(`Device ID: ${s._id}`))}catch(e){i.fail(`Failed to bind device: ${e.message}`),process.exit(1)}}),function(e,a){return j.apply(this,arguments)})),Q.command("control <id> <type>").description("Control a device").option("-p, --payload <json>","Event payload as JSON").action((P=v(function*(e,a,t){var i=G(),n=(0,S.default)(`Sending ${a} to device...`).start();try{var o;t.payload&&(o=JSON.parse(t.payload)),yield i.controlDevice({id:e,type:a,eventPayload:o}),n.succeed(`Control event sent: ${O.Ay.green(a)}`)}catch(e){n.fail(`Failed to control device: ${e.message}`),process.exit(1)}}),function(e,a,t){return P.apply(this,arguments)})),Q.command("refresh <id>").description("Refresh device application").action((L=v(function*(e){var a=G(),t=(0,S.default)("Refreshing device...").start();try{yield a.controlDevice({id:e,type:"refresh"}),t.succeed("Device refreshed")}catch(e){t.fail(`Failed to refresh device: ${e.message}`),process.exit(1)}}),function(e){return L.apply(this,arguments)})),Q.command("clear-cache <id>").description("Clear device cache").action((B=v(function*(e){var a=G(),t=(0,S.default)("Clearing cache...").start();try{yield a.controlDevice({id:e,type:"clear-cache"}),t.succeed("Cache cleared")}catch(e){t.fail(`Failed to clear cache: ${e.message}`),process.exit(1)}}),function(e){return B.apply(this,arguments)})),Q.command("screenshot <id>").description("Take device screenshot and save to file").option("-o, --output <path>","Output file path").option("--no-take","Only fetch existing screenshot without taking a new one").action((M=v(function*(e,a){var t=G(),i=(0,S.default)("Fetching workspace info...").start();try{var n,o,r,s=yield t.workspace();null!=s&&null!=(n=s.media_resource)&&n.enable_media_workspace||(i.fail("Media workspace is not enabled for this workspace"),process.exit(1)),s.media_resource.system_media_box_id||(i.fail("No media box configured for this workspace"),process.exit(1)),!1!==a.take&&(i.text="Sending screenshot request to device...",yield t.controlDevice({id:e,type:"take-screenshot"}),i.text="Waiting for device to capture screenshot...",yield new Promise(function(e){return setTimeout(e,3e3)})),i.text="Fetching screenshot...";var p=yield(0,z.he)(t,s,e,a.output);if(p.error&&(i.fail(p.error),process.exit(1)),i.succeed("Screenshot saved"),console.log(),console.log(O.Ay.bold("Screenshot saved to:")),console.log(O.Ay.cyan(p.path)),console.log(),null!=(o=p.file)&&o.meta){var l=p.file.meta,d=l.originalWidth,c=l.originalHeight,u=l.originalFileSize;if(d&&c&&console.log(`${O.Ay.gray("Size:")} ${d}x${c}`),u){var m=(u/1024).toFixed(1);console.log(`${O.Ay.gray("File:")} ${m} KB`)}}null!=(r=p.file)&&r.updatedAt&&console.log(`${O.Ay.gray("Updated:")} ${new Date(p.file.updatedAt).toLocaleString()}`)}catch(e){i.fail(`Failed to get screenshot: ${e.message}`),process.exit(1)}}),function(e,a){return M.apply(this,arguments)})),Q.command("monitor").description("Monitor device status (polls every 60s)").option("-g, --group <id>","Monitor devices in a group").option("-i, --interval <seconds>","Polling interval in seconds","60").action((U=v(function*(e){var a=G(),t=1e3*parseInt(e.interval,10);console.log(O.Ay.bold("\nDevice Monitor")),console.log(O.Ay.gray(`Polling every ${e.interval}s. Press Ctrl+C to stop.\n`));var i,n=(i=v(function*(){try{var t;if(t=e.group?yield a.devicesByGroup({id:e.group}):yield a.devices({}),process.stdout.write("[2J[0f"),console.log(O.Ay.bold("Device Monitor")+O.Ay.gray(` - ${(new Date).toLocaleTimeString()}`)),console.log("─".repeat(80)),!t||0===t.length)return void console.log(O.Ay.yellow("No devices found"));t.forEach(function(e){var a,t,i=null==(a=e.entry_detail)||null==(a=a.watch_dog_timer)?void 0:a.last_alive_time,n=Y(i),o=e.name||e.device_name||e.device_target_name,r=(null==(t=e.entry_detail)||null==(t=t.application)?void 0:t.name)||O.Ay.gray("No app");console.log(`${n} ${O.Ay.cyan(o.padEnd(25))} ${r}`)}),console.log(`\n${O.Ay.gray("Press Ctrl+C to stop")}`)}catch(e){console.error(O.Ay.red(`Error: ${e.message}`))}}),function(){return i.apply(this,arguments)});yield n(),setInterval(n,t)}),function(e){return U.apply(this,arguments)}));var H,J,W,K,X=f(79896),Z=f(35704),ee=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},ae=new E("app").description("Application management");ae.command("new").description("Create a new application").requiredOption("-n, --name <name>","Application name").option("-d, --description <description>","Application description").option("--layout-width <width>","Layout width",parseInt).option("--layout-height <height>","Layout height",parseInt).option("--example <key>","Create from example template").option("--init","Initialize a BRICKS Project after creation").option("-o, --output <dir>","Output directory for --init (default: current directory)").option("-y, --yes","Skip prompts for --init").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=ee(),t=e.json?null:(0,S.default)("Creating application...").start();try{var i={name:e.name};e.description&&(i.description=e.description),e.layoutWidth&&(i.layoutWidth=e.layoutWidth),e.layoutHeight&&(i.layoutHeight=e.layoutHeight),e.example&&(i.createExampleKey=e.example);var n=yield a.createApplication(i);if(e.json&&!e.init?console.log(JSON.stringify(n,null,2)):e.json||(t.succeed(`Application created: ${O.Ay.green(n.name)}`),console.log(` ID: ${O.Ay.gray(n._id)}`),n.description&&console.log(` ${O.Ay.gray(n.description)}`)),e.init){t&&t.stop();var o=(yield Promise.all([f.e(356),f.e(465)]).then(f.bind(f,16465))).initProject;yield o("application",n._id,{output:e.output,yes:e.yes,json:e.json})}}catch(a){e.json?console.error(JSON.stringify({error:a.message})):t.fail(`Failed to create application: ${a.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ae.command("list").description("List all applications").option("-k, --keyword <keyword>","Filter by keyword").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=ee(),t=(0,S.default)("Fetching applications...").start();try{var i=yield a.applications({keyword:e.keyword});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No applications found"));console.log(O.Ay.bold("\nApplications")),console.log("─".repeat(80)),i.forEach(function(e){var a=e.has_unreleased_changes?O.Ay.yellow("●"):O.Ay.green("●"),t=e.current_version?`v${e.current_version}`:O.Ay.gray("no version");console.log(`${a} ${O.Ay.cyan(e.name)} ${O.Ay.gray(t)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),e.description&&console.log(` ${O.Ay.gray(e.description)}`),console.log()})}catch(e){t.fail(`Failed to list applications: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ae.command("get <id>").description("Get application details").option("-c, --composed","Get composed configuration").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ee(),i=(0,S.default)("Fetching application...").start();try{var n,o,r,s,p,l,d=yield t.application({id:e,composed:a.composed});if(i.stop(),d||(console.log(O.Ay.red("Application not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(d,null,2));if(console.log(O.Ay.bold(`\nApplication: ${d.name}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(d._id)}`),console.log(`Description: ${d.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=d.tags)?void 0:n.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(d.create_datetime)}`),console.log(`Modified: ${O.Ay.gray(d.last_modify_datetime)}`),console.log(`\n${O.Ay.bold("Version")}`),d.current_version){if(console.log(`Current: v${d.current_version}`),d.current_version_details){var c=d.current_version_details;c.name&&console.log(`Release Name: ${c.name}`),c.note&&console.log(`Release Note: ${O.Ay.gray(c.note)}`),c.create_datetime&&console.log(`Released At: ${O.Ay.gray(c.create_datetime)}`)}}else console.log(`Current: ${O.Ay.gray("No version")}`);if(console.log(`Unreleased: ${d.has_unreleased_changes?O.Ay.yellow("Yes"):O.Ay.green("No")}`),console.log(`\n${O.Ay.bold("Features")}`),console.log(`Short Edit: ${null!=(o=d.short_edit)&&o.enabled?O.Ay.green("Enabled"):O.Ay.gray("Disabled")}`),null!=(r=d.short_edit)&&r.enabled&&d.short_edit.ref_map){var u=Object.keys(d.short_edit.ref_map).length;console.log(` References: ${u} editable properties`)}console.log(`Automation: ${null!=(s=d.canvas_control)&&s.enable_schedule?O.Ay.green("Scheduled"):O.Ay.gray("No schedule")}`),null!=(p=d.lock)&&p.locked&&console.log(`Locked: ${O.Ay.yellow("Yes")} (at ${d.lock.locked_at||"N/A"})`),d.sync_key&&console.log(`Sync Key: ${O.Ay.gray(d.sync_key)}`),(null==(l=d.devices)?void 0:l.length)>0?(console.log(`\n${O.Ay.bold("Bound Devices")} (${d.devices.length})`),d.devices.forEach(function(e){var a="active"===e.status?O.Ay.green("●"):O.Ay.gray("○"),t=e.frame?O.Ay.gray(` [${e.frame.x||0},${e.frame.y||0} ${e.frame.width}x${e.frame.height}]`):"";console.log(` ${a} ${e.device_id}${t}`)})):console.log(`\n${O.Ay.bold("Bound Devices")}: ${O.Ay.gray("None")}`),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get application: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("update <id>").description("Update application").option("-n, --name <name>","Application name").option("-d, --description <description>","Application description").option("-c, --config <json>","Application config as JSON string").option("-f, --file <path>","Application config from file").option("--validate","Validate configuration").action((H=v(function*(e,a){var t=ee(),i=(0,S.default)("Updating application...").start();try{var n={id:e};a.name&&(n.name=a.name),a.description&&(n.description=a.description),a.validate&&(n.validateConfig=!0),a.config?n.config=a.config:a.file&&(n.config=X.readFileSync(a.file,"utf-8"));var o=yield t.updateApplication(n);i.succeed(`Application updated: ${O.Ay.green(o.name)}`),o.has_unreleased_changes&&console.log(O.Ay.yellow("Note: Application has unreleased changes"))}catch(e){i.fail(`Failed to update application: ${e.message}`),process.exit(1)}}),function(e,a){return H.apply(this,arguments)})),ae.command("short-edit <id>").description("Short edit application properties").requiredOption("-l, --list <json>","Short edit list as JSON array").action(function(){var e=v(function*(e,a){var t=ee(),i=(0,S.default)("Applying short edit...").start();try{var n=JSON.parse(a.list);Array.isArray(n)||(i.fail("List must be a JSON array"),process.exit(1));var o=yield t.shortEditApplication({id:e,list:n});i.succeed(`Short edit applied to: ${O.Ay.green(o.name)}`)}catch(e){i.fail(`Failed to apply short edit: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("short-refs <id>").description("List short edit references for an application").option("-k, --keyword <keyword>","Filter by shortId or title").option("-t, --types <types>","Comma-separated shortId prefixes to include (e.g. B,C,S)").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ee(),i=(0,S.default)("Fetching short edit references...").start();try{var n,o=yield t.application({id:e});if(i.stop(),null==o||null==(n=o.short_edit)||!n.enabled)return void console.log(O.Ay.yellow("Short Edit is not enabled for this application"));var r=a.types?a.types.split(",").map(function(e){return e.trim()}).filter(Boolean):[],s=(0,Z.V)(o.short_edit.ref_map,{keyword:a.keyword,types:r});if(a.json)return void console.log(JSON.stringify(s,null,2));if(0===s.length)return void console.log(O.Ay.yellow("No short edit references found"));console.log(O.Ay.bold(`\nShort Edit References: ${o.name}`)),s.forEach(function(e){console.log(O.Ay.cyan(`\n${e.label} (${e.prefix}_)`)),e.refs.forEach(function(e){var a=e.shortId,t=e.ref,i=null!=t&&t.title?O.Ay.gray(`- ${t.title}`):"";console.log(` ${O.Ay.green(a)} ${i}`)})}),console.log()}catch(e){i.fail(`Failed to fetch short edit references: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("bind <id>").description("Bind devices to application").option("-b, --bind <devices>","Device IDs to bind (comma-separated)").option("-u, --unbind <devices>","Device IDs to unbind (comma-separated)").action(function(){var e=v(function*(e,a){var t=ee(),i=(0,S.default)("Updating device bindings...").start();try{var n={id:e};a.bind&&(n.bindDevices=a.bind.split(",").map(function(e){return e.trim()})),a.unbind&&(n.unbindDevices=a.unbind.split(",").map(function(e){return e.trim()})),yield t.bindApplication(n),i.succeed("Device bindings updated")}catch(e){i.fail(`Failed to update bindings: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("trigger <id> <testId>").description("Trigger automation test on application").option("--play","Play the test",!0).option("--stop","Stop the test").option("--setup-at-launch","Setup to run at app launch").option("-g, --match-group <group>","Match group").action(function(){var e=v(function*(e,a,t){var i=ee(),n=(0,S.default)("Triggering automation...").start();try{yield i.triggerApplicationCanvasControl({id:e,testId:a,play:!t.stop&&t.play,setupAtLaunch:t.setupAtLaunch,matchGroup:t.matchGroup}),n.succeed(`Automation triggered: ${O.Ay.green(a)}`)}catch(e){n.fail(`Failed to trigger automation: ${e.message}`),process.exit(1)}});return function(a,t,i){return e.apply(this,arguments)}}()),ae.command("release <id>").description("Release application to BRICKS platform").requiredOption("-c, --config <path|json>","Application config file path or JSON string").option("--version <version>","Version name").option("--changelogs <text>","Release changelogs").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ee(),i=a.json?null:(0,S.default)("Releasing application...").start();try{var n,o=a.config;(a.config.endsWith(".json")||a.config.includes("/"))&&(X.existsSync(a.config)||(i?i.fail(`Config file not found: ${a.config}`):console.error(JSON.stringify({error:`Config file not found: ${a.config}`})),process.exit(1)),o=X.readFileSync(a.config,"utf-8"));var r=yield t.application({id:e});r||(i?i.fail("Application not found"):console.error(JSON.stringify({error:"Application not found"})),process.exit(1)),null!=(n=r.lock)&&n.enabled&&(i?i.fail("Application is locked"):console.error(JSON.stringify({error:"Application is locked"})),process.exit(1));var s=a.version||r.name||"Untitled",p=a.changelogs?`${a.changelogs}\n\nRelease by BRICKS CLI`:"Release by BRICKS CLI";yield t.releaseApplication({id:e,config:o,releaseCurrentVersion:s,releaseCurrentVersionNote:p}),a.json?console.log(JSON.stringify({success:!0,name:r.name})):i.succeed(`Application released: ${O.Ay.green(r.name)}`)}catch(e){a.json?console.error(JSON.stringify({error:e.message})):i.fail(`Failed to release application: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ae.command("project-pull <id>").description("Pull application source files from BRICKS platform").option("-j, --json","Output as JSON (for programmatic use)").action((J=v(function*(e,a){var t=ee(),i=a.json?null:(0,S.default)("Pulling application project...").start();try{var n,o=yield t.applicationProject({id:e,buildApplicationOnly:!0});o||(i?i.fail("Application project not found"):console.error(JSON.stringify({error:"Application project not found"})),process.exit(1)),a.json?console.log(JSON.stringify(o)):(i.succeed(`Application project fetched: ${O.Ay.green((null==(n=o.files)?void 0:n.length)||0)} files`),console.log(JSON.stringify(o,null,2)))}catch(e){a.json?console.error(JSON.stringify({error:e.message})):i.fail(`Failed to pull application project: ${e.message}`),process.exit(1)}}),function(e,a){return J.apply(this,arguments)})),ae.command("check-config <path>").description("Validate application config against BRICKS schema").option("-j, --json","Output as JSON").action((W=v(function*(e,a){X.existsSync(e)||(console.error(O.Ay.red(`Config file not found: ${e}`)),process.exit(1));var t=(0,S.default)("Validating config...").start();try{var i=X.readFileSync(e,"utf-8"),n=JSON.parse(i),o=yield Promise.all([f.e(428),f.e(425),f.e(890)]).then(f.t.bind(f,38890,19)),r=o.checkConfig,s=o.checkConfigDeprecatedFeatures,p=r(n),l=s(n);if(t.stop(),a.json)return console.log(JSON.stringify(Object.assign({},p,{deprecations:l}),null,2)),void(p.valid||process.exit(1));if(p.valid&&0===l.length)return void console.log(O.Ay.green("✓ Config is valid"));console.log(O.Ay.bold("\nConfig Validation Report")),console.log("─".repeat(60)),p.schema.length>0&&(console.log(O.Ay.red(`\n Schema Errors (${p.schema.length})\n`)),p.schema.forEach(function(e,a){var t,i=e.instancePath||e.dataPath||"/";console.log(` ${O.Ay.red(`${a+1}.`)} ${O.Ay.bold(i)}`),console.log(` ${e.message}`),null!=(t=e.params)&&t.pattern&&console.log(` ${O.Ay.gray(`pattern: ${e.params.pattern}`)}`)})),p.ref.length>0&&(console.log(O.Ay.red(`\n Reference Errors (${p.ref.length})\n`)),p.ref.forEach(function(e,a){console.log(` ${O.Ay.red(`${a+1}.`)} ${O.Ay.bold(e.field)}`),console.log(` ${e.message}`)})),l.length>0&&(console.log(O.Ay.yellow(`\n Deprecation Warnings (${l.length})\n`)),l.forEach(function(e,a){console.log(` ${O.Ay.yellow(`${a+1}.`)} ${O.Ay.bold(e.id)}`),console.log(` ${e.data}`)})),console.log(`\n${"─".repeat(60)}`);var d=p.schema.length+p.ref.length;p.valid?console.log(O.Ay.yellow(`⚠ ${l.length} warning(s)`)):console.log(O.Ay.red(`✗ ${d} error(s)`)+(l.length>0?O.Ay.yellow(`, ${l.length} warning(s)`):"")),p.valid||process.exit(1)}catch(e){t.fail(`Failed to validate config: ${e.message}`),process.exit(1)}}),function(e,a){return W.apply(this,arguments)})),ae.command("project-init <id>").description("Initialize a BRICKS Project from an application").option("-o, --output <dir>","Output directory (default: current directory)").option("--github-actions","Include GitHub Actions workflow (default: true)").option("--no-github-actions","Skip GitHub Actions workflow setup").option("--agents","Include AGENTS.md (default: true)").option("--no-agents","Skip AGENTS.md setup").option("--claude","Include CLAUDE.md (default: true)").option("--no-claude","Skip CLAUDE.md setup").option("--gemini","Include GEMINI.md (default: false)").option("--no-gemini","Skip GEMINI.md setup").option("--install","Run bun install after generation (default: true)").option("--no-install","Skip bun install after generation").option("--git","Initialize git repository (default: true)").option("--no-git","Skip git initialization").option("-y, --yes","Skip prompts and use defaults/flags").option("-j, --json","Output as JSON (for programmatic use)").action((K=v(function*(e,a){var t=(yield Promise.all([f.e(356),f.e(465)]).then(f.bind(f,16465))).initProject;yield t("application",e,a)}),function(e,a){return K.apply(this,arguments)}));var te=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},ie=new E("module").description("Module management");ie.command("new").description("Create a new module").requiredOption("-n, --name <name>","Module name").option("-d, --description <description>","Module description").option("--layout-width <width>","Layout width",parseInt).option("--layout-height <height>","Layout height",parseInt).option("--public","Make module available to all users").option("--allow-modify","Allow users to modify imported module config").option("--init","Initialize a BRICKS Project after creation").option("-o, --output <dir>","Output directory for --init (default: current directory)").option("-y, --yes","Skip prompts for --init").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=te(),t=e.json?null:(0,S.default)("Creating module...").start();try{var i={name:e.name};e.description&&(i.description=e.description),e.layoutWidth&&(i.layoutWidth=e.layoutWidth),e.layoutHeight&&(i.layoutHeight=e.layoutHeight),e.public&&(i.isPublic=!0),e.allowModify&&(i.isAllowModify=!0);var n=yield a.createModule(i);if(e.json&&!e.init?console.log(JSON.stringify(n,null,2)):e.json||(t.succeed(`Module created: ${O.Ay.green(n.name)}`),console.log(` ID: ${O.Ay.gray(n._id)}`),n.description&&console.log(` ${O.Ay.gray(n.description)}`),console.log(` Public: ${n.is_public?O.Ay.green("Yes"):O.Ay.gray("No")}`),console.log(` Allow Modify: ${n.is_allow_modify?O.Ay.green("Yes"):O.Ay.gray("No")}`)),e.init){t&&t.stop();var o=(yield Promise.all([f.e(356),f.e(465)]).then(f.bind(f,16465))).initProject;yield o("module",n._id,{output:e.output,yes:e.yes,json:e.json})}}catch(a){e.json?console.error(JSON.stringify({error:a.message})):t.fail(`Failed to create module: ${a.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ie.command("list").description("List all modules").option("-k, --keyword <keyword>","Filter by keyword").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=te(),t=(0,S.default)("Fetching modules...").start();try{var i=yield a.modules({keyword:e.keyword});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No modules found"));console.log(O.Ay.bold("\nModules")),console.log("─".repeat(80)),i.forEach(function(e){var a=e.current_version?`v${e.current_version}`:O.Ay.gray("no version");console.log(`● ${O.Ay.cyan(e.name)} ${O.Ay.gray(a)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),e.description&&console.log(` ${O.Ay.gray(e.description)}`),console.log()})}catch(e){t.fail(`Failed to list modules: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ie.command("list-public").description("Search public modules").requiredOption("-k, --keyword <keyword>","Search keyword (min 2 characters)").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=(0,V.createClient)((0,A.getBaseUrl)()),t=(0,S.default)("Searching public modules...").start();try{var i=yield a.publicModules({keyword:e.keyword});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No public modules found"));console.log(O.Ay.bold("\nPublic Modules")),console.log("─".repeat(80)),i.forEach(function(e){var a=e.current_version?`v${e.current_version}`:O.Ay.gray("no version");console.log(`● ${O.Ay.cyan(e.name)} ${O.Ay.gray(a)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),e.description&&console.log(` ${O.Ay.gray(e.description)}`),console.log()})}catch(e){t.fail(`Failed to search public modules: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),ie.command("get <id>").description("Get module details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=te(),i=(0,S.default)("Fetching module...").start();try{var n,o,r,s,p,l=yield t.module({id:e});if(i.stop(),l||(console.log(O.Ay.red("Module not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(l,null,2));if(console.log(O.Ay.bold(`\nModule: ${l.name}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(l._id)}`),console.log(`Description: ${l.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=l.tags)?void 0:n.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(l.create_datetime)}`),console.log(`Modified: ${O.Ay.gray(l.last_modify_datetime)}`),console.log(`\n${O.Ay.bold("Version")}`),console.log(`Current: ${l.current_version?`v${l.current_version}`:O.Ay.gray("No version")}`),console.log(`Unreleased: ${l.has_unreleased_changes?O.Ay.yellow("Yes"):O.Ay.green("No")}`),console.log(`\n${O.Ay.bold("Settings")}`),console.log(`Public: ${l.is_public?O.Ay.green("Yes"):O.Ay.gray("No")}`),console.log(`Allow Modify: ${l.is_allow_modify?O.Ay.green("Yes"):O.Ay.gray("No")}`),console.log(`Short Edit: ${null!=(o=l.short_edit)&&o.enabled?O.Ay.green("Enabled"):O.Ay.gray("Disabled")}`),null!=(r=l.short_edit)&&r.enabled&&l.short_edit.ref_map){var d=Object.keys(l.short_edit.ref_map).length;console.log(` References: ${d} editable properties`)}null!=(null==(s=l.use_count)?void 0:s.total_count)&&(console.log(`\n${O.Ay.bold("Usage")}`),console.log(`Used In: ${l.use_count.total_count} application(s)`)),(null==(p=l.expose_properties)?void 0:p.length)>0&&(console.log(`\n${O.Ay.bold("Exposed Properties")} (${l.expose_properties.length})`),l.expose_properties.forEach(function(e){console.log(` - ${O.Ay.cyan(e)}`)})),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get module: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("update <id>").description("Update module").option("-n, --name <name>","Module name").option("-d, --description <description>","Module description").option("-c, --config <json>","Module config as JSON string").option("-f, --file <path>","Module config from file").option("--validate","Validate configuration").action(function(){var e=v(function*(e,a){var t=te(),i=(0,S.default)("Updating module...").start();try{var n={id:e};a.name&&(n.name=a.name),a.description&&(n.description=a.description),a.validate&&(n.validateConfig=!0),a.config?n.config=a.config:a.file&&(n.config=X.readFileSync(a.file,"utf-8"));var o=yield t.updateModule(n);i.succeed(`Module updated: ${O.Ay.green(o.name)}`)}catch(e){i.fail(`Failed to update module: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("short-edit <id>").description("Short edit module properties").requiredOption("-l, --list <json>","Short edit list as JSON array").action(function(){var e=v(function*(e,a){var t=te(),i=(0,S.default)("Applying short edit...").start();try{var n=JSON.parse(a.list);Array.isArray(n)||(i.fail("List must be a JSON array"),process.exit(1));var o=yield t.shortEditModule({id:e,list:n});i.succeed(`Short edit applied to: ${O.Ay.green(o.name)}`)}catch(e){i.fail(`Failed to apply short edit: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("short-refs <id>").description("List short edit references for a module").option("-k, --keyword <keyword>","Filter by shortId or title").option("-t, --types <types>","Comma-separated shortId prefixes to include (e.g. B,C,S)").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=te(),i=(0,S.default)("Fetching short edit references...").start();try{var n,o=yield t.module({id:e});if(i.stop(),null==o||null==(n=o.short_edit)||!n.enabled)return void console.log(O.Ay.yellow("Short Edit is not enabled for this module"));var r=a.types?a.types.split(",").map(function(e){return e.trim()}).filter(Boolean):[],s=(0,Z.V)(o.short_edit.ref_map,{keyword:a.keyword,types:r});if(a.json)return void console.log(JSON.stringify(s,null,2));if(0===s.length)return void console.log(O.Ay.yellow("No short edit references found"));console.log(O.Ay.bold(`\nShort Edit References: ${o.name}`)),s.forEach(function(e){console.log(O.Ay.cyan(`\n${e.label} (${e.prefix}_)`)),e.refs.forEach(function(e){var a=e.shortId,t=e.ref,i=null!=t&&t.title?O.Ay.gray(`- ${t.title}`):"";console.log(` ${O.Ay.green(a)} ${i}`)})}),console.log()}catch(e){i.fail(`Failed to fetch short edit references: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("release <id>").description("Release module to BRICKS platform").requiredOption("-c, --config <path|json>","Module config file path or JSON string").option("--version <version>","Version name").option("--changelogs <text>","Release changelogs").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=te(),i=a.json?null:(0,S.default)("Releasing module...").start();try{var n=a.config;(a.config.endsWith(".json")||a.config.includes("/"))&&(X.existsSync(a.config)||(i?i.fail(`Config file not found: ${a.config}`):console.error(JSON.stringify({error:`Config file not found: ${a.config}`})),process.exit(1)),n=X.readFileSync(a.config,"utf-8"));var o=yield t.module({id:e});o||(i?i.fail("Module not found"):console.error(JSON.stringify({error:"Module not found"})),process.exit(1)),o.is_public&&(i?i.fail("Public module deployment is temporarily not recommended"):console.error(JSON.stringify({error:"Public module deployment is temporarily not recommended"})),process.exit(1));var r=a.version||o.name||"Untitled",s=a.changelogs?`${a.changelogs}\n\nRelease by BRICKS CLI`:"Release by BRICKS CLI";yield t.releaseModule({id:e,config:n,releaseCurrentVersion:r,releaseCurrentVersionNote:s}),a.json?console.log(JSON.stringify({success:!0,name:o.name})):i.succeed(`Module released: ${O.Ay.green(o.name)}`)}catch(e){a.json?console.error(JSON.stringify({error:e.message})):i.fail(`Failed to release module: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("project-pull <id>").description("Pull module source files from BRICKS platform").option("-j, --json","Output as JSON (for programmatic use)").action(function(){var e=v(function*(e,a){var t=te(),i=a.json?null:(0,S.default)("Pulling module project...").start();try{var n,o=yield t.moduleProject({id:e,buildApplicationOnly:!0});if(o||(i?i.fail("Module project not found"):console.error(JSON.stringify({error:"Module project not found"})),process.exit(1)),a.json)console.log(JSON.stringify(o));else i.succeed(`Module project fetched: ${O.Ay.green((null==(n=o.files)?void 0:n.length)||0)} files`),console.log(JSON.stringify(o,null,2))}catch(e){a.json?console.error(JSON.stringify({error:e.message})):i.fail(`Failed to pull module project: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),ie.command("project-init <id>").description("Initialize a BRICKS Project from a module").option("-o, --output <dir>","Output directory (default: current directory)").option("--github-actions","Include GitHub Actions workflow (default: true)").option("--no-github-actions","Skip GitHub Actions workflow setup").option("--agents","Include AGENTS.md (default: true)").option("--no-agents","Skip AGENTS.md setup").option("--claude","Include CLAUDE.md (default: true)").option("--no-claude","Skip CLAUDE.md setup").option("--gemini","Include GEMINI.md (default: false)").option("--no-gemini","Skip GEMINI.md setup").option("--install","Run bun install after generation (default: true)").option("--no-install","Skip bun install after generation").option("--git","Initialize git repository (default: true)").option("--no-git","Skip git initialization").option("-y, --yes","Skip prompts and use defaults/flags").option("-j, --json","Output as JSON (for programmatic use)").action(function(){var e=v(function*(e,a){var t=(yield Promise.all([f.e(356),f.e(465)]).then(f.bind(f,16465))).initProject;yield t("module",e,a)});return function(a,t){return e.apply(this,arguments)}}());var ne=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},oe=3e5,re=function(e){if(!e)return O.Ay.gray("○");var a=Date.now()-new Date(e).getTime();return a<=oe?O.Ay.green("●"):Math.floor(a/6e4)<60?O.Ay.yellow("○"):O.Ay.red("○")},se=new E("group").description("Device Group management");se.command("list").description("List all device groups").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=ne(),t=(0,S.default)("Fetching device groups...").start();try{var i=yield a.deviceGroups({});if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No device groups found"));console.log(O.Ay.bold("\nDevice Groups")),console.log("─".repeat(80)),i.forEach(function(e){var a,t=(null==(a=e.devices)?void 0:a.length)||0;console.log(`● ${O.Ay.cyan(e.name)} ${O.Ay.gray(`(${t} devices)`)}`),console.log(` ID: ${O.Ay.gray(e._id)}`),e.description&&console.log(` ${O.Ay.gray(e.description)}`),console.log()})}catch(e){t.fail(`Failed to list groups: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),se.command("get <id>").description("Get device group details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ne(),i=(0,S.default)("Fetching device group...").start();try{var n,o,r=yield t.deviceGroup({id:e});if(i.stop(),r||(console.log(O.Ay.red("Device group not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(r,null,2));console.log(O.Ay.bold(`\nDevice Group: ${r.name}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(r._id)}`),console.log(`Description: ${r.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=r.tags)?void 0:n.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(r.create_datetime)}`),console.log(`Modified: ${O.Ay.gray(r.last_modify_datetime)}`),(null==(o=r.devices)?void 0:o.length)>0&&(console.log(`\n${O.Ay.bold("Devices")} (${r.devices.length})`),r.devices.forEach(function(e){var a=e.device_target_name||e.device_id;console.log(` - ${a} ${O.Ay.gray(`(${e.device_id})`)}`)})),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get group: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),se.command("devices <id>").description("List devices in a group with status").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ne(),i=(0,S.default)("Fetching devices...").start();try{var n=yield t.devicesByGroup({id:e});if(i.stop(),a.json)return void console.log(JSON.stringify(n,null,2));if(!n||0===n.length)return void console.log(O.Ay.yellow("No devices in this group"));console.log(O.Ay.bold("\nDevices in Group")),console.log("─".repeat(80)),n.forEach(function(e){var a,t,i=null==(a=e.entry_detail)||null==(a=a.watch_dog_timer)?void 0:a.last_alive_time,n=re(i),o=e.name||e.device_name||e.device_target_name,r=(null==(t=e.entry_detail)||null==(t=t.application)?void 0:t.name)||O.Ay.gray("No app");console.log(`${n} ${O.Ay.cyan(o.padEnd(30))} ${r}`)}),console.log("─".repeat(80))}catch(e){i.fail(`Failed to get devices: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),se.command("dispatch <id> <action>").description("Dispatch action to all devices in group").action(function(){var e=v(function*(e,a){var t=ne(),i=(0,S.default)(`Dispatching ${a}...`).start(),n=["refresh","clear-cache","system-menu-open","system-menu-close","system-info-open","system-info-close","local-sync-panel-open","local-sync-panel-close","debug-panel-open","debug-panel-close","logging-on","logging-off","test-panel-open","test-panel-close"];n.includes(a)||(i.fail(`Invalid action. Valid actions: ${n.join(", ")}`),process.exit(1));try{var o=yield t.dispatchDeviceGroupAction({id:e,action:a});i.succeed(`Action dispatched: ${O.Ay.green(a)}`),o&&(console.log(`Success: ${O.Ay.green(o.success||0)}`),console.log(`Failed: ${O.Ay.red(o.failed||0)}`))}catch(e){i.fail(`Failed to dispatch action: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),se.command("refresh <id>").description("Refresh all devices in group").action(function(){var e=v(function*(e){var a=ne(),t=(0,S.default)("Refreshing devices...").start();try{var i=yield a.dispatchDeviceGroupAction({id:e,action:"refresh"});t.succeed("Devices refreshed"),i&&(console.log(`Success: ${O.Ay.green(i.success||0)}`),console.log(`Failed: ${O.Ay.red(i.failed||0)}`))}catch(e){t.fail(`Failed to refresh: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),se.command("monitor <id>").description("Monitor devices in group (polls every 60s)").option("-i, --interval <seconds>","Polling interval in seconds","60").action(function(){var e=v(function*(e,a){var t=ne(),i=1e3*parseInt(a.interval,10);console.log(O.Ay.bold("\nDevice Group Monitor")),console.log(O.Ay.gray(`Polling every ${a.interval}s. Press Ctrl+C to stop.\n`));var n=function(){var a=v(function*(){try{var a=yield Promise.all([t.deviceGroup({id:e}),t.devicesByGroup({id:e})]),i=q(a,2),n=i[0],o=i[1];if(process.stdout.write("[2J[0f"),console.log(O.Ay.bold(`Device Group: ${n.name}`)+O.Ay.gray(` - ${(new Date).toLocaleTimeString()}`)),console.log("─".repeat(80)),!o||0===o.length)return void console.log(O.Ay.yellow("No devices in this group"));var r=0,s=0;o.forEach(function(e){var a,t,i=null==(a=e.entry_detail)||null==(a=a.watch_dog_timer)?void 0:a.last_alive_time,n=re(i),o=e.name||e.device_name||e.device_target_name,p=(null==(t=e.entry_detail)||null==(t=t.application)?void 0:t.name)||O.Ay.gray("No app");i&&Date.now()-new Date(i).getTime()<=oe?r++:s++,console.log(`${n} ${O.Ay.cyan(o.padEnd(30))} ${p}`)}),console.log("─".repeat(80)),console.log(`Online: ${O.Ay.green(r)} Offline: ${O.Ay.red(s)}`),console.log(`\n${O.Ay.gray("Press Ctrl+C to stop")}`)}catch(e){console.error(O.Ay.red(`Error: ${e.message}`))}});return function(){return a.apply(this,arguments)}}();yield n(),setInterval(n,i)});return function(a,t){return e.apply(this,arguments)}}());var pe=f(90147);const le=a("fs/promises");var de=f(16928),ce=f(86090),ue=function(){var e=(0,A.getCurrentProfile)(),a=(0,A.getToken)(e);return a||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1)),(0,V.createClient)((0,A.getBaseUrl)(),a)},me=function(){var e=v(function*(e){var a=yield e.workspace();if(!(0,z.wR)(a))throw new Error("Media workspace not enabled for this workspace")});return function(a){return e.apply(this,arguments)}}(),fe=function(e){var a=e.meta||{};if(!a.originalFileUploaded)return{ready:!1,label:"Uploading"};if("Video"===e.fileType){if(!a.videoThumbOriginalFileKey)return{ready:!1,label:"Processing"};if(!a.convertedFileUploaded)return{ready:!1,label:"Transcoding"}}return{ready:!0,label:"Ready"}},ve=function(e){return e.ready?O.Ay.green(e.label):O.Ay.yellow(e.label)},he=new E("media").description("Media Flow support");he.command("boxes").description("List Media Flow boxes").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=ue(),t=(0,S.default)("Fetching media boxes...").start();try{yield me(a);var i=yield a.mediaBoxes();if(t.stop(),e.json)return void console.log(JSON.stringify(i,null,2));if(!i||0===i.length)return void console.log(O.Ay.yellow("No media boxes found"));console.log(O.Ay.bold("\nMedia Boxes")),console.log("─".repeat(80)),i.forEach(function(e){var a;console.log(`${O.Ay.cyan(e.name||"Unnamed")} ${O.Ay.gray(e.id)}`),e.description&&console.log(` ${e.description}`),null!=(a=e.tags)&&a.length&&console.log(` Tags: ${e.tags.join(", ")}`),null!=e.size&&console.log(` Size: ${e.size}`),console.log()})}catch(e){t.fail(`Failed to list media boxes: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),he.command("box <id>").description("Get Media Flow box details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ue(),i=(0,S.default)("Fetching media box...").start();try{var n,o;yield me(t);var r=yield t.mediaBox({id:e});if(i.stop(),r||(console.log(O.Ay.red("Media box not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(r,null,2));console.log(O.Ay.bold(`\nMedia Box: ${r.name||"Unnamed"}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(r.id)}`),console.log(`Description: ${r.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=r.tags)?void 0:n.join(", "))||O.Ay.gray("None")}`),null!=r.size&&console.log(`Size: ${r.size}`),null!=(o=r.passcodes)&&o.length&&(console.log(`\n${O.Ay.bold("Passcodes")}`),r.passcodes.forEach(function(e){console.log(`- ${e.name||"Passcode"}: ${e.code}`)})),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get media box: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),he.command("files <boxId>").description("List Media Flow files in a box").option("-t, --types <types>","Comma-separated file types to include").option("-u, --user-tag <tag>","Filter by user tag (repeatable)",function(e,a){return[].concat(pe(a),[e])},[]).option("-l, --limit <limit>","Limit results",function(e){return Number.parseInt(e,10)}).option("-o, --offset <offset>","Offset results",function(e){return Number.parseInt(e,10)}).option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ue(),i=(0,S.default)("Fetching media files...").start();try{var n;yield me(t);var o=a.types?a.types.split(",").map(function(e){return e.trim()}).filter(Boolean):void 0,r=null!=(n=a.userTag)&&n.length?a.userTag:void 0,s=yield t.mediaFiles({boxId:e,includeTypes:o,userTags:r,limit:a.limit,offset:a.offset});if(i.stop(),a.json)return void console.log(JSON.stringify(s,null,2));if(!s||0===s.length)return void console.log(O.Ay.yellow("No media files found"));console.log(O.Ay.bold(`\nMedia Files (${s.length})`)),console.log("─".repeat(100)),s.forEach(function(e){var a,t=fe(e);console.log(`${O.Ay.cyan(e.name||"Unnamed")} ${O.Ay.gray(e.id)}`),console.log(` Type: ${e.fileType} Status: ${ve(t)}`),null!=(a=e.userTags)&&a.length&&console.log(` Tags: ${e.userTags.join(", ")}`),e.updatedAt&&console.log(` Updated: ${new Date(e.updatedAt).toLocaleString()}`),console.log()})}catch(e){i.fail(`Failed to list media files: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}()),he.command("file <id>").description("Get Media Flow file details").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a){var t=ue(),i=(0,S.default)("Fetching media file...").start();try{var n,o;yield me(t);var r=yield t.mediaFile({id:e});if(i.stop(),r||(console.log(O.Ay.red("Media file not found")),process.exit(1)),a.json)return void console.log(JSON.stringify(r,null,2));var s=fe(r);console.log(O.Ay.bold(`\nMedia File: ${r.name||"Unnamed"}`)),console.log("─".repeat(60)),console.log(`ID: ${O.Ay.gray(r.id)}`),console.log(`Box ID: ${O.Ay.gray(r.boxId)}`),console.log(`Type: ${r.fileType}`),console.log(`Status: ${ve(s)}`),console.log(`Description: ${r.description||O.Ay.gray("N/A")}`),console.log(`Tags: ${(null==(n=r.userTags)?void 0:n.join(", "))||O.Ay.gray("None")}`),console.log(`Created: ${O.Ay.gray(r.createdAt||"N/A")}`),console.log(`Updated: ${O.Ay.gray(r.updatedAt||"N/A")}`);var p=(0,z.Gu)(r),l=(0,z.Gu)(r,{preferThumbnail:!0});null!=(o=r.meta)&&o.originalFileKey&&console.log(`Original Key: ${O.Ay.gray(r.meta.originalFileKey)}`),p&&console.log(`Original URL: ${O.Ay.gray(p)}`),l&&l!==p&&console.log(`Thumbnail URL: ${O.Ay.gray(l)}`),console.log("─".repeat(60))}catch(e){i.fail(`Failed to get media file: ${e.message}`),process.exit(1)}});return function(a,t){return e.apply(this,arguments)}}());var ge=function(e){var a=e.match(/^(\d+)x(\d+)(?::(\w+))?$/);if(!a)throw new Error(`Invalid image version spec: "${e}". Expected format: WxH or WxH:STRATEGY`);return{width:parseInt(a[1],10),height:parseInt(a[2],10),strategy:(a[3]||"FILL").toUpperCase(),copypreview:!1}},ye=function(){var e=v(function*(e,a,t,i,n){var o=new FormData;Object.entries(a).forEach(function(e){var a=q(e,2),t=a[0],i=a[1];o.append(t,i)}),o.append("file",new Blob([t],{type:n}),i);var r=yield fetch(e,{method:"POST",body:o});if(!r.ok&&204!==r.status){var s=yield r.text().catch(function(){return""});throw new Error(`S3 upload failed (${r.status}): ${s}`)}});return function(a,t,i,n,o){return e.apply(this,arguments)}}(),be=function(){var e=v(function*(e,a,t){var i=[],n=0,o=function(){var a=v(function*(){for(;n<e.length;){var a=n;n+=1,i[a]=yield t(e[a],a)}});return function(){return a.apply(this,arguments)}}(),r=Array.from({length:Math.min(a,e.length)},function(){return o()});return yield Promise.all(r),i});return function(a,t,i){return e.apply(this,arguments)}}();he.command("upload <boxId> <files...>").description("Upload file(s) to a Media Flow box").option("-d, --description <text>","File description","").option("-t, --user-tag <tag>","User tag (repeatable, max 15)",function(e,a){return[].concat(pe(a),[e])},[]).option("--image-version <spec>","Image resize spec as WxH or WxH:STRATEGY (repeatable)",function(e,a){return[].concat(pe(a),[e])},[]).option("--image-version-type <type>","Image output format: jpg or png").option("--enable-ai-analysis","Enable AI analysis on uploaded files").option("--ai-instruction <text>","Custom AI analysis instruction").option("--concurrency <n>","Max concurrent uploads",function(e){return parseInt(e,10)},3).option("-j, --json","Output as JSON").action(function(){var e=v(function*(e,a,t){var i=ue(),n=(0,S.default)("Preparing upload...").start();try{if(yield me(i),t.userTag.length>15)throw new Error("Maximum 15 user tags allowed");var o=t.imageVersion.map(ge),r=t.enableAiAnalysis||!!t.aiInstruction,s=yield Promise.all(a.map(function(){var e=v(function*(e){var a=(0,de.resolve)(e),t=yield(0,le.stat)(a).catch(function(){return null});if(!t||!t.isFile())throw new Error(`Not a file: ${e}`);var i=(0,de.basename)(a);return{filePath:a,fileName:i,contentType:(0,ce.lookup)(i)||"application/octet-stream",size:t.size}});return function(a){return e.apply(this,arguments)}}()));n.stop();var p=s.length;console.log(O.Ay.bold(`\nUploading ${p} file${p>1?"s":""} to box ${O.Ay.gray(e)}...\n`));var l=[];yield be(s,t.concurrency,function(){var a=v(function*(a,n){var s,d,c=`[${n+1}/${p}] ${a.fileName}`,u=(0,S.default)(`${c} — requesting upload...`).start();try{var m=(d=a.contentType)?"image/svg+xml"===d?"FILE":d.startsWith("image/")?"IMAGE":d.startsWith("video/")?"VIDEO":d.startsWith("audio/")?"AUDIO":"FILE":"FILE",f={imageVersions:"IMAGE"===m?o:[],imageVersionType:"IMAGE"===m?t.imageVersionType:void 0,enableAiAnalysis:r,aiCustomInstruction:t.aiInstruction||void 0},v=yield i.createMediaFileUploadRequest({name:a.fileName,description:t.description,boxId:e,fileType:m,contentType:a.contentType,userTags:t.userTag.length>0?t.userTag:[],meta:f});u.text=`${c} — uploading to storage...`;var h=JSON.parse(v.meta.uploadInfo),g=yield(0,le.readFile)(a.filePath);yield ye(h.url,{AWSAccessKeyId:h.AWSAccessKeyId,"Content-Type":h["Content-Type"],key:h.key,Signature:h.Signature,Policy:h.Policy,acl:h.acl},g,a.fileName,a.contentType),u.succeed(`${c} ${O.Ay.green("✓")} ${O.Ay.gray(`(${m}, ${s=a.size,s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:s<1073741824?`${(s/1048576).toFixed(1)} MB`:`${(s/1073741824).toFixed(1)} GB`})`)}`),l.push({file:a.fileName,id:v.id,status:"success",fileType:m,size:a.size})}catch(e){u.fail(`${c} — ${e.message}`),l.push({file:a.fileName,id:null,status:"failed",error:e.message})}});return function(e,t){return a.apply(this,arguments)}}());var d=l.filter(function(e){return"success"===e.status}).length,c=l.filter(function(e){return"failed"===e.status}).length;t.json?console.log(JSON.stringify({boxId:e,results:l,summary:{total:p,success:d,failed:c}},null,2)):(console.log(),0===c?console.log(O.Ay.green(`Uploaded ${d}/${p} files`)):console.log(O.Ay.yellow(`Uploaded ${d}/${p} files (${c} failed)`))),c>0&&process.exit(1)}catch(e){n.fail(`Upload failed: ${e.message}`),process.exit(1)}});return function(a,t,i){return e.apply(this,arguments)}}());var De={prod:"https://display.bricks.tools",beta:"https://display-beta.bricks.tools",dev:"http://localhost:3001"},xe=function(e){var a=Object.entries(De).find(function(a){var t=q(a,2)[1];return e===t});return a?a[0]:null},_e=new E("config").description("CLI configuration management");_e.command("endpoint").argument("[environment]","Environment to use (prod, beta, dev)").description("Show or set the API endpoint environment").option("-p, --profile","Set for current profile instead of global").action(function(e,a){var t=(0,A.getBaseUrl)(),i=xe(t);if(!e)return console.log(O.Ay.bold("\nAPI Endpoint Configuration")),console.log("─".repeat(50)),console.log(`Current URL: ${O.Ay.cyan(t)}`),i?console.log(`Environment: ${O.Ay.green(i)}`):console.log(`Environment: ${O.Ay.yellow("custom")}`),console.log("─".repeat(50)),console.log(O.Ay.gray("\nAvailable environments:")),Object.entries(De).forEach(function(e){var a=q(e,2),i=a[0],n=a[1],o=t===n?O.Ay.green("● "):" ",r=t===n?O.Ay.green(i):i;console.log(`${o}${r.padEnd(8)} ${O.Ay.gray(n)}`)}),console.log(""),void console.log(O.Ay.gray("Usage: bricks config endpoint <prod|beta|dev>"));var n=Object.keys(De);n.includes(e)||(console.error(O.Ay.red(`Invalid environment: ${e}`)),console.log(O.Ay.gray(`Valid options: ${n.join(", ")}`)),process.exit(1));var o=De[e];if(t!==o){if(a.profile){var r=(0,A.getCurrentProfile)();(0,A.setBaseUrl)(o,r),console.log(O.Ay.green(`✓ Endpoint changed to ${e}: ${o} (profile: ${r})`))}else(0,A.setBaseUrl)(o),console.log(O.Ay.green(`✓ Endpoint changed to ${e}: ${o}`));console.log(O.Ay.yellow("\nNote: You may need to re-authenticate if your token is for a different environment.")),console.log(O.Ay.gray("Use `bricks auth status` to check your connection."))}else console.log(O.Ay.yellow(`Already using ${e} environment: ${o}`))}),_e.command("show").description("Show current configuration").option("-j, --json","Output as JSON").action(function(e){var a=(0,A.getBaseUrl)(),t=xe(a);e.json?console.log(JSON.stringify({endpoint:a,environment:t||"custom"},null,2)):(console.log(O.Ay.bold("\nBRICKS CLI Configuration")),console.log("─".repeat(50)),console.log(`API Endpoint: ${O.Ay.cyan(a)}`),t?console.log(`Environment: ${O.Ay.green(t)}`):console.log(`Environment: ${O.Ay.yellow("custom")}`),console.log("─".repeat(50)))});var we=new E("mcp").description("MCP server management");we.command("start").description("Start the BRICKS MCP server in STDIO mode").option("-t, --token <token>","API token (overrides saved token)").action(function(){var e=v(function*(e){var a=(0,A.getCurrentProfile)(),t=e.token||(0,A.getToken)(a);t||(console.error(O.Ay.red("Error: No API token found.")),console.error(O.Ay.gray("Please login first with: bricks auth login <passcode>")),console.error(O.Ay.gray("Or provide a token with: bricks mcp start --token <token>")),process.exit(1));try{var i=(yield Promise.all([f.e(428),f.e(300),f.e(425),f.e(232)]).then(f.bind(f,18232))).startStdioServer;yield i({token:t})}catch(e){console.error(O.Ay.red(`Failed to start MCP server: ${e.message}`)),process.exit(1)}});return function(a){return e.apply(this,arguments)}}());var Ee=new E("devtools").description("DevTools server discovery and connection");Ee.command("scan").description("Scan LAN for DevTools servers via UDP + HTTP").option("-t, --timeout <ms>","Scan timeout in milliseconds","3000").option("-j, --json","Output as JSON").option("--verify","Verify each discovered server via HTTP").option("--udp-only","Skip HTTP subnet probe (UDP only)").option("-p, --port <port>","Port for HTTP probe","19851").action(function(){var e=v(function*(e){var a=(yield Promise.resolve().then(f.bind(f,29790))).default,t=yield f.e(44).then(f.bind(f,12044)),i=t.discoverDevToolsServers,n=t.verifyDevToolsServer,o=t.httpProbeSubnet,r=yield Promise.resolve().then(f.bind(f,74752)),s=r.getCurrentProfile,p=r.getTokenInfo,l=parseInt(e.timeout,10),d=a(`Scanning for DevTools servers (${l}ms)...`).start();try{var c,u=i({timeout:l,idleTimeout:800}),m=e.udpOnly?Promise.resolve([]):(d.text="Scanning via UDP + HTTP probe...",o({port:parseInt(e.port,10),timeout:l})),h=yield Promise.all([u,m]),g=q(h,2),y=g[0],b=g[1],D=[].concat(pe(y),pe(b)),x=new Map;D.forEach(function(e){var a=e.deviceId||`${e.address}:${e.port}`,t=x.get(a);t?(t.addresses.includes(e.address)||t.addresses.push(e.address),"127.0.0.1"===t.address&&"127.0.0.1"!==e.address&&(t.address=e.address),(e.protocols||[]).forEach(function(e){var a,i;null!=(a=t.protocols)&&a.includes(e)||null==(i=t.protocols)||i.push(e)})):x.set(a,Object.assign({},e,{addresses:[e.address]}))});var _=pe(x.values());if(0===_.length)return e.json?(d.stop(),console.log(JSON.stringify([],null,2))):d.info("No DevTools servers found on the network."),void process.exit(0);if(e.verify){d.text=`Verifying ${_.length} server(s)...`;var w=yield Promise.all(_.map(function(){var e=v(function*(e){var a=yield n(e.address,e.port);return Object.assign({},e,{verified:!!a})});return function(a){return e.apply(this,arguments)}}()));_.splice.apply(_,[0,_.length].concat(pe(w)))}if(d.stop(),e.json)return d.stop(),void console.log(JSON.stringify(_,null,2));var E=p(s()),T=(null==E?void 0:E.workspaceId)||null;console.log(O.Ay.bold(`\nFound ${_.length} DevTools server(s)`)),console.log("─".repeat(80)),_.forEach(function(e){var a=!1===e.verified?O.Ay.red("unverified"):O.Ay.green("online"),t=e.hasPasscode?O.Ay.yellow("passcode"):O.Ay.gray("open"),i=(e.protocols||[]).map(function(e){return O.Ay.cyan(e)}).join(", "),n=e.workspaceId&&T&&e.workspaceId===T,o=e.addresses||[e.address],r=o.filter(function(a){return a!==e.address}),s=r.length>0?`${e.address}:${e.port} +${r.length} more`:`${e.address}:${e.port}`;console.log(` ${O.Ay.bold(e.name||"Unknown")} ${O.Ay.gray(`(${s})`)} [${a}]`),r.length>0&&console.log(` Addresses: ${o.map(function(e){return O.Ay.gray(e)}).join(", ")}`);var p=` Protocols: ${i||O.Ay.gray("none")} Auth: ${t}`;if(e.deviceId&&(p+=` Device: ${O.Ay.gray(e.deviceId)}`),console.log(p),e.workspaceId){var l=n?O.Ay.green(`${e.workspaceId} (current profile)`):O.Ay.gray(e.workspaceId);console.log(` Workspace: ${l}`)}}),console.log("─".repeat(80)),console.log(O.Ay.gray(`\nConnect via: devtools://devtools/bundled/js_app.html?ws=<address>:${(null==(c=_[0])?void 0:c.port)||19851}/ws?p=<passcode>`)),process.exit(0)}catch(e){throw d.fail(`Scan failed: ${e.message}`),e}});return function(a){return e.apply(this,arguments)}}()),Ee.command("open <address>").description("Show connection URLs for a DevTools server").option("-p, --port <port>","Server port","19851").option("--verify","Verify server is reachable first").action(function(){var e=v(function*(e,a){var t=parseInt(a.port,10),i=`${e}:${t}`;if(a.verify){var n=(yield Promise.resolve().then(f.bind(f,29790))).default,o=(yield f.e(44).then(f.bind(f,12044))).verifyDevToolsServer,r=n(`Verifying ${i}...`).start(),s=yield o(e,t);s||(r.fail(`Could not reach DevTools server at ${i}`),process.exit(1)),r.succeed(`${s.name||"DevTools"} is reachable`),console.log()}console.log(O.Ay.bold("Connection URLs")),console.log("─".repeat(60)),console.log(` Web UI: ${O.Ay.cyan(`http://${i}`)}`),console.log(` CDP: ${O.Ay.cyan(`devtools://devtools/bundled/js_app.html?ws=${i}/ws?p=<passcode>`)}`),console.log(` MCP: ${O.Ay.cyan(`http://${i}/mcp`)}`),console.log(` MCP SSE: ${O.Ay.cyan(`http://${i}/sse`)}`),console.log(` Info: ${O.Ay.cyan(`http://${i}/devtools/info`)}`),console.log("─".repeat(60)),console.log(),console.log(O.Ay.bold("Authorization")),console.log(" MCP and MCP SSE require a Bearer token header with the device passcode:"),console.log(` ${O.Ay.gray("Authorization: Bearer <passcode>")}`)});return function(a,t){return e.apply(this,arguments)}}());var Te=f(69278),Ne=f(70857),Fe=process.env.BRICKS_PROJECT_DESKTOP_DATA_DIR||de.join(Ne.homedir(),".bricks-project-desktop"),Oe=de.join(Fe,"acp.sock"),Ae=new E("desktop-acp-bridge").description("ACP bridge — connects acpx to the running BRICKS Project Desktop app").action(function(){var e=Te.connect(Oe);e.on("connect",function(){process.stdin.pipe(e),e.pipe(process.stdout)}),e.on("error",function(e){"ENOENT"===e.code||"ECONNREFUSED"===e.code?process.stderr.write(`[acp] Cannot connect to BRICKS Project Desktop.\n Make sure the desktop app is running and ACP is enabled in Settings.\n Socket: ${Oe}\n`):process.stderr.write(`[acp] Connection error: ${e.message}\n`),process.exit(1)}),e.on("close",function(){process.exit(0)})}),Se=function(){var e=v(function*(){var e=process.argv.findIndex(function(e){return"--auth-profile"===e||"-ap"===e});if(-1!==e&&process.argv[e+1]&&((0,A.setProfileOverride)(process.argv[e+1]),process.argv.splice(e,2)),g.name("bricks").description("BRICKS CLI - Command-line interface for BRICKS Workspace API").version("2.23.9").enablePositionalOptions(),g.addCommand(R),g.addCommand(Q),g.addCommand(ae),g.addCommand(ie),g.addCommand(se),g.addCommand(he),g.addCommand(_e),g.addCommand(we),g.addCommand(Ee),g.addCommand(Ae),g.command("interactive").alias("i").description("Start interactive mode with Ink UI").action(v(function*(){try{(0,(yield Promise.all([f.e(63),f.e(775)]).then(f.bind(f,76775))).runInteractiveMode)()}catch(e){console.error(O.Ay.red(`Failed to start interactive mode: ${e.message}`)),process.exit(1)}})),g.command("workspace").alias("ws").description("Show current workspace information").option("-j, --json","Output as JSON").action(function(){var e=v(function*(e){var a=yield Promise.resolve().then(f.bind(f,74752)),t=a.getToken,i=a.getBaseUrl,n=a.getCurrentProfile,o=(yield Promise.resolve().then(f.bind(f,50700))).createClient,r=(yield Promise.resolve().then(f.bind(f,29790))).default,s=t(n());s||(console.error(O.Ay.red("Not logged in. Use `bricks auth login` first.")),process.exit(1));var p=r("Fetching workspace info...").start();try{var l,d,c=o(i(),s),u=yield c.workspace();if(p.stop(),e.json)return void console.log(JSON.stringify(u,null,2));console.log(O.Ay.bold("\nWorkspace Information")),console.log("─".repeat(60)),console.log(`Name: ${O.Ay.green(u.name)}`),console.log(`ID: ${O.Ay.gray(u._id)}`),console.log(`Description: ${u.description||O.Ay.gray("N/A")}`),console.log(`\n${O.Ay.bold("Data")}`),console.log(`Remote Update: ${null!=(l=u.bank)&&l.enable_remote_update?O.Ay.green("Enabled"):O.Ay.gray("Disabled")}`),console.log(`Spacename: ${(null==(d=u.bank)?void 0:d.spacename)||O.Ay.gray("N/A")}`),console.log("─".repeat(60))}catch(e){p.fail(`Failed to get workspace: ${e.message}`),process.exit(1)}});return function(a){return e.apply(this,arguments)}}()),g.on("--help",function(){console.log(""),console.log(O.Ay.bold("Examples:")),console.log(""),console.log(O.Ay.gray(" # Login with a one-time passcode (recommended)")),console.log(" $ bricks auth login <passcode>"),console.log(""),console.log(O.Ay.gray(" # List all devices")),console.log(" $ bricks device list"),console.log(""),console.log(O.Ay.gray(" # Monitor devices in real-time")),console.log(" $ bricks device monitor"),console.log(""),console.log(O.Ay.gray(" # Control a device")),console.log(" $ bricks device refresh <device-id>"),console.log(" $ bricks device control <device-id> clear-cache"),console.log(""),console.log(O.Ay.gray(" # Bind a new device")),console.log(' $ bricks device bind <passcode> -n "My Device"'),console.log(""),console.log(O.Ay.gray(" # List applications")),console.log(" $ bricks app list"),console.log(""),console.log(O.Ay.gray(" # Start interactive mode")),console.log(" $ bricks interactive"),console.log(""),console.log(O.Ay.gray(" # Change API endpoint")),console.log(" $ bricks config endpoint beta"),console.log(""),console.log(O.Ay.gray("Get workspace token from BRICKS Controller:")),console.log(O.Ay.cyan(" https://control.bricks.tools")),console.log(O.Ay.gray(" Go to Workspace Settings > API Token"))}),0===process.argv.slice(2).length)try{return void(0,(yield Promise.all([f.e(63),f.e(775)]).then(f.bind(f,76775))).runInteractiveMode)()}catch(e){console.error(O.Ay.red(`Failed to start interactive mode: ${e.message}`)),process.exit(1)}yield g.parseAsync(process.argv)});return function(){return e.apply(this,arguments)}}();const Ce=Se;export{Ce as default,Se as run};
|