@fugood/bricks-cli 2.24.9 → 2.24.11
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/146.js +1 -0
- package/lib/153.js +1 -1
- package/lib/169.js +1 -0
- package/lib/209.js +1 -0
- package/lib/336.js +1 -0
- package/lib/378.js +1 -0
- package/lib/480.js +1 -0
- package/lib/611.js +1 -0
- package/lib/627.js +1 -0
- package/lib/632.js +1 -0
- package/lib/637.js +1 -0
- package/lib/657.js +1 -0
- package/lib/7.js +1 -0
- package/lib/700.js +863 -0
- package/lib/703.js +1 -1
- package/lib/718.js +1 -0
- package/lib/737.js +226 -226
- package/lib/779.js +1 -1
- package/lib/890.js +1 -1
- package/lib/90.js +1 -0
- package/lib/996.js +1 -0
- package/lib/index.js +1 -863
- package/package.json +1 -1
- package/lib/63.js +0 -1
package/lib/890.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __webpack_esm_id__=890;export const __webpack_esm_ids__=[890];export const __webpack_esm_modules__={1639:(e,t,r)=>{const{v4:a}=r(79194);t.getIDPattern=e=>`^${e}_[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`,t.autoGeneratorIDPrefix="AUTO_GENERATOR_",t.makeId=e=>{let r="";switch(e){case"animation":r="ANIMATION_";break;case"brick":r="BRICK_";break;case"dynamic-brick":r="DYNAMIC_BRICK_";break;case"subspace":r="SUBSPACE_";break;case"canvas":r="CANVAS_";break;case"generator":r="GENERATOR_";break;case"auto-generator":r=t.autoGeneratorIDPrefix;break;case"data":case"property_bank":r="PROPERTY_BANK_DATA_NODE_";break;case"property_bank_command":r="PROPERTY_BANK_COMMAND_NODE_";break;case"property_bank_calc":r="PROPERTY_BANK_COMMAND_MAP_";break;case"automation_map":r="AUTOMATION_MAP_";break;case"test":r="TEST_";break;case"test_case":r="TEST_CASE_";break;case"test_var":r="TEST_VAR_";break;case"state_group":r="BRICK_STATE_GROUP_"}return`${r}${a()}`};const n=/[$()*+.?[\\\]^{|}]/g;t.replaceMultiple=(e,t)=>{const r=Object.keys(t).sort((e,t)=>t.length-e.length);if(0===r.length)return e;const a=new RegExp(r.map(e=>e.replace(n,"\\$&")).join("|"),"g");return e.replace(a,e=>t[e])}},5982:(e,t,r)=>{const{getIDPattern:a}=r(1639),n=a("BRICK_STATE_GROUP");e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/state_group.schema.json5",title:"State Group",description:"A state group config",type:"object",patternProperties:{[n]:{type:"object",properties:{title:{type:"string",description:"State Group Title"},description:{type:"string",description:"State Group Description"},conds:{type:"array",items:{type:"object",properties:{type:{type:"string",enum:["property_bank","property_bank_by_item_key","inner_state"]},key:{type:"string"},method:{type:"string",enum:["==","!=",">",">=","<","<="]}}}},commented:{type:"boolean",description:"If true, this state group will not be used."},override:{type:"object",properties:{property:{type:"boolean"},event:{type:"boolean"},outlet:{type:"boolean"},animation:{type:"boolean"}}},break:{type:"boolean",description:"If true, this state group will stop checking next state groups."},property:{type:"object"},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."},outlet:{type:"object"},animation:{type:"object"}}}}}},7436:(e,t,r)=>{const{docs:a}=r(5867),n=e=>`^${e}_[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`;t.propertyBank={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/property_bank.schema.json5",title:"Property Bank",description:"A data storage config file.",type:"object",properties:{alias:{type:"string",description:"Optional alias for this data node, used as variable name in code generation."},linkedFrom:{type:["string","null"],description:"ID of linked from another subspace or not",pattern:n("SUBSPACE")},title:{type:"string",description:"This property bank's name."},description:{type:"string",description:"This property bank's description."},type:{type:"string",enum:["string","number","array","object","bool","any"]},routing:{type:["string","null"],enum:["default","read-only"]},preload:{type:["object","null"]},kind:{type:["string","null"]},unit:{type:["string","null"]},value:{},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."},enable_remote_update:{type:["boolean","null"],description:"Enable remote update on this data node. (If Workspace have enable this feature)"},global_remote_update_prop:{type:["string","null"]},use_remote_id_prefix:{type:["boolean","null"]},local_sync:{type:"object",description:"Define property behavior on Local Sync mode.",properties:{update_mode:{type:"string",enum:["all","main-only","minor-only","dont-sync"]}}}},required:["type"]};const p=n("PROPERTY_BANK_(DATA_NODE|COMMAND_NODE)");t.propertyBankCommand={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/property_bank_command.schema.json5",title:"Property Bank Commands",description:"Property Bank Calculation",type:"object",properties:{type:{type:"string",enum:["data-node",...Object.keys(a).map(e=>`command-node-${e}`)]},title:{type:"string",description:"This property bank command's name."},note:{type:"string",description:"This property bank command's note."},properties:{type:"object",description:"The node properties"},in:{type:"object",description:"The node inputs",patternProperties:{"^.+$":{type:["array","null"],items:{type:"object",properties:{port:{type:"string"},id:{type:"string",pattern:p},disable_trigger_command:{type:"boolean"}},required:["id","port"]}}}},out:{type:"object",description:"The node outputs",patternProperties:{"^.+$":{type:["array","null"],items:{type:"object",properties:{port:{type:"string"},id:{type:"string",pattern:p}},required:["id","port"]}}}}},required:["type","properties","in","out"]},t.propertyBankCalcScriptConfig={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/property_bank_calc_script_config.schema.json5",title:"Property Bank Calulation Script Config",description:"JavaScript Sandbox calculation config",type:"object",properties:{code:{type:["string","null"]},inputs:{type:"object",patternProperties:{[n("PROPERTY_BANK_DATA_NODE")]:{type:"string"}},additionalProperties:!1},output:{type:["string","null"]},error:{type:["string","null"]},outputs:{type:"object",patternProperties:{"^.+$":{type:"array",items:{type:"string",pattern:n("PROPERTY_BANK_DATA_NODE")}}}}},required:["inputs","outputs","code"]}},12062:(e,t)=>{t.checkMethodFinished=e=>{const[t,...r]=e;switch(t){case"brick_press":{const[,e]=r;return!!e}case"wait_until_brick_exists":case"brick_exists":{const[,e]=r;return!!e}case"wait_until_canvas_change":{const[,e]=r;return!!e}case"wait_until_event_trigger":{const[,e,t]=r;return!!e&&!!t}case"keydown":case"keyup":{const[e,t]=r;return!!e||!!t}case"http_request":{const[e]=r;return!!e}case"assert_property":case"wait_until_property_change":{const[,e,t]=r;return!!e&&void 0!==t}case"execute_action":{const[,e,t]=r;return!!e&&!!t}case"match_screenshot":const[e]=r;return!!e;case"delay":case"do_nothing":return!0;default:return!1}}},18501:(e,t,r)=>{const{docs:a}=r(5867);t.isCommand=e=>Boolean(e&&e.type&&e.type.startsWith("command-node-")),t.getPorts=e=>e?Array.isArray(e)?e:[e]:[];t.getCommandCallbackFromPort=(e,r)=>{const n=e[r];if(!t.isCommand(n))return null;const p=(e=>a[e.type.replace("command-node-","")]?.commands?.[e.properties?.command])(n);return p?.iterateeFrom||p?.invocationFrom||null},t.checkDisableTriggerCommand=(e,r)=>t.getPorts(e[r.id]?.in?.[r.port]).some(e=>e?.disable_trigger_command);const n=(e,r,a)=>!(!r||!e[r.id])&&(r.port!==((e,r,a)=>(a.has(r)||a.set(r,t.getCommandCallbackFromPort(e,r)),a.get(r)))(e,r.id,a)&&!t.checkDisableTriggerCommand(e,r));t.findCircularReferenceIds=e=>{const r=(e=>{const r=new Map;return Object.keys(e).reduce((a,p)=>{const o=[];return Object.values(e[p]?.out||{}).forEach(a=>{t.getPorts(a).forEach(t=>{n(e,t,r)&&o.push(t.id)})}),a[p]=o,a},{})})(e),a=new Map;return Object.keys(e).filter(t=>"data-node"===e[t]?.type).filter(e=>((e,t,r)=>{if(r.has(e))return r.get(e);const a=[{id:e,edgeIndex:0,reachesCycle:!1}],n=new Set([e]);for(;a.length>0;){const e=a[a.length-1],p=t[e.id]||[];if(e.reachesCycle||e.edgeIndex>=p.length){n.delete(e.id),r.set(e.id,e.reachesCycle),a.pop(),e.reachesCycle&&a.length>0&&(a[a.length-1].reachesCycle=!0);continue}const o=p[e.edgeIndex];e.edgeIndex+=1,r.has(o)?r.get(o)&&(e.reachesCycle=!0):n.has(o)?e.reachesCycle=!0:(n.add(o),a.push({id:o,edgeIndex:0,reachesCycle:!1}))}return r.get(e)||!1})(e,r,a))},t.hasCircularReference=e=>t.findCircularReferenceIds(e).length>0,t.composeMap=e=>Object.values(e).reduce((e,r)=>Object.entries(r?.map||{}).reduce((e,[r,a])=>{if(e[r]){if(t.isCommand(a))throw new Error(`Doesn't allow same command id in another map, ${r}`);const n=e[r];Object.keys(a?.in||{}).forEach(e=>{a.in[e]&&(n.in[e]=(n.in[e]||[]).concat(a.in[e]).filter(Boolean))}),Object.keys(a?.out||{}).forEach(e=>{a.out[e]&&(n.out[e]=(n.out[e]||[]).concat(a.out[e]).filter(Boolean))})}else e[r]={...a,in:{...a?.in},out:{...a?.out}};return e},e),{})},24090:e=>{e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/animation.schema.json5",title:"Animtation",description:"A brick animation config",type:"object",oneOf:[{properties:{alias:{type:"string"},title:{type:"string"},description:{type:"string"},animationRunType:{type:"string",enum:["once","loop"]},type:{type:"string",enum:["timing","decay","spring"]},property:{type:"string",enum:["opacity","transform.translateX","transform.translateY","transform.scale","transform.scaleX","transform.scaleY","transform.rotate","transform.rotateX","transform.rotateY"]},config:{type:"object"}},required:["type","property","config"]},{properties:{alias:{type:"string"},title:{type:"string"},compose_type:{type:"string",enum:["parallel","sequence"]},item_list:{type:"array",items:{type:"object",properties:{animation_id:{type:"string"}}}}},required:["compose_type","item_list"]}]}},27449:(e,t,r)=>{const{getIDPattern:a}=r(1639);e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/brick.schema.json5",title:"Brick",description:"A brick config",type:"object",properties:{alias:{type:"string",description:"Optional alias for this brick, used as variable name in code generation."},title:{type:"string",description:"This brick's name."},description:{type:"string",description:"This brick's description."},template_key:{type:"string"},property:{type:"object"},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."},outlet:{type:"object",patternProperties:{"^BRICK_(.)+$":{type:"string",pattern:a("PROPERTY_BANK_DATA_NODE")}},additionalProperties:!1},state_group:{$ref:"http://display.bricks.tools/state_group.schema.json5",description:"Use state group to describe how to transform property, event and outlet."},primary_component:{type:"boolean",default:!1,description:"Mark this brick as a primary component for easier discovery in Runtime Editor."}},required:["template_key"]}},37517:(e,t,r)=>{const{composeMap:a,findCircularReferenceIds:n}=r(18501);e.exports=function(e){const t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{if(r.module?.link)return;const p=r.property_bank_calc_map;if(!p||0===Object.keys(p).length)return;const o=`subspace_map.${e}.property_bank_calc_map`;try{const e=a(p),r=n(e);if(r.length>0){const a=r.slice(0,5).map(t=>e[t].title||t),n=r.length>5?` and ${r.length-5} more`:"";t.push({field:o,message:`Circular reference detected in data calculation. Affected nodes: ${a.join(", ")}${n}. Please check the data connections for loops.`})}}catch(e){t.push({field:o,message:e.message})}}),t}},38890:(e,t,r)=>{const{getDocByTemplateKey:a}=r(63981),n=r(80211),p=r(45907),o=r(37517),i=r(78078),{getBrickName:s}=r(86343);t.checkConfigDeprecatedFeatures=e=>{const t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{Object.entries(r.brick_map||{}).forEach(([n,p])=>{void 0===p.property?.borderLeftWidth&&void 0===p.property?.borderRightWidth&&void 0===p.property?.borderTopWidth&&void 0===p.property?.borderBottomWidth||t.push({id:n,name:"Used Deprecated Feature",data:`In v2.16, we have been changed \`Border Width\` to \`Border Size\` (Unit \`px\` to \`grid\`). The \`${s("brick",p,n)}\` brick still used the border width. Please re-edit it to transfer to the new unit.`});const o=a(p.template_key);o?.brickMeta?.deprecated&&t.push({id:n,name:"Used Deprecated Feature",data:`The \`${s("brick",p,n)}\` brick in \`${s("subspace",r,e)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`})}),Object.entries(r.generator_map||{}).forEach(([n,p])=>{const o=a(p.template_key);o?.brickMeta?.deprecated&&t.push({id:n,name:"Used Deprecated Feature",data:`The \`${s("brick",p,n)}\` brick in \`${s("subspace",r,e)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`})})}),t},t.checkConfig=(e,t={})=>{const r={schema:n(e),ref:p(e,t),calc:t.checkCalc?o(e):[],expression:t.checkExpressions?i(e):[]};return r.valid=0===r.schema.length&&0===r.ref.length&&0===r.calc.length&&0===r.expression.length,r.message=r.schema.concat(r.ref).concat(r.calc).concat(r.expression).map(({instancePath:e,field:t,message:r})=>{const a=e||t;return a?`${a}: ${r}`:r}).join("\n"),r}},45907:(e,t,r)=>{const{getDocByTemplateKey:a}=r(63981),{systemActions:n}=r(49741),{checkMethodFinished:p}=r(12062),o=(e,t,r)=>{const a=e[t];return a?r?!r[a]&&`The entry of \`${t}\` is not defined in the map.`:"The map is not defined":`\`${t}\` is not defined.`},i=(e,t=[])=>{t.forEach(t=>{e.push(t)})},s="PROPERTY_BANK#",c=[],d=["BRICK_GRID","BRICK_STICKER","BRICK_CHART_LINE","BRICK_CHART_BAR","BRICK_CHART_PIE","BRICK_CHART_PROGRESS","BRICK_3D_VIEWER","GENERATOR_PROMPT","GENERATOR_MEDIA_RESOURCE","GENERATOR_TEXT_INPUT_CONTROLLER","GENERATOR_CAMERA_CONTROLLER","GENERATOR_WEBVIEW_CONTROLLER","GENERATOR_FILE_READER","GENERATOR_URL_FILE_SYNC","GENERATOR_TENSORFLOW_INFERENCE","GENERATOR_TAPPAY_T2P_IOS"],y=(e,t,r,p,o,i,s)=>{const y=[];if(!r)return y.push({field:`${t}.template_key`,message:"`template_key` is not defined."}),y;if(c.includes(r)||d.includes(r))return y;return a(r)?Object.entries(p||{}).reduce((e,[r,p])=>Array.isArray(p)?(p.forEach(({handler:p,action:c,parameter_list:d},y)=>{if("SYSTEM"===p){n[c]||e.push({field:`${t}.event_map.${r}.${y}.action`,message:`SYSTEM action ${c} is not found in the definition.`});const a=n[c];return!a?.canProvideProperty&&d&&d.length>0&&e.push({field:`${t}.event_map.${r}.${y}.parameter_list`,message:`SYSTEM action ${c} is not allowed to provide property.`}),void("PROPERTY_BANK"!==c&&"PROPERTY_BANK_COMMAND"!==c||(d||[]).forEach((a,n)=>{const p=a?.input_to_receiver;"string"==typeof p&&p.startsWith("PROPERTY_BANK_")||e.push({field:`${t}.event_map.${r}.${y}.parameter_list.${n}.input_to_receiver`,message:`SYSTEM action ${c} requires \`input_to_receiver\` to start with \`PROPERTY_BANK_\`.`})}))}const l=i[p]||s[p]||o[p];if(!l)return void e.push({field:`${t}.event_map.${r}.${y}.handler`,message:`The handler ${p} is not found in the brick map, generator map, or subspace map.`});const m=a(l.template_key);if(!m)return;if(!m.actionTypes||!m.actionTypes[c])return void e.push({field:`${t}.event_map.${r}.${y}.action`,message:`The event action ${c} is not defined in the handler ${l.template_key}.`});!m.actionTypes[c].canProvideProperty&&d&&d.length>0&&e.push({field:`${t}.event_map.${r}.${y}.parameter_list`,message:`The event action ${c} in the handler ${l.template_key} is not allowed to provide property.`})}),e):(e.push({field:`${t}.event_map.${r}`,message:"The event content must be an array."}),e),y):(y.push({field:`${t}.template_key`,message:`Template ${r} is not found.`}),y)},l=e=>"string"==typeof e&&e.startsWith("VARIABLE#"),m={brick_press:{subspaceScopedMaps:{0:"subspace",1:"brick_map"}},brick_exists:{subspaceScopedMaps:{0:"subspace",1:"brick_map"}},wait_until_brick_exists:{subspaceScopedMaps:{0:"subspace",1:"brick_map"}},wait_until_canvas_change:{subspaceScopedMaps:{0:"subspace",1:"canvas_map"}},wait_until_event_trigger:{subspaceScopedMaps:{0:"subspace"},dynamicArgs:{1:{name:"sender"}}},assert_property:{subspaceScopedMaps:{0:"subspace",1:"property_bank_map"}},wait_until_property_change:{subspaceScopedMaps:{0:"subspace",1:"property_bank_map"}},execute_action:{subspaceScopedMaps:{0:"subspace"},dynamicArgs:{1:{name:"handler",allowedLiterals:["SYSTEM"]}}}},_=[{prefix:"BRICK_",map:"brick_map"},{prefix:"GENERATOR_",map:"generator_map"},{prefix:"CANVAS_",map:"canvas_map"},{prefix:"PROPERTY_BANK_",map:"property_bank_map"},{prefix:"SUBSPACE_",map:"subspace_map"}],u=(e,t,r,a,n)=>!r||l(r)||n&&n[r]?null:{field:`${e}.run.${t+1}`,message:`The entry \`${r}\` is not defined in \`${a}\`.`},b=(e,t,r,a)=>{const n=[],[p,...o]=t||[],i=m[p];if(!i)return n;const s=Object.entries(i.subspaceScopedMaps||{}).find(([,e])=>"subspace"===e)?.[0],c=(null!=s?o[Number(s)]:void 0)||a,d=c&&!l(c)?r[c]:null;return Object.entries(i.subspaceScopedMaps||{}).forEach(([t,a])=>{const p=Number(t),i=o[p];if("subspace"===a){const t=u(e,p,i,"subspace_map",r);return void(t&&n.push(t))}if(!d)return;const s=u(e,p,i,a,d[a]);s&&n.push(s)}),Object.entries(i.dynamicArgs||{}).forEach(([t,a])=>{const p=Number(t),i=o[p];if(!i||l(i))return;if(a.allowedLiterals?.includes(i))return;const s=(e=>"string"!=typeof e?null:_.find(({prefix:t})=>e.startsWith(t))||null)(i);if(!s)return void n.push({field:`${e}.run.${p+1}`,message:`\`${i}\` has no recognizable ID prefix.`});const c="subspace_map"===s.map?r:d?.[s.map];if("subspace_map"!==s.map&&!d)return;const y=u(e,p,i,s.map,c);y&&n.push(y)}),n},E=(e,t,r,a)=>{const n=[];return Object.entries(t?.case_map||{}).forEach(([t,o])=>{o?.commented||p(o?.run||[])&&i(n,b(`${e}.case_map.${t}`,o.run,r,a))}),n};e.exports=function(e,t={}){const r=[],a=o(e,"root_subspace_id",e.subspace_map);return a&&r.push({field:"root_subspace_id",message:a}),Object.entries(e.subspace_map||{}).forEach(([t,a])=>{if(a.module?.link)return;const n=o(a,"root_canvas_id",a.canvas_map);n&&r.push({field:`subspace_map.${t}.root_canvas_id`,message:n}),Object.entries(a.canvas_map||{}).forEach(([n,p])=>{i(r,((e,t=[],r={},a={},n)=>t.reduce((t,p,o)=>{const i={};switch(p.type){case"brick":i.field=`${e}.${o}.brick_id`,p.brick_id?r[p.brick_id]||(i.message="The entry of `brick_id` is not defined in the map."):i.message="`brick_id` is not defined.";break;case"subspace":i.field=`${e}.${o}.subspace_id`,p.subspace_id?a[p.subspace_id]?n===p.subspace_id&&(i.message="Root Subspace can't be referenced as a Canvas item"):i.message="The entry of `subspace_id` is not defined in the map.":i.message="`subspace_id` is not defined."}return i.message&&t.push(i),t},[]))(`subspace_map.${t}.canvas_map.${n}.item_list`,p.item_list,a.brick_map,e.subspace_map,e.root_subspace_id))}),Object.entries(a.brick_map||{}).forEach(([n,p])=>{i(r,((e,t={},r={})=>Object.entries(t).reduce((t,[a,n])=>{const p={field:`${e}.key`};return"string"==typeof n&&n.startsWith(s)&&!r[n.replace(s,"")]&&(p.message=`Property \`${a}\` (content: \`${n}\`) is not defined in the map.`),p.message&&t.push(p),t},[]))(`subspace_map.${t}.brick_map.${n}.property`,p.property,a.property_bank_map)),i(r,y(0,`subspace_map.${t}.brick_map.${n}`,p.template_key,p.event_map,e.subspace_map||{},a.generator_map||{},a.brick_map||{}))}),Object.entries(a.generator_map||{}).forEach(([n,p])=>{i(r,y(0,`subspace_map.${t}.generator_map.${n}`,p.template_key,p.event_map,e.subspace_map||{},a.generator_map||{},a.brick_map||{}))}),Object.entries(a.property_bank_map||{}).forEach(([n,p])=>{i(r,y(0,`subspace_map.${t}.property_bank_map.${n}`,"PROPERTY_BANK",p.event_map,e.subspace_map||{},a.generator_map||{},a.brick_map||{}))})}),t.checkAutomation&&i(r,(e=>{const t=[],r=e.subspace_map||{},a=e.root_subspace_id,n=e.automation_map||{},p=Object.keys(n).length>0;return Object.entries(n).forEach(([e,n])=>{Object.entries(n?.map||{}).forEach(([n,p])=>{i(t,E(`automation_map.${e}.map.${n}`,p,r,a))})}),p||Object.entries(e.test_map||{}).forEach(([e,n])=>{i(t,E(`test_map.${e}`,n,r,a))}),t})(e)),r}},49741:(e,t,r)=>{const a=r(95479),{animationRunTypes:n,autoGeneratedItemIdKind:p}=r(99470);t.systemActionDescriptions={PROPERTY_BANK_EXPRESSION:{default:"","en-us":"Change Data value with script expression. One expression of return value","zh-tw":"使用腳本表達式改變 Data 值。 一個表達式回傳值","ja-jp":"スクリプト式を使用して Data の値を変更する。1つの式で値を返す"},PROPERTY_BANK:{default:"","en-us":"Change Data value","zh-tw":"改變 Data 值","ja-jp":"Data の値を変更する"},PROPERTY_BANK_COMMAND:{default:"","en-us":"Trigger Data calculation flow without value change","zh-tw":"不需改變值,觸發 Data 計算流程","ja-jp":"値を変更せずに Data の計算フローをトリガーする"},DYNAMIC_BRICK:{default:"","en-us":"[Unstable] Dynamically generate bricks","zh-tw":"[Unstable] 動態地産生 Bricks","ja-jp":"動的に生成されたブリック"},DYNAMIC_BRICK_RESET:{default:"","en-us":"[Unstable] Reset Dynamic Bricks","zh-tw":"[Unstable] 重設 Dynamic Bricks","ja-jp":"動的に生成されたブリックをリセットする"},DYNAMIC_ANIMATION:{default:"","en-us":"Run specific Animation on specific Brick","zh-tw":"在指定的 Brick 上運行指定的 Animation","ja-jp":"指定されたブリックで指定されたアニメーションを実行する"},DYNAMIC_ANIMATION_RESET:{default:"","en-us":"Reset Dynamic Animation","zh-tw":"重設 Dynamic Animation","ja-jp":"動的なアニメーションをリセットする"},DYNAMIC_ANIMATION_STOP:{default:"","en-us":"Stop Dynamic Animation","zh-tw":"停止 Dynamic Animation","ja-jp":"動的なアニメーションを停止する"},CHANGE_CANVAS:{default:"","en-us":"Change canvas on the current Subspace","zh-tw":"在當前的 Subspace 中切換 Canvas","ja-jp":"現在の Subspace の Canvas を変更する"},MESSAGE:{default:"","en-us":"Log System message","zh-tw":"Log System message","ja-jp":"システムメッセージをログに記録する"},ALERT:{default:"","en-us":"Show system alert popup with custom message","zh-tw":"顯示自定義訊息的系統警告彈窗","ja-jp":"カスタムメッセージを使用してシステム警告ポップアップを表示する"},POPUP_RESET:{default:"","en-us":"Close current showing popups with type or id.","zh-tw":"關閉目前顯示的 Popup,可以指定 Popup 類型或 id。","ja-jp":"現在表示されているポップアップを閉じる、または ID で指定されたポップアップを閉じる。"},TAKE_SCREENSHOT:{default:"","en-us":"Take screenshot for current subspace or the full viewport (including portal subspaces)","zh-tw":"為當前的 Subspace 截圖,或截取整個顯示畫面(包含 Portal Subspace)","ja-jp":"現在の Subspace またはビューポート全体(Portal Subspace を含む)のスクリーンショットを撮る"},STORAGE_SET:{default:"","en-us":"Store a value in application-specific storage","zh-tw":"在應用程式特定的儲存空間中儲存值","ja-jp":"アプリケーション固有のストレージに値を保存する"},STORAGE_RETRIEVE:{default:"","en-us":"Retrieve a value from application-specific storage","zh-tw":"從應用程式特定的儲存空間中取得值","ja-jp":"アプリケーション固有のストレージから値を取得する"},STORAGE_DELETE:{default:"","en-us":"Delete a value from application-specific storage or clear all values","zh-tw":"從應用程式特定的儲存空間中刪除值或清除所有值","ja-jp":"アプリケーション固有のストレージから値を削除するか、すべての値をクリアする"},CHANNEL_SUBSCRIBE:{default:"","en-us":"Subscribe to a channel for data update","zh-tw":"訂閱一個 Channel 以接收資料更新","ja-jp":"チャンネルを購読してデータ更新を受け取る"},CHANNEL_UNSUBSCRIBE:{default:"","en-us":"Unsubscribe from a channel","zh-tw":"取消訂閱一個 Channel","ja-jp":"チャンネルから購読を解除する"},CHANNEL_PUBLISH:{default:"","en-us":"Publish data to a channel","zh-tw":"發布資料到一個 Channel","ja-jp":"チャンネルにデータを発行する"},DELAY:{default:"","en-us":"Delay for a certain time between actions","zh-tw":"延遲一段時間,用於兩個動作之間","ja-jp":"一定時間遅延する、2つのアクションの間"},USE_SHARE_APPLICATION:{default:"","en-us":"[Internal] Use a shared application","zh-tw":"[Internal] 切換到分享的應用程式","ja-jp":"[Internal] 共有アプリケーションを使用する"},AUTH_IN_DEVICE:{default:"","en-us":"[Internal] Auth in device","zh-tw":"[Internal] 在裝置上進行帳號登入","ja-jp":"[Internal] デバイスで認証する"},REFRESH_BINDCODE:{default:"","en-us":"[Internal] Refresh passcode for bind device","zh-tw":"[Internal] 更新裝置綁定碼","ja-jp":"[Internal] デバイスのバインドコードを更新する"},OPEN_URL:{default:"","en-us":"Open URL","zh-tw":"開啟 URL","ja-jp":"URL を開く"},OPEN_FILE:{default:"","en-us":"Open File or Directory","zh-tw":"開啟檔案或目錄","ja-jp":"ファイルまたはディレクトリを開く"},THROW_EXCEPTION:{default:"","en-us":"Throw exception","zh-tw":"拋出例外","ja-jp":"例外を投げる"},RESTART_FOUNDATION:{default:"","en-us":"Restart the foundation (React Native bundle)","zh-tw":"重新啟動基礎設施 (React Native bundle)","ja-jp":"基盤を再起動する (React Native bundle)"},DISMISS_KEYBOARD:{default:"","en-us":"Dismiss keyboard","zh-tw":"關閉鍵盤","ja-jp":"キーボードを閉じる"},TRIGGER_APPLICATION_FILTER:{default:"","en-us":"Trigger application AI filter","zh-tw":"觸發應用程式 AI 過濾器","ja-jp":"アプリケーション AI フィルターをトリガーする"},STOP_APPLICATION_FILTER:{default:"","en-us":"Stop running application AI filter","zh-tw":"停止運行中的應用程式 AI 過濾器","ja-jp":"実行中のアプリケーション AI フィルターを停止する"},SAVE_UPDATE_SNAPSHOT:{default:"","en-us":"Save update snapshot (from Application Filter or DevTools MCP Server) to media system","zh-tw":"儲存更新快照 (來自 Application Filter 或 DevTools MCP Server) 到媒體系統","ja-jp":"メディアシステムに更新スナップショット (Application Filter または DevTools MCP サーバーから) を保存する"}},t.systemActions={PROPERTY_BANK_EXPRESSION:{displayName:"CHANGE DATA WITH EXPRESSION",canProvideProperty:!0,filterKind:[p],propertyNameType:"defined_properties",property:{EXPRESSION:{type:"string",displayName:"Expression",normalizeDisplayName:!1},VARIABLES:{type:"nested",schema:{type:"object",properties:{id:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Data ID",normalizeDisplayName:!1},key:{type:"string"}},allowNewItem:!0},popover:!0,defaultValue:[]},RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},RESULT_ASSIGN_PATH:{type:"string"},ERROR_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1}},previewIcon:{type:"font-awesome-6pro",name:"bolt",size:14}},PROPERTY_BANK:{displayName:"CHANGE DATA",canProvideProperty:!0,filterKind:[p],propertyNameType:"property_bank",previewIcon:{type:"font-awesome-6pro",name:"bolt",size:14}},PROPERTY_BANK_COMMAND:{displayName:"TRIGGER DATA COMMAND",disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"property_bank",type:"bool",previewIcon:{type:"font-awesome-6pro",name:"bolt",size:16}},DYNAMIC_BRICK:{hidden:"unstable",disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{DYNAMIC_BRICK_ADD_LIST:{type:"string"},DYNAMIC_BRICK_PREFER_AFTER_ITEM_ID:{type:"string"},DYNAMIC_BRICK_RESET:{type:"bool"},DYNAMIC_BRICK_REMOVE_ITEM_ID:{type:"string"},DYNAMIC_BRICK_REMOVE_ITEMS:{type:"string"}},previewIcon:{type:"font-awesome-6pro",name:"grid-2"}},DYNAMIC_BRICK_RESET:{hidden:"unstable",disallowMultiple:!0,canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"rotate-right"}},DYNAMIC_ANIMATION:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{DYNAMIC_ANIMATION_BRICK_ID:{type:"string",kind:"id",idType:"brick"},DYNAMIC_ANIMATION_ANIMATION_ID:{type:"string",kind:"id",idType:"animation"},DYNAMIC_ANIMATION_RUN_TYPE:{type:"oneOf",oneOf:n},DYNAMIC_ANIMATION_RESET_INITIAL_VALUE:{type:"bool"}},previewIcon:{type:"font-awesome-6pro",name:"bars-staggered",size:16}},DYNAMIC_ANIMATION_RESET:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{DYNAMIC_ANIMATION_BRICK_ID:{type:"string",kind:"id",idType:"brick"}},previewIcon:{type:"font-awesome-6pro",name:"rotate-right"}},DYNAMIC_ANIMATION_STOP:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{DYNAMIC_ANIMATION_BRICK_ID:{type:"string",kind:"id",idType:"brick"}},previewIcon:{type:"font-awesome-6pro",name:"stop"}},CHANGE_CANVAS:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{CANVAS_ID:{type:"string",kind:"id",idType:"canvas"},CANVAS_TITLE_LIKE:{type:"string"},CANVAS_KEY_MAP_LIST:{type:"nested",schema:{type:"object",properties:{key:{displayName:"Key",type:"string"},value:{displayName:"Canvas ID",type:"string",kind:"id",idType:"canvas"}},allowNewItem:!0},popover:!0,defaultValue:[]},CANVAS_KEY:{type:"string"}},previewIcon:{type:"font-awesome-6pro",name:"diamond-turn-right",size:16}},MESSAGE:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{SYSTEM_MESSAGE_TYPE:{type:"oneOf",oneOf:["SYSTEM_MESSAGE_TYPE_INFO","SYSTEM_MESSAGE_TYPE_SUCCESS","SYSTEM_MESSAGE_TYPE_WARNING","SYSTEM_MESSAGE_TYPE_ERROR"]},SYSTEM_MESSAGE_TITLE:{type:"string"},SYSTEM_MESSAGE_MESSAGE:{type:"string"}},previewIcon:{type:"font-awesome-6pro",name:"note"}},ALERT:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{ALERT_ID:{type:"string"},ALERT_TYPE:{type:"oneOf",oneOf:["info","success","warning","error"]},ALERT_TITLE:{type:"string"},ALERT_MESSAGE:{type:"string"},ALERT_SELECTIONS:{type:"nested",schema:{type:"object",properties:{label:{type:"string"},color:{type:"string"},value:{type:"string"},disableResult:{type:"bool"}},allowNewItem:!0},popover:!0,defaultValue:[]},ALERT_SELECTION_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},ALERT_TIMEOUT:{type:"number",defaultValue:1e4},ALERT_HIDE_SELECTIONS:{type:"bool"}},previewIcon:{type:"font-awesome-6pro",name:"bell"}},POPUP_RESET:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{POPUP_CLEAR_TYPE:{type:"oneOf",oneOf:["all","alert","generator"]},POPUP_ID:{type:"string"}},previewIcon:{type:"font-awesome-6pro",name:"rotate-right"}},TAKE_SCREENSHOT:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{TAKE_SCREENSHOT_CURRENT_SUBSPACE:{type:"bool"},TAKE_SCREENSHOT_BRICK_ID:{type:"string",kind:"id",idType:"brick",displayName:"Brick ID",normalizeDisplayName:!1},TAKE_SCREENSHOT_FORMAT:{type:"oneOf",oneOf:["jpg","png"]},TAKE_SCREENSHOT_QUALITY:{type:"number",max:1,min:0,step:.1},TAKE_SCREENSHOT_WIDTH:{type:"number"},TAKE_SCREENSHOT_HEIGHT:{type:"number"},TAKE_SCREENSHOT_SAVE_PROPERTY:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1}},previewIcon:{type:"font-awesome-6pro",name:"camera",size:16}},STORAGE_SET:{displayName:"STORAGE SET",canProvideProperty:!0,propertyNameType:"defined_properties",property:{STORAGE_TYPE:{type:"oneOf",oneOf:["persist","in-memory"],displayName:"Storage Type",defaultValue:"persist"},STORAGE_SCOPE:{type:"oneOf",oneOf:["global","subspace"],displayName:"Storage Scope",defaultValue:"global"},STORAGE_KEY:{type:"string",displayName:"Key",normalizeDisplayName:!1},STORAGE_VALUE:{type:"any",displayName:"Value",normalizeDisplayName:!1}},previewIcon:{type:"font-awesome-6pro",name:"database",size:14}},STORAGE_RETRIEVE:{displayName:"STORAGE RETRIEVE",canProvideProperty:!0,propertyNameType:"defined_properties",property:{STORAGE_TYPE:{type:"oneOf",oneOf:["persist","in-memory"],displayName:"Storage Type",defaultValue:"persist"},STORAGE_SCOPE:{type:"oneOf",oneOf:["global","subspace"],displayName:"Storage Scope",defaultValue:"global"},STORAGE_KEY:{type:"string",displayName:"Key",normalizeDisplayName:!1},STORAGE_RETRIEVE_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Result Target"},STORAGE_RETRIEVE_DEFAULT_VALUE:{type:"string",displayName:"Default Value",normalizeDisplayName:!1},STORAGE_RETRIEVE_SKIP_IF_NOT_FOUND:{type:"bool",displayName:"Skip if Not Found",defaultValue:!1}},previewIcon:{type:"font-awesome-6pro",name:"database",size:14}},STORAGE_DELETE:{displayName:"STORAGE DELETE",canProvideProperty:!0,propertyNameType:"defined_properties",property:{STORAGE_TYPE:{type:"oneOf",oneOf:["persist","in-memory"],displayName:"Storage Type",defaultValue:"persist"},STORAGE_SCOPE:{type:"oneOf",oneOf:["global","subspace"],displayName:"Storage Scope",defaultValue:"global"},STORAGE_KEY:{type:"string",displayName:"Key",normalizeDisplayName:!1},STORAGE_DELETE_ALL:{type:"bool",displayName:"Delete All Values",defaultValue:!1}},previewIcon:{type:"font-awesome-6pro",name:"trash",size:14}},CHANNEL_SUBSCRIBE:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{CHANNEL_SUBSCRIBE_KEY:{type:"string"},CHANNEL_SUBSCRIBE_TYPE:{type:"oneOf",oneOf:["on","once"]},CHANNEL_SUBSCRIBE_LIVETIME:{type:"number",kind:"unit",unit:"ms"},CHANNEL_SUBSCRIBE_DATA_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Result"},CHANNEL_SUBSCRIBE_DATA_ASSIGN_LIST:{type:"nested",schema:{type:"object",properties:{path:{displayName:"Object Path",type:"string"},type:{type:"oneOf",oneOf:["any","string","number","bool","array","object"],oneOfEmptyOption:!1,defaultValue:"any"},id:{displayName:"Data ID",type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},required:{type:"bool",defaultValue:!1}},allowNewItem:!0},popover:!0,defaultValue:[]},CHANNEL_SUBSCRIBE_PROGRESS_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Progress"},CHANNEL_SUBSCRIBE_PROGRESS_ASSIGN_LIST:{type:"nested",schema:{type:"object",properties:{path:{displayName:"Object Path",type:"string"},type:{type:"oneOf",oneOf:["any","string","number","bool","array","object"],oneOfEmptyOption:!1,defaultValue:"any"},id:{displayName:"Data ID",type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},required:{type:"bool",defaultValue:!1}},allowNewItem:!0},popover:!0,defaultValue:[]},CHANNEL_SUBSCRIBE_ERROR_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Error"}},previewIcon:{type:"font-awesome-6pro",name:"display",size:16}},CHANNEL_UNSUBSCRIBE:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{CHANNEL_UNSUBSCRIBE_KEY_MATCH:{type:"string"}}},CHANNEL_PUBLISH:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{CHANNEL_PUBLISH_KEY_MATCH:{type:"string"},CHANNEL_PUBLISH_PAYLOAD_TYPE:{type:"oneOf",oneOf:["result","progress","error"]},CHANNEL_PUBLISH_PAYLOAD:{type:"string"}}},DELAY:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{DELAY_TIME:{type:"number",kind:"unit",unit:"ms"}}},USE_SHARE_APPLICATION:{hidden:"internal",canProvideProperty:!0,propertyNameType:"defined_properties",property:{APPLICATION_ID:{type:"string"},RELEASE_VERSION:{type:"string"},USE_TYPE:{type:"oneOf",oneOf:["run","use-after-bind","cancel-use"]},VIEWPORT_PRESET_NAME_LIKE:{type:"string"},VIEWPORT_PRESET_DEVICE_TARGET:{type:"string"},ENABLE_LOCAL_SYNC:{type:"bool"}},previewIcon:{type:"font-awesome-6pro",name:"display",size:16}},AUTH_IN_DEVICE:{hidden:"internal",canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"user",size:16}},REFRESH_BINDCODE:{hidden:"internal",canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"arrows-rotate",size:16}},OPEN_URL:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{URL:{type:"string",normalizeDisplayName:!1,displayName:"URL"},BEHAVIOR:{type:"oneOf",oneOf:["in-app","new-window"]},IN_APP_TINT_COLOR:{type:"string",kind:"color",popover:!0}},previewIcon:{type:"font-awesome-6pro",name:"external-link",size:16}},OPEN_FILE:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{PICK_TYPE:{type:"oneOf",oneOf:["file","multiple","directory"],oneOfEmptyOption:!1},FILE_TYPE:{type:"any"},COPY_TO:{type:"oneOf",oneOf:["cache","document"]},MODE:{type:"oneOf",oneOf:["import","open"]},SAVE_PROPERTY:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},SAVE_DETAIL_PROPERTY:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},ERROR_SAVE_PROPERTY:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1}},previewIcon:{type:"font-awesome-6pro",name:"folder-open",size:16}},THROW_EXCEPTION:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{BEHAVIOR:{type:"oneOf",oneOf:["application","native"]},EXCEPTION_MESSAGE:{type:"string",displayName:"Exception Message"}},previewIcon:{type:"font-awesome-6pro",name:"bomb",size:16}},RESTART_FOUNDATION:{canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"arrows-rotate",size:16}},DISMISS_KEYBOARD:{canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"keyboard-down",size:16}},TRIGGER_APPLICATION_FILTER:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{NAME:{type:"string",displayName:"Filter Name",normalizeDisplayName:!1},VARIABLES:{type:"any",displayName:"Variables",normalizeDisplayName:!1},RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Result Target"},ERROR:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Error Target"}},previewIcon:{type:"font-awesome-6pro",name:"robot",size:16}},STOP_APPLICATION_FILTER:{canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"stop",size:16}},SAVE_UPDATE_SNAPSHOT:{displayName:"SAVE UPDATE SNAPSHOT",canProvideProperty:!0,propertyNameType:"defined_properties",property:{SNAPSHOT_FILE_INDENTIFIER:{type:"string",displayName:"Filename Identifier",defaultValue:"default",normalizeDisplayName:!1},SNAPSHOT_SAVE_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Result Target"},SNAPSHOT_ERROR_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Error Target"}},previewIcon:{type:"font-awesome-6pro",name:"camera-retro",size:16}}},t.getSubspaceActionTypes=e=>Object.entries(e.action_map||{}).reduce((e,[t,r])=>(e[`SUBSPACE_ACTION_${t}`]={canProvideProperty:Object.keys(r.event_property_map||{}).length>0,property:Object.entries(r.event_property_map||{}).reduce((e,[t,r])=>(e[`SUBSPACE_${t}`]={type:r.type,name:a(t)},e),{}),propertyNameType:"defined_properties"},e),{})},54369:(e,t,r)=>{const{getIDPattern:a}=r(1639);e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/generator.schema.json5",title:"Generator",description:"A generator config",type:"object",properties:{alias:{type:"string",description:"Optional alias for this generator, used as variable name in code generation."},title:{type:"string",description:"This generator's name."},description:{type:"string",description:"This generator's description."},local_sync:{type:"object",description:"Define generator behavior on Local Sync mode.",properties:{run_mode:{type:"string",enum:["all","main-only","minor-only"]}}},template_key:{type:"string"},property:{type:"object"},outlet:{type:"object",patternProperties:{"^GENERATOR_(.)+$":{type:"string",pattern:a("PROPERTY_BANK_DATA_NODE")}},additionalProperties:!1},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."}},required:["template_key"]}},62701:e=>{e.exports=JSON.parse('["easeInSine","easeOutSine","easeInOutSine","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInElastic","easeOutElastic","easeInOutElastic","easeInBounce","easeOutBounce","easeInOutBounce"]')},66354:(e,t,r)=>{const{getIDPattern:a}=r(1639),n=a("CANVAS");e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/subspace.schema.json5",title:"Subspace",description:"A brick subspace config",type:"object",properties:{routing:{type:"object",patternProperties:{[a("PROPERTY_BANK_DATA_NODE")]:{type:"object",properties:{enabled_routing:{type:["boolean","null"]}}}},additionalProperties:!1},title:{type:"string",description:"Subspace Title"},description:{type:"string",description:"Subspace Description"},module:{type:"object"},layout:{type:"object",properties:{width:{type:"number"},height:{type:"number"}}},root_canvas_id:{type:"string",description:"Canvas ID point to this stage entry subspace.",pattern:n},property_bank_map:{type:"object",patternProperties:{[a("PROPERTY_BANK_DATA_NODE")]:{$ref:"http://display.bricks.tools/property_bank.schema.json5",description:"One subspace can have many property bank."}},additionalProperties:!1},property_bank_calc_map:{type:"object",patternProperties:{[a("PROPERTY_BANK_COMMAND_MAP")]:{type:"object",properties:{type:{type:"string",enum:["general","script"]},map:{type:"object",patternProperties:{[a("PROPERTY_BANK_(DATA_NODE|COMMAND_NODE)")]:{$ref:"http://display.bricks.tools/property_bank_command.schema.json5",description:"One command map can have many property bank data node."}}},editor_info:{type:"object",patternProperties:{[a("PROPERTY_BANK_(DATA_NODE|COMMAND_NODE)")]:{type:"object",properties:{position:{type:"object",properties:{x:{type:"number"},y:{type:"number"}}},points:{type:"object"}},description:"One command map can have many property bank data node."}}},script_config:{$ref:"http://display.bricks.tools/property_bank_calc_script_config.schema.json5",description:"JavaScript Sandbox calculation config"},note:{type:"string",description:"Note of this calc map."}},description:"One command map can have many property bank commands"}},additionalProperties:!1},brick_map:{type:"object",patternProperties:{[a("BRICK")]:{$ref:"http://display.bricks.tools/brick.schema.json5",description:"One subspace can have many brick."}},additionalProperties:!1},generator_map:{type:"object",patternProperties:{[a("(GENERATOR|AUTO_GENERATOR)")]:{$ref:"http://display.bricks.tools/generator.schema.json5",description:"One subspace can have many generator."}},additionalProperties:!1},animation_map:{type:"object",patternProperties:{[a("ANIMATION")]:{$ref:"http://display.bricks.tools/animation.schema.json5",description:"One subspace can have many animation."}},additionalProperties:!1},canvas_map:{type:"object",patternProperties:{[n]:{$ref:"http://display.bricks.tools/canvas.schema.json5",description:"One subspace can have many canvas."}},additionalProperties:!1},local_sync:{type:"object",description:"Define subspace behavior on Local Sync mode.",properties:{change_canvas:{type:"string",enum:["all","main-only","minor-only"]}}}},if:{properties:{module:{type:"object",properties:{link:{const:!0}},required:["link"]}},required:["module"]},then:{required:["module"]},else:{required:["root_canvas_id","property_bank_map","brick_map","generator_map","animation_map","canvas_map"]}}},78078:(e,t,r)=>{const{parse:a}=r(89236),n={ecmaVersion:2020,allowReturnOutsideFunction:!0},p=(e,t,r)=>{e&&"object"==typeof e&&(Array.isArray(e)?e.forEach((e,a)=>p(e,`${t}[${a}]`,r)):Object.entries(e).forEach(([e,o])=>{"event_map"!==e&&"eventMap"!==e||!o||"object"!=typeof o?o&&"object"==typeof o&&p(o,`${t}.${e}`,r):Object.entries(o).forEach(([p,o])=>{Array.isArray(o)&&o.forEach((o,i)=>{if("PROPERTY_BANK_EXPRESSION"!==o?.action)return;const s=(e=>{const t=e.parameter_list||e.parameterList||[];if(!Array.isArray(t))return;const r=t.find(e=>"EXPRESSION"===(e?.input_to_receiver||e?.inputToReceiver));return r?r.result_from_sender??r.resultFromSender:void 0})(o);if("string"!=typeof s||s.startsWith("PROPERTY_BANK#"))return;const c=(e=>{if(!e.trim())return"Expression is empty";let t;try{t=a(e,n)}catch(e){return`Expression does not parse: ${e.message}`}const r=(e=>{for(let t=0;t<e.length;t+=1){const r=e[t];if("ExpressionStatement"!==r.type){if("VariableDeclaration"===r.type){if(r.declarations.some(e=>"Identifier"!==e.id.type||!e.init))return"a variable declaration with destructuring or no initializer";continue}if(t!==e.length-1||"ReturnStatement"!==r.type)return`an unsupported ${r.type}`}}return null})(t.body);return r?`Expression contains ${r}; statements must fold into a single expression (expression statements, simple const/let declarations, and a final return only). Use ternaries instead of if/for/while, or move branching logic to a DataCalculationScript.`:null})(s);c&&r.push({field:`${t}.${e}.${p}[${i}]`,message:c})})})}))};e.exports=function(e){const t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{r.module?.link||p(r,`subspace_map.${e}`,t)}),t}},79458:(e,t,r)=>{const{getIDPattern:a}=r(1639),n=a("SUBSPACE"),p=a("TEST");e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/root.schema.json5",title:"Root",description:"A brick root config",type:"object",properties:{title:{type:"string",description:"The root config name."},root_subspace_id:{type:"string",description:"The root subspace id.",pattern:n},subspace_map:{type:"object",patternProperties:{[n]:{$ref:"http://display.bricks.tools/subspace.schema.json5",description:"Root config can have many subspace."}},additionalProperties:!1},test_map:{type:"object",patternProperties:{[p]:{$ref:"http://display.bricks.tw/test.schema.json5",description:"Root config can have many test."}},additionalProperties:!1,deprecated:!0,description:"Deprecated in favor of automation_map.AUTOMATION_MAP_DEFAULT"},automation_map:{$ref:"http://display.bricks.tools/automation_map.schema.json5",description:"Maps of automation tests organized by collection"},show_viewports:{type:"boolean",description:"Show device viewport reference on editor"},enable_unstable_bricks:{type:"boolean",description:"Enable unstable bricks / generators"},hide_short_refs:{type:"boolean",description:"Hide all instances in Short Edit mode"},warnings:{type:"array",description:"Config validation warnings from server"}},required:["title","subspace_map","root_subspace_id"]}},80211:(e,t,r)=>{const a=r(11601),{propertyBank:n,propertyBankCommand:p,propertyBankCalcScriptConfig:o}=r(7436),i=new a({strict:!1,schemas:[r(85912),n,p,o,r(5982),r(54369),r(24090),r(27449),r(85190),r(66354),r(92514),r(97256),r(79458)]});function s(e){const t=i.getSchema("http://display.bricks.tools/root.schema.json5");return t(e),t.errors||[]}s.ajv=i,e.exports=s},85190:(e,t,r)=>{const a=r(62701),{getIDPattern:n}=r(1639),p={type:"object",properties:{method:{type:"string",anyOf:[{enum:[""].concat(a)},{pattern:"^cubic-bezier\\([\\d.-]+,\\s*[\\d.-]+,\\s*[\\d.-]+,\\s*[\\d.-]+\\)$"}]},duration:{type:"number",min:0}}},o={type:"object",properties:{x:{type:"number"},y:{type:"number"},width:{type:"number"},height:{type:"number"}}},i={type:"object",properties:{default:p,x:p,y:p,width:p,height:p,opacity:p}},s={type:"object",properties:{x:{type:"number"},y:{type:"number"},width:{type:"number"},height:{type:"number"},standby_mode:{type:"string",enum:["custom","top","left","right","bottom"]},standby_frame:o,standby_opacity:{type:"number"},standby_delay:{type:"number"},standby_delay_random:{type:"number"},standby_easing:i,showing_delay:{type:"number"},render_out_of_viewport:{type:"boolean"}}};e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/canvas.schema.json5",title:"Canvas",description:"A brick canvas config",type:"object",properties:{alias:{type:"string",description:"Optional alias for this canvas, used as variable name in code generation."},title:{type:"string",description:"Canvas Title"},description:{type:"string",description:"Canvas Description"},property:{type:"object"},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."},state_group:{$ref:"http://display.bricks.tools/state_group.schema.json5",description:"Use state group to describe how to transform property, event and outlet."},item_list:{type:"array",items:{type:"object",oneOf:[{properties:{type:{type:"string",enum:["subspace"]},subspace_id:{type:"string",description:"The subspace id",pattern:n("SUBSPACE")},frame:{...s,properties:{...s.properties,exceed_boundary:{type:"boolean"}}}}},{properties:{type:{type:"string",enum:["brick"]},brick_id:{type:"string",description:"The brick id",pattern:n("BRICK")},frame:s}}]}}}},e.exports.standbyFrame=o,e.exports.standbyEasing=i},85912:e=>{e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/event_map.schema.json5",title:"Event Map",description:"A event map config",type:"object",patternProperties:{"^.+$":{type:"array",description:"List all handler response to this event.",items:{type:"object",description:"A handle trigger action and parameter.",properties:{action:{type:"string",description:"Which action will be execute."},handler:{type:"string",description:"Which generator are handler."},wait_async:{type:"boolean",description:"Wait for async action finish."},parameter_list:{type:"array",description:"Describe how which data will as parameter and send to where.",items:{type:"object",properties:{result_from_sender:{description:"Describe which data will be the input."},input_to_receiver:{description:"Describe where the input data will go."}},required:["input_to_receiver"]}}},required:["action","handler","parameter_list"]}}},additionalProperties:!1}},86343:(e,t,r)=>{const{v4:a}=r(79194),n=r(95479),{nameMap:p,brickMapping:o,generatorMapping:i}=r(63981);t.idByItem=(e={})=>e.canvas_id||e.subspace_id||e.brick_id||e.generator_id||e.property_bank_id||e.property_bank_calc_id||e.bank_id||e.scene_id,t.getAnimationType=e=>e.type||e.compose_type||e.composeType,t.cleanUpAnimationMap=e=>Object.entries(e).reduce((e,[t,r])=>((r.type||r.compose_type)&&(e[t]=r),e),{}),t.matchItemByItem=(e,t)=>{if(!e)return!1;let r;switch("string"==typeof t&&(r=t),e.type){case"brick":return e.brick_id===(r||t.brick_id);case"subspace":return e.subspace_id===(r||t.subspace_id);case"canvas":return e.canvas_id===(r||t.canvas_id);case"generator":return e.generator_id===(r||t.generator_id);case"property_bank":return e.property_bank_id===(r||t.property_bank_id);default:return!1}},t.makePasscode=()=>a(),t.kindOneOfTypes={string:["color","datetime","id","graphql","rich-text-content","sandbox-script","llm-prompt","media-resource-image","media-resource-video","media-resource-audio","media-resource-file","lottie-file-uri","rive-file-uri","ggml-model-asset","gguf-model-asset","binary-asset"],number:["unit"],object:["tts-speaker-config"],"array-object":["llm-tools","llm-messages","mcp-server-resources","mcp-server-tools","mcp-server-prompts"]},t.getKindOneOfTypes=(e,r)=>"array"===e?"object"===r?t.kindOneOfTypes[`${e}-${r}`]:void 0:t.kindOneOfTypes[e],t.unitOneOfTypes=["grid","px","ms"],t.idOneOfTypes=["canvas","brick","generator","animation","property_bank"],t.typeToName={brick:"Brick",generator:"Generator",subspace:"Subspace",canvas:"Canvas",animation:"Animation",property_bank:"Data",property_bank_calc:"Calculation"},t.getBrickName=(e,r,a)=>{if(!r)return e.toUpperCase();if(r.title)return r.title;let o;switch(e){case"bank":o="BANK";break;case"subspace":o="SUBSPACE";break;case"canvas":o="CANVAS";break;case"animation":o=`<${n(t.getAnimationType(r))}>`;break;case"property_bank":o="<Data>";break;case"property_bank_calc":o="<Map>";break;case"state_group":o="<Switch Case>";break;default:o=`<${p[r.template_key||r.templateKey]||"Unknown"}>`}return a&&a.length>10?o+=` (${a.replace(/[A-Z_]+/g,"").substr(0,6)}...)`:a&&(o+=` (${a})`),o},t.getCallInternalActions=e=>{const t=o[e]||i[e];if(t)return t.callInternalActions},t.mapToList=(e,r)=>Object.entries(r).reduce((r,[a,n])=>(r.push({id:a,...n,title:t.getBrickName(e,n,a)}),r),[]);const s={subspaceMap:"subspace",brickMap:"brick",generatorMap:"generator",propertyBankMap:"property_bank",propertyAvailableToAdd:"property_bank",canvasMap:"canvas",animationMap:"animation"},c={};t.mapToListForDerivedState=(e,r,a,n)=>{const p=a[e]||c;return p!==n[e]?{[e]:p,[r]:t.mapToList(s[e],p)}:{}},t.arrayTypePrefix="array of ",t.propertyBankTypes=["string","number","bool","object","any",`${t.arrayTypePrefix}string`,`${t.arrayTypePrefix}number`,`${t.arrayTypePrefix}bool`,`${t.arrayTypePrefix}object`],t.animationRunTypes=["once","loop"],t.stopPropagationOnKeyBackspace=e=>{8===e.keyCode&&e.stopPropagation()},t.nestedTypes=["object","array","any"],t.isPropertyBankTypeNested=e=>t.nestedTypes.includes(e),t.propertyTypeToSchema=e=>{const r=e.indexOf(t.arrayTypePrefix)>-1,a=e.replace(t.arrayTypePrefix,"");return{type:a,properties:"object"===a?{}:void 0,allowNewItem:r,allowCustomProperty:"object"===a}}},92514:(e,t,r)=>{const{getIDPattern:a}=r(1639);e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tw/test.schema.json5",title:"Test",description:"A brick test config",type:"object",properties:{title:{type:"string",description:"Test Title"},description:{type:"string",description:"Test Description"},meta:{type:"object",properties:{}},open_report_on_failed:{type:"boolean",description:"Open Automation report on failed"},use_media_flow_screenshots:{type:"boolean",description:"Save screeshots to SYSTEM media box if enabled"},trigger_type:{type:"string",enum:["launch","anytime","cron"],description:"Trigger type (launch: restart the application, anytime: trigger directly)"},cron:{type:"string",description:"Cron Expression"},timeout:{type:"number",description:"Test runtime timeout"},case_map:{type:"object",patternProperties:{[a("TEST_CASE")]:{type:"object",properties:{id:{type:"string"},name:{type:"string"},run:{type:"array"},commented:{type:"boolean"},exit_on_failed:{type:"boolean"},pre_delay:{type:"number"},post_delay:{type:"number"}}}},additionalProperties:!1},var_map:{type:"object",patternProperties:{[a("TEST_VAR")]:{type:"object",properties:{title:{type:"string",description:"This var's name."},type:{type:"string",enum:["string","number","array","object","bool","any"]},value:{}}}},additionalProperties:!1}},required:["case_map","var_map"]}},97256:(e,t,r)=>{const{getIDPattern:a}=r(1639),n=a("TEST");e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/automation_map.schema.json5",title:"Automation Map",description:"A map of automation test collections",type:"object",patternProperties:{"AUTOMATION_MAP_.*":{type:"object",properties:{title:{type:"string",description:"The name of the test map"},createdAt:{type:"number",description:"The creation timestamp of the test map"},map:{type:"object",patternProperties:{[n]:{$ref:"http://display.bricks.tw/test.schema.json5",description:"A test configuration"}},additionalProperties:!1}}}},additionalProperties:!1}},99470:(e,t)=>{t.animationRunTypes=["once","loop"],t.autoGeneratedItemIdKind="auto-generated-item-id";const r=/^([^.](?![\w!#$%&'*+/=?^`{|}~\-]+\.\.)([\w!#$%&'*+./=?^`{|}~\-]+[^.])|([\dA-Za-z]{1,2}))@([\dA-Za-z-]{1,64}\.){1,10}[A-Za-z]{2,64}$/;t.isEmail=e=>"string"==typeof e&&r.test(e)&&e.indexOf("@")<65&&e.length<255;const a=/^(data:)([\w+/]+);(charset=[\w-]+|base64).*,(.*)/i,n=e=>new RegExp(`^(${e.join("|")}):\\/\\/(www\\.)?([\\w#%+.:=@~-]{1,256}\\.[\\d()a-z]{1,6}\\b|localhost|[\\d]{1,3}\\.[\\d]{1,3}\\.[\\d]{1,3}\\.[\\d]{1,3})([\\w#%&()+./:=?@~-]*)`,"i"),p=["https?"],o=n(p);t.isURI=(e,t=p)=>{const r=t.includes("data");if(r&&a.test(e))return!0;return(e=>e===p||1===e.length&&"https?"===e[0]?o:n(e))(r?t.filter(e=>"data"!==e):t).test(e)}}};
|
|
1
|
+
export const __webpack_esm_id__=890;export const __webpack_esm_ids__=[890];export const __webpack_esm_modules__={1639:(e,t,r)=>{const{v4:a}=r(79194);t.getIDPattern=e=>`^${e}_[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`,t.autoGeneratorIDPrefix="AUTO_GENERATOR_",t.makeId=e=>{let r="";switch(e){case"animation":r="ANIMATION_";break;case"brick":r="BRICK_";break;case"dynamic-brick":r="DYNAMIC_BRICK_";break;case"subspace":r="SUBSPACE_";break;case"canvas":r="CANVAS_";break;case"generator":r="GENERATOR_";break;case"auto-generator":r=t.autoGeneratorIDPrefix;break;case"data":case"property_bank":r="PROPERTY_BANK_DATA_NODE_";break;case"property_bank_command":r="PROPERTY_BANK_COMMAND_NODE_";break;case"property_bank_calc":r="PROPERTY_BANK_COMMAND_MAP_";break;case"automation_map":r="AUTOMATION_MAP_";break;case"test":r="TEST_";break;case"test_case":r="TEST_CASE_";break;case"test_var":r="TEST_VAR_";break;case"state_group":r="BRICK_STATE_GROUP_"}return`${r}${a()}`};const n=/[$()*+.?[\\\]^{|}]/g;t.replaceMultiple=(e,t)=>{const r=Object.keys(t).sort((e,t)=>t.length-e.length);if(0===r.length)return e;const a=new RegExp(r.map(e=>e.replace(n,"\\$&")).join("|"),"g");return e.replace(a,e=>t[e])}},5982:(e,t,r)=>{const{getIDPattern:a}=r(1639),n=a("BRICK_STATE_GROUP");e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/state_group.schema.json5",title:"State Group",description:"A state group config",type:"object",patternProperties:{[n]:{type:"object",properties:{title:{type:"string",description:"State Group Title"},description:{type:"string",description:"State Group Description"},conds:{type:"array",items:{type:"object",properties:{type:{type:"string",enum:["property_bank","property_bank_by_item_key","inner_state"]},key:{type:"string"},method:{type:"string",enum:["==","!=",">",">=","<","<="]}}}},commented:{type:"boolean",description:"If true, this state group will not be used."},override:{type:"object",properties:{property:{type:"boolean"},event:{type:"boolean"},outlet:{type:"boolean"},animation:{type:"boolean"}}},break:{type:"boolean",description:"If true, this state group will stop checking next state groups."},property:{type:"object"},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."},outlet:{type:"object"},animation:{type:"object"}}}}}},7436:(e,t,r)=>{const{docs:a}=r(5867),n=e=>`^${e}_[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$`;t.propertyBank={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/property_bank.schema.json5",title:"Property Bank",description:"A data storage config file.",type:"object",properties:{alias:{type:"string",description:"Optional alias for this data node, used as variable name in code generation."},linkedFrom:{type:["string","null"],description:"ID of linked from another subspace or not",pattern:n("SUBSPACE")},title:{type:"string",description:"This property bank's name."},description:{type:"string",description:"This property bank's description."},type:{type:"string",enum:["string","number","array","object","bool","any"]},routing:{type:["string","null"],enum:["default","read-only"]},preload:{type:["object","null"]},kind:{type:["string","null"]},unit:{type:["string","null"]},value:{},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."},enable_remote_update:{type:["boolean","null"],description:"Enable remote update on this data node. (If Workspace have enable this feature)"},global_remote_update_prop:{type:["string","null"]},use_remote_id_prefix:{type:["boolean","null"]},local_sync:{type:"object",description:"Define property behavior on Local Sync mode.",properties:{update_mode:{type:"string",enum:["all","main-only","minor-only","dont-sync"]}}}},required:["type"]};const p=n("PROPERTY_BANK_(DATA_NODE|COMMAND_NODE)");t.propertyBankCommand={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/property_bank_command.schema.json5",title:"Property Bank Commands",description:"Property Bank Calculation",type:"object",properties:{type:{type:"string",enum:["data-node",...Object.keys(a).map(e=>`command-node-${e}`)]},title:{type:"string",description:"This property bank command's name."},note:{type:"string",description:"This property bank command's note."},properties:{type:"object",description:"The node properties"},in:{type:"object",description:"The node inputs",patternProperties:{"^.+$":{type:["array","null"],items:{type:"object",properties:{port:{type:"string"},id:{type:"string",pattern:p},disable_trigger_command:{type:"boolean"}},required:["id","port"]}}}},out:{type:"object",description:"The node outputs",patternProperties:{"^.+$":{type:["array","null"],items:{type:"object",properties:{port:{type:"string"},id:{type:"string",pattern:p}},required:["id","port"]}}}}},required:["type","properties","in","out"]},t.propertyBankCalcScriptConfig={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/property_bank_calc_script_config.schema.json5",title:"Property Bank Calulation Script Config",description:"JavaScript Sandbox calculation config",type:"object",properties:{code:{type:["string","null"]},inputs:{type:"object",patternProperties:{[n("PROPERTY_BANK_DATA_NODE")]:{type:"string"}},additionalProperties:!1},output:{type:["string","null"]},error:{type:["string","null"]},outputs:{type:"object",patternProperties:{"^.+$":{type:"array",items:{type:"string",pattern:n("PROPERTY_BANK_DATA_NODE")}}}}},required:["inputs","outputs","code"]}},12062:(e,t)=>{t.checkMethodFinished=e=>{const[t,...r]=e;switch(t){case"brick_press":{const[,e]=r;return!!e}case"wait_until_brick_exists":case"brick_exists":{const[,e]=r;return!!e}case"wait_until_canvas_change":{const[,e]=r;return!!e}case"wait_until_event_trigger":{const[,e,t]=r;return!!e&&!!t}case"keydown":case"keyup":{const[e,t]=r;return!!e||!!t}case"http_request":{const[e]=r;return!!e}case"assert_property":case"wait_until_property_change":{const[,e,t]=r;return!!e&&void 0!==t}case"execute_action":{const[,e,t]=r;return!!e&&!!t}case"match_screenshot":const[e]=r;return!!e;case"delay":case"do_nothing":return!0;default:return!1}}},18501:(e,t,r)=>{const{docs:a}=r(5867);t.isCommand=e=>Boolean(e&&e.type&&e.type.startsWith("command-node-")),t.getPorts=e=>e?Array.isArray(e)?e:[e]:[];t.getCommandCallbackFromPort=(e,r)=>{const n=e[r];if(!t.isCommand(n))return null;const p=(e=>a[e.type.replace("command-node-","")]?.commands?.[e.properties?.command])(n);return p?.iterateeFrom||p?.invocationFrom||null},t.checkDisableTriggerCommand=(e,r)=>t.getPorts(e[r.id]?.in?.[r.port]).some(e=>e?.disable_trigger_command);const n=(e,r,a)=>!(!r||!e[r.id])&&(r.port!==((e,r,a)=>(a.has(r)||a.set(r,t.getCommandCallbackFromPort(e,r)),a.get(r)))(e,r.id,a)&&!t.checkDisableTriggerCommand(e,r));t.findCircularReferenceIds=e=>{const r=(e=>{const r=new Map;return Object.keys(e).reduce((a,p)=>{const o=[];return Object.values(e[p]?.out||{}).forEach(a=>{t.getPorts(a).forEach(t=>{n(e,t,r)&&o.push(t.id)})}),a[p]=o,a},{})})(e),a=new Map;return Object.keys(e).filter(t=>"data-node"===e[t]?.type).filter(e=>((e,t,r)=>{if(r.has(e))return r.get(e);const a=[{id:e,edgeIndex:0,reachesCycle:!1}],n=new Set([e]);for(;a.length>0;){const e=a[a.length-1],p=t[e.id]||[];if(e.reachesCycle||e.edgeIndex>=p.length){n.delete(e.id),r.set(e.id,e.reachesCycle),a.pop(),e.reachesCycle&&a.length>0&&(a[a.length-1].reachesCycle=!0);continue}const o=p[e.edgeIndex];e.edgeIndex+=1,r.has(o)?r.get(o)&&(e.reachesCycle=!0):n.has(o)?e.reachesCycle=!0:(n.add(o),a.push({id:o,edgeIndex:0,reachesCycle:!1}))}return r.get(e)||!1})(e,r,a))},t.hasCircularReference=e=>t.findCircularReferenceIds(e).length>0;const p=(e={})=>Object.entries(e).reduce((e,[t,r])=>(e[t]=(e=>Array.isArray(e)?e.slice():e)(r),e),{}),o=new WeakSet,i=(e,t,r)=>{if(!r)return;const a=((e,t)=>{const r=e[t];if(!r)return e[t]=[],e[t];if(!Array.isArray(r))return e[t]=[r],e[t];if(!o.has(r)){let e=0;for(const t of r)t&&(r[e]=t,e+=1);r.length=e,o.add(r)}return r})(e,t);(Array.isArray(r)?r:[r]).forEach(e=>{e&&a.push(e)})};t.composeMap=e=>Object.values(e).reduce((e,r)=>Object.entries(r?.map||{}).reduce((e,[r,a])=>{if(e[r]){if(t.isCommand(a))throw new Error(`Doesn't allow same command id in another map, ${r}`);const n=e[r];Object.keys(a?.in||{}).forEach(e=>{i(n.in,e,a.in[e])}),Object.keys(a?.out||{}).forEach(e=>{i(n.out,e,a.out[e])})}else e[r]={...a,in:p(a?.in),out:p(a?.out)};return e},e),{})},24090:e=>{e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/animation.schema.json5",title:"Animtation",description:"A brick animation config",type:"object",oneOf:[{properties:{alias:{type:"string"},title:{type:"string"},description:{type:"string"},animationRunType:{type:"string",enum:["once","loop"]},type:{type:"string",enum:["timing","decay","spring"]},property:{type:"string",enum:["opacity","transform.translateX","transform.translateY","transform.scale","transform.scaleX","transform.scaleY","transform.rotate","transform.rotateX","transform.rotateY"]},config:{type:"object"}},required:["type","property","config"]},{properties:{alias:{type:"string"},title:{type:"string"},compose_type:{type:"string",enum:["parallel","sequence"]},item_list:{type:"array",items:{type:"object",properties:{animation_id:{type:"string"}}}}},required:["compose_type","item_list"]}]}},27449:(e,t,r)=>{const{getIDPattern:a}=r(1639);e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/brick.schema.json5",title:"Brick",description:"A brick config",type:"object",properties:{alias:{type:"string",description:"Optional alias for this brick, used as variable name in code generation."},title:{type:"string",description:"This brick's name."},description:{type:"string",description:"This brick's description."},template_key:{type:"string"},property:{type:"object"},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."},outlet:{type:"object",patternProperties:{"^BRICK_(.)+$":{type:"string",pattern:a("PROPERTY_BANK_DATA_NODE")}},additionalProperties:!1},state_group:{$ref:"http://display.bricks.tools/state_group.schema.json5",description:"Use state group to describe how to transform property, event and outlet."},primary_component:{type:"boolean",default:!1,description:"Mark this brick as a primary component for easier discovery in Runtime Editor."}},required:["template_key"]}},37517:(e,t,r)=>{const{composeMap:a,findCircularReferenceIds:n}=r(18501);e.exports=function(e){const t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{if(r.module?.link)return;const p=r.property_bank_calc_map;if(!p||0===Object.keys(p).length)return;const o=`subspace_map.${e}.property_bank_calc_map`;try{const e=a(p),r=n(e);if(r.length>0){const a=r.slice(0,5).map(t=>e[t].title||t),n=r.length>5?` and ${r.length-5} more`:"";t.push({field:o,message:`Circular reference detected in data calculation. Affected nodes: ${a.join(", ")}${n}. Please check the data connections for loops.`})}}catch(e){t.push({field:o,message:e.message})}}),t}},38890:(e,t,r)=>{const{getDocByTemplateKey:a}=r(63981),n=r(80211),p=r(45907),o=r(37517),i=r(78078),{getBrickName:s}=r(86343);t.checkConfigDeprecatedFeatures=e=>{const t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{Object.entries(r.brick_map||{}).forEach(([n,p])=>{void 0===p.property?.borderLeftWidth&&void 0===p.property?.borderRightWidth&&void 0===p.property?.borderTopWidth&&void 0===p.property?.borderBottomWidth||t.push({id:n,name:"Used Deprecated Feature",data:`In v2.16, we have been changed \`Border Width\` to \`Border Size\` (Unit \`px\` to \`grid\`). The \`${s("brick",p,n)}\` brick still used the border width. Please re-edit it to transfer to the new unit.`});const o=a(p.template_key);o?.brickMeta?.deprecated&&t.push({id:n,name:"Used Deprecated Feature",data:`The \`${s("brick",p,n)}\` brick in \`${s("subspace",r,e)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`})}),Object.entries(r.generator_map||{}).forEach(([n,p])=>{const o=a(p.template_key);o?.brickMeta?.deprecated&&t.push({id:n,name:"Used Deprecated Feature",data:`The \`${s("brick",p,n)}\` brick in \`${s("subspace",r,e)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`})})}),t},t.checkConfig=(e,t={})=>{const r={schema:n(e),ref:p(e,t),calc:t.checkCalc?o(e):[],expression:t.checkExpressions?i(e):[]};return r.valid=0===r.schema.length&&0===r.ref.length&&0===r.calc.length&&0===r.expression.length,r.message=r.schema.concat(r.ref).concat(r.calc).concat(r.expression).map(({instancePath:e,field:t,message:r})=>{const a=e||t;return a?`${a}: ${r}`:r}).join("\n"),r}},41900:e=>{e.exports={expressionFoldAcornOptions:{ecmaVersion:2020,allowReturnOutsideFunction:!0},getUnfoldableStatementDescription:(e,t=null)=>{for(let t=0;t<e.length;t+=1){const r=e[t];if("ExpressionStatement"!==r.type){if("VariableDeclaration"===r.type){if(r.declarations.some(e=>"Identifier"!==e.id.type||!e.init))return"a variable declaration with destructuring or no initializer";continue}if(t!==e.length-1||"ReturnStatement"!==r.type)return`an unsupported ${r.type}`}}return t}}},45907:(e,t,r)=>{const{getDocByTemplateKey:a}=r(63981),{systemActions:n}=r(49741),{checkMethodFinished:p}=r(12062),o=(e,t,r)=>{const a=e[t];return a?r?!r[a]&&`The entry of \`${t}\` is not defined in the map.`:"The map is not defined":`\`${t}\` is not defined.`},i=(e,t=[])=>{t.forEach(t=>{e.push(t)})},s="PROPERTY_BANK#",c=[],d=["BRICK_GRID","BRICK_STICKER","BRICK_CHART_LINE","BRICK_CHART_BAR","BRICK_CHART_PIE","BRICK_CHART_PROGRESS","BRICK_3D_VIEWER","GENERATOR_PROMPT","GENERATOR_MEDIA_RESOURCE","GENERATOR_TEXT_INPUT_CONTROLLER","GENERATOR_CAMERA_CONTROLLER","GENERATOR_WEBVIEW_CONTROLLER","GENERATOR_FILE_READER","GENERATOR_URL_FILE_SYNC","GENERATOR_TENSORFLOW_INFERENCE","GENERATOR_TAPPAY_T2P_IOS"],y=(e,t,r,p,o,i,s)=>{const y=[];if(!r)return y.push({field:`${t}.template_key`,message:"`template_key` is not defined."}),y;if(c.includes(r)||d.includes(r))return y;return a(r)?Object.entries(p||{}).reduce((e,[r,p])=>Array.isArray(p)?(p.forEach((p,c)=>{if(!p||"object"!=typeof p)return void e.push({field:`${t}.event_map.${r}.${c}`,message:"The event handler must be an object."});const{handler:d,action:y,parameter_list:l}=p;if("SYSTEM"===d){n[y]||e.push({field:`${t}.event_map.${r}.${c}.action`,message:`SYSTEM action ${y} is not found in the definition.`});const a=n[y];return!a?.canProvideProperty&&l&&l.length>0&&e.push({field:`${t}.event_map.${r}.${c}.parameter_list`,message:`SYSTEM action ${y} is not allowed to provide property.`}),void("PROPERTY_BANK"!==y&&"PROPERTY_BANK_COMMAND"!==y||(l||[]).forEach((a,n)=>{const p=a?.input_to_receiver;"string"==typeof p&&p.startsWith("PROPERTY_BANK_")||e.push({field:`${t}.event_map.${r}.${c}.parameter_list.${n}.input_to_receiver`,message:`SYSTEM action ${y} requires \`input_to_receiver\` to start with \`PROPERTY_BANK_\`.`})}))}const m=i[d]||s[d]||o[d];if(!m)return void e.push({field:`${t}.event_map.${r}.${c}.handler`,message:`The handler ${d} is not found in the brick map, generator map, or subspace map.`});const _=a(m.template_key);if(!_)return;if(!_.actionTypes||!_.actionTypes[y])return void e.push({field:`${t}.event_map.${r}.${c}.action`,message:`The event action ${y} is not defined in the handler ${m.template_key}.`});!_.actionTypes[y].canProvideProperty&&l&&l.length>0&&e.push({field:`${t}.event_map.${r}.${c}.parameter_list`,message:`The event action ${y} in the handler ${m.template_key} is not allowed to provide property.`})}),e):(e.push({field:`${t}.event_map.${r}`,message:"The event content must be an array."}),e),y):(y.push({field:`${t}.template_key`,message:`Template ${r} is not found.`}),y)},l=e=>"string"==typeof e&&e.startsWith("VARIABLE#"),m={brick_press:{subspaceScopedMaps:{0:"subspace",1:"brick_map"}},brick_exists:{subspaceScopedMaps:{0:"subspace",1:"brick_map"}},wait_until_brick_exists:{subspaceScopedMaps:{0:"subspace",1:"brick_map"}},wait_until_canvas_change:{subspaceScopedMaps:{0:"subspace",1:"canvas_map"}},wait_until_event_trigger:{subspaceScopedMaps:{0:"subspace"},dynamicArgs:{1:{name:"sender"}}},assert_property:{subspaceScopedMaps:{0:"subspace",1:"property_bank_map"}},wait_until_property_change:{subspaceScopedMaps:{0:"subspace",1:"property_bank_map"}},execute_action:{subspaceScopedMaps:{0:"subspace"},dynamicArgs:{1:{name:"handler",allowedLiterals:["SYSTEM"]}}}},_=[{prefix:"BRICK_",map:"brick_map"},{prefix:"GENERATOR_",map:"generator_map"},{prefix:"CANVAS_",map:"canvas_map"},{prefix:"PROPERTY_BANK_",map:"property_bank_map"},{prefix:"SUBSPACE_",map:"subspace_map"}],u=(e,t,r,a,n)=>!r||l(r)||n&&n[r]?null:{field:`${e}.run.${t+1}`,message:`The entry \`${r}\` is not defined in \`${a}\`.`},b=(e,t,r,a)=>{const n=[],[p,...o]=t||[],i=m[p];if(!i)return n;const s=Object.entries(i.subspaceScopedMaps||{}).find(([,e])=>"subspace"===e)?.[0],c=(null!=s?o[Number(s)]:void 0)||a,d=c&&!l(c)?r[c]:null;return Object.entries(i.subspaceScopedMaps||{}).forEach(([t,a])=>{const p=Number(t),i=o[p];if("subspace"===a){const t=u(e,p,i,"subspace_map",r);return void(t&&n.push(t))}if(!d)return;const s=u(e,p,i,a,d[a]);s&&n.push(s)}),Object.entries(i.dynamicArgs||{}).forEach(([t,a])=>{const p=Number(t),i=o[p];if(!i||l(i))return;if(a.allowedLiterals?.includes(i))return;const s=(e=>"string"!=typeof e?null:_.find(({prefix:t})=>e.startsWith(t))||null)(i);if(!s)return void n.push({field:`${e}.run.${p+1}`,message:`\`${i}\` has no recognizable ID prefix.`});const c="subspace_map"===s.map?r:d?.[s.map];if("subspace_map"!==s.map&&!d)return;const y=u(e,p,i,s.map,c);y&&n.push(y)}),n},E=(e,t,r,a)=>{const n=[];return Object.entries(t?.case_map||{}).forEach(([t,o])=>{o?.commented||p(o?.run||[])&&i(n,b(`${e}.case_map.${t}`,o.run,r,a))}),n};e.exports=function(e,t={}){const r=[],a=o(e,"root_subspace_id",e.subspace_map);return a&&r.push({field:"root_subspace_id",message:a}),Object.entries(e.subspace_map||{}).forEach(([t,a])=>{if(a.module?.link)return;const n=o(a,"root_canvas_id",a.canvas_map);n&&r.push({field:`subspace_map.${t}.root_canvas_id`,message:n}),Object.entries(a.canvas_map||{}).forEach(([n,p])=>{i(r,((e,t=[],r={},a={},n)=>t.reduce((t,p,o)=>{const i={};switch(p.type){case"brick":i.field=`${e}.${o}.brick_id`,p.brick_id?r[p.brick_id]||(i.message="The entry of `brick_id` is not defined in the map."):i.message="`brick_id` is not defined.";break;case"subspace":i.field=`${e}.${o}.subspace_id`,p.subspace_id?a[p.subspace_id]?n===p.subspace_id&&(i.message="Root Subspace can't be referenced as a Canvas item"):i.message="The entry of `subspace_id` is not defined in the map.":i.message="`subspace_id` is not defined."}return i.message&&t.push(i),t},[]))(`subspace_map.${t}.canvas_map.${n}.item_list`,p.item_list,a.brick_map,e.subspace_map,e.root_subspace_id))}),Object.entries(a.brick_map||{}).forEach(([n,p])=>{i(r,((e,t={},r={})=>Object.entries(t).reduce((t,[a,n])=>{const p={field:`${e}.key`};return"string"==typeof n&&n.startsWith(s)&&!r[n.replace(s,"")]&&(p.message=`Property \`${a}\` (content: \`${n}\`) is not defined in the map.`),p.message&&t.push(p),t},[]))(`subspace_map.${t}.brick_map.${n}.property`,p.property,a.property_bank_map)),i(r,y(0,`subspace_map.${t}.brick_map.${n}`,p.template_key,p.event_map,e.subspace_map||{},a.generator_map||{},a.brick_map||{}))}),Object.entries(a.generator_map||{}).forEach(([n,p])=>{i(r,y(0,`subspace_map.${t}.generator_map.${n}`,p.template_key,p.event_map,e.subspace_map||{},a.generator_map||{},a.brick_map||{}))}),Object.entries(a.property_bank_map||{}).forEach(([n,p])=>{i(r,y(0,`subspace_map.${t}.property_bank_map.${n}`,"PROPERTY_BANK",p.event_map,e.subspace_map||{},a.generator_map||{},a.brick_map||{}))})}),t.checkAutomation&&i(r,(e=>{const t=[],r=e.subspace_map||{},a=e.root_subspace_id,n=e.automation_map||{},p=Object.keys(n).length>0;return Object.entries(n).forEach(([e,n])=>{Object.entries(n?.map||{}).forEach(([n,p])=>{i(t,E(`automation_map.${e}.map.${n}`,p,r,a))})}),p||Object.entries(e.test_map||{}).forEach(([e,n])=>{i(t,E(`test_map.${e}`,n,r,a))}),t})(e)),r}},49741:(e,t,r)=>{const a=r(95479),{animationRunTypes:n,autoGeneratedItemIdKind:p}=r(99470);t.systemActionDescriptions={PROPERTY_BANK_EXPRESSION:{default:"","en-us":"Change Data value with script expression. One expression of return value","zh-tw":"使用腳本表達式改變 Data 值。 一個表達式回傳值","ja-jp":"スクリプト式を使用して Data の値を変更する。1つの式で値を返す"},PROPERTY_BANK:{default:"","en-us":"Change Data value","zh-tw":"改變 Data 值","ja-jp":"Data の値を変更する"},PROPERTY_BANK_COMMAND:{default:"","en-us":"Trigger Data calculation flow without value change","zh-tw":"不需改變值,觸發 Data 計算流程","ja-jp":"値を変更せずに Data の計算フローをトリガーする"},DYNAMIC_BRICK:{default:"","en-us":"[Unstable] Dynamically generate bricks","zh-tw":"[Unstable] 動態地産生 Bricks","ja-jp":"動的に生成されたブリック"},DYNAMIC_BRICK_RESET:{default:"","en-us":"[Unstable] Reset Dynamic Bricks","zh-tw":"[Unstable] 重設 Dynamic Bricks","ja-jp":"動的に生成されたブリックをリセットする"},DYNAMIC_ANIMATION:{default:"","en-us":"Run specific Animation on specific Brick","zh-tw":"在指定的 Brick 上運行指定的 Animation","ja-jp":"指定されたブリックで指定されたアニメーションを実行する"},DYNAMIC_ANIMATION_RESET:{default:"","en-us":"Reset Dynamic Animation","zh-tw":"重設 Dynamic Animation","ja-jp":"動的なアニメーションをリセットする"},DYNAMIC_ANIMATION_STOP:{default:"","en-us":"Stop Dynamic Animation","zh-tw":"停止 Dynamic Animation","ja-jp":"動的なアニメーションを停止する"},CHANGE_CANVAS:{default:"","en-us":"Change canvas on the current Subspace","zh-tw":"在當前的 Subspace 中切換 Canvas","ja-jp":"現在の Subspace の Canvas を変更する"},MESSAGE:{default:"","en-us":"Log System message","zh-tw":"Log System message","ja-jp":"システムメッセージをログに記録する"},ALERT:{default:"","en-us":"Show system alert popup with custom message","zh-tw":"顯示自定義訊息的系統警告彈窗","ja-jp":"カスタムメッセージを使用してシステム警告ポップアップを表示する"},POPUP_RESET:{default:"","en-us":"Close current showing popups with type or id.","zh-tw":"關閉目前顯示的 Popup,可以指定 Popup 類型或 id。","ja-jp":"現在表示されているポップアップを閉じる、または ID で指定されたポップアップを閉じる。"},TAKE_SCREENSHOT:{default:"","en-us":"Take screenshot for current subspace or the full viewport (including portal subspaces)","zh-tw":"為當前的 Subspace 截圖,或截取整個顯示畫面(包含 Portal Subspace)","ja-jp":"現在の Subspace またはビューポート全体(Portal Subspace を含む)のスクリーンショットを撮る"},STORAGE_SET:{default:"","en-us":"Store a value in application-specific storage","zh-tw":"在應用程式特定的儲存空間中儲存值","ja-jp":"アプリケーション固有のストレージに値を保存する"},STORAGE_RETRIEVE:{default:"","en-us":"Retrieve a value from application-specific storage","zh-tw":"從應用程式特定的儲存空間中取得值","ja-jp":"アプリケーション固有のストレージから値を取得する"},STORAGE_DELETE:{default:"","en-us":"Delete a value from application-specific storage or clear all values","zh-tw":"從應用程式特定的儲存空間中刪除值或清除所有值","ja-jp":"アプリケーション固有のストレージから値を削除するか、すべての値をクリアする"},CHANNEL_SUBSCRIBE:{default:"","en-us":"Subscribe to a channel for data update","zh-tw":"訂閱一個 Channel 以接收資料更新","ja-jp":"チャンネルを購読してデータ更新を受け取る"},CHANNEL_UNSUBSCRIBE:{default:"","en-us":"Unsubscribe from a channel","zh-tw":"取消訂閱一個 Channel","ja-jp":"チャンネルから購読を解除する"},CHANNEL_PUBLISH:{default:"","en-us":"Publish data to a channel","zh-tw":"發布資料到一個 Channel","ja-jp":"チャンネルにデータを発行する"},DELAY:{default:"","en-us":"Delay for a certain time between actions","zh-tw":"延遲一段時間,用於兩個動作之間","ja-jp":"一定時間遅延する、2つのアクションの間"},USE_SHARE_APPLICATION:{default:"","en-us":"[Internal] Use a shared application","zh-tw":"[Internal] 切換到分享的應用程式","ja-jp":"[Internal] 共有アプリケーションを使用する"},AUTH_IN_DEVICE:{default:"","en-us":"[Internal] Auth in device","zh-tw":"[Internal] 在裝置上進行帳號登入","ja-jp":"[Internal] デバイスで認証する"},REFRESH_BINDCODE:{default:"","en-us":"[Internal] Refresh passcode for bind device","zh-tw":"[Internal] 更新裝置綁定碼","ja-jp":"[Internal] デバイスのバインドコードを更新する"},OPEN_URL:{default:"","en-us":"Open URL","zh-tw":"開啟 URL","ja-jp":"URL を開く"},OPEN_FILE:{default:"","en-us":"Open File or Directory","zh-tw":"開啟檔案或目錄","ja-jp":"ファイルまたはディレクトリを開く"},THROW_EXCEPTION:{default:"","en-us":"Throw exception","zh-tw":"拋出例外","ja-jp":"例外を投げる"},RESTART_FOUNDATION:{default:"","en-us":"Restart the foundation (React Native bundle)","zh-tw":"重新啟動基礎設施 (React Native bundle)","ja-jp":"基盤を再起動する (React Native bundle)"},DISMISS_KEYBOARD:{default:"","en-us":"Dismiss keyboard","zh-tw":"關閉鍵盤","ja-jp":"キーボードを閉じる"},TRIGGER_APPLICATION_FILTER:{default:"","en-us":"Trigger application AI filter","zh-tw":"觸發應用程式 AI 過濾器","ja-jp":"アプリケーション AI フィルターをトリガーする"},STOP_APPLICATION_FILTER:{default:"","en-us":"Stop running application AI filter","zh-tw":"停止運行中的應用程式 AI 過濾器","ja-jp":"実行中のアプリケーション AI フィルターを停止する"},SAVE_UPDATE_SNAPSHOT:{default:"","en-us":"Save update snapshot (from Application Filter or DevTools MCP Server) to media system","zh-tw":"儲存更新快照 (來自 Application Filter 或 DevTools MCP Server) 到媒體系統","ja-jp":"メディアシステムに更新スナップショット (Application Filter または DevTools MCP サーバーから) を保存する"}},t.systemActions={PROPERTY_BANK_EXPRESSION:{displayName:"CHANGE DATA WITH EXPRESSION",canProvideProperty:!0,filterKind:[p],propertyNameType:"defined_properties",property:{EXPRESSION:{type:"string",displayName:"Expression",normalizeDisplayName:!1},VARIABLES:{type:"nested",schema:{type:"object",properties:{id:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Data ID",normalizeDisplayName:!1},key:{type:"string"}},allowNewItem:!0},popover:!0,defaultValue:[]},RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},RESULT_ASSIGN_PATH:{type:"string"},ERROR_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1}},previewIcon:{type:"font-awesome-6pro",name:"bolt",size:14}},PROPERTY_BANK:{displayName:"CHANGE DATA",canProvideProperty:!0,filterKind:[p],propertyNameType:"property_bank",previewIcon:{type:"font-awesome-6pro",name:"bolt",size:14}},PROPERTY_BANK_COMMAND:{displayName:"TRIGGER DATA COMMAND",disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"property_bank",type:"bool",previewIcon:{type:"font-awesome-6pro",name:"bolt",size:16}},DYNAMIC_BRICK:{hidden:"unstable",disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{DYNAMIC_BRICK_ADD_LIST:{type:"string"},DYNAMIC_BRICK_PREFER_AFTER_ITEM_ID:{type:"string"},DYNAMIC_BRICK_RESET:{type:"bool"},DYNAMIC_BRICK_REMOVE_ITEM_ID:{type:"string"},DYNAMIC_BRICK_REMOVE_ITEMS:{type:"string"}},previewIcon:{type:"font-awesome-6pro",name:"grid-2"}},DYNAMIC_BRICK_RESET:{hidden:"unstable",disallowMultiple:!0,canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"rotate-right"}},DYNAMIC_ANIMATION:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{DYNAMIC_ANIMATION_BRICK_ID:{type:"string",kind:"id",idType:"brick"},DYNAMIC_ANIMATION_ANIMATION_ID:{type:"string",kind:"id",idType:"animation"},DYNAMIC_ANIMATION_RUN_TYPE:{type:"oneOf",oneOf:n},DYNAMIC_ANIMATION_RESET_INITIAL_VALUE:{type:"bool"}},previewIcon:{type:"font-awesome-6pro",name:"bars-staggered",size:16}},DYNAMIC_ANIMATION_RESET:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{DYNAMIC_ANIMATION_BRICK_ID:{type:"string",kind:"id",idType:"brick"}},previewIcon:{type:"font-awesome-6pro",name:"rotate-right"}},DYNAMIC_ANIMATION_STOP:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{DYNAMIC_ANIMATION_BRICK_ID:{type:"string",kind:"id",idType:"brick"}},previewIcon:{type:"font-awesome-6pro",name:"stop"}},CHANGE_CANVAS:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{CANVAS_ID:{type:"string",kind:"id",idType:"canvas"},CANVAS_TITLE_LIKE:{type:"string"},CANVAS_KEY_MAP_LIST:{type:"nested",schema:{type:"object",properties:{key:{displayName:"Key",type:"string"},value:{displayName:"Canvas ID",type:"string",kind:"id",idType:"canvas"}},allowNewItem:!0},popover:!0,defaultValue:[]},CANVAS_KEY:{type:"string"}},previewIcon:{type:"font-awesome-6pro",name:"diamond-turn-right",size:16}},MESSAGE:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{SYSTEM_MESSAGE_TYPE:{type:"oneOf",oneOf:["SYSTEM_MESSAGE_TYPE_INFO","SYSTEM_MESSAGE_TYPE_SUCCESS","SYSTEM_MESSAGE_TYPE_WARNING","SYSTEM_MESSAGE_TYPE_ERROR"]},SYSTEM_MESSAGE_TITLE:{type:"string"},SYSTEM_MESSAGE_MESSAGE:{type:"string"}},previewIcon:{type:"font-awesome-6pro",name:"note"}},ALERT:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{ALERT_ID:{type:"string"},ALERT_TYPE:{type:"oneOf",oneOf:["info","success","warning","error"]},ALERT_TITLE:{type:"string"},ALERT_MESSAGE:{type:"string"},ALERT_SELECTIONS:{type:"nested",schema:{type:"object",properties:{label:{type:"string"},color:{type:"string"},value:{type:"string"},disableResult:{type:"bool"}},allowNewItem:!0},popover:!0,defaultValue:[]},ALERT_SELECTION_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},ALERT_TIMEOUT:{type:"number",defaultValue:1e4},ALERT_HIDE_SELECTIONS:{type:"bool"}},previewIcon:{type:"font-awesome-6pro",name:"bell"}},POPUP_RESET:{disallowMultiple:!0,canProvideProperty:!0,propertyNameType:"defined_properties",property:{POPUP_CLEAR_TYPE:{type:"oneOf",oneOf:["all","alert","generator"]},POPUP_ID:{type:"string"}},previewIcon:{type:"font-awesome-6pro",name:"rotate-right"}},TAKE_SCREENSHOT:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{TAKE_SCREENSHOT_CURRENT_SUBSPACE:{type:"bool"},TAKE_SCREENSHOT_BRICK_ID:{type:"string",kind:"id",idType:"brick",displayName:"Brick ID",normalizeDisplayName:!1},TAKE_SCREENSHOT_FORMAT:{type:"oneOf",oneOf:["jpg","png"]},TAKE_SCREENSHOT_QUALITY:{type:"number",max:1,min:0,step:.1},TAKE_SCREENSHOT_WIDTH:{type:"number"},TAKE_SCREENSHOT_HEIGHT:{type:"number"},TAKE_SCREENSHOT_SAVE_PROPERTY:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1}},previewIcon:{type:"font-awesome-6pro",name:"camera",size:16}},STORAGE_SET:{displayName:"STORAGE SET",canProvideProperty:!0,propertyNameType:"defined_properties",property:{STORAGE_TYPE:{type:"oneOf",oneOf:["persist","in-memory"],displayName:"Storage Type",defaultValue:"persist"},STORAGE_SCOPE:{type:"oneOf",oneOf:["global","subspace"],displayName:"Storage Scope",defaultValue:"global"},STORAGE_KEY:{type:"string",displayName:"Key",normalizeDisplayName:!1},STORAGE_VALUE:{type:"any",displayName:"Value",normalizeDisplayName:!1}},previewIcon:{type:"font-awesome-6pro",name:"database",size:14}},STORAGE_RETRIEVE:{displayName:"STORAGE RETRIEVE",canProvideProperty:!0,propertyNameType:"defined_properties",property:{STORAGE_TYPE:{type:"oneOf",oneOf:["persist","in-memory"],displayName:"Storage Type",defaultValue:"persist"},STORAGE_SCOPE:{type:"oneOf",oneOf:["global","subspace"],displayName:"Storage Scope",defaultValue:"global"},STORAGE_KEY:{type:"string",displayName:"Key",normalizeDisplayName:!1},STORAGE_RETRIEVE_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Result Target"},STORAGE_RETRIEVE_DEFAULT_VALUE:{type:"string",displayName:"Default Value",normalizeDisplayName:!1},STORAGE_RETRIEVE_SKIP_IF_NOT_FOUND:{type:"bool",displayName:"Skip if Not Found",defaultValue:!1}},previewIcon:{type:"font-awesome-6pro",name:"database",size:14}},STORAGE_DELETE:{displayName:"STORAGE DELETE",canProvideProperty:!0,propertyNameType:"defined_properties",property:{STORAGE_TYPE:{type:"oneOf",oneOf:["persist","in-memory"],displayName:"Storage Type",defaultValue:"persist"},STORAGE_SCOPE:{type:"oneOf",oneOf:["global","subspace"],displayName:"Storage Scope",defaultValue:"global"},STORAGE_KEY:{type:"string",displayName:"Key",normalizeDisplayName:!1},STORAGE_DELETE_ALL:{type:"bool",displayName:"Delete All Values",defaultValue:!1}},previewIcon:{type:"font-awesome-6pro",name:"trash",size:14}},CHANNEL_SUBSCRIBE:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{CHANNEL_SUBSCRIBE_KEY:{type:"string"},CHANNEL_SUBSCRIBE_TYPE:{type:"oneOf",oneOf:["on","once"]},CHANNEL_SUBSCRIBE_LIVETIME:{type:"number",kind:"unit",unit:"ms"},CHANNEL_SUBSCRIBE_DATA_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Result"},CHANNEL_SUBSCRIBE_DATA_ASSIGN_LIST:{type:"nested",schema:{type:"object",properties:{path:{displayName:"Object Path",type:"string"},type:{type:"oneOf",oneOf:["any","string","number","bool","array","object"],oneOfEmptyOption:!1,defaultValue:"any"},id:{displayName:"Data ID",type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},required:{type:"bool",defaultValue:!1}},allowNewItem:!0},popover:!0,defaultValue:[]},CHANNEL_SUBSCRIBE_PROGRESS_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Progress"},CHANNEL_SUBSCRIBE_PROGRESS_ASSIGN_LIST:{type:"nested",schema:{type:"object",properties:{path:{displayName:"Object Path",type:"string"},type:{type:"oneOf",oneOf:["any","string","number","bool","array","object"],oneOfEmptyOption:!1,defaultValue:"any"},id:{displayName:"Data ID",type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},required:{type:"bool",defaultValue:!1}},allowNewItem:!0},popover:!0,defaultValue:[]},CHANNEL_SUBSCRIBE_ERROR_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Error"}},previewIcon:{type:"font-awesome-6pro",name:"display",size:16}},CHANNEL_UNSUBSCRIBE:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{CHANNEL_UNSUBSCRIBE_KEY_MATCH:{type:"string"}}},CHANNEL_PUBLISH:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{CHANNEL_PUBLISH_KEY_MATCH:{type:"string"},CHANNEL_PUBLISH_PAYLOAD_TYPE:{type:"oneOf",oneOf:["result","progress","error"]},CHANNEL_PUBLISH_PAYLOAD:{type:"string"}}},DELAY:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{DELAY_TIME:{type:"number",kind:"unit",unit:"ms"}}},USE_SHARE_APPLICATION:{hidden:"internal",canProvideProperty:!0,propertyNameType:"defined_properties",property:{APPLICATION_ID:{type:"string"},RELEASE_VERSION:{type:"string"},USE_TYPE:{type:"oneOf",oneOf:["run","use-after-bind","cancel-use"]},VIEWPORT_PRESET_NAME_LIKE:{type:"string"},VIEWPORT_PRESET_DEVICE_TARGET:{type:"string"},ENABLE_LOCAL_SYNC:{type:"bool"}},previewIcon:{type:"font-awesome-6pro",name:"display",size:16}},AUTH_IN_DEVICE:{hidden:"internal",canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"user",size:16}},REFRESH_BINDCODE:{hidden:"internal",canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"arrows-rotate",size:16}},OPEN_URL:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{URL:{type:"string",normalizeDisplayName:!1,displayName:"URL"},BEHAVIOR:{type:"oneOf",oneOf:["in-app","new-window"]},IN_APP_TINT_COLOR:{type:"string",kind:"color",popover:!0}},previewIcon:{type:"font-awesome-6pro",name:"external-link",size:16}},OPEN_FILE:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{PICK_TYPE:{type:"oneOf",oneOf:["file","multiple","directory"],oneOfEmptyOption:!1},FILE_TYPE:{type:"any"},COPY_TO:{type:"oneOf",oneOf:["cache","document"]},MODE:{type:"oneOf",oneOf:["import","open"]},SAVE_PROPERTY:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},SAVE_DETAIL_PROPERTY:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1},ERROR_SAVE_PROPERTY:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1}},previewIcon:{type:"font-awesome-6pro",name:"folder-open",size:16}},THROW_EXCEPTION:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{BEHAVIOR:{type:"oneOf",oneOf:["application","native"]},EXCEPTION_MESSAGE:{type:"string",displayName:"Exception Message"}},previewIcon:{type:"font-awesome-6pro",name:"bomb",size:16}},RESTART_FOUNDATION:{canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"arrows-rotate",size:16}},DISMISS_KEYBOARD:{canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"keyboard-down",size:16}},TRIGGER_APPLICATION_FILTER:{canProvideProperty:!0,propertyNameType:"defined_properties",property:{NAME:{type:"string",displayName:"Filter Name",normalizeDisplayName:!1},VARIABLES:{type:"any",displayName:"Variables",normalizeDisplayName:!1},RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Result Target"},ERROR:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Error Target"}},previewIcon:{type:"font-awesome-6pro",name:"robot",size:16}},STOP_APPLICATION_FILTER:{canProvideProperty:!1,previewIcon:{type:"font-awesome-6pro",name:"stop",size:16}},SAVE_UPDATE_SNAPSHOT:{displayName:"SAVE UPDATE SNAPSHOT",canProvideProperty:!0,propertyNameType:"defined_properties",property:{SNAPSHOT_FILE_INDENTIFIER:{type:"string",displayName:"Filename Identifier",defaultValue:"default",normalizeDisplayName:!1},SNAPSHOT_SAVE_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Result Target"},SNAPSHOT_ERROR_RESULT:{type:"string",kind:"id",idType:"property_bank",showPropertyBankLink:!1,displayName:"Error Target"}},previewIcon:{type:"font-awesome-6pro",name:"camera-retro",size:16}}},t.getSubspaceActionTypes=e=>Object.entries(e.action_map||{}).reduce((e,[t,r])=>(e[`SUBSPACE_ACTION_${t}`]={canProvideProperty:Object.keys(r.event_property_map||{}).length>0,property:Object.entries(r.event_property_map||{}).reduce((e,[t,r])=>(e[`SUBSPACE_${t}`]={type:r.type,name:a(t)},e),{}),propertyNameType:"defined_properties"},e),{})},54369:(e,t,r)=>{const{getIDPattern:a}=r(1639);e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/generator.schema.json5",title:"Generator",description:"A generator config",type:"object",properties:{alias:{type:"string",description:"Optional alias for this generator, used as variable name in code generation."},title:{type:"string",description:"This generator's name."},description:{type:"string",description:"This generator's description."},local_sync:{type:"object",description:"Define generator behavior on Local Sync mode.",properties:{run_mode:{type:"string",enum:["all","main-only","minor-only"]}}},template_key:{type:"string"},property:{type:"object"},outlet:{type:"object",patternProperties:{"^GENERATOR_(.)+$":{type:"string",pattern:a("PROPERTY_BANK_DATA_NODE")}},additionalProperties:!1},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."}},required:["template_key"]}},62701:e=>{e.exports=JSON.parse('["easeInSine","easeOutSine","easeInOutSine","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInElastic","easeOutElastic","easeInOutElastic","easeInBounce","easeOutBounce","easeInOutBounce"]')},66354:(e,t,r)=>{const{getIDPattern:a}=r(1639),n=a("CANVAS");e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/subspace.schema.json5",title:"Subspace",description:"A brick subspace config",type:"object",properties:{routing:{type:"object",patternProperties:{[a("PROPERTY_BANK_DATA_NODE")]:{type:"object",properties:{enabled_routing:{type:["boolean","null"]}}}},additionalProperties:!1},title:{type:"string",description:"Subspace Title"},description:{type:"string",description:"Subspace Description"},module:{type:"object"},layout:{type:"object",properties:{width:{type:"number"},height:{type:"number"}}},root_canvas_id:{type:"string",description:"Canvas ID point to this stage entry subspace.",pattern:n},property_bank_map:{type:"object",patternProperties:{[a("PROPERTY_BANK_DATA_NODE")]:{$ref:"http://display.bricks.tools/property_bank.schema.json5",description:"One subspace can have many property bank."}},additionalProperties:!1},property_bank_calc_map:{type:"object",patternProperties:{[a("PROPERTY_BANK_COMMAND_MAP")]:{type:"object",properties:{type:{type:"string",enum:["general","script"]},map:{type:"object",patternProperties:{[a("PROPERTY_BANK_(DATA_NODE|COMMAND_NODE)")]:{$ref:"http://display.bricks.tools/property_bank_command.schema.json5",description:"One command map can have many property bank data node."}}},editor_info:{type:"object",patternProperties:{[a("PROPERTY_BANK_(DATA_NODE|COMMAND_NODE)")]:{type:"object",properties:{position:{type:"object",properties:{x:{type:"number"},y:{type:"number"}}},points:{type:"object"}},description:"One command map can have many property bank data node."}}},script_config:{$ref:"http://display.bricks.tools/property_bank_calc_script_config.schema.json5",description:"JavaScript Sandbox calculation config"},note:{type:"string",description:"Note of this calc map."}},description:"One command map can have many property bank commands"}},additionalProperties:!1},brick_map:{type:"object",patternProperties:{[a("BRICK")]:{$ref:"http://display.bricks.tools/brick.schema.json5",description:"One subspace can have many brick."}},additionalProperties:!1},generator_map:{type:"object",patternProperties:{[a("(GENERATOR|AUTO_GENERATOR)")]:{$ref:"http://display.bricks.tools/generator.schema.json5",description:"One subspace can have many generator."}},additionalProperties:!1},animation_map:{type:"object",patternProperties:{[a("ANIMATION")]:{$ref:"http://display.bricks.tools/animation.schema.json5",description:"One subspace can have many animation."}},additionalProperties:!1},canvas_map:{type:"object",patternProperties:{[n]:{$ref:"http://display.bricks.tools/canvas.schema.json5",description:"One subspace can have many canvas."}},additionalProperties:!1},local_sync:{type:"object",description:"Define subspace behavior on Local Sync mode.",properties:{change_canvas:{type:"string",enum:["all","main-only","minor-only"]}}}},if:{properties:{module:{type:"object",properties:{link:{const:!0}},required:["link"]}},required:["module"]},then:{required:["module"]},else:{required:["root_canvas_id","property_bank_map","brick_map","generator_map","animation_map","canvas_map"]}}},78078:(e,t,r)=>{const{parse:a}=r(89236),{expressionFoldAcornOptions:n,getUnfoldableStatementDescription:p}=r(41900),o=(e,t,r)=>{e&&"object"==typeof e&&(Array.isArray(e)?e.forEach((e,a)=>o(e,`${t}[${a}]`,r)):Object.entries(e).forEach(([e,i])=>{"event_map"!==e&&"eventMap"!==e||!i||"object"!=typeof i?i&&"object"==typeof i&&o(i,`${t}.${e}`,r):Object.entries(i).forEach(([o,i])=>{Array.isArray(i)&&i.forEach((i,s)=>{if("PROPERTY_BANK_EXPRESSION"!==i?.action)return;const c=(e=>{const t=e.parameter_list||e.parameterList||[];if(!Array.isArray(t))return;const r=t.find(e=>"EXPRESSION"===(e?.input_to_receiver||e?.inputToReceiver));return r?r.result_from_sender??r.resultFromSender:void 0})(i);if("string"!=typeof c||c.startsWith("PROPERTY_BANK#"))return;const d=(e=>{if(!e.trim())return"Expression is empty";let t;try{t=a(e,n)}catch(e){return`Expression does not parse: ${e.message}`}const r=p(t.body);return r?`Expression contains ${r}; statements must fold into a single expression (expression statements, simple const/let declarations, and a final return only). Use ternaries instead of if/for/while, or move branching logic to a DataCalculationScript.`:null})(c);d&&r.push({field:`${t}.${e}.${o}[${s}]`,message:d})})})}))};e.exports=function(e){const t=[];return Object.entries(e.subspace_map||{}).forEach(([e,r])=>{r.module?.link||o(r,`subspace_map.${e}`,t)}),t}},79458:(e,t,r)=>{const{getIDPattern:a}=r(1639),n=a("SUBSPACE"),p=a("TEST");e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/root.schema.json5",title:"Root",description:"A brick root config",type:"object",properties:{title:{type:"string",description:"The root config name."},root_subspace_id:{type:"string",description:"The root subspace id.",pattern:n},subspace_map:{type:"object",patternProperties:{[n]:{$ref:"http://display.bricks.tools/subspace.schema.json5",description:"Root config can have many subspace."}},additionalProperties:!1},test_map:{type:"object",patternProperties:{[p]:{$ref:"http://display.bricks.tw/test.schema.json5",description:"Root config can have many test."}},additionalProperties:!1,deprecated:!0,description:"Deprecated in favor of automation_map.AUTOMATION_MAP_DEFAULT"},automation_map:{$ref:"http://display.bricks.tools/automation_map.schema.json5",description:"Maps of automation tests organized by collection"},show_viewports:{type:"boolean",description:"Show device viewport reference on editor"},enable_unstable_bricks:{type:"boolean",description:"Enable unstable bricks / generators"},hide_short_refs:{type:"boolean",description:"Hide all instances in Short Edit mode"},warnings:{type:"array",description:"Config validation warnings from server"}},required:["title","subspace_map","root_subspace_id"]}},80211:(e,t,r)=>{const a=r(11601),{propertyBank:n,propertyBankCommand:p,propertyBankCalcScriptConfig:o}=r(7436),i=new a({strict:!1,schemas:[r(85912),n,p,o,r(5982),r(54369),r(24090),r(27449),r(85190),r(66354),r(92514),r(97256),r(79458)]});function s(e){const t=i.getSchema("http://display.bricks.tools/root.schema.json5");return t(e),t.errors||[]}s.ajv=i,e.exports=s},85190:(e,t,r)=>{const a=r(62701),{getIDPattern:n}=r(1639),p={type:"object",properties:{method:{type:"string",anyOf:[{enum:[""].concat(a)},{pattern:"^cubic-bezier\\([\\d.-]+,\\s*[\\d.-]+,\\s*[\\d.-]+,\\s*[\\d.-]+\\)$"}]},duration:{type:"number",min:0}}},o={type:"object",properties:{x:{type:"number"},y:{type:"number"},width:{type:"number"},height:{type:"number"}}},i={type:"object",properties:{default:p,x:p,y:p,width:p,height:p,opacity:p}},s={type:"object",properties:{x:{type:"number"},y:{type:"number"},width:{type:"number"},height:{type:"number"},standby_mode:{type:"string",enum:["custom","top","left","right","bottom"]},standby_frame:o,standby_opacity:{type:"number"},standby_delay:{type:"number"},standby_delay_random:{type:"number"},standby_easing:i,showing_delay:{type:"number"},render_out_of_viewport:{type:"boolean"}}};e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/canvas.schema.json5",title:"Canvas",description:"A brick canvas config",type:"object",properties:{alias:{type:"string",description:"Optional alias for this canvas, used as variable name in code generation."},title:{type:"string",description:"Canvas Title"},description:{type:"string",description:"Canvas Description"},property:{type:"object"},event_map:{$ref:"http://display.bricks.tools/event_map.schema.json5",description:"Use event map describe how event should go."},state_group:{$ref:"http://display.bricks.tools/state_group.schema.json5",description:"Use state group to describe how to transform property, event and outlet."},item_list:{type:"array",items:{type:"object",oneOf:[{properties:{type:{type:"string",enum:["subspace"]},subspace_id:{type:"string",description:"The subspace id",pattern:n("SUBSPACE")},frame:{...s,properties:{...s.properties,exceed_boundary:{type:"boolean"}}}}},{properties:{type:{type:"string",enum:["brick"]},brick_id:{type:"string",description:"The brick id",pattern:n("BRICK")},frame:s}}]}}}},e.exports.standbyFrame=o,e.exports.standbyEasing=i},85912:e=>{e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/event_map.schema.json5",title:"Event Map",description:"A event map config",type:"object",patternProperties:{"^.+$":{type:"array",description:"List all handler response to this event.",items:{type:"object",description:"A handle trigger action and parameter.",properties:{action:{type:"string",description:"Which action will be execute."},handler:{type:"string",description:"Which generator are handler."},wait_async:{type:"boolean",description:"Wait for async action finish."},parameter_list:{type:"array",description:"Describe how which data will as parameter and send to where.",items:{type:"object",properties:{result_from_sender:{description:"Describe which data will be the input."},input_to_receiver:{description:"Describe where the input data will go."}},required:["input_to_receiver"]}}},required:["action","handler","parameter_list"]}}},additionalProperties:!1}},86343:(e,t,r)=>{const{v4:a}=r(79194),n=r(95479),{nameMap:p,brickMapping:o,generatorMapping:i}=r(63981);t.idByItem=(e={})=>e.canvas_id||e.subspace_id||e.brick_id||e.generator_id||e.property_bank_id||e.property_bank_calc_id||e.bank_id||e.scene_id,t.getAnimationType=e=>e.type||e.compose_type||e.composeType,t.cleanUpAnimationMap=e=>Object.entries(e).reduce((e,[t,r])=>((r.type||r.compose_type)&&(e[t]=r),e),{}),t.matchItemByItem=(e,t)=>{if(!e)return!1;let r;switch("string"==typeof t&&(r=t),e.type){case"brick":return e.brick_id===(r||t.brick_id);case"subspace":return e.subspace_id===(r||t.subspace_id);case"canvas":return e.canvas_id===(r||t.canvas_id);case"generator":return e.generator_id===(r||t.generator_id);case"property_bank":return e.property_bank_id===(r||t.property_bank_id);default:return!1}},t.makePasscode=()=>a(),t.kindOneOfTypes={string:["color","datetime","id","graphql","rich-text-content","sandbox-script","llm-prompt","media-resource-image","media-resource-video","media-resource-audio","media-resource-file","lottie-file-uri","rive-file-uri","ggml-model-asset","gguf-model-asset","binary-asset"],number:["unit"],object:["tts-speaker-config"],"array-object":["llm-tools","llm-messages","mcp-server-resources","mcp-server-tools","mcp-server-prompts"]},t.getKindOneOfTypes=(e,r)=>"array"===e?"object"===r?t.kindOneOfTypes[`${e}-${r}`]:void 0:t.kindOneOfTypes[e],t.unitOneOfTypes=["grid","px","ms"],t.idOneOfTypes=["canvas","brick","generator","animation","property_bank"],t.typeToName={brick:"Brick",generator:"Generator",subspace:"Subspace",canvas:"Canvas",animation:"Animation",property_bank:"Data",property_bank_calc:"Calculation"},t.getBrickName=(e,r,a)=>{if(!r)return e.toUpperCase();if(r.title)return r.title;let o;switch(e){case"bank":o="BANK";break;case"subspace":o="SUBSPACE";break;case"canvas":o="CANVAS";break;case"animation":o=`<${n(t.getAnimationType(r))}>`;break;case"property_bank":o="<Data>";break;case"property_bank_calc":o="<Map>";break;case"state_group":o="<Switch Case>";break;default:o=`<${p[r.template_key||r.templateKey]||"Unknown"}>`}return a&&a.length>10?o+=` (${a.replace(/[A-Z_]+/g,"").substr(0,6)}...)`:a&&(o+=` (${a})`),o},t.getCallInternalActions=e=>{const t=o[e]||i[e];if(t)return t.callInternalActions},t.mapToList=(e,r)=>Object.entries(r).reduce((r,[a,n])=>(r.push({id:a,...n,title:t.getBrickName(e,n,a)}),r),[]);const s={subspaceMap:"subspace",brickMap:"brick",generatorMap:"generator",propertyBankMap:"property_bank",propertyAvailableToAdd:"property_bank",canvasMap:"canvas",animationMap:"animation"},c={};t.mapToListForDerivedState=(e,r,a,n)=>{const p=a[e]||c;return p!==n[e]?{[e]:p,[r]:t.mapToList(s[e],p)}:{}},t.arrayTypePrefix="array of ",t.propertyBankTypes=["string","number","bool","object","any",`${t.arrayTypePrefix}string`,`${t.arrayTypePrefix}number`,`${t.arrayTypePrefix}bool`,`${t.arrayTypePrefix}object`],t.animationRunTypes=["once","loop"],t.stopPropagationOnKeyBackspace=e=>{8===e.keyCode&&e.stopPropagation()},t.nestedTypes=["object","array","any"],t.isPropertyBankTypeNested=e=>t.nestedTypes.includes(e),t.propertyTypeToSchema=e=>{const r=e.indexOf(t.arrayTypePrefix)>-1,a=e.replace(t.arrayTypePrefix,"");return{type:a,properties:"object"===a?{}:void 0,allowNewItem:r,allowCustomProperty:"object"===a}}},92514:(e,t,r)=>{const{getIDPattern:a}=r(1639);e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tw/test.schema.json5",title:"Test",description:"A brick test config",type:"object",properties:{title:{type:"string",description:"Test Title"},description:{type:"string",description:"Test Description"},meta:{type:"object",properties:{}},open_report_on_failed:{type:"boolean",description:"Open Automation report on failed"},use_media_flow_screenshots:{type:"boolean",description:"Save screeshots to SYSTEM media box if enabled"},trigger_type:{type:"string",enum:["launch","anytime","cron"],description:"Trigger type (launch: restart the application, anytime: trigger directly)"},cron:{type:"string",description:"Cron Expression"},timeout:{type:"number",description:"Test runtime timeout"},case_map:{type:"object",patternProperties:{[a("TEST_CASE")]:{type:"object",properties:{id:{type:"string"},name:{type:"string"},run:{type:"array"},commented:{type:"boolean"},exit_on_failed:{type:"boolean"},pre_delay:{type:"number"},post_delay:{type:"number"}}}},additionalProperties:!1},var_map:{type:"object",patternProperties:{[a("TEST_VAR")]:{type:"object",properties:{title:{type:"string",description:"This var's name."},type:{type:"string",enum:["string","number","array","object","bool","any"]},value:{}}}},additionalProperties:!1}},required:["case_map","var_map"]}},97256:(e,t,r)=>{const{getIDPattern:a}=r(1639),n=a("TEST");e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://display.bricks.tools/automation_map.schema.json5",title:"Automation Map",description:"A map of automation test collections",type:"object",patternProperties:{"AUTOMATION_MAP_.*":{type:"object",properties:{title:{type:"string",description:"The name of the test map"},createdAt:{type:"number",description:"The creation timestamp of the test map"},map:{type:"object",patternProperties:{[n]:{$ref:"http://display.bricks.tw/test.schema.json5",description:"A test configuration"}},additionalProperties:!1}}}},additionalProperties:!1}},99470:(e,t)=>{t.animationRunTypes=["once","loop"],t.autoGeneratedItemIdKind="auto-generated-item-id";const r=/^([^.](?![\w!#$%&'*+/=?^`{|}~\-]+\.\.)([\w!#$%&'*+./=?^`{|}~\-]+[^.])|([\dA-Za-z]{1,2}))@([\dA-Za-z-]{1,64}\.){1,10}[A-Za-z]{2,64}$/;t.isEmail=e=>"string"==typeof e&&r.test(e)&&e.indexOf("@")<65&&e.length<255;const a=/^(data:)([\w+/]+);(charset=[\w-]+|base64).*,(.*)/i,n=e=>new RegExp(`^(${e.join("|")}):\\/\\/(www\\.)?([\\w#%+.:=@~-]{1,256}\\.[\\d()a-z]{1,6}\\b|localhost|[\\d]{1,3}\\.[\\d]{1,3}\\.[\\d]{1,3}\\.[\\d]{1,3})([\\w#%&()+./:=?@~-]*)`,"i"),p=["https?"],o=n(p);t.isURI=(e,t=p)=>{const r=t.includes("data");if(r&&a.test(e))return!0;return(e=>e===p||1===e.length&&"https?"===e[0]?o:n(e))(r?t.filter(e=>"data"!==e):t).test(e)}}};
|