var__defProp=Object.defineProperty,__typeError=e=>{throwTypeError(e)},__defNormalProp=(e,t,i)=>tine?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,__publicField=(e,t,i)=>__defNormalProp(e,"symbol"!=typeoft?t+"":t,i),__accessCheck=(e,t,i)=>t.has(e)||__typeError("Cannot "+i),__privateGet=(e,t,i)=>(__accessCheck(e,t,"read from private field"),i?i.call(e):t.get(e)),__privateAdd=(e,t,i)=>t.has(e)?__typeError("Cannot add the same private member more than once"):tinstanceofWeakSet?t.add(e):t.set(e,i),__privateSet=(e,t,i,s)=>(__accessCheck(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),__privateMethod=(e,t,i)=>(__accessCheck(e,t,"access private method"),i),_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_pos,_size,_node,_value,_ComboWidget_instances,getValues_fn,canUseButton_fn,tryChangeValue_fn;import{dasdefineStore,hashotkeys,sasscript,aasscript$1,TasTooltip,basscript$2,casstoreToRefs,easscript$3,fasscript$4,gasscript$5,iasscript$6}from"./vendor-BWlTOcRr.js";import{cascloneDeep}from"./lodash-CZi7izHi.js";import{rasref,masmarkRaw,tastoRaw,uasuseModel,oasonMounted,aasopenBlock,cascreateElementBlock,bascreateBaseVNode,dascreateVNode,easunref,waswithDirectives,fascreateBlock,gasmergeModels,nasnormalizeStyle,hasrenderSlot,iascomputed,jaswatch,kasnormalizeClass,lascreateCommentVNode,paswithCtx,qastoDisplayString,saswithModifiers,vasreactive,FasFragment,xasrenderList}from"./vue-DAoaJb2i.js";import{uasuseEventListener,aasuseIntersectionObserver,basuseMouseInElement,casuseElementHover}from"./vueuse-CqzKat4r.js";letapp$1=(null==(_b=null==(_a=window.comfyAPI)?void0:_a.app)?void0:_b.app)||null,api=(null==(_d=null==(_c=window.comfyAPI)?void0:_c.api)?void0:_d.api)||null,$el=(null==(_f=null==(_e=window.comfyAPI)?void0:_e.ui)?void0:_f.$el)||null,ComfyDialog=(null==(_h=null==(_g=window.comfyAPI)?void0:_g.dialog)?void0:_h.ComfyDialog)||null,ComfyWidgets=(null==(_j=null==(_i=window.comfyAPI)?void0:_i.widgets)?void0:_j.ComfyWidgets)||null,applyTextReplacements=(null==(_l=null==(_k=window.comfyAPI)?void0:_k.utils)?void0:_l.applyTextReplacements)||null,GroupNodeConfig=(null==(_n=null==(_m=window.comfyAPI)?void0:_m.groupNode)?void0:_n.GroupNodeConfig)||null,registerExtension=e=>{try{app$1.registerExtension(e)}catch(t){}};constgetUserSettingsValue=e=>{vart,i;returne?null==(i=null==(t=null==app$1?void0:app$1.ui)?void0:t.settings)?void0:i.getSettingValue(e):null};functiongetSetting(e,t=null){try{leti=e?getUserSettingsValue(e):null;returnnull==i&&(i=t?localStorage[t]:localStorage[e]||null),i}catch(i){returnnull}}functiongetSettingsLookup(e,t=e=>{}){vari;consts=null==(i=app$1.ui.settings.settingsLookup)?void0:i[e];s&&(s.onChange=e=>t(e))}asyncfunctionsetSetting(e,t,i=null){vars,o;if(!e)thrownewError("Invalid arguments");try{(null==(o=null==(s=null==app$1?void0:app$1.ui)?void0:s.settings)?void0:o.setSettingValue)?app$1.ui.settings.setSettingValue(e,t):awaitapi.storeSetting(e,t),i&&(localStorage[i]="object"==typeoft?JSON.stringify(t):t)}catch(a){}}functionaddSetting(e){app$1.ui.settings.settingsLookup[e.id]||app$1.ui.settings.addSetting(e)}functiongetLocale(){returngetSetting("Comfy.Locale")}constzhCN={"Workflow created by":"工作流创建者","Watch more video content":"观看更多视频内容","Workflow Guide":"工作流指南","💎 View Checkpoint Info...":"💎 查看 Checkpoint 信息...","💎 View Lora Info...":"💎 查看 Lora 信息...","🔃 Reload Node":"🔃 刷新节点","Updated At:":"最近更新:","Created At:":"首次发布:","✏️ Edit":"✏️ 编辑","💾 Save":"💾 保存","No notes":"当前还没有备注内容","Saving Notes...":"正在保存备注...","Type your notes here":"在这里输入备注内容",ModelName:"模型名称","Models Required":"所需模型","Download Model":"下载模型","Source Url":"模型源地址",Notes:"备注",Type:"类型","Trained Words":"训练词",BaseModel:"基础算法",Details:"详情",Description:"描述",Download:"下载量",Source:"来源","Saving Preview...":"正在保存预览图...","Saving Succeed":"保存成功","Clean SuccessFully":"清理成功","Clean Failed":"清理失败","Saving Failed":"保存失败","No COMBO link":"沒有找到COMBO连接","Reboot ComfyUI":"重启ComfyUI","Are you sure you'd like to reboot the server?":"是否要重启ComfyUI?","NODES MAP":"管理节点与组",NodesMap:"节点与组","Nodes map sorting mode":"管理节点组排序模式","Search by Node ID/Name...":"通过节点ID/名称搜索...","No Nodes":"未找到节点","No nodes found in the map":"在工作流程中没有找到节点","No nodes found in the search":"未找到与搜索匹配的节点","Jump to this node":"跳转到该节点","Rename node":"重命名节点","Delete node":"删除节点","Rename group":"重命名组","Delete group":"删除组","Expand All":"展开所有组","Collapse All":"折叠所有组",Close:"关闭","Default automatic sorting, if set to manual, groups can be dragged and dropped and the sorting results saved.":"默认自动排序,如果设置为手动,组可以拖放并保存排序结果。","For drag and drop sorting, please find Nodes map sorting mode in Settings->EasyUse and change it to manual":"如需拖拽排序请在设置->EasyUse节点中找到管理节点组排序模式并修改成 manual",Queue:"队列","Cleanup Of VRAM Usage":"清理显存占用","Please stop all running tasks before cleaning GPU":"请在清理GPU之前停止所有运行中的任务",Always:"启用中",Bypass:"已忽略",Never:"已停用","Auto Sorting":"自动排序","Toggle `Show/Hide` can set mode of group, LongPress can set group nodes to never":"点击`启用中/已忽略`可设置组模式, 长按可停用该组节点","Enable Shift+Up/Down/Left/Right key and Shift+Ctrl+Alt+Left/Right to align selected nodes":"启用 Shift+上/下/左/右 和 Shift+Ctrl+Alt+左/右 键对齐选中的节点","Enable Shift+Ctrl+Left/Right key to normalize selected nodes":"启用 Shift+Ctrl+左/右 键规范化选中的节点","Enable Shift+g to add selected nodes to a group":"启用 Shift+g 键将选中的节点添加一个组","Enable Shift+r to unload models and node cache":"启用 Shift+r 键卸载模型和节点缓存","Enable Shift+m to toggle nodes map":"启用 Shift+m 键显隐管理节点组","Enable Up/Down/Left/Right key to jump nearest nodes":"启用 上/下/左/右 键跳转到最近的前后节点","Enable Alt+1~9 to paste nodes from nodes template":"启用 Alt+1~9 从节点模板粘贴到工作流中","Enable contextMenu auto nest subdirectories":"启用上下文菜单自动嵌套子目录","Enable right-click menu to add node A~Z sorting":"启用右键菜单中新建节点A~Z排序","Enable model thumbnails display":"启动模型预览图显示","Enable nodes runtime display":"启动节点运行时间显示","Enable chain get node and set node with parent nodes":"启用将获取点和设置点与父节点链在一起","Maximum number of model thumbnails displayed":"显示的模型缩略图的最大数量","Too many thumbnails will affect the first loading time, set the maximum value to not load the thumbnail function when there are too many models's thumbnail":"太多的缩略图会影响首次加载时间,当模型缩略图太多时,设置最大值以不加载缩略图功能","Too many thumbnails, have closed the display":"模型缩略图太多啦,为您关闭了显示","Shift+Up/Down/Left/Right can align selected nodes, Shift+Ctrl+Alt+Left/Right can distribute horizontal/vertical nodes":"Shift+上/下/左/右 可以对齐选中的节点, Shift+Ctrl+Alt+左/右 可以水平/垂直分布节点","Enable Shift+Ctrl+Left key to normalize width and Shift+Ctrl+Right key to normalize height":"启用 Shift+Ctrl+左 键规范化宽度和 Shift+Ctrl+右 键规范化高度","After v1.2.39, Ctrl+g can be used instead of it":"从v1.2.39开始,可以使用Ctrl+g代替","Styles Selector Display Type":"样式选择器显示类型","Styles Selector Display Type, if set to 'Gird', it will display as a gird, if set to 'List', it will display as a list":"样式选择器显示类型,如果设置为“网格”,则显示为网格,如果设置为“列表”,则显示为列表","Use three shortcut buttons in the right-click menu":"在右键菜单中使用三个快捷按钮","Enable Nodes Map":"启用节点组管理","Display Groups Only":"仅显示组","Display Node ID":"显示节点ID","You need to refresh the page to update successfully":"您需要刷新页面以成功更新","Get styles list Failed":"获取样式列表失败","Get style image Failed":"获取样式图片失败","Empty All":"清空所有","Type here to search styles ...":"在此处输入以搜索样式 ...","Loading UserInfo...":"正在获取用户信息...","Please set the APIKEY first":"请先设置APIKEY","Setting APIKEY":"设置APIKEY","Save Account Info":"保存账号信息",Choose:"选择",Delete:"删除",Edit:"编辑","At least one account is required":"删除失败: 至少需要一个账户","APIKEY is not Empty":"APIKEY 不能为空","Add Account":"添加账号","Getting Your APIKEY":"获取您的APIKEY",Canceling:"正在取消","Cancel current run":"取消当前运行","Waiting for selection...":"等待选择中...","Using last selection":"使用上次选择","Pass Through":"跳过选择","Unknown Mode":"未知模式","Choose Selected Images":"选择选中的图片","Choose images to continue":"选择图片以继续","Please run first":"请先运行队列","Progress selected":"处理选中的图片","Progress selected image":"处理选中的图片","Please select images to continue":"请选择图片以继续",Background:"背景",Hat:"帽子",Hair:"头发",Body:"身体",Face:"脸部",Clothes:"衣服",Others:"其他",Glove:"手套",Glasses:"眼镜",Sunglasses:"太阳镜","Upper-clothes":"上衣","Top-clothes":"上衣","Bottom-clothes":"下身装","Torso-skin":"皮肤",Dress:"连衣裙",Belt:"腰带",Coat:"外套",Socks:"袜子",Pants:"裤子",Jumpsuits:"连体衣",Bag:"包",Scarf:"围巾",Skirt:"裙子","Left-arm":"左臂","Right-arm":"右臂","Left-leg":"左腿","Right-leg":"右腿","Left-foot":"左脚","Right-foot":"右脚","Left-shoe":"左鞋","Right-shoe":"右鞋","select mask components":"选择分割部位","select items":"选择项",Unlabelled:"未标记","shirt, blouse":"衬衫,女式衬衫","top, t-shirt, sweatshirt":"上衣,T恤,运动衫",sweater:"毛衣",cardigan:"开襟毛衣",jacket:"夹克",vest:"背心",pants:"长裤",shorts:"短裤",skirt:"裙子",coat:"外套",dress:"连衣裙",jumpsuit:"连体衣",cape:"斗篷",glasses:"眼镜",hat:"帽子","headband, head covering, hair accessory":"头带,头饰,发饰",tie:"领带",glove:"手套",watch:"手表",belt:"腰带","leg warmer":"护腿","tights, stockings":"紧身袜,丝袜",sock:"袜子",shoe:"鞋子","bag, wallet":"包,钱包",scarf:"围巾",umbrella:"雨伞",hood:"帽兜",collar:"领子",lapel:"翻领",epaulette:"肩章",sleeve:"袖子",pocket:"口袋",neckline:"领口",buckle:"扣环",zipper:"拉链",applique:"贴花",bead:"珠子",bow:"蝴蝶结",flower:"花朵装饰",fringe:"流苏",ribbon:"丝带",rivet:"铆钉",ruffle:"褶边",sequin:"亮片",tassel:"流苏穗",background:"背景",skin:"皮肤",nose:"鼻子",eyeglasses:"眼镜",left_eye:"左眼",right_eye:"右眼",left_eyebrow:"左眉毛",right_eyebrow:"右眉毛",left_ear:"左耳",right_ear:"右耳",mouth:"嘴巴",upper_lip:"上唇",lower_lip:"下唇",hair:"头发",earring:"耳环",necklace:"项链",neck:"脖子",clothing:"服装",s:"秒","No Node Templates Found":"未找到节点模板预设","Get Node Templates File Failed":"获取节点模板文件失败","Node template with {key} not set":"未设置快捷键为{key}的节点预设","ComfyUI Basic":"ComfyUI 基础节点","Recommend Nodes":"推荐节点","Others A~Z":"其他节点 A~Z","The maximum number of inputs is 20":"输入数量最大20个","The maximum number of outputs is 20":"输出数量最大20个","Stop recording":"停止录音","Voice input":"语音输入",Continue:"继续",Stop:"停止",now:"当前",prev:"上一步"},$t=(e,t=!1)=>{switch(getLocale()){case"zh-CN":case"zh":returnzhCN[e]||e;default:returne}};functionaddPreconnect(e,t=!1){consti=document.createElement("link");i.rel="preconnect",i.href=e,t&&(i.crossorigin=""),document.head.appendChild(i)}functionaddCss(e,t=!0,i="ComfyUI-Easy-Use"){consts=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.href=t?`extensions/${i}/${e}`:e,document.head.appendChild(s)}constPREFIX_CLASS="comfyui-easyuse-",DARK_THEME_CLASS="dark-theme",THEME_COLOR="#60a5fa",CUSTOM_LINK_TYPES_COLOR={PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd",FLOW_CONTROL:"#373780"},MAX_SEED_NUM=0x4000000000000,COMFYUI_NODE_BASIC_CATEGORY=["loaders","latent","image","mask","sampling","_for_testing","advanced","utils","api","api node","加载器","Latent","图像","遮罩","采样","_用于测试","高级","工具","API","api 节点","chargeurs","latent","image","masque","échantillonnage","_pour_test","avancé","outils","nœud api","загрузчики","латентный","изображение","маска","выборка","_для_тестирования","расширенный","инструменты","api","api узел","로더","잠재","이미지","마스크","샘플링","_테스트용","고급","도구","api","api 노드","ローダー","潜在","画像","マスク","サンプリング","_テスト用","高度な","ツール","api","apiノード","cargadores","latente","imagen","máscara","muestreo","_para_pruebas","avanzado","herramientas","api","nodo api"],HUMAN_SEGMENTATION={selfie_multiclass_256x256:["Background","Hair","Body","Face","Clothes","Others"],human_parsing_lip:["Background","Hat","Hair","Glove","Sunglasses","Upper-clothes","Dress","Coat","Socks","Pants","Jumpsuits","Scarf","Skirt","Face","Left-arm","Right-arm","Left-leg","Right-leg","Left-shoe","Right-shoe"],"human_parts (deeplabv3p)":["Background","Face","Hair","Glasses","Top-clothes","Bottom-clothes","Torso-skin","Left-arm","Right-arm","Left-leg","Right-leg","Left-foot","Right-foot"],segformer_b3_clothes:{Background:0,Hat:1,Hair:2,Sunglasses:3,"Upper-clothes":4,Skirt:5,Pants:6,Dress:7,Belt:8,"Left-shoe":9,"Right-shoe":10,Face:11,"Left-leg":12,"Right-leg":13,"Left-arm":14,"Right-arm":15,Bag:16,Scarf:17},segformer_b3_fashion:{Unlabelled:0,"shirt, blouse":1,"top, t-shirt, sweatshirt":2,sweater:3,cardigan:4,jacket:5,vest:6,pants:7,shorts:8,skirt:9,coat:10,dress:11,jumpsuit:12,cape:13,glasses:14,hat:15,"headband, head covering, hair accessory":16,tie:17,glove:18,watch:19,belt:20,"leg warmer":21,"tights, stockings":22,sock:23,shoe:24,"bag, wallet":25,scarf:26,umbrella:27,hood:28,collar:29,lapel:30,epaulette:31,sleeve:32,pocket:33,neckline:34,buckle:35,zipper:36,applique:37,bead:38,bow:39,flower:40,fringe:41,ribbon:42,rivet:43,ruffle:44,sequin:45,tassel:46},face_parsing:["background","skin","nose","eyeglasses","left_eye","right_eye","left_eyebrow","right_eyebrow","left_ear","right_ear","mouth","upper_lip","lower_lip","hair","hat","earring","necklace","neck","clothing"]},NODE_MODE={ALWAYS:0,NEVER:2,BYPASS:4},NODES_MAP_ID="easyuse_nodes_map",NO_PREVIEW_IMAGE="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABkAAD/4QMyaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA5LjEtYzAwMSA3OS4xNDYyODk5Nzc3LCAyMDIzLzA2LzI1LTIzOjU3OjE0ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuMyAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2RkFERDc2MUNDRkIxMUVGQjFENkE0NzFCNTUzRkQ0MCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2RkFERDc2MkNDRkIxMUVGQjFENkE0NzFCNTUzRkQ0MCI+IDx4bXBNTTpEZ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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/9k=",VERSION=112,bgcolor$1="rgba(24,24,27,.9)",obsidian={ColorPalette:{version:VERSION,id:"obsidian",name:"Obsidian",colors:{node_slot:{CLIP:"#FFD500",CLIP_VISION:"#A8DADC",CLIP_VISION_OUTPUT:"#ad7452",CONDITIONING:"#FFA931",CONTROL_NET:"#6EE7B7",IMAGE:"#64B5F6",LATENT:"#FF9CF9",MASK:"#81C784",MODEL:"#B39DDB",STYLE_MODEL:"#C2FFAE",VAE:"#FF6E6E",TAESD:"#DCC274",PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd",FAST_MODEL_LOADER:"#ffd399",SAMPLING:"#60a5fa"},litegraph_base:{BACKGROUND_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQBJREFUeNrs1rEKwjAUhlETUkj3vP9rdmr1Ysammk2w5wdxuLgcMHyptfawuZX4pJSWZTnfnu/lnIe/jNNxHHGNn//HNbbv+4dr6V+11uF527arU7+u63qfa/bnmh8sWLBgwYJlqRf8MEptXPBXJXa37BSl3ixYsGDBMliwFLyCV/DeLIMFCxYsWLBMwSt4Be/NggXLYMGCBUvBK3iNruC9WbBgwYJlsGApeAWv4L1ZBgsWLFiwYJmCV/AK3psFC5bBggULloJX8BpdwXuzYMGCBctgwVLwCl7Be7MMFixYsGDBsu8FH1FaSmExVfAxBa/gvVmwYMGCZbBg/W4vAQYA5tRF9QYlv/QAAAAASUVORK5CYII=",CLEAR_BACKGROUND_COLOR:"#222222",NODE_TITLE_COLOR:"#d4d4d8",NODE_SELECTED_TITLE_COLOR:"#ffffff",NODE_TEXT_SIZE:14,NODE_TEXT_COLOR:"#ffffff",NODE_SUBTEXT_SIZE:12,NODE_DEFAULT_COLOR:"#09090b",NODE_DEFAULT_BGCOLOR:"rgba(24,24,27,.9)",NODE_DEFAULT_BOXCOLOR:"rgba(255,255,255,.75)",NODE_DEFAULT_SHAPE:2,NODE_BOX_OUTLINE_COLOR:THEME_COLOR,NODE_BYPASS_BGCOLOR:"#FF00FF",NODE_ERROR_COLOUR:"#E00",DEFAULT_SHADOW_COLOR:"rgba(0,0,0,0)",DEFAULT_GROUP_FONT:24,WIDGET_BGCOLOR:"#242427",WIDGET_OUTLINE_COLOR:"#3f3f46",WIDGET_TEXT_COLOR:"#d4d4d8",WIDGET_SECONDARY_TEXT_COLOR:"#d4d4d8",LINK_COLOR:"#9A9",EVENT_LINK_COLOR:"#A86",CONNECTING_LINK_COLOR:"#AFA"},comfy_base:{"fg-color":"#fff","bg-color":"#09090b","comfy-menu-bg":"rgba(24,24,24,.9)","comfy-input-bg":"#262626","input-text":"#ddd","descrip-text":"#999","drag-text":"#ccc","error-text":"#ff4444","border-color":"#29292c","tr-even-bg-color":"rgba(28,28,28,.9)","tr-odd-bg-color":"rgba(19,19,19,.9)"}}},NODE_COLORS:{red:{color:"#af3535",bgcolor:bgcolor$1,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:bgcolor$1,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:bgcolor$1,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:bgcolor$1,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:bgcolor$1,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:bgcolor$1,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:bgcolor$1,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:bgcolor$1,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:bgcolor$1,groupcolor:"#444"}}};letobsidian_dark=JSON.parse(JSON.stringify(obsidian));deleteobsidian_dark.NODE_COLORS,obsidian_dark.ColorPalette.id="obsidian_dark",obsidian_dark.ColorPalette.name="Obsidian Dark",obsidian_dark.ColorPalette.colors.litegraph_base.BACKGROUND_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGlmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDEgNzkuMTQ2Mjg5OSwgMjAyMy8wNi8yNS0yMDowMTo1NSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6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AuS8F74GHBgmWwYCl4Ba/gXZbBggULFixYprMUvIJX8B54WAYLFixYCl5nKXiXpeA98LBgwTJYsGC9tg1o8f4TTtqzNQAAAABJRU5ErkJggg==",obsidian_dark.ColorPalette.colors.litegraph_base.CLEAR_BACKGROUND_COLOR="#09090b";constbgcolor="#FFFFFF",milk_white={ColorPalette:{id:"milk_white",name:"Milk White",colors:{node_slot:{CLIP:"#FFA726",CLIP_VISION:"#5C6BC0",CLIP_VISION_OUTPUT:"#8D6E63",CONDITIONING:"#EF5350",CONTROL_NET:"#66BB6A",IMAGE:"#42A5F5",LATENT:"#AB47BC",MASK:"#9CCC65",MODEL:"#7E57C2",STYLE_MODEL:"#D4E157",VAE:"#FF7043",PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd",FAST_MODEL_LOADER:"#ffd399",SAMPLING:"#60a5fa"},litegraph_base:{BACKGROUND_IMAGE:"data:image/gif;base64,R0lGODlhZABkALMAAAAAAP///+vr6+rq6ujo6Ofn5+bm5uXl5d3d3f///wAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAABkAGQAAAT/UMhJq7046827HkcoHkYxjgZhnGG6si5LqnIM0/fL4qwwIMAg0CAsEovBIxKhRDaNy2GUOX0KfVFrssrNdpdaqTeKBX+dZ+jYvEaTf+y4W66mC8PUdrE879f9d2mBeoNLfH+IhYBbhIx2jkiHiomQlGKPl4uZe3CaeZifnnijgkESBqipqqusra6vsLGys62SlZO4t7qbuby7CLa+wqGWxL3Gv3jByMOkjc2lw8vOoNSi0czAncXW3Njdx9Pf48/Z4Kbbx+fQ5evZ4u3k1fKR6cn03vHlp7T9/v8A/8Gbp4+gwXoFryXMB2qgwoMMHyKEqA5fxX322FG8tzBcRnMW/zlulPbRncmQGidKjMjyYsOSKEF2FBlJQMCbOHP6c9iSZs+UnGYCdbnSo1CZI5F64kn0p1KnTH02nSoV3dGTV7FFHVqVq1dtWcMmVQZTbNGu72zqXMuW7danVL+6e4t1bEy6MeueBYLXrNO5Ze36jQtWsOG97wIj1vt3St/DjTEORss4nNq2mDP3e7w4r1bFkSET5hy6s2TRlD2/mSxXtSHQhCunXo26NevCpmvD/UU6tuullzULH76q92zdZG/Ltv1a+W+osI/nRmyc+fRi1Xdbh+68+0vv10dH3+77KD/i6IdnX669/frn5Zsjh4/2PXju8+8bzc9/6fj27LFnX11/+IUnXWl7BJfegm79FyB9JOl3oHgSklefgxAC+FmFGpqHIYcCfkhgfCohSKKJVo044YUMttggiBkmp6KFXw1oII24oYhjiDByaKOOHcp3Y5BD/njikSkO+eBREQAAOw==",CLEAR_BACKGROUND_COLOR:"lightgray",NODE_TITLE_COLOR:"#222",NODE_SELECTED_TITLE_COLOR:"#000",NODE_TEXT_SIZE:14,NODE_TEXT_COLOR:"#444",NODE_SUBTEXT_SIZE:12,NODE_DEFAULT_COLOR:"#F7F7F7",NODE_DEFAULT_BGCOLOR:"#F5F5F5",NODE_DEFAULT_BOXCOLOR:"#555",NODE_DEFAULT_SHAPE:2,NODE_BOX_OUTLINE_COLOR:"#000",DEFAULT_SHADOW_COLOR:"rgba(0,0,0,0.1)",DEFAULT_GROUP_FONT:24,WIDGET_BGCOLOR:"#D4D4D4",WIDGET_OUTLINE_COLOR:"#999",WIDGET_TEXT_COLOR:"#222",WIDGET_SECONDARY_TEXT_COLOR:"#555",LINK_COLOR:"#9A9",EVENT_LINK_COLOR:"#FF9800",CONNECTING_LINK_COLOR:"#222"},comfy_base:{"fg-color":"#222","bg-color":"#DDD","comfy-menu-bg":"#F5F5F5","comfy-input-bg":"#C9C9C9","input-text":"#222","descrip-text":"#444","drag-text":"#555","error-text":"#F44336","border-color":"#bbb","tr-even-bg-color":"#f9f9f9","tr-odd-bg-color":"#fff","content-bg":"#e0e0e0","content-fg":"#222","content-hover-bg":"#adadad","content-hover-fg":"#222"}}},NODE_COLORS:{red:{color:"#af3535",bgcolor:bgcolor,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:bgcolor,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:bgcolor,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:bgcolor,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:bgcolor,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:bgcolor,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:bgcolor,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:bgcolor,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:bgcolor,groupcolor:"#444"}}},settings={addGroup:{id:"EasyUse.Hotkeys.AddGroup",name:"Enable Shift+g to add selected nodes to a group",tooltip:"After v1.2.39, Ctrl+g can be used instead of it",type:"boolean",defaultValue:!0},cleanVRAMUsed:{id:"EasyUse.Hotkeys.cleanVRAMUsed",name:"Enable Shift+r to unload models and node cache",type:"boolean",defaultValue:!0},toggleSiteMap:{id:"EasyUse.Hotkeys.toggleNodesMap",name:"Enable Shift+m to toggle nodes map",type:"boolean",defaultValue:!0},alignSelectedNodes:{id:"EasyUse.Hotkeys.AlignSelectedNodes",name:"Enable Shift+Up/Down/Left/Right key and Shift+Ctrl+Alt+Left/Right to align selected nodes",tooltip:"Shift+Up/Down/Left/Right can align selected nodes, Shift+Ctrl+Alt+Left/Right can distribute horizontal/vertical nodes",type:"boolean",defaultValue:!0},NormalizeSelectedNodes:{id:"EasyUse.Hotkeys.NormalizeSelectedNodes",name:"Enable Shift+Ctrl+Left/Right key to normalize selected nodes",tooltip:"Enable Shift+Ctrl+Left key to normalize width and Shift+Ctrl+Right key to normalize height",type:"boolean",defaultValue:!0},nodesTemplate:{id:"EasyUse.Hotkeys.NodesTemplate",name:"Enable Alt+1~9 to paste nodes from nodes template",type:"boolean",defaultValue:!0},jumpNearestNodes:{id:"EasyUse.Hotkeys.JumpNearestNodes",name:"Enable Up/Down/Left/Right key to jump nearest nodes",type:"boolean",defaultValue:!0},subDirectories:{id:"EasyUse.ContextMenu.SubDirectories",name:"Enable contextMenu auto nest subdirectories",type:"boolean",defaultValue:!1},modelsThumbnails:{id:"EasyUse.ContextMenu.ModelsThumbnails",name:"Enable model thumbnails display",type:"boolean",defaultValue:!1},rightMenuNodesSort:{id:"EasyUse.ContextMenu.NodesSort",name:"Enable right-click menu to add node A~Z sorting",type:"boolean",defaultValue:!0},quickOptions:{id:"EasyUse.ContextMenu.QuickOptions",name:"Use three shortcut buttons in the right-click menu",type:"combo",options:["At the forefront","At the end","Disable"],defaultValue:"At the forefront"},nodesRuntime:{id:"EasyUse.Nodes.Runtime",name:"Enable nodes runtime display",type:"boolean",defaultValue:!0},chainGetSet:{id:"EasyUse.Nodes.ChainGetSet",name:"Enable chain get node and set node with parent nodes",type:"boolean",defaultValue:!0},nodesMap:{id:"EasyUse.NodesMap.Sorting",name:"Nodes map sorting mode",tooltip:"Default automatic sorting, if set to manual, groups can be dragged and dropped and the sorting results saved.",type:"combo",options:["Auto sorting","Manual drag&drop sorting"],defaultValue:"Auto sorting"},displayNodesID:{id:"EasyUse.NodesMap.DisplayNodeID",name:"Display Node ID",type:"boolean",defaultValue:!0},onlyDisplayGroup:{id:"EasyUse.NodesMap.DisplayGroupOnly",name:"Display Groups Only",type:"boolean",defaultValue:!1},enableNodesMap:{id:"EasyUse.NodesMap.Enable",name:"Enable Nodes Map",tooltip:"You need to refresh the page to update successfully",type:"boolean",defaultValue:!0},stylesSelectorDisplay:{id:"EasyUse.StylesSelector.DisplayType",name:"Styles Selector Display Type",tooltip:"Styles Selector Display Type, if set to 'Gird', it will display as a gird, if set to 'List', it will display as a list",type:"combo",options:["Gird","List"],defaultValue:"Gird"}};functionsleep(e=100,t){returnnewPromise((i=>{setTimeout((()=>{i(t)}),e)}))}functionformatTime(e,t){if(e="number"==typeofe?e:einstanceofDate?e.getTime():parseInt(e),isNaN(e))returnnull;leti=newDate(e);(e=i.toString().split(/[\s\:]/g).slice(0,-2))[1]=["01","02","03","04","05","06","07","08","09","10","11","12"][i.getMonth()];lets={MM:1,dd:2,yyyy:3,hh:4,mm:5,ss:6};returnt.replace(/([Mmdhs]|y{2})\1/g,(t=>e[s[t]]))}functionisLocalNetwork(e){return["192.168.","10.","127.",/^172\.((1[6-9]|2[0-9]|3[0-1])\.)/].some((t=>"string"==typeoft?e.startsWith(t):t.test(e)))}constisMac=/Mac|iPod|iPhone|iPad/.test(navigator.platform),normalize=e=>isMac?e.replace(/Ctrl/g,"⌘").replace(/Alt/g,"⌥").replace(/Shift/g,"⇧"):e;classToast{constructor(){__publicField(this,"element",$el(`div.${PREFIX_CLASS}toast`)),__publicField(this,"children",HTMLElement),__publicField(this,"container",document.body),__publicField(this,"info_icon",`mdi mdi-information ${PREFIX_CLASS}theme`),__publicField(this,"success_icon",`mdi mdi-check-circle ${PREFIX_CLASS}success`),__publicField(this,"error_icon",`mdi mdi-close-circle ${PREFIX_CLASS}error`),__publicField(this,"warn_icon",`mdi mdi-alert-circle ${PREFIX_CLASS}warning`),__publicField(this,"loading_icon","mdi mdi-rotate-right loading"),this.container.appendChild(this.element)}asyncshow(e){lett=$el(`div.${PREFIX_CLASS}toast-container`,[$el("div",[$el("span",[...e.icon?[$el("i",{className:e.icon})]:[],$el("span",e.content)])])]);t.setAttribute("toast-id",e.id),this.element.replaceChildren(t),this.container.appendChild(this.element),awaitsleep(64),t.style.marginTop=`-${t.offsetHeight}px`,awaitsleep(64),t.classList.add("show"),e.duration&&(awaitsleep(e.duration),this.hide(e.id))}asynchide(e){constt=document.querySelector(`.${PREFIX_CLASS}toast > [toast-id="${e}"]`);(null==t?void0:t.classList.contains("show"))&&(t.classList.remove("show"),awaitsleep(750)),t&&t.remove()}asyncclearAllMessages(){lete=document.querySelector(`.${PREFIX_CLASS}container`);e&&(e.innerHTML="")}asyncinfo(e,t=3e3,i=[]){this.show({id:"toast-info",icon:this.info_icon,content:e,duration:t})}asyncsuccess(e,t=3e3){this.show({id:"toast-success",icon:this.success_icon,content:e,duration:t})}asyncerror(e,t=3e3){this.show({id:"toast-error",icon:this.error_icon,content:e,duration:t})}asyncwarn(e,t=3e3){this.show({id:"toast-warn",icon:this.warn_icon,content:e,duration:t})}asyncshowLoading(e,t=0){this.show({id:"toast-loading",icon:this.loading_icon,content:e,duration:t})}asynchideLoading(){this.hide("toast-loading")}}consttoast=newToast,useNodesStore=defineStore("groups",{state:e=>({groups:[],nodes:[],isWatching:!1}),getters:{groups_nodes(){vare;lett=[],i=[];consts=e=>{vart;return{info:e,children:(null==(t=e.sub_groups)?void0:t.length)>0?e.sub_groups.map(s):[],bounds:{x1:e.pos[0],y1:e.pos[1],x2:e.pos[0]+e.size[0],y2:e.pos[1]+e.size[1]}}};if(t=this.groups.map(s),(null==(e=this.nodes)?void0:e.length)>0){conste=(e,t)=>e[0]>=t.x1&&e[0]<=t.x2&&e[1]>=t.y1&&e[1]<=t.y2,s=(t,i)=>{lets=null,o=-1;consta=(i,n)=>{i.bounds&&e(t.pos,i.bounds)&&(n>o&&(o=n,s=i),i.children.forEach((e=>a(e,n+1))))};returni.forEach((e=>a(e,0))),s};this.nodes.forEach((e=>{consto=s(e,t);o?(o.children||(o.children=[]),o.children.push(e)):i.push({info:e})}))}return[...t,...i]}},actions:{setGroups(e){lett=cloneDeep(e);t.forEach((e=>{e.sub_groups=[],t.forEach((t=>{t!==e&&t.pos[0]>e.pos[0]&&t.pos[0]<e.pos[0]+e.size[0]&&t.pos[1]>e.pos[1]&&t.pos[1]<e.pos[1]+e.size[1]&&e.sub_groups.push(t)})),e.sub_groups.forEach((e=>{t=t.filter((t=>t!==e))}))})),this.groups="Manual drag&drop sorting"==getSetting("EasyUse.NodesMap.Sorting")?cloneDeep(t):cloneDeep(t.sort(((e,t)=>e.pos[0]-t.pos[0])).sort(((e,t)=>e.pos[1]-t.pos[1])))},setNodes(e){this.nodes=cloneDeep(e)},update(){vare,t,i;(((null==(e=app$1.extensionManager)?void0:e.activeSidebarTab)||(null==(i=null==(t=app$1.extensionManager.sidebarTab)?void0:t.activeSidebarTab)?void0:i.id))===NODES_MAP_ID||this.isWatching)&&setTimeout((e=>{this.setGroups(app$1.canvas.graph._groups),this.setNodes(app$1.canvas.graph._nodes)}),1)},watchGraph(e=!1){e&&(this.isWatching=!0);lett=this;this.update();consti=app$1.graph.onNodeAdded;app$1.graph.onNodeAdded=function(e){t.update();consts=e.onRemoved;returne.onRemoved=function(){returnt.update(),null==s?void0:s.apply(this,arguments)},null==i?void0:i.apply(this,arguments)},app$1.canvas.onNodeMoved=function(e){t.update()};consts=LGraphCanvas.onNodeAlign;LGraphCanvas.onNodeAlign=function(e){returnt.update(),null==s?void0:s.apply(this,arguments)};consto=LGraphCanvas.onGroupAdd;LGraphCanvas.onGroupAdd=function(){returnt.update(),null==o?void0:o.apply(this,arguments)};consta=LGraphCanvas.onGroupAlign;LGraphCanvas.onGroupAlign=function(e){returnt.update(),null==a?void0:a.apply(this,arguments)};constn=LGraphCanvas.onMenuNodeRemove;LGraphCanvas.onMenuNodeRemove=function(e){returnt.update(),null==n?void0:n.apply(this,arguments)}},unwatchGraph(){this.isWatching=!1}}});functiondrawRoundedRect(e,t,i,s,o,a){e.beginPath(),e.moveTo(t+a,i),e.lineTo(t+s-a,i),e.arcTo(t+s,i,t+s,i+a,a),e.lineTo(t+s,i+o-a),e.arcTo(t+s,i+o,t+s-a,i+o,a),e.lineTo(t+a,i+o),e.arcTo(t,i+o,t,i+o-a,a),e.lineTo(t,i+a),e.arcTo(t,i,t+a,i,a),e.closePath()}functiondrawText(e,t,i,s,o="#000",a=12,n="Inter"){e.font=`${a}px ${n}`,e.fillStyle=o,e.fillText(t,i,s)}constELLIPSIS="…",TWO_DOT_LEADER="‥",ONE_DOT_LEADER="․",RenderShape={BOX:1,ROUND:2,CIRCLE:3,CARD:4,ARROW:5,GRID:6,HollowCircle:7};functionstrokeShape(e,t,i={}){const{shape:s=RenderShape.BOX,round_radius:o=LiteGraph.ROUND_RADIUS,title_height:a=LiteGraph.NODE_TITLE_HEIGHT,title_mode:n=LiteGraph.NORMAL_TITLE,color:l=LiteGraph.NODE_BOX_OUTLINE_COLOR,padding:r=6,collapsed:d=!1,thickness:c=1}=i;n===LiteGraph.TRANSPARENT_TITLE&&(t[1]-=a,t[3]+=a);const{lineWidth:u,strokeStyle:p}=e;e.lineWidth=c,e.globalAlpha=.8,e.strokeStyle=l,e.beginPath();const[A,g,h,m]=t;switch(s){caseRenderShape.BOX:e.rect(A-r,g-r,h+2*r,m+2*r);break;caseRenderShape.ROUND:caseRenderShape.CARD:{constt=o+r,i=s===RenderShape.CARD&&d||s===RenderShape.ROUND?[t]:[t,2,t,2];e.roundRect(A-r,g-r,h+2*r,m+2*r,i);break}caseRenderShape.CIRCLE:{constt=A+h/2,i=g+m/2,s=Math.max(h,m)/2+r;e.arc(t,i,s,0,2*Math.PI);break}}e.stroke(),e.lineWidth=u,e.strokeStyle=p,e.globalAlpha=1}functiontruncateTextToWidth(e,t,i){if(!(i>0))return"";if(e.measureText(t).width<=i)returnt;consts=.75*e.measureText(ELLIPSIS).width;if(s>i){if(.75*e.measureText(TWO_DOT_LEADER).width<i)returnTWO_DOT_LEADER;return.75*e.measureText(ONE_DOT_LEADER).width<i?ONE_DOT_LEADER:""}leto=0,a=t.length,n=0;for(;o<=a;){constl=Math.floor(.5*(o+a));if(0===l){o=l+1;continue}constr=t.substring(0,l);e.measureText(r).width+s<=i?(n=l,o=l+1):a=l-1}return0===n?ELLIPSIS:t.substring(0,n)+ELLIPSIS}functiondrawTextInArea({ctx:e,text:t,area:i,align:s="left"}){const{left:o,right:a,bottom:n,width:l,centreX:r}=i;if(e.measureText(t).width<=l){e.textAlign=s;consti="left"===s?o:"right"===s?a:r;returnvoide.fillText(t,i,n)}constd=truncateTextToWidth(e,t,l);if(0===d.length)return;e.textAlign="left",e.fillText(d.slice(0,-1),o,n),e.rect(o,n,l,1),e.textAlign="right";constc=d.at(-1);c&&e.fillText(c,a,n,.75*e.measureText(c).width)}constis_all_same_aspect_ratio$1=e=>{if(!e.length||1===e.length)return!0;constt=e[0].naturalWidth/e[0].naturalHeight;for(leti=1;i<e.length;i++){if(t!=e[i].naturalWidth/e[i].naturalHeight)return!1}return!0};functioncalculateImageGrid$1(e,t,i){vars,o;leta=0,n=null==(s=e[0])?void0:s.naturalWidth,l=null==(o=e[0])?void0:o.naturalHeight;constr=e.length;letd,c,u,p,A;for(letg=1;g<=r;g++){conste=Math.ceil(r/g),s=t/g,o=s/n,h=i/e/l,m=Math.min(o,h,1),f=n*m,y=l*m,v=f*y*r;v>a&&(a=v,d=f,c=y,u=g,p=e,A=g*((s-f)/2))}return{cellWidth:d,cellHeight:c,cols:u,rows:p,shiftX:A}}constrenderPreview=(e,t,i)=>{consts=app$1.canvas,o=s.graph_mouse;!s.pointer_is_down&&t.pointerDown&&(o[0]===t.pointerDown.pos[0]&&o[1]===t.pointerDown.pos[1]&&(t.imageIndex=t.pointerDown.index),t.pointerDown=null);consta=t.imgs??[];let{imageIndex:n}=t;constl=a.length;1!==l||n||(t.imageIndex=n=0);constr=t.size[0],d=t.size[1]-i-15;if(null==n){letn,c,u,p,A;constg=is_all_same_aspect_ratio$1(a);if(g)p=0,({cellWidth:n,cellHeight:c,cols:A,shiftX:u}=calculateImageGrid$1(a,r,d));else{p=2;conste=a.reduce(((e,t)=>Math.max(e,t.naturalWidth,t.naturalHeight)),0),t=[];t.length=a.length,t[0]={naturalWidth:e,naturalHeight:e},({cellWidth:n,cellHeight:c,cols:A,shiftX:u}=calculateImageGrid$1(t,r,d))}leth=!1;t.imageRects=[];for(letr=0;r<l;r++){constl=a[r],d=Math.floor(r/A),m=r%A,f=m*n+u,y=d*c+i;if(!h&&(h=LiteGraph.isInsideRectangle(o[0],o[1],f+t.pos[0],y+t.pos[1],n,c),h)){t.overIndex=r;leti=110;s.pointer_is_down&&(t.pointerDown&&t.pointerDown.index===r||(t.pointerDown={index:r,pos:[...o]}),i=125),e.filter=`contrast(${i}%) brightness(${i}%)`,s.canvas.style.cursor="pointer"}t.imageRects.push([f,y,n,c]);constv=n/l.width,_=c/l.height,b=Math.min(v,_),S=b*l.height,N=d*c+i+(c-S)/2,w=b*l.width,E=m*n+u+(n-w)/2;e.drawImage(l,E+p,N+p,w-2*p,S-2*p),g||(e.strokeStyle="#8F8F8F",e.lineWidth=1,e.strokeRect(f+p,y+p,n-2*p,c-2*p)),e.filter="none"}returnvoid(h||(t.pointerDown=null,t.overIndex=null))}constc=a[n];if(!c)return;letu=null==c?void0:c.naturalWidth,p=null==c?void0:c.naturalHeight;constA=r/u,g=d/p,h=Math.min(A,g,1);u*=h,p*=h;constm=(r-u)/2,f=(d-p)/2+i;e.drawImage(c,m,f,u,p),e.fillStyle=LiteGraph.NODE_TEXT_COLOR,e.textAlign="center",e.font="10px sans-serif";consty=`${Math.round(c.naturalWidth)} × ${Math.round(c.naturalHeight)}`,v=f+p+10;e.fillText(y,m+u/2,v);const_=(i,a,n,l)=>{letr="#333",d="#fff",c=!1;returnLiteGraph.isInsideRectangle(o[0],o[1],i+t.pos[0],a+t.pos[1],n,n)&&(s.canvas.style.cursor="pointer",s.pointer_is_down?(r="#1e90ff",c=!0):(r="#eee",d="#000")),e.fillStyle=r,e.beginPath(),e.roundRect(i,a,n,n,[4]),e.fill(),e.fillStyle=d,e.font="12px Arial",e.textAlign="center",e.fillText(l,i+15,a+20),c};if(!(l>1))return;constb=(t.imageIndex??0)+1;if(_(r-40,d+i-40,30,`${b}/${l}`)){conste=b>=l?0:b;t.pointerDown&&t.pointerDown.index===e||(t.pointerDown={index:e,pos:[...o]})}_(r-40,i+10,30,"x")&&(t.pointerDown&&null===t.pointerDown.index||(t.pointerDown={index:null,pos:[...o]}))};classImagePreviewWidget{constructor(e,t){this.type="custom",this.name=e,this.options=t,this.value=""}draw(e,t,i,s,o){renderPreview(e,t,s)}computeLayoutSize(e,t){return{minHeight:220,minWidth:1}}}constuseImagePreviewWidget=()=>(e,t)=>e.addCustomWidget(newImagePreviewWidget(t.name,{serialize:!1})),useChainCallback=(e,...t)=>function(...i){null==e||e.call(this,...i),t.forEach((e=>e.call(this,...i)))},useTryCatchCallback=(e,...t)=>function(...i){try{t.forEach((e=>null==e?void0:e.call(this,...i)))}catch(s){null==e||e.call(this,...i,s)}};functionisInRectangle(e,t,i,s,o,a){returne>=i&&e<i+o&&t>=s&&t<s+a}classRectangleextendsFloat64Array{constructor(e=0,t=0,i=0,s=0){super(4),__privateAdd(this,_pos),__privateAdd(this,_size),this[0]=e,this[1]=t,this[2]=i,this[3]=s}subarray(e=0,t){consti=e<<3,s=void0===t?t:t-e;returnnewFloat64Array(this.buffer,i,s)}getpos(){return__privateGet(this,_pos)??__privateSet(this,_pos,this.subarray(0,2)),__privateGet(this,_pos)}setpos(e){this[0]=e[0],this[1]=e[1]}getsize(){return__privateGet(this,_size)??__privateSet(this,_size,this.subarray(2,4)),__privateGet(this,_size)}setsize(e){this[2]=e[0],this[3]=e[1]}getx(){returnthis[0]}setx(e){this[0]=e}gety(){returnthis[1]}sety(e){this[1]=e}getwidth(){returnthis[2]}setwidth(e){this[2]=e}getheight(){returnthis[3]}setheight(e){this[3]=e}getleft(){returnthis[0]}setleft(e){this[0]=e}gettop(){returnthis[1]}settop(e){this[1]=e}getright(){returnthis[0]+this[2]}setright(e){this[0]=e-this[2]}getbottom(){returnthis[1]+this[3]}setbottom(e){this[1]=e-this[3]}getcentreX(){returnthis[0]+.5*this[2]}getcentreY(){returnthis[1]+.5*this[3]}updateTo(e){this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3]}containsXy(e,t){const{x:i,y:s,width:o,height:a}=this;returne>=i&&e<i+o&&t>=s&&t<s+a}containsPoint(e){returnthis.x<=e[0]&&this.y<=e[1]&&this.x+this.width>=e[0]&&this.y+this.height>=e[1]}containsRect(e){returnthis.x<=e[0]&&this.y<=e[1]&&this.x+this.width>=e[0]+e[2]&&this.y+this.height>=e[1]+e[3]}overlaps(e){returnthis.x<e[0]+e[2]&&this.y<e[1]+e[3]&&this.x+this.width>e[0]&&this.y+this.height>e[1]}findContainingCorner(e,t,i){returnthis.isInTopLeftCorner(e,t,i)?"NW":this.isInTopRightCorner(e,t,i)?"NE":this.isInBottomLeftCorner(e,t,i)?"SW":this.isInBottomRightCorner(e,t,i)?"SE":void0}isInTopLeftCorner(e,t,i){returnisInRectangle(e,t,this.x,this.y,i,i)}isInTopRightCorner(e,t,i){returnisInRectangle(e,t,this.right-i,this.y,i,i)}isInBottomLeftCorner(e,t,i){returnisInRectangle(e,t,this.x,this.bottom-i,i,i)}isInBottomRightCorner(e,t,i){returnisInRectangle(e,t,this.right-i,this.bottom-i,i,i)}isInTopEdge(e,t,i){returnisInRectangle(e,t,this.x,this.y,this.width,i)}isInBottomEdge(e,t,i){returnisInRectangle(e,t,this.x,this.bottom-i,this.width,i)}isInLeftEdge(e,t,i){returnisInRectangle(e,t,this.x,this.y,i,this.height)}isInRightEdge(e,t,i){returnisInRectangle(e,t,this.right-i,this.y,i,this.height)}getCentre(){return[this.centreX,this.centreY]}getArea(){returnthis.width*this.height}getPerimeter(){return2*(this.width+this.height)}getTopLeft(){return[this[0],this[1]]}getBottomRight(){return[this.right,this.bottom]}getSize(){return[this[2],this[3]]}getOffsetTo([e,t]){return[e-this[0],t-this[1]]}getOffsetFrom([e,t]){return[this[0]-e,this[1]-t]}resizeTopLeft(e,t){this[2]+=this[0]-e,this[3]+=this[1]-t,this[0]=e,this[1]=t}resizeBottomLeft(e,t){this[2]+=this[0]-e,this[3]=t-this[1],this[0]=e}resizeTopRight(e,t){this[2]=e-this[0],this[3]+=this[1]-t,this[1]=t}resizeBottomRight(e,t){this[2]=e-this[0],this[3]=t-this[1]}setWidthRightAnchored(e){constt=this[2];this[2]=e,this[0]+=t-e}setHeightBottomAnchored(e){constt=this[3];this[3]=e,this[1]+=t-e}toArray(){returnthis.export()}export(){return[this[0],this[1],this[2],this[3]]}_drawDebug(e,t="red"){const{strokeStyle:i,lineWidth:s}=e;try{e.strokeStyle=t,e.lineWidth=.5,e.beginPath(),e.strokeRect(this[0],this[1],this[2],this[3])}finally{e.strokeStyle=i,e.lineWidth=s}}}_pos=newWeakMap,_size=newWeakMap;const_BaseWidget=classe{constructor(e,t){__privateAdd(this,_node),__privateAdd(this,_value),void0===t&&(t=e.node),__privateSet(this,_node,t),__privateSet(this,_value,e.value),this.name=e.name,this.options=e.options,this.type=e.type,this.y=0;const{node:i,outline_color:s,background_color:o,height:a,text_color:n,secondary_text_color:l,disabledTextColor:r,displayName:d,displayValue:c,labelBaseline:u,...p}=e;Object.assign(this,p)}getnode(){return__privateGet(this,_node)}getvalue(){return__privateGet(this,_value)}setvalue(e){__privateSet(this,_value,e)}getoutline_color(){returnthis.advanced?LiteGraph.WIDGET_ADVANCED_OUTLINE_COLOR:LiteGraph.WIDGET_OUTLINE_COLOR}getbackground_color(){returnLiteGraph.WIDGET_BGCOLOR}getheight(){returnLiteGraph.NODE_WIDGET_HEIGHT}gettext_color(){returnLiteGraph.WIDGET_TEXT_COLOR}getsecondary_text_color(){returnLiteGraph.WIDGET_SECONDARY_TEXT_COLOR}getdisabledTextColor(){returnLiteGraph.WIDGET_DISABLED_TEXT_COLOR}getdisplayName(){returnthis.label||this.name}get_displayValue(){returnString(this.value)}getlabelBaseline(){returnthis.y+.7*this.height}drawWidgetShape(t,{width:i,showText:s,isEasyUseTheme:o}){const{height:a,y:n}=this,{margin:l}=e;t.textAlign="left",t.strokeStyle=this.outline_color,t.fillStyle=this.background_color,t.beginPath(),s?o?t.roundRect(l,n,i-2*l,a,[.25*a]):t.roundRect(l,n,i-2*l,a,[.5*a]):t.rect(l,n,i-2*l,a),t.fill(),s&&!this.computedDisabled&&t.stroke()}drawTruncatingText({ctx:t,width:i,leftPadding:s=5,rightPadding:o=20,isEasyUseTheme:a}){const{height:n,y:l}=this,{margin:r}=e,{displayName:d,_displayValue:c}=this,u=t.measureText(d).width,p=t.measureText(c).width,A=e.labelValueGap,g=2*r+(a?s?2:-8:s),h=i-g-2*r-(a?4:o),m=u+A+p,f=newRectangle(g,l,h,.7*n);if(a&&(t.font="11px Inter"),t.fillStyle=this.secondary_text_color,m<=h)drawTextInArea({ctx:t,text:d,area:f,align:"left"});elseif(LiteGraph.truncateWidgetTextEvenly){conste=(h-A)/(m-A);f.width=u*e,drawTextInArea({ctx:t,text:d,area:f,align:"left"}),f.right=g+h,f.setWidthRightAnchored(p*e)}elseif(LiteGraph.truncateWidgetValuesFirst){conste=Math.min(u,h);f.width=e,drawTextInArea({ctx:t,text:d,area:f,align:"left"}),f.right=g+h,f.setWidthRightAnchored(Math.max(h-A-e,0))}else{conste=Math.min(p,h);f.width=Math.max(h-A-e,0),drawTextInArea({ctx:t,text:d,area:f,align:"left"}),f.right=g+h,f.setWidthRightAnchored(e)}t.fillStyle=this.text_color,drawTextInArea({ctx:t,text:c,area:f,align:"right"})}setValue(e,{e:t,node:i,canvas:s}){varo;consta=this.value;if(e===this.value)return;constn="number"===this.type?Number(e):e;this.value=n,(null==(o=this.options)?void0:o.property)&&void0!==i.properties[this.options.property]&&i.setProperty(this.options.property,n);constl=s.graph_mouse;this.callback&&this.callback(this.value,s,i,l,t),i.onWidgetChanged&&i.onWidgetChanged(this.name??"",n,a,this),i.graph&&i.graph._version++}};_node=newWeakMap,_value=newWeakMap,__publicField(_BaseWidget,"margin",15),__publicField(_BaseWidget,"arrowMargin",6),__publicField(_BaseWidget,"arrowWidth",10),__publicField(_BaseWidget,"minValueWidth",42),__publicField(_BaseWidget,"labelValueGap",5);letBaseWidget=_BaseWidget;classButtonWidgetextendsBaseWidget{constructor(e,t){super(e,t),this.type="button",this.clicked=this.clicked??!1}drawWidget(e,{width:t,showText:i=!0,isEasyUseTheme:s=!1}){const{fillStyle:o,strokeStyle:a,textAlign:n}=e,{height:l,y:r}=this,{margin:d}=BaseWidget;e.fillStyle=this.background_color,this.clicked&&(e.fillStyle="#AAA",this.clicked=!1),s?(e.fillStyle=this.background_color,e.beginPath(),e.roundRect(d,r,t-2*d,l,[.25*l]),e.fill()):e.fillRect(d,r,t-2*d,l),i&&!this.computedDisabled&&(e.strokeStyle=this.outline_color,s?e.stroke():e.strokeRect(d,r,t-2*d,l)),i&&this.drawLabel(e,.5*t),Object.assign(e,{textAlign:n,strokeStyle:a,fillStyle:o})}drawLabel(e,t){e.textAlign="center",e.fillStyle=this.text_color,e.fillText(this.displayName,t,this.y+.7*this.height)}onClick({e:e,node:t,canvas:i}){consts=i.graph_mouse;this.clicked=!0,i.setDirty(!0),this.callback&&this.callback(this,i,t,s,e)}}classBooleanWidgetextendsBaseWidget{constructor(e){super(e),this.type="toggle"}drawWidget(e,{width:t,showText:i=!0,isEasyUseTheme:s=!1}){const{height:o,y:a}=this,{margin:n}=BaseWidget;this.drawWidgetShape(e,{width:t,showText:i,isEasyUseTheme:s}),e.fillStyle=this.value?THEME_COLOR:"#333",e.beginPath(),e.arc(t-2*n+(s?4:0),a+.5*o,o*(s?.25:.36),0,2*Math.PI),e.fill(),i&&(this.drawLabel(e,2*n-(s?8:0)),this.drawValue(e,t-(s?36:40)))}drawLabel(e,t){e.fillStyle=this.secondary_text_color;const{displayName:i}=this;i&&e.fillText(i,t,this.labelBaseline)}drawValue(e,t){e.fillStyle=this.value?this.text_color:this.secondary_text_color,e.textAlign="right";consti=this.value?this.options.on||"true":this.options.off||"false";e.fillText(i,t,this.labelBaseline)}onClick(e){this.setValue(!this.value,e)}}functiongetWidgetStep(e){returne.step2||.1*(e.step||10)}functionclamp(e,t,i){returne<t?t:e>i?i:e}constsentWarnings=newSet;functionwarnDeprecated(e,t=null){if(!LiteGraph.alwaysRepeatWarnings){if(sentWarnings.has(e))return;if(sentWarnings.size>UNIQUE_MESSAGE_LIMIT)return;sentWarnings.add(e)}for(constiofLiteGraph.onDeprecationWarning)i(e,t)}classSliderWidgetextendsBaseWidget{constructor(e,t){super(e,t),this.type="slider"}drawWidget(e,{width:t,showText:i=!0,isEasyUseTheme:s=!1}){const{fillStyle:o,strokeStyle:a,textAlign:n}=e,{height:l,y:r}=this,{margin:d}=BaseWidget;e.fillStyle=this.background_color,s?(e.strokeStyle=this.outline_color,e.beginPath(),e.roundRect(d,r,t-2*d,l,[.25*l]),e.fill(),e.stroke()):e.fillRect(d,r,t-2*d,l);constc=this.options.max-this.options.min;letu=(this.value-this.options.min)/c;if(u=clamp(u,0,1),e.fillStyle=this.options.slider_color??THEME_COLOR,s?(e.beginPath(),e.roundRect(d,r,u*(t-2*d),l,[.25*l]),e.fill()):e.fillRect(d,r,u*(t-2*d),l),i&&!this.computedDisabled&&(e.strokeStyle=this.outline_color,s||e.strokeRect(d,r,t-2*d,l)),null!=this.marker){leti=(this.marker-this.options.min)/c;i=clamp(i,0,1),e.fillStyle=this.options.marker_color??"#AA9",s?e.roundRect(d+i*(t-2*d),r,2,l,[.25*l]):e.fillRect(d+i*(t-2*d),r,2,l)}if(i){e.textAlign="center",e.fillStyle=this.text_color;consti=Number(this.value).toFixed(this.options.precision??3);e.fillText(`${this.label||this.name}${i}`,.5*t,r+.7*l)}Object.assign(e,{textAlign:n,strokeStyle:a,fillStyle:o})}onClick(e){if(this.options.read_only)return;const{e:t,node:i}=e,s=this.width||i.size[0],o=clamp((t.canvasX-i.pos[0]-15)/(s-30),0,1),a=this.options.min+(this.options.max-this.options.min)*o;a!==this.value&&this.setValue(a,e)}onDrag(e){if(this.options.read_only)return!1;const{e:t,node:i}=e,s=this.width||i.size[0],o=clamp((t.canvasX-i.pos[0]-15)/(s-30),0,1),a=this.options.min+(this.options.max-this.options.min)*o;a!==this.value&&this.setValue(a,e)}}classKnobWidgetextendsBaseWidget{constructor(){super(),this.type="knob",this.current_drag_offset=0}computeLayoutSize(){return{minHeight:60,minWidth:20,maxHeight:1e6,maxWidth:1e6}}getheight(){returnthis.computedHeight||super.height}drawWidget(e,{width:t,showText:i=!0}){const{fillStyle:s,strokeStyle:o,textAlign:a}=e,{y:n}=this,{margin:l}=BaseWidget,{gradient_stops:r="rgb(14, 182, 201); rgb(0, 216, 72)"}=this.options,d=this.computedHeight||this.height,c=Math.min(this.computedHeight||this.height,this.width||20)/20,u={x:t/2,y:d/2+n};e.lineWidth=(Math.min(t,d)-l*c)/6;constp=(Math.min(t,d)-l*c-e.lineWidth)/2;{constt=e.createRadialGradient(u.x,u.y,p+e.lineWidth,0,0,p+e.lineWidth);t.addColorStop(0,"rgb(29, 29, 29)"),t.addColorStop(1,"rgb(116, 116, 116)"),e.fillStyle=t}e.beginPath(),e.arc(u.x,u.y,p+e.lineWidth/2,0,2*Math.PI,!1),e.fill(),e.closePath();constA={start_angle:.6*Math.PI,end_angle:2.4*Math.PI};e.beginPath();{constt=e.createRadialGradient(u.x,u.y,p+e.lineWidth,0,0,p+e.lineWidth);t.addColorStop(0,"rgb(99, 99, 99)"),t.addColorStop(1,"rgb(36, 36, 36)"),e.strokeStyle=t}e.arc(u.x,u.y,p,A.start_angle,A.end_angle,!1),e.stroke(),e.closePath();constg=this.options.max-this.options.min;leth=(this.value-this.options.min)/g;h=clamp(h,0,1),e.beginPath();constm=e.createConicGradient(A.start_angle,u.x,u.y),f=r.split(";");for(const[v,_]off.entries())m.addColorStop(v,_.trim());e.strokeStyle=m;consty=(A.end_angle-A.start_angle)*h+A.start_angle;if(e.arc(u.x,u.y,p,A.start_angle,y,!1),e.stroke(),e.closePath(),i&&!this.computedDisabled&&(e.strokeStyle=this.outline_color,e.beginPath(),e.strokeStyle=this.outline_color,e.arc(u.x,u.y,p+e.lineWidth/2,0,2*Math.PI,!1),e.lineWidth=1,e.stroke(),e.closePath()),i){e.textAlign="center",e.fillStyle=this.text_color;consti=Number(this.value).toFixed(this.options.precision??3);e.fillText(`${this.label||this.name}\n${i}`,.5*t,n+.5*d)}Object.assign(e,{textAlign:a,strokeStyle:o,fillStyle:s})}onClick(){this.current_drag_offset=0}onDrag(e){if(this.options.read_only)return;const{e:t}=e,i=getWidgetStep(this.options),s=this.options.max-this.options.min,o=s/10,a=s/100,n={delta_x:i,shift:o>i?o-o%i:i,delta_y:a>i?a-a%i:i},l=Math.abs(t.movementY)>Math.abs(t.movementX),r=l?-t.movementY:t.movementX;this.current_drag_offset+=r;letd=0;this.current_drag_offset>15?(d+=1,this.current_drag_offset-=15):this.current_drag_offset<-15&&(d-=1,this.current_drag_offset+=15);constc=d*(t.shiftKey?n.shift:l?n.delta_y:i),u=clamp(this.value+c,this.options.min,this.options.max);u!==this.value&&this.setValue(u,e)}}classBaseSteppedWidgetextendsBaseWidget{constructor(e,t){super(e,t)}canIncrement(){thrownewError("Method not implemented")}canDecrement(){thrownewError("Method not implemented")}incrementValue(e){thrownewError("Method not implemented")}decrementValue(e){thrownewError("Method not implemented")}drawArrowButtons(e,t,i){const{height:s,text_color:o,disabledTextColor:a,y:n}=this,{arrowMargin:l,arrowWidth:r,margin:d}=BaseWidget,c=d+l+(i?2:0),u=c+r;e.fillStyle=this.canDecrement()?o:a,e.beginPath();constp=i?6.5:5,A=i?-6:0;e.moveTo(u+A,n+p),e.lineTo(c+A/2,n+.5*s),e.lineTo(u+A,n+s-p),e.fill(),e.fillStyle=this.canIncrement()?o:a,e.beginPath(),e.moveTo(t-u-A,n+p),e.lineTo(t-c-A/2,n+.5*s),e.lineTo(t-u-A,n+s-p),e.fill()}drawWidget(e,t){const{fillStyle:i,strokeStyle:s,textAlign:o}=e;this.drawWidgetShape(e,t),t.showText&&(this.computedDisabled||this.drawArrowButtons(e,t.width,t.isEasyUseTheme),this.drawTruncatingText({ctx:e,width:t.width,isEasyUseTheme:t.isEasyUseTheme})),Object.assign(e,{textAlign:o,strokeStyle:s,fillStyle:i})}}functiontoArray(e){returnArray.isArray(e)?e:Object.keys(e)}classComboWidgetextendsBaseSteppedWidget{constructor(e,t){super(e,t),__privateAdd(this,_ComboWidget_instances),this.type="combo"}get_displayValue(){const{values:e}=this.options;if(e){constt="function"==typeofe?e():e;if(t&&!Array.isArray(t))returnt[this.value]}return"number"==typeofthis.value?String(this.value):this.value}canIncrement(){return__privateMethod(this,_ComboWidget_instances,canUseButton_fn).call(this,!0)}canDecrement(){return__privateMethod(this,_ComboWidget_instances,canUseButton_fn).call(this,!1)}incrementValue(e){__privateMethod(this,_ComboWidget_instances,tryChangeValue_fn).call(this,1,e)}decrementValue(e){__privateMethod(this,_ComboWidget_instances,tryChangeValue_fn).call(this,-1,e)}onClick({e:e,node:t,canvas:i}){consts=e.canvasX-t.pos[0],o=this.width||t.size[0];if("function"==typeofthis.options.values&&warnDeprecated("Using a function for values is deprecated. Use an array of unique values instead."),s<40)returnthis.decrementValue({e:e,node:t,canvas:i});if(s>o-40)returnthis.incrementValue({e:e,node:t,canvas:i});consta=__privateMethod(this,_ComboWidget_instances,getValues_fn).call(this,t),n=toArray(a),l=a!=n?Object.values(a):a;newLiteGraph.ContextMenu(l,{scale:Math.max(1,i.ds.scale),event:e,className:"dark",callback:s=>{this.setValue(a!=n?l.indexOf(s):s,{e:e,node:t,canvas:i})}})}}_ComboWidget_instances=newWeakSet,getValues_fn=function(e){const{values:t}=this.options;if(null==t)thrownewError("[ComboWidget]: values is required");return"function"==typeoft?t(this,e):t},canUseButton_fn=function(e){const{values:t}=this.options;if("function"==typeoft)return!1;consti=toArray(t);if(!(i.length>1))return!1;consts=i.at(0),o=i.at(-1);returns===o||this.value!==(e?o:s)},tryChangeValue_fn=function(e,t){consti=__privateMethod(this,_ComboWidget_instances,getValues_fn).call(this,t.node),s=toArray(i);t.canvas.last_mouseclick=0;consto=clamp("object"==typeofi?s.indexOf(String(this.value))+e:s.indexOf(this.value)+e,0,s.length-1),a=Array.isArray(i)?i[o]:o;this.setValue(a,t)};classNumberWidgetextendsBaseSteppedWidget{constructor(e,t){super(e,t),this.type="number"}get_displayValue(){returnNumber(this.value).toFixed(void0!==this.options.precision?this.options.precision:3)}canIncrement(){const{max:e}=this.options;returnnull==e||this.value<e}canDecrement(){const{min:e}=this.options;returnnull==e||this.value>e}incrementValue(e){this.setValue(this.value+getWidgetStep(this.options),e)}decrementValue(e){this.setValue(this.value-getWidgetStep(this.options),e)}setValue(e,t){leti=e;null!=this.options.min&&i<this.options.min&&(i=this.options.min),null!=this.options.max&&i>this.options.max&&(i=this.options.max),super.setValue(i,t)}onClick({e:e,node:node,canvas:canvas}){constx=e.canvasX-node.pos[0],width=this.width||node.size[0],delta=x<40?-1:x>width-40?1:0;delta?this.setValue(this.value+delta*getWidgetStep(this.options),{e:e,node:node,canvas:canvas}):canvas.prompt("Value",this.value,(v=>{if(/^[\d\s()*+/-]+|\d+\.\d+$/.test(v))try{v=eval(v)}catch{}constnewValue=Number(v);isNaN(newValue)||this.setValue(newValue,{e:e,node:node,canvas:canvas})}),e)}onDrag({e:e,node:t,canvas:i}){consts=this.width||t.width,o=e.canvasX-t.pos[0];(o<40?-1:o>s-40?1:0)&&o>-3&&o<s+3||this.setValue(this.value+(e.deltaX??0)*getWidgetStep(this.options),{e:e,node:t,canvas:i})}}classTextWidgetextendsBaseWidget{constructor(e,t){vari;super(e,t),this.type=this.type??"string",this.value=(null==(i=e.value)?void0:i.toString())??""}drawWidget(e,{width:t,showText:i=!0,isEasyUseTheme:s=!1}){const{fillStyle:o,strokeStyle:a,textAlign:n}=e;this.drawWidgetShape(e,{width:t,showText:i,isEasyUseTheme:s}),i&&this.drawTruncatingText({ctx:e,width:t,leftPadding:0,rightPadding:0,isEasyUseTheme:s}),Object.assign(e,{textAlign:n,strokeStyle:a,fillStyle:o})}onClick({e:e,node:t,canvas:i}){vars;i.prompt("Value",this.value,(s=>{null!==s&&this.setValue(s,{e:e,node:t,canvas:i})}),e,(null==(s=this.options)?void0:s.multiline)??!1)}}classLegacyWidgetextendsBaseWidget{draw(e,t,i,s,o,a){}drawWidget(e,t){consti=LiteGraph.NODE_WIDGET_HEIGHT;this.draw&&this.draw(e,this.node,t.width,this.y,i,!!t.showText)}onClick(){}}functiontoClass(e,...t){returnt[0]instanceofe?t[0]:newe(...t)}functiontoConcreteWidget(e,t,i=!0){if(einstanceofBaseWidget)returne;consts=e;switch(s.type){case"button":returntoClass(ButtonWidget,s,t);case"toggle":returntoClass(BooleanWidget,s,t);case"slider":returntoClass(SliderWidget,s,t);case"knob":returntoClass(KnobWidget,s,t);case"combo":returntoClass(ComboWidget,s,t);case"number":returntoClass(NumberWidget,s,t);case"string":case"text":returntoClass(TextWidget,s,t);default:if(i)returntoClass(LegacyWidget,e,t)}}letnodesStore$1=null;constcustom_themes=["custom_obsidian","custom_obsidian_dark","custom_milk_white","obsidian_dark","obsidian","milk_white"],NODE_CUSTOM_COLORS={"easy positive":"green","easy negative":"red","easy promptList":"cyan","easy promptLine":"cyan","easy promptConcat":"cyan","easy promptReplace":"cyan","easy forLoopStart":"blue","easy forLoopEnd":"blue","easy whileLoopStart":"blue","easy whileLoopEnd":"blue","easy loadImagesForLoop":"blue"};letNODE_COLOR_THEMES=LGraphCanvas.node_colors,color_palettes=null,color_palette=null,monitor=null;for(leteinsettings)addSetting(settings[e]);letOriginDrawNodeWidgets=null;functiongetColorBrightness(e,t,i){return.299*e+.587*t+.114*i}functionisColorDarkOrLight(e){lett=e.replace("#","");returngetColorBrightness(parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16))>127.5?"light":"dark"}functiondrawNodeShape(e,t,i,s,o,a,n){varl,r;t.strokeStyle=s,t.fillStyle=o;constd=LiteGraph.NODE_TITLE_HEIGHT,{low_quality:c}=this,{collapsed:u}=e.flags,p=e.renderingShape,{title_mode:A}=e.constructor,g=A!=LiteGraph.TRANSPARENT_TITLE&&A!=LiteGraph.NO_TITLE;leth=newFloat32Array(4);h=[0,g?-d:0,i[0]+1,g?i[1]+d:i[1]];letm=t.globalAlpha;if(t.lineWidth=1,t.beginPath(),p==LiteGraph.BOX_SHAPE||c?t.fillRect(h[0],h[1],h[2],h[3]):p==LiteGraph.ROUND_SHAPE||p==LiteGraph.CARD_SHAPE?t.roundRect(h[0],h[1],h[2],h[3],p==LiteGraph.CARD_SHAPE?[this.round_radius,this.round_radius,0,0]:[this.round_radius]):p==LiteGraph.CIRCLE_SHAPE&&t.arc(.5*i[0],.5*i[1],.5*i[0],0,2*Math.PI),t.strokeStyle=LiteGraph.WIDGET_OUTLINE_COLOR,t.stroke(),t.strokeStyle=s,t.fill(),e.has_errors&&!LiteGraph.use_legacy_node_error_indicator&&strokeShape(t,h,{shape:p,title_mode:A,title_height:d,padding:12,color:LiteGraph.NODE_ERROR_COLOUR,collapsed:u,thickness:10}),!u&&g&&(t.shadowColor="transparent",t.fillStyle="rgba(0,0,0,0.2)",t.fillRect(0,-1,h[2],2)),t.shadowColor="transparent",e.onDrawBackground&&e.onDrawBackground(t,this,this.canvas,this.graph_mouse),g||A==LiteGraph.TRANSPARENT_TITLE){consts="dark"==isColorDarkOrLight((null==e?void0:e.color)||"#ffffff");e.drawTitleBarBackground(t,{scale:this.ds.scale,low_quality:c}),t.globalAlpha=m;leto=!1;LiteGraph.node_box_coloured_by_mode&&LiteGraph.NODE_MODES_COLORS[e.mode]&&(o=LiteGraph.NODE_MODES_COLORS[e.mode]),LiteGraph.node_box_coloured_when_on&&(o=e.action_triggered?"#FFF":e.execute_triggered?"#AAA":o);letn=10;if(e.onDrawTitleBox)e.onDrawTitleBox(t,d,i,this.ds.scale);elseif(p==LiteGraph.ROUND_SHAPE||p==LiteGraph.CIRCLE_SHAPE||p==LiteGraph.CARD_SHAPE){consti=s?"#ffffff":LiteGraph.NODE_SELECTED_TITLE_COLOR,l=s?"#eeeeee":e.boxcolor||o||LiteGraph.NODE_DEFAULT_BOXCOLOR;t.fillStyle=a?i:l,t.beginPath(),t.fillRect(10,0-1.05*n-1,1.1*n,.125*n),t.fillRect(10,0-1.45*n-1,1.1*n,.125*n),t.fillRect(10,0-1.85*n-1,1.1*n,.125*n)}elset.fillStyle=e.renderingBoxColor,t.fillRect(.5*(d-n),-.5*(d+n),n,n);if(t.globalAlpha=m,e.onDrawTitleText&&e.onDrawTitleText(t,d,i,this.ds.scale,this.title_text_font,a),!c){t.font=this.title_text_font;consti=e.getTitle()??`❌ ${e.type}`,o=String(i)+(e.pinned?"📌":"");o&&(t.fillStyle=a?s?"#ffffff":LiteGraph.NODE_SELECTED_TITLE_COLOR:s?"#ffffff":e.constructor.title_text_color||this.node_title_color,e.flags.collapsed?(t.textAlign="left",t.measureText(o),t.fillText(o.substr(0,20),d,LiteGraph.NODE_TITLE_TEXT_Y-d),t.textAlign="left"):(t.textAlign="left",t.fillText(o,d,LiteGraph.NODE_TITLE_TEXT_Y-d)))}if(!u&&e.subgraph&&!e.skip_subgraph_button){leti=LiteGraph.NODE_TITLE_HEIGHT,s=e.size[0]-i,o=LiteGraph.isInsideRectangle(this.graph_mouse[0]-e.pos[0],this.graph_mouse[1]-e.pos[1],s+2,2-i,i-4,i-4);t.fillStyle=o?"#888":"#555",p==LiteGraph.BOX_SHAPE||c?t.fillRect(s+2,2-i,i-4,i-4):(t.beginPath(),t.roundRect(s+2,2-i,i-4,i-4,[4]),t.fill()),t.fillStyle="#333",t.beginPath(),t.moveTo(s+.2*i,.6*-i),t.lineTo(s+.8*i,.6*-i),t.lineTo(s+.5*i,.3*-i),t.fill()}null==(l=e.onDrawTitle)||l.call(e,t)}if(null==e?void0:e.strokeStyles){for(constiofObject.values(e.strokeStyles)){consts=i.call(e);s&&strokeShape(t,h,{shape:p,title_height:d,title_mode:A,collapsed:u,...s})}null==e||e.drawProgressBar(t)}elseif(a){null==(r=e.onBounding)||r.call(e,h),A==LiteGraph.TRANSPARENT_TITLE&&(h[1]-=d,h[3]+=d),t.lineWidth=2,t.globalAlpha=.8,t.beginPath();leto=0,a=0,n=1;p==LiteGraph.BOX_SHAPE?t.rect(o+h[0],o+h[1],a+h[2],a+h[3]):p==LiteGraph.ROUND_SHAPE||p==LiteGraph.CARD_SHAPE&&e.flags.collapsed?t.roundRect(o+h[0],o+h[1],a+h[2],a+h[3],[this.round_radius*n]):p==LiteGraph.CARD_SHAPE?t.roundRect(o+h[0],o+h[1],a+h[2],a+h[3],[this.round_radius*n,n,this.round_radius*n,n]):p==LiteGraph.CIRCLE_SHAPE&&t.arc(.5*i[0],.5*i[1],.5*i[0]+6,0,2*Math.PI),t.strokeStyle=LiteGraph.NODE_BOX_OUTLINE_COLOR,t.stroke(),t.strokeStyle=s,t.globalAlpha=1}e.execute_triggered>0&&e.execute_triggered--,e.action_triggered>0&&e.action_triggered--}functiondrawNodeWidgets(e,t,i){vars,o;if(!e.widgets)return;consta=e.widgets.some((e=>["easyHidden","fastHidden"].includes(e.type))),n=custom_themes.includes(color_palette);if(!a&&!n)returnvoid(OriginDrawNodeWidgets&&(null==OriginDrawNodeWidgets||OriginDrawNodeWidgets.apply(this,arguments)));letl=this.low_quality||!1,r=this.editor_alpha||1;constd=e.size[0],{widgets:c}=e,u=LiteGraph.NODE_WIDGET_HEIGHT,p=!l;i.save(),i.globalAlpha=r;for(constAofc){if(!e.isWidgetVisible(A))continue;const{y:t}=A,a=A.advanced?LiteGraph.WIDGET_ADVANCED_OUTLINE_COLOR:LiteGraph.WIDGET_OUTLINE_COLOR;A.last_y=t,A.computedDisabled=A.disabled||null!=(null==(s=e.getSlotFromWidget(A))?void0:s.link),i.strokeStyle=a,i.fillStyle="#222",i.textAlign="left",A.computedDisabled&&(i.globalAlpha*=.5);constc=A.width||d;if("function"==typeofA.draw)A.draw(i,e,c,t,u,l);elseif("$$canvas-image-preview"==A.name){conste=(e,t,i,s)=>{renderPreview(e,t,s)};A.draw=e}elsenull==(o=toConcreteWidget(A,e,!1))||o.drawWidget(i,{width:c,showText:p,isEasyUseTheme:n});i.globalAlpha=r}i.restore()}functiononMenuNodeMode(e,t,i,s,o){returnnewLiteGraph.ContextMenu(LiteGraph.NODE_MODES,{event:i,callback:function(e){if(!o)return;vart=Object.values(LiteGraph.NODE_MODES).indexOf(e),i=function(e){t>=0&&LiteGraph.NODE_MODES[t]?e.changeMode(t):e.changeMode(LiteGraph.ALWAYS),nodesStore$1||(nodesStore$1=useNodesStore()),nodesStore$1.update()},s=LGraphCanvas.active_canvas;if(!s.selected_nodes||Object.keys(s.selected_nodes).length<=1)i(o);elsefor(varains.selected_nodes)i(s.selected_nodes[a])},parentMenu:s,node:o}),!1}functiononMenuNodeColors(e,t,i,s,o){if(!o)throw"no node for color";vara=[];for(varnina.push({value:null,content:"<span style='display: block; padding-left: 4px;'>No color</span>"}),LGraphCanvas.node_colors){varl=LGraphCanvas.node_colors[n];e={value:n,content:"<span style='display: block; color: #999; padding-left: 4px; border-left: 8px solid "+l.color+"; background-color:"+l.bgcolor+"'>"+n+"</span>"};a.push(e)}returnnewLiteGraph.ContextMenu(a,{event:i,callback:function(e){if(!o)return;vart=e.value?LGraphCanvas.node_colors[e.value]:null,i=function(e){t?e.constructor===LiteGraph.LGraphGroup?e.color=t.groupcolor:(e.color=t.color,e.bgcolor=t.bgcolor):(deletee.color,deletee.bgcolor),nodesStore$1||(nodesStore$1=useNodesStore()),nodesStore$1.update()},s=LGraphCanvas.active_canvas;if(!s.selected_nodes||Object.keys(s.selected_nodes).length<=1)i(o);elsefor(varains.selected_nodes)i(s.selected_nodes[a]);o.setDirtyCanvas(!0,!0)},parentMenu:s,node:o}),!1}functiononShowPropertyEditor(e,t,i,s,o){vara=e.property||"title",n=o[a],l=document.createElement("div");l.is_modified=!1,l.className="graphdialog",l.innerHTML="<span class='name'></span><input autofocus type='text' class='value'/><button>OK</button>",l.close=function(){l.parentNode&&l.parentNode.removeChild(l)},l.querySelector(".name").innerText=a;varr=l.querySelector(".value");r&&(r.value=n,r.addEventListener("blur",(function(e){this.focus()})),r.addEventListener("keydown",(function(e){if(l.is_modified=!0,27==e.keyCode)l.close();elseif(13==e.keyCode)g();elseif(13!=e.keyCode&&"textarea"!=e.target.localName)return;e.preventDefault(),e.stopPropagation()})));vard=LGraphCanvas.active_canvas.canvas,c=d.getBoundingClientRect(),u=-20,p=-20;c&&(u-=c.left,p-=c.top),event?(l.style.left=event.clientX+u+"px",l.style.top=event.clientY+p+"px"):(l.style.left=.5*d.width+u+"px",l.style.top=.5*d.height+p+"px"),l.querySelector("button").addEventListener("click",g),d.parentNode.appendChild(l),r&&r.focus();varA=null;functiong(){r&&function(t){"Number"==e.type?t=Number(t):"Boolean"==e.type&&(t=Boolean(t));o[a]=t,l.parentNode&&l.parentNode.removeChild(l);o.setDirtyCanvas(!0,!0),nodesStore$1||(nodesStore$1=useNodesStore());nodesStore$1.update()}(r.value)}l.addEventListener("mouseleave",(function(e){LiteGraph.dialog_close_on_mouse_leave&&!l.is_modified&&LiteGraph.dialog_close_on_mouse_leave&&(A=setTimeout(l.close,LiteGraph.dialog_close_on_mouse_leave_delay))})),l.addEventListener("mouseenter",(function(e){LiteGraph.dialog_close_on_mouse_leave&&A&&clearTimeout(A)}))}registerExtension({name:"Comfy.EasyUse.UI",init(){vare,t;consti="Comfy.CustomColorPalettes",s="Comfy.Settings.Comfy.CustomColorPalettes";if(color_palettes||(color_palettes=getSetting(i,s)),color_palette||(color_palette=getSetting("Comfy.ColorPalette","Comfy.Settings.Comfy.ColorPalette")||"dark"),(!(null==(e=null==color_palettes?void0:color_palettes.obsidian)?void0:e.version)||color_palettes.obsidian.version<obsidian.ColorPalette.version)&&(color_palettes.obsidian=obsidian.ColorPalette,color_palettes.obsidian_dark=obsidian_dark.ColorPalette,setSetting(i,color_palettes,s)),(!color_palettes||!(null==(t=null==color_palettes?void0:color_palettes.milk_white)?void0:t.version)||color_palettes.milk_white.version<milk_white.ColorPalette.version)&&(color_palettes.milk_white=milk_white.ColorPalette,setSetting(i,color_palettes,s)),custom_themes.includes(color_palette)){switch(document.body.classList+=" comfyui-easyuse",addPreconnect("https://fonts.googleapis.com",!0),addCss("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700&family=JetBrains+Mono&display=swap",!1),color_palette){case"obsidian":case"obsidian_dark":case"custom_obsidian":case"custom_obsidian_dark":case"dark":LGraphCanvas.node_colors=obsidian.NODE_COLORS;break;case"custom_milk_white":case"milk_white":case"light":LGraphCanvas.node_colors=milk_white.NODE_COLORS}NODE_COLOR_THEMES=LGraphCanvas.node_colors,LiteGraph.NODE_TEXT_SIZE=13,LGraphCanvas.prototype.drawNodeShape=useTryCatchCallback(LGraphCanvas.prototype.drawNodeShape,drawNodeShape)}elsedocument.body.classList.remove("comfyui-easyuse");OriginDrawNodeWidgets=LGraphCanvas.prototype.drawNodeWidgets,LGraphCanvas.prototype.drawNodeWidgets=useTryCatchCallback(OriginDrawNodeWidgets,drawNodeWidgets),LGraphCanvas.onMenuNodeMode=useTryCatchCallback(LGraphCanvas.onMenuNodeMode,onMenuNodeMode),LGraphCanvas.onMenuNodeColors=useTryCatchCallback(LGraphCanvas.onMenuNodeColors,onMenuNodeColors),LGraphCanvas.onShowPropertyEditor=useTryCatchCallback(LGraphCanvas.onShowPropertyEditor,onShowPropertyEditor)},asyncsetup(){vare;Object.assign(app$1.canvas.default_connection_color_byType,CUSTOM_LINK_TYPES_COLOR),Object.assign(LGraphCanvas.link_type_colors,CUSTOM_LINK_TYPES_COLOR),"custom_milk_white"==color_palette&&document.body.classList.remove(DARK_THEME_CLASS),app$1.ui.settings.addEventListener("Comfy.ColorPalette.change",(async({detail:e})=>{(null==e?void0:e.value)&&(null==e?void0:e.oldValue)&&(awaitsleep(1),Object.assign(app$1.canvas.default_connection_color_byType,CUSTOM_LINK_TYPES_COLOR),Object.assign(LGraphCanvas.link_type_colors,CUSTOM_LINK_TYPES_COLOR)),"custom_milk_white"==e.value&&document.body.classList.remove(DARK_THEME_CLASS)})),setTimeout((e=>setCrystoolsUI(getSetting("Comfy.UseNewMenu")||"Disabled")),1);constt=null==(e=app$1.ui.settings.settingsLookup)?void0:e["Comfy.UseNewMenu"];t&&(t.onChange=e=>setCrystoolsUI(e)),api.addEventListener("easyuse-toast",(e=>{constt=e.detail.content,i=e.detail.type,s=e.detail.duration;i?toast.show({id:`toast-${i}`,icon:toast[i+"_icon"],content:`${t}`,duration:s||3e3}):toast.info(t,s)}))},asyncnodeCreated(e){if(NODE_CUSTOM_COLORS.hasOwnProperty(e.comfyClass)){constt=NODE_CUSTOM_COLORS[e.comfyClass],i=NODE_COLOR_THEMES[t];if(!i)return;!e.bgcolor&&i.bgcolor&&(e.bgcolor=i.bgcolor),!e.color&&i.color&&(e.color=i.color)}}});constsetCrystoolsUI=e=>{vart;consti=(null==(t=document.getElementById("crystools-root"))?void0:t.children)||null,s=getSetting("Comfy.Workflow.WorkflowTabsPosition",null);if((null==i?void0:i.length)>0&&s)if(monitor||(monitor=document.getElementById("MonitorUI")),"Disabled"==e){document.getElementById("crystools-root").appendChild(monitor)}else{lete=document.getElementById("crystools-root-easyuse");if(e)e.appendChild(monitor);else{conste=document.getElementsByClassName("comfyui-menu-right");e.length>0&&e[0].before($el("div",{id:"crystools-root-easyuse"},monitor))}}};letorigProps={};constgetWidgetByName=(e,t)=>e.widgets.find((e=>e.name===t)),doesInputWithNameLink=(e,t,i)=>!!e.inputs&&e.inputs.some((e=>e.name===t&&e.link&&!i)),toggleWidget=(e,t,i=!1,s="")=>{varo;if(!t||doesInputWithNameLink(e,t.name,i))return;origProps[t.name]||(origProps[t.name]={origType:t.type,origComputeSize:t.computeSize});consta=e.size;t.type=i?origProps[t.name].origType:"easyHidden"+s,t.computeSize=i?origProps[t.name].origComputeSize:()=>[0,-4],null==(o=t.linkedWidgets)||o.forEach((s=>toggleWidget(e,s,":"+t.name,i)));constn=i?Math.max(e.computeSize()[1],a[1]):e.size[1];e.setSize([e.size[0],n])},getWidgetValue=(e,t=0)=>{vari,s;if(e)return(null==(i=e.widgets)?void0:i[t])?e.widgets[t].value:e.widgets_values?null==(s=e.widgets_values)?void0:s[t]:void0},updateNodeHeight=e=>e.setSize([e.size[0],e.computeSize()[1]]),getNodeById=(e,t)=>graph.getNodeById(e),getSelectedNodes=e=>{vart;try{returnObject.values(null==(t=null==graph?void0:graph.list_of_graphcanvas[0])?void0:t.selected_nodes)}catch(i){return[]}};functioneaseInOut(e){return.5-.5*Math.cos(Math.PI*e)}functionlerp(e,t,i){returne+easeInOut(i)*(t-e)}constjumpToPosition=([e,t],i)=>{consts=i.ds,o=document.body.clientWidth,a=document.body.clientHeight,n=s.scale,l=.5*o/n-e,r=.5*a/n-t,d=Date.now()+250,c=s.offset[0],u=s.offset[1],p=()=>{conste=d-Date.now();if(!(Date.now()<d))returns.offset[0]=l,s.offset[1]=r,voidi.setDirty(!0,!0);requestAnimationFrame(p);constt=1-e/250;s.offset[0]=lerp(c,l,t),s.offset[1]=lerp(u,r,t),i.setDirty(!0,!0)};requestAnimationFrame(p)},jumpToNode=(e,t=!0)=>{vari,s;consto=(null==(s=null==(i=e.graph)?void0:i.list_of_graphcanvas)?void0:s[0])||null;if(!o)return;const[a,n]=e.pos,[l,r]=e.size;jumpToPosition([a+l/2,n+r/2],o),t&&o.selectNode(e)},jumpToNodeId=e=>{constt=getNodeById(e);t&&jumpToNode(t)},getLinks=()=>graph.links??[],getLinkById=(e,t=getLinks())=>t[e],getAllNodes=e=>graph._nodes??[],formatVariables=e=>e.toLowerCase().replace(/_./g,(e=>e.replace("_","").toUpperCase())),isGetNode=e=>"easy getNode"===e.type,isSetNode=e=>"easy setNode"===e.type,isGetSetNode=e=>isGetNode(e)||isSetNode(e),getGetSetNodes=(e=getAllNodes())=>e.filter((e=>isGetSetNode(e)));letlastTargetGetPos={},lastTargetSetPos={};constchainNode=(e=!1,t={})=>{vari,s,o,a,n;constl=getGetSetNodes();if(!l||l.length<1)return;constr=getSelectedNodes();if(0===r.length)return;letd=t.inputX||160,c=t.ouputX||60;if(r.filter((e=>isGetSetNode(e))).length>1)return;for(constpofr){leta=t.inputY||10,n=t.outputY||30;constl=[],u=p.id;if(p.graph){lastTargetGetPos[u]||(lastTargetGetPos[u]=[]);for(consteofp.inputs??[]){constt=e.link;if(!t)continue;const{origin_id:i,target_slot:s}=getLinkById(t),o=getNodeById(i);if(!o)continue;if(!isGetSetNode(o))continue;letn=p.getConnectionPos(!0,s);lastTargetGetPos[u][s]||(lastTargetGetPos[u][s]=n),!lastTargetGetPos[u]||lastTargetGetPos[u][s][1]===n[1]&&lastTargetGetPos[u][s][0]===n[0]||(d=n[0]-lastTargetGetPos[u][s][0],a=n[1]-lastTargetGetPos[u][s][1],o.pos=[o.pos[0]+d,o.pos[1]+a]),lastTargetGetPos[u][s]=n,l.push(o)}lastTargetSetPos[u]||(lastTargetSetPos[u]=[]);for(consteofp.outputs??[])if(e.links&&p.graph)for(consttofe.links){const{target_id:e,target_slot:s,origin_slot:o}=getLinkById(t),a=getNodeById(e);if(!a)continue;if(!isGetSetNode(a))continue;constr=null==(i=a.outputs)?void0:i.links;if((null==r?void0:r.length)>1)return;constd=p.getConnectionPos(!1,o);lastTargetSetPos[u][o]||(lastTargetSetPos[u][o]=d),!lastTargetSetPos[u]||lastTargetSetPos[u][o][0]===d[0]&&lastTargetSetPos[u][o][1]===d[1]||(c=d[0]-lastTargetSetPos[u][o][0],n=d[1]-lastTargetSetPos[u][o][1],a.pos=[a.pos[0]+c,a.pos[1]+n]),lastTargetSetPos[u][o]=d,l.push(a)}if(e&&1===r.length){conste=[p,...l];(null==(o=null==(s=p.graph)?void0:s.list_of_graphcanvas)?void0:o[0]).selectNodes(e)}}}constu=r[0];if(!u)return;(null==(n=null==(a=u.graph)?void0:a.list_of_graphcanvas)?void0:n[0]).setDirty(!0,!0)},setWidgetValue=(e,t,i=0)=>{e.widgets_values||(e.widgets_values=[]),e.widgets_values[i]=t,e.widgets[i].value=t},graphAdd=e=>graph.add(e),graphRemove=e=>graph.remove(e),traverseInputReroute=(e,t=0)=>{vari,s;if("Reroute"!==e.type)return[e,t];consto=e,a=null==(s=null==(i=o.inputs)?void0:i[0])?void0:s.link;if(!a)return[o,t];constn=getLinkById(a);if(!n)return[o,t];constl=getNodeById(n.origin_id);returnl?(setTimeout((()=>{graphRemove(o)})),traverseInputReroute(l,n.origin_slot)):[o,t]},traverseOutputReroute=e=>{vart,i,s;if("Reroute"!==e.type)returne;consto=e,a=null==(i=null==(t=o.outputs)?void0:t[0])?void0:i.links;if(!a)returno;constn=a[0];if(!n)returno;constl=getLinkById(n);if(!l)returno;constr=getNodeById(l.target_id);returnr?(1===(null==(s=o.outputs[0].links)?void0:s.length)&&setTimeout((()=>{graphRemove(o)})),traverseOutputReroute(r)):o},convertLinkToGetSetNode=(e,t=!1)=>{vari,s,o,a,n,l,r,d,c,u;const{type:p}=e;if("*"===p)return;let{origin_id:A,target_id:g,origin_slot:h,target_slot:m}=e,f=getNodeById(A),y=getNodeById(g);if(!f||!y)return!1;if("Reroute"===f.type){lete=0;[f,e]=traverseInputReroute(f),A=null==f?void0:f.id,h=e,void0!==h&&-1!==h||(h=0)}if("Reroute"===y.type&&(y=traverseOutputReroute(y),g=null==y?void0:y.id,m=null==y?void0:y.inputs.findIndex((e=>e.type===p)),void0!==m&&-1!==m||(m=0)),void0===A||void0===g||!f||!y)return!1;if(t&&(isGetSetNode(f)||isGetSetNode(y)))return!1;letv=formatVariables((null==(i=y.getInputInfo(m))?void0:i.name)??p.toLowerCase());v||(v=formatVariables((null==(o=null==(s=null==f?void0:f.outputs)?void0:s[h])?void0:o.name)??(null==(n=null==(a=null==f?void0:f.outputs)?void0:a[h])?void0:n.type.toString())??v+`_from_${A}_to_${g}`));let_,b=!1,S=!1;if(isGetSetNode(f))v=getWidgetValue(f),S=!0;else{conste=null==(r=null==(l=f.outputs)?void0:l[h])?void0:r.links;if(e)for(consttofe){conste=getNodeById((null==(d=getLinkById(t))?void0:d.target_id)??-1);e&&isGetSetNode(e)&&isSetNode(e)&&(v=getWidgetValue(e),S=!0)}if(!S){for(consteofgetGetSetNodes()){if(!(v===getWidgetValue(e)&&isSetNode(e)))continue;constt=null==(c=e.inputs[0])?void0:c.link;(null==(u=getLinkById(t))?void0:u.origin_id)===f.id?S=!0:b=!0}b&&(v+=`_from_${A}_to_${g}`)}}if(!S){_=LiteGraph.createNode("easy setNode"),_.is_auto_link=!0;conste=f.getConnectionPos(!1,h);_.pos=[e[0]+20,e[1]],_.inputs[0].name=v,_.inputs[0].type=p,_.inputs[0].widget=y.inputs[m].widget,setWidgetValue(_,v),graphAdd(_),_.flags.collapsed=!0;lett=[];f.widgets?t=Object.values(f.widgets).map((e=>e.value)):f.widgets_values&&(t=JSON.parse(JSON.stringify(f.widgets_values))),f.connect(h,_,0),f.widgets_values=t,"PrimitiveNode"===f.type&&setTimeout((()=>{if(f){f.connect(h,_,0);for(const[e,i]oft.entries())setWidgetValue(f,i,e);null!==_&&_.setSize(_.computeSize())}}))}constN=LiteGraph.createNode("easy getNode"),w=y.getConnectionPos(!0,m);N.pos=[w[0]-150,w[1]],N.outputs[0].name=v,N.outputs[0].type=p,N.outputs[0].widget=y.inputs[m].widget,graphAdd(N),setWidgetValue(N,v),null===N||(N.flags.collapsed=!0,N.setSize(N.computeSize()),N.connect(0,y,m))},addNodesToGroup=(e,t=[],i=20)=>{vars,o,a,n,l,r,d,c,u,p;for(varAof(o=a=n=l=-1,r=d=c=u=-1,[e._nodes,t]))for(varginA)r=(p=A[g]).pos[0],d=p.pos[1],c=p.pos[0]+p.size[0],u=p.pos[1]+p.size[1],"Reroute"!=p.type&&(d-=LiteGraph.NODE_TITLE_HEIGHT),(null==(s=p.flags)?void0:s.collapsed)&&(u=d+LiteGraph.NODE_TITLE_HEIGHT,(null==p?void0:p._collapsed_width)&&(c=r+Math.round(p._collapsed_width))),(-1==o||r<o)&&(o=r),(-1==a||d<a)&&(a=d),(-1==n||c>n)&&(n=c),(-1==l||u>l)&&(l=u);a-=Math.round(1.4*e.font_size),e.pos=[o-i,a-i],e.size=[n-o+2*i,l-a+2*i]},setNodesSameSize=(e,t="width")=>{vari;consts=e[0],o="width"==t?0:1,a=null==(i=s.size)?void0:i[o];a&&(e.forEach((e=>{e.size[o]=a})),LGraphCanvas.active_canvas.setDirty(!0,!0))},distributeNodes=(e,t="horizontal")=>{if(e.length<3)return;consti="horizontal"===t?0:1;e.sort(((e,t)=>e.pos[i]-t.pos[i]));consts=Math.min(...e.map((e=>e.pos[i]))),o=(Math.max(...e.map((e=>e.pos[i]+e.size[i])))-s-e.reduce(((e,t)=>e+t.size[i]),0))/(e.length-1);leta=s;e.forEach((e=>{e.pos[i]=a,a+=e.size[i]+o})),LGraphCanvas.active_canvas.setDirty(!0,!0)},CANVAS_IMAGE_PREVIEW_WIDGET="$$canvas-image-preview";functionuseNodeCanvasImagePreview(){conste=useImagePreviewWidget();return{showCanvasImagePreview:function(t){vari;(null==(i=t.imgs)?void0:i.length)&&t.widgets&&(t.widgets.find((e=>e.name===CANVAS_IMAGE_PREVIEW_WIDGET))||e(t,{type:"IMAGE_PREVIEW",name:CANVAS_IMAGE_PREVIEW_WIDGET}))},removeCanvasImagePreview:function(e){vart,i;if(!e.widgets)return;consts=e.widgets.findIndex((e=>e.name===CANVAS_IMAGE_PREVIEW_WIDGET));s>-1&&(null==(i=(t=e.widgets[s]).onRemove)||i.call(t),e.widgets.splice(s,1))}}}constANIM_PREVIEW_WIDGET="$$comfy_animation_preview";functionuseNodeVideoPreview(){return{showVideoPreview:function(e){vart;(null==(t=e.video)?void0:t.length)&&e.widgets&&e.widgets.findIndex((e=>e.name===ANIM_PREVIEW_WIDGET))},removeVideoPreview:function(e){vart,i;if(!e.widgets)return;consts=e.widgets.findIndex((e=>"video-preview"===e.name));s>-1&&(null==(i=(t=e.widgets[s]).onRemove)||i.call(t),e.widgets.splice(s,1))}}}constVIDEO_NODE_PROPERTY="video_upload",getNodeData=e=>{vart;returnnull==(t=e.constructor)?void0:t.nodeData},getInputSpecsFromData=e=>{if(!e)return[];const{required:t,optional:i}=e,s=[];if(t)for(constoofObject.values(t))s.push(o);if(i)for(constoofObject.values(i))s.push(o);returns},hasInputProperty=(e,t)=>{if(!e)return!1;consti=getNodeData(e);if(!(null==i?void0:i.input))return!1;returngetInputSpecsFromData(i.input).some((e=>{vari;returnnull==(i=null==e?void0:e[1])?void0:i[t]}))};functionisVideoNode(e){return!!e&&(!!e.videoContainer||!!e.widgets&&hasInputProperty(e,VIDEO_NODE_PROPERTY))}constgetNodeId=e=>null==e?void0:e.id.toString(),getNodeOutputs=e=>app$1.nodeOutputs[getNodeId(e)],getNodePreviews=e=>app$1.nodePreviewImages[getNodeId(e)],getPreviewParam=e=>e.animatedImages?"":app$1.getPreviewFormatParam();functiongetNodeImageUrls(e){vart;consti=getNodePreviews(e),s=getNodeOutputs(e);if((null==i?void0:i.length)&&!e.isOutputFinal)returni;if(!(null==(t=null==s?void0:s.images)?void0:t.length))return(null==i?void0:i.length)?i:void0;consto=app$1.getRandParam(),a=getPreviewParam(e);returns.images.map((e=>{constt=newURLSearchParams(e);returnapi.apiURL(`/view?${t}${a}${o}`)}))}constVIDEO_WIDGET_NAME="video-preview",VIDEO_DEFAULT_OPTIONS={playsInline:!0,controls:!0,loop:!0},MEDIA_LOAD_TIMEOUT=8192,MAX_RETRIES=1,VIDEO_PIXEL_OFFSET=64,createContainer=()=>{conste=document.createElement("div");returne.classList.add("comfy-img-preview"),e},createTimeout=e=>newPromise((t=>setTimeout((()=>t(null)),e))),getVideoRealURL=e=>api.apiURL(`/view?filename=${encodeURIComponent(e.filename)}&type=${e.type}&subfolder=${e.subfolder}&rand=${Math.random()}`),useNodePreview=(e,t)=>{const{loadElement:i,onLoaded:s,onFailedLoading:o}=t,a=async(e,t=0)=>{consts=awaitPromise.race([i(e),createTimeout(MEDIA_LOAD_TIMEOUT)]);returnnull===s&&t<MAX_RETRIES?a(e,t+1):s};return{showPreview:function(){vari;if(e.isLoading)return;constn=(null==(i=e.videos)?void0:i.length)>0?e.videos.map((e=>getVideoRealURL(e))):getNodeImageUrls(e);(null==n?void0:n.length)&&((null==t?void0:t.block)&&(e.isLoading=!0),(asynce=>Promise.all(e.map((e=>a(e)))))(n).then((e=>{constt=e.filter((e=>null!==e));t.length&&(null==s||s(t))})).catch((()=>{null==o||o()})).finally((()=>{e.isLoading=!1})))}}},useNodeImage=e=>{e.previewMediaType="image";returnuseNodePreview(e,{loadElement:e=>newPromise((t=>{consti=newImage;i.onload=()=>t(i),i.onerror=()=>t(null),i.src=e})),onLoaded:t=>{e.imageIndex=null,e.imgs=t},onFailedLoading:()=>{e.imgs=void0}})},useNodeVideo=e=>{e.previewMediaType="video";returnuseNodePreview(e,{loadElement:e=>newPromise((t=>{consti=document.createElement("video");Object.assign(i,VIDEO_DEFAULT_OPTIONS),i.onloadeddata=()=>t(i),i.onerror=()=>t(null),i.src=e})),onLoaded:t=>{consti=t[0];vars,o;i&&(e.videoContainer||(e.imgs&&(e.imgs=void0),e.videoContainer=createContainer(),e.videoContainer.style.pointerEvents="auto",s=e.videoContainer,(null==(o=e.widgets)?void0:o.some((e=>e.name===VIDEO_WIDGET_NAME)))||e.addDOMWidget(VIDEO_WIDGET_NAME,"video",s,{hideOnZoom:!1,serialize:!1})),e.videoContainer.replaceChildren(i),e.imageOffset=VIDEO_PIXEL_OFFSET)},onFailedLoading:()=>{e.videoContainer=void0}})};functionunsafeDrawBackground(e,t){vari;if(e.flags.collapsed)return;const{showCanvasImagePreview:s,removeCanvasImagePreview:o}=useNodeCanvasImagePreview(),{showVideoPreview:a,removeVideoPreview:n}=useNodeVideoPreview(),l=getNodeOutputs(e),r=getNodePreviews(e),d=l&&(e.images!==l.images||e.videos!==l.videos),c=r&&e.preview!==r;if(c&&(e.isOutputFinal=!1,e.isTwiceRendered&&(e.isTwiceRendered=!1),e.preview=r),d&&(e.isOutputFinal=!0,l.images&&(e.images=l.images),l.videos&&(e.videos=l.videos)),d||c){e.animatedImages=null==l?void0:l.animated;constt=e.animatedImages&&l.images.some((e=>{vart;returnnull==(t=e.filename)?void0:t.includes("webp")})),i=e.animatedImages&&!t||isVideoNode(this);d&&(null==l?void0:l.videos)||i?useNodeVideo(e).showPreview():useNodeImage(e).showPreview()}e.id!=app$1.runningNodeId&&!e.isTwiceRendered&&e.isOutputFinal&&(e.videos?useNodeVideo(e.videos):useNodeImage(e).showPreview(),e.isTwiceRendered=!0),(null==(i=e.imgs)?void0:i.length)&&(e.animatedImages||d&&(null==l?void0:l.videos)?(o(e),a(e)):(n(e),s(e)))}constallow_widgets=["rescale_after_model","rescale","lora_name","upscale_method","image_output","add_noise","info","sampler_name","ckpt_B_name","ckpt_C_name","save_model","refiner_ckpt_name","num_loras","num_controlnet","mode","toggle","resolution","ratio","target_parameter","input_count","replace_count","downscale_mode","range_mode","text_combine_mode","input_mode","lora_count","ckpt_count","conditioning_mode","preset","use_tiled","use_batch","num_embeds","easing_mode","guider","scheduler","inpaint_mode","t5_type","rem_mode","encode","method"],ipa_presets=["LIGHT - SD1.5 only (low strength)","STANDARD (medium strength)","VIT-G (medium strength)","REGULAR - FLUX and SD3.5 only (high strength)","PLUS (high strength)","PLUS (kolors genernal)","PLUS FACE (portraits)","FULL FACE - SD1.5 only (portraits stronger)","COMPOSITION"],ipa_loras_presets=["FACEID","FACEID PLUS - SD1.5 only","FACEID PLUS V2","FACEID PLUS KOLORS"],ipa_faceid_presets=[...ipa_loras_presets,"FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"],has_seed_nodes=["easy seed","easy latentNoisy","easy wildcards","easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingSdTurbo","easy preSamplingCascade","easy preSamplingDynamicCFG","easy preSamplingLayerDiffusion","easy fullkSampler","easy fullCascadeKSampler"],loader_nodes=["easy fullLoader","easy a1111Loader","easy comfyLoader","easy hyditLoader","easy pixArtLoader"],samplers_nodes=["easy fullkSampler","easy kSampler","easy kSamplerCustom","easy kSamplerTiled","easy kSamplerLayerDiffusion","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo","easy fullCascadeKSampler","easy cascadeKSampler"],image_dynamic_nodes=["easy imageSize","easy imageSizeBySide","easy imageSizeByLongerSide","easy imageSizeShow","easy imageRatio","easy imagePixelPerfect"],loop_nodes=["easy forLoopStart","easy forLoopEnd","easy whileLoopStart","easy whileLoopEnd"],index_switch_nodes=["easy anythingIndexSwitch","easy imageIndexSwitch","easy textIndexSwitch","easy conditioningIndexSwitch"],inverse_switch_nodes=["easy anythingInversedSwitch"],change_slots_nodes=["easy loadImagesForLoop",...loop_nodes,...index_switch_nodes,...inverse_switch_nodes],value_names={"easy anythingInversedSwitch":"out","easy anythingIndexSwitch":"value","easy imageIndexSwitch":"image","easy textIndexSwitch":"text","easy conditioningIndexSwitch":"cond"};functiontoggleLogic(e,t){vari;consts=e.comfyClass;leto=t.value;switch(t.name){case"range_mode":toggleWidget(e,getWidgetByName(e,"step"),"step"==o),toggleWidget(e,getWidgetByName(e,"num_steps"),"num_steps"==o),updateNodeHeight(e);break;case"text_combine_mode":toggleWidget(e,getWidgetByName(e,"replace_text"),"replace"==o);break;case"lora_name":["lora_model_strength","lora_clip_strength"].map((t=>toggleWidget(e,getWidgetByName(e,t),"None"!==o)));break;case"resolution":"自定义 x 自定义"===o&&(t.value="width x height (custom)"),["empty_latent_width","empty_latent_height","width","height"].map((t=>toggleWidget(e,getWidgetByName(e,t),"width x height (custom)"===o)));break;case"ratio":["empty_latent_width","empty_latent_height"].map((t=>toggleWidget(e,getWidgetByName(e,t),"custom"===o)));break;case"num_loras":vara=o+1,n=null==(i=getWidgetByName(e,"mode"))?void0:i.value;requestAnimationFrame((t=>{for(leti=0;i<a;i++)toggleWidget(e,getWidgetByName(e,"lora_"+i+"_name"),!0),toggleWidget(e,getWidgetByName(e,"lora_"+i+"_strength"),"simple"===n),["lora_"+i+"_model_strength","lora_"+i+"_clip_strength"].map((t=>toggleWidget(e,getWidgetByName(e,t),"simple"!==n)));for(leti=a;i<99;i++)["lora_"+i+"_name","lora_"+i+"_strength","lora_"+i+"_model_strength","lora_"+i+"_clip_strength"].map((t=>toggleWidget(e,getWidgetByName(e,t),!1)));updateNodeHeight(e)}));break;case"num_controlnet":a=o+1,n=getWidgetByName(e,"mode").value;for(lett=0;t<a;t++)["controlnet_"+t,"controlnet_"+t+"_strength","scale_soft_weight_"+t].map((t=>toggleWidget(e,getWidgetByName(e,t),!0))),["start_percent_"+t,"end_percent_"+t].map((t=>toggleWidget(e,getWidgetByName(e,t),"simple"!==n)));for(lett=a;t<21;t++)["controlnet_"+t,"controlnet_"+t+"_strength","scale_soft_weight_"+t,"start_percent_"+t,"end_percent_"+t].map((t=>toggleWidget(e,getWidgetByName(e,t),!1)));updateNodeHeight(e);break;case"mode":switch(null==e?void0:e.comfyClass){case"easy loraStack":a=getWidgetByName(e,"num_loras").value+1,n=o;for(lett=0;t<a;t++)toggleWidget(e,getWidgetByName(e,"lora_"+t+"_strength"),"simple"===n),["lora_"+t+"_model_strength","lora_"+t+"_clip_strength"].map((t=>toggleWidget(e,getWidgetByName(e,t),"simple"!==n)));updateNodeHeight(e);break;case"easy controlnetStack":a=getWidgetByName(e,"num_controlnet").value+1,n=o;for(lett=0;t<a;t++)["start_percent_"+t,"end_percent_"+t].map((t=>toggleWidget(e,getWidgetByName(e,t),"simple"!==n)));updateNodeHeight(e);break;case"easy icLightApply":n=o;["lighting","remove_bg"].map((t=>toggleWidget(e,getWidgetByName(e,t),"Foreground"===n))),toggleWidget(e,getWidgetByName(e,"source"),"Foreground"!==n),updateNodeHeight(e)}break;case"toggle":t.type="toggle",t.options={on:"Enabled",off:"Disabled"};break;case"t5_type":["clip_name","padding"].map((t=>toggleWidget(e,getWidgetByName(e,t),"sd3"==o))),["t5_name","device","dtype"].map((t=>toggleWidget(e,getWidgetByName(e,t),"t5v11"==o))),updateNodeHeight(e);break;case"preset":if("FLUX.1-dev"==o&&(t.value="REGULAR - FLUX and SD3.5 only (high strength)"),ipa_presets.includes(o)){lett=getWidgetByName(e,"use_tiled");toggleWidget(e,getWidgetByName(e,"lora_strength")),toggleWidget(e,getWidgetByName(e,"provider"),!!["REGULAR - FLUX and SD3.5 only (high strength)"].includes(o)),toggleWidget(e,getWidgetByName(e,"weight_faceidv2")),toggleWidget(e,getWidgetByName(e,"weight_kolors")),toggleWidget(e,getWidgetByName(e,"use_tiled"),!0),toggleWidget(e,getWidgetByName(e,"sharpening"),t&&t.value)}elseipa_faceid_presets.includes(o)&&(toggleWidget(e,getWidgetByName(e,"weight_faceidv2"),!!["FACEID PLUS V2","FACEID PLUS KOLORS"].includes(o)),toggleWidget(e,getWidgetByName(e,"weight_kolors"),!!["FACEID PLUS KOLORS"].includes(t.value)),["FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"].includes(o)?toggleWidget(e,getWidgetByName(e,"lora_strength"),!1):toggleWidget(e,getWidgetByName(e,"lora_strength"),!0),toggleWidget(e,getWidgetByName(e,"provider"),!0),toggleWidget(e,getWidgetByName(e,"use_tiled")),toggleWidget(e,getWidgetByName(e,"sharpening")));updateNodeHeight(e);break;case"use_tiled":toggleWidget(e,getWidgetByName(e,"sharpening"),!!o),updateNodeHeight(e);break;case"num_embeds":a=o+1;for(lett=0;t<a;t++)toggleWidget(e,getWidgetByName(e,"weight"+t),!0);for(lett=a;t<6;t++)toggleWidget(e,getWidgetByName(e,"weight"+t));updateNodeHeight(e);break;case"inpaint_mode":switch(o){case"normal":case"fooocus_inpaint":["dtype","fitting","function","scale","start_at","end_at"].map((t=>toggleWidget(e,getWidgetByName(e,t),!1)));break;case"brushnet_random":case"brushnet_segmentation":["dtype","scale","start_at","end_at"].map((t=>toggleWidget(e,getWidgetByName(e,t),!0))),["fitting","function"].map((t=>toggleWidget(e,getWidgetByName(e,t),!1)));break;case"powerpaint":["dtype","fitting","function","scale","start_at","end_at"].map((t=>toggleWidget(e,getWidgetByName(e,t),!0)))}updateNodeHeight(e);break;case"encode":toggleWidget(e,getWidgetByName(e,"noise_mask"),!!["inpaint_model_conditioning","different_diffusion"].includes(o)),updateNodeHeight(e);break;case"image_output":toggleWidget(e,getWidgetByName(e,"link_id"),!!["Sender","Sender&Save"].includes(o)),toggleWidget(e,getWidgetByName(e,"decode_vae_name"),!!["Hide","Hide&Save"].includes(o)),["save_prefix","output_path","embed_workflow","number_padding","overwrite_existing"].map((t=>toggleWidget(e,getWidgetByName(e,t),!!["Save","Hide&Save","Sender&Save"].includes(o))));break;case"add_noise":varl=getWidgetByName(e,"control_before_generate"),r=getWidgetByName(e,"control_after_generate")||l;"disable"===o?(toggleWidget(e,getWidgetByName(e,"seed")),r&&(r.last_value=r.value,r.value="fixed",toggleWidget(e,r))):("enable"===o&&(t.value="enable (CPU)"),toggleWidget(e,getWidgetByName(e,"seed"),!0),r&&((null==r?void0:r.last_value)&&(r.value=r.last_value),toggleWidget(e,r,!0))),updateNodeHeight(e);break;case"guider":switch(o){case"Basic":case"IP2P+Basic":["cfg_negative"].map((t=>toggleWidget(e,getWidgetByName(e,t))));break;case"CFG":case"IP2P+CFG":toggleWidget(e,getWidgetByName(e,"cfg"),!0),toggleWidget(e,getWidgetByName(e,"cfg_negative"));break;case"DualCFG":case"IP2P+DualCFG":["cfg","cfg_negative"].map((t=>toggleWidget(e,getWidgetByName(e,t),!0)))}updateNodeHeight(e);break;case"scheduler":"easy preSamplingCustom"==s&&(["karrasADV","exponentialADV","polyExponential"].includes(o)?(["sigma_max","sigma_min"].map((t=>toggleWidget(e,getWidgetByName(e,t),!0))),["denoise","beta_d","beta_min","eps_s","coeff"].map((t=>toggleWidget(e,getWidgetByName(e,t))),!1),toggleWidget(e,getWidgetByName(e,"rho"),"exponentialADV"!=o)):"vp"==o?(["sigma_max","sigma_min","denoise","rho","coeff"].map((t=>toggleWidget(e,getWidgetByName(e,t)))),["beta_d","beta_min","eps_s"].map((t=>toggleWidget(e,getWidgetByName(e,t),!0)))):(["sigma_max","sigma_min","beta_d","beta_min","eps_s","rho"].map((t=>toggleWidget(e,getWidgetByName(e,t)))),toggleWidget(e,getWidgetByName(e,"coeff"),"gits"==o),toggleWidget(e,getWidgetByName(e,"denoise"),!0)),updateNodeHeight(e));break;case"conditioning_mode":["replace","concat","combine"].includes(o)?["average_strength","old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>toggleWidget(e,getWidgetByName(e,t)))):"average"==o?(toggleWidget(e,getWidgetByName(e,"average_strength"),!0),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>toggleWidget(e,getWidgetByName(e,t),!1)))):"timestep"==o&&(["average_strength"].map((t=>toggleWidget(e,getWidgetByName(e,t),!1))),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>toggleWidget(e,getWidgetByName(e,t),!0))));break;case"rescale":getWidgetByName(e,"rescale_after_model").value,toggleWidget(e,getWidgetByName(e,"width"),"to Width/Height"===o),toggleWidget(e,getWidgetByName(e,"height"),"to Width/Height"===o),toggleWidget(e,getWidgetByName(e,"percent"),"by percentage"===o),toggleWidget(e,getWidgetByName(e,"longer_side"),"to longer side - maintain aspect"===o),updateNodeHeight(e);break;case"upscale_method":["factor","crop"].map((t=>toggleWidget(e,getWidgetByName(e,t),"None"!==o)));break;case"target_parameter":switch(s){case"easy XYInputs: Steps":["first_step","last_step"].map((t=>toggleWidget(e,getWidgetByName(e,t),"steps"==o))),["first_start_step","last_start_step"].map((t=>toggleWidget(e,getWidgetByName(e,t),"start_at_step"==o))),["first_end_step","last_end_step"].map((t=>toggleWidget(e,getWidgetByName(e,t),"end_at_step"==o)));break;case"easy XYInputs: Sampler/Scheduler":lett=getWidgetByName(e,"input_count").value+1;for(leti=0;i<t;i++)toggleWidget(e,getWidgetByName(e,"sampler_"+i),"scheduler"!==o),toggleWidget(e,getWidgetByName(e,"scheduler_"+i),"sampler"!==o);updateNodeHeight(e);break;case"easy XYInputs: ControlNet":["first_strength","last_strength"].map((t=>toggleWidget(e,getWidgetByName(e,t),"strength"==o))),["first_start_percent","last_start_percent"].map((t=>toggleWidget(e,getWidgetByName(e,t),"start_percent"==o))),["first_end_percent","last_end_percent"].map((t=>toggleWidget(e,getWidgetByName(e,t),"end_percent"==o))),["strength","start_percent","end_percent"].map((t=>toggleWidget(e,getWidgetByName(e,t),o!=t))),updateNodeHeight(e)}case"replace_count":a=o+1;for(lett=0;t<a;t++)toggleWidget(e,getWidgetByName(e,"replace_"+t),!0);for(lett=a;t<31;t++)toggleWidget(e,getWidgetByName(e,"replace_"+t));updateNodeHeight(e);break;case"lora_count":a=o+1;vard=-1==getWidgetByName(e,"input_mode").value.indexOf("Weights");for(lett=0;t<a;t++)toggleWidget(e,getWidgetByName(e,"lora_name_"+t),!0),["model_str_"+t,"clip_str_"+t].map((t=>toggleWidget(e,getWidgetByName(e,t),!d)));for(lett=a;t<11;t++)["lora_name_"+t,"model_str_"+t,"clip_str_"+t].map((t=>toggleWidget(e,getWidgetByName(e,t),!1)));updateNodeHeight(e);break;case"ckpt_count":a=o+1;varc=-1!=getWidgetByName(e,"input_mode").value.indexOf("ClipSkip"),u=-1!=getWidgetByName(e,"input_mode").value.indexOf("VAE");for(lett=0;t<a;t++)toggleWidget(e,getWidgetByName(e,"ckpt_name_"+t),!0),toggleWidget(e,getWidgetByName(e,"clip_skip_"+t),!!c),toggleWidget(e,getWidgetByName(e,"vae_name_"+t),!!u);for(lett=a;t<11;t++)["ckpt_name_"+t,"clip_skip_"+t,"vae_name_"+t].map((t=>toggleWidget(e,getWidgetByName(e,t),!1)));updateNodeHeight(e);break;case"input_count":a=o+1;varp=getWidgetByName(e,"target_parameter").value;for(lett=0;t<a;t++)toggleWidget(e,getWidgetByName(e,"sampler_"+t),"scheduler"!==p),toggleWidget(e,getWidgetByName(e,"scheduler_"+t),"sampler"!==p);for(lett=a;t<31;t++)toggleWidget(e,getWidgetByName(e,"sampler_"+t)),toggleWidget(e,getWidgetByName(e,"scheduler_"+t));updateNodeHeight(e);break;case"input_mode":switch(s){case"easy XYInputs: Lora":a=getWidgetByName(e,"lora_count").value+1;constt=-1!=o.indexOf("Weights");for(leti=0;i<a;i++)toggleWidget(e,getWidgetByName(e,"lora_name_"+i),!0),["model_str_"+i,"clip_str_"+i].map((i=>toggleWidget(e,getWidgetByName(e,i),!!t)));["model_strength","clip_strength"].map((i=>toggleWidget(e,getWidgetByName(e,i),!t)));break;case"easy XYInputs: Checkpoint":a=getWidgetByName(e,"ckpt_count").value+1,c=-1!=getWidgetByName(e,"input_mode").value.indexOf("ClipSkip"),u=-1!=getWidgetByName(e,"input_mode").value.indexOf("VAE");for(leti=0;i<a;i++)toggleWidget(e,getWidgetByName(e,"ckpt_name_"+i),!0),toggleWidget(e,getWidgetByName(e,"clip_skip_"+i),!!c),toggleWidget(e,getWidgetByName(e,"vae_name_"+i),!!u)}updateNodeHeight(e);break;case"rem_mode":toggleWidget(e,getWidgetByName(e,"torchscript_jit"),"Inspyrenet"===o),toggleWidget(e,getWidgetByName(e,"refine_foreground"),"BEN2"===o),updateNodeHeight(e)}}app$1.registerExtension({name:"Comfy.EasyUse.Widget",asyncbeforeRegisterNodeDef(e,t,i){vars;consto=t.name,a=e.prototype.onAdded,n=e.prototype.onNodeCreated,l=e.prototype.onConfigure,r=e.prototype.onExecuted,d=e.prototype.onConnectionsChange;if(["easy showAnything","easy showAnythingLazy","easy showTensorShape","easy showSpentTime","easy imageInterrogator","easy showLoaderSettingsNames"].includes(o)){lets=function(e,t="text"){vars,o;if(this.widgets){conste=this.widgets.findIndex((e=>e.name===t));if(-1!==e){for(lett=e;t<this.widgets.length;t++)null==(o=(s=this.widgets[t]).onRemove)||o.call(s);this.widgets.length=e}}for(constaofe){conste=ComfyWidgets.STRING(this,"text",["STRING",{multiline:!0}],i).widget;e.inputEl.readOnly=!0,e.inputEl.style.opacity=.6,e.value=a}requestAnimationFrame((()=>{vare;constt=this.computeSize();t[0]<this.size[0]&&(t[0]=this.size[0]),t[1]<this.size[1]&&(t[1]=this.size[1]),null==(e=this.onResize)||e.call(this,t),i.graph.setDirtyCanvas(!0,!1)}))};e.prototype.onExecuted=function(e){null==r||r.apply(this,arguments),s.call(this,e.text,"text")},["easy imageInterrogator"].includes(t.name)||(e.prototype.onConfigure=function(){vare;null==l||l.apply(this,arguments);lett="text";switch(o){case"easy showLoaderSettingsNames":t="names";break;case"easy showSpentTime":t="spent_time";break;default:t="text"}(null==(e=this.widgets_values)?void0:e.length)&&s.call(this,this.widgets_values,t)})}if(image_dynamic_nodes.includes(o)){lett=function(e){vart="";for(leti=0;i<e.length;i++)t+=e[i];if(this.widgets){conste=this.widgets.findIndex((e=>"info"===e.name));if(-1!==e&&this.widgets[e]){this.widgets[e].value=t}}requestAnimationFrame((()=>{vare;constt=this.computeSize();t[0]<this.size[0]&&(t[0]=this.size[0]),t[1]<this.size[1]&&(t[1]=this.size[1]),null==(e=this.onResize)||e.call(this,t),i.graph.setDirtyCanvas(!0,!1)}))};e.prototype.onExecuted=function(e){null==r||r.apply(this,arguments),t.call(this,e.text)}}if("easy promptLine"==o&&(e.prototype.onAdded=asyncfunction(){a&&a.apply(this,[]);lete=this.widgets.find((e=>"prompt"==e.name));this.addWidget("button","get values from COMBO link","",(()=>{vart,s;consto=(null==(s=null==(t=this.outputs[1])?void0:t.links)?void0:s.length)>0?this.outputs[1].links[0]:null,a=i.graph._nodes.find((e=>{vart;returnnull==(t=e.inputs)?void0:t.find((e=>e.link==o))}));if(o&&a){constt=a.inputs.find((e=>e.link==o)).widget.name,i=a.widgets.find((e=>e.name==t));lets=(null==i?void0:i.options.values)||null;s&&(s=s.join("\n"),e.value=s)}elsetoast.error($t("No COMBO link"),3e3)}),{serialize:!1})}),loader_nodes.includes(t.name)){lett=function(e){vart="";for(leti=0;i<e.length;i++)t+=e[i];returnt},i=function(e,t="positive"){if(this.widgets){consti=this.widgets.findIndex((e=>e.name===t+"_prompt")),s="comfy-multiline-input wildcard_"+t+"_"+this.id.toString();if(-1==i&&e){consti=document.createElement("textarea");i.className=s,i.placeholder="Wildcard Prompt ("+t+")";consto=this.addDOMWidget(t+"_prompt","customtext",i,{getValue:e=>i.value,setValue(e){i.value=e},serialize:!1});o.inputEl=i,o.inputEl.readOnly=!0,i.addEventListener("input",(()=>{vare;null==(e=o.callback)||e.call(o,o.value)})),o.value=e}elseif(this.widgets[i])if(e){this.widgets[i].value=e}else{this.widgets.splice(i,1);conste=document.getElementsByClassName(s);e&&e[0]&&e[0].remove()}}};e.prototype.onExecuted=function(e){null==r||r.apply(this,arguments);consts=t(e.positive),o=t(e.negative);i.call(this,s,"positive"),i.call(this,o,"negative")}}if(["easy sv3dLoader"].includes(t.name)){lett=function(e,t,i){switch(e){case"azimuth":returni.readOnly=!0,i.style.opacity=.6,"0:(0.0,0.0)"+(t>1?`\n${t-1}:(360.0,0.0)`:"");case"elevation":returni.readOnly=!0,i.style.opacity=.6,"0:(-90.0,0.0)"+(t>1?`\n${t-1}:(90.0,0.0)`:"");case"custom":returni.readOnly=!1,i.style.opacity=1,"0:(0.0,0.0)\n9:(180.0,0.0)\n20:(360.0,0.0)"}};e.prototype.onNodeCreated=asyncfunction(){n&&n.apply(this,[]);conste=this.widgets.find((e=>"easing_mode"==e.name)),i=this.widgets.find((e=>"batch_size"==e.name)),s=this.widgets.find((e=>"scheduler"==e.name));setTimeout((o=>{s.value||(s.value=t(e.value,i.value,s.inputEl))}),1),e.callback=e=>{s.value=t(e,i.value,s.inputEl)},i.callback=i=>{s.value=t(e.value,i,s.inputEl)}}}if(has_seed_nodes.includes(o)&&(e.prototype.onNodeCreated=asyncfunction(){n&&n.apply(this,[]);conste=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),s=this.widgets.find((e=>["control before generate","control after generate","control_before_generate","control_after_generate"].includes(e.name)));if("easy seed"==t.name&&s){constt=this.addWidget("button","🎲 Manual Random Seed",null,(t=>{"fixed"!=s.value&&(s.value="fixed"),e.value=Math.floor(Math.random()*MAX_SEED_NUM),i.queuePrompt(0,1)}),{serialize:!1});e.linkedWidgets=[t,s]}},e.prototype.onAdded=asyncfunction(){a&&a.apply(this,[]);conste=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),t=this.widgets.find((e=>["control before generate","control after generate","control_before_generate","control_after_generate"].includes(e.name)));t&&setTimeout((i=>{["control before generate","control_before_generate"].includes(t.name)&&0===e.value&&(e.value=Math.floor(Math.random()*MAX_SEED_NUM))}),1)}),"easy convertAnything"==o&&(e.prototype.onNodeCreated=asyncfunction(){n&&n.apply(this,[]);conste=this.widgets.find((e=>"output_type"==e.name)),t=t=>{this.outputs[0].type=e.value.toUpperCase(),this.outputs[0].name=e.value,this.outputs[0].label=e.value};setTimeout((e=>t()),10),e.callback=e=>t()}),"easy imageInsetCrop"==o){lett=function(e){constt=e.widgets[0];for(leti=1;i<=4;i++)"Pixels"===t.value?(e.widgets[i].options.step=80,void0!==e.widgets[i].options.step2&&(e.widgets[i].options.step2=8),e.widgets[i].options.max=8192):(e.widgets[i].options.step=10,void0!==e.widgets[i].options.step2&&(e.widgets[i].options.step2=1),e.widgets[i].options.max=99)};e.prototype.onAdded=asyncfunction(e){consti=this.widgets[0];lets=i.callback;i.callback=(...e)=>{t(this),s&&s.apply(i,[...e])},setTimeout((e=>{t(this)}),1)}}if(change_slots_nodes.includes(o)){constt=e=>{switch(o){case"easy forLoopStart":case"easy whileLoopStart":return0;case"easy forLoopEnd":case"easy whileLoopEnd":return1}},i=e=>{switch(o){case"easy forLoopStart":return2;case"easy forLoopEnd":case"easy whileLoopEnd":return0;case"easy whileLoopStart":return1}};e.prototype.onNodeCreated=asyncfunction(){if("easy loadImagesForLoop"==o&&(this.outputs[0].shape=5),loop_nodes.includes(o)){conste=this.inputs.findIndex((e=>"flow"===e.name)),s=this.outputs.findIndex((e=>"flow"===e.name));-1!==e&&(this.inputs[e].shape=5),-1!==s&&(this.outputs[s].shape=5),this.inputs=this.inputs.filter(((e,i)=>i<=t()||e.widget)),this.outputs=this.outputs.filter(((e,t)=>t<=i())),updateNodeHeight(this)}returnindex_switch_nodes.includes(o)&&("easy textIndexSwitch"==o&&(this.widgets=this.widgets.filter(((e,t)=>t<=2))),this.inputs=this.inputs.filter(((e,t)=>t<=1||e.widget)),updateNodeHeight(this)),null==n?void0:n.apply(this,arguments)},e.prototype.onConnectionsChange=function(e,s,a,n){varl,r;if(n)if(1==e){lete=this.inputs.every((e=>null!==e.link||e.widget)),i=this.inputs.filter((e=>!["condition","index","total"].includes(e.name)));if(loop_nodes.includes(o)){if(e){if(i.length>=20)returnvoidtoast.warn($t("The maximum number of inputs is 20"));lete=i[i.length-1],t=parseInt(e.name.split("initial_value")[1])+1;if(this.inputs.find((e=>e.name==="initial_value"+t)))return;lets="initial_value"+t,o="value"+t;this.addInput(s,"*"),this.addOutput(o,"*")}elseif(!a){conste=t();leti=this.inputs.findLastIndex((e=>e.link));if(s>=e&&(-1===i||s>=i)){lete=this.inputs[s];if(!e.name||["condition","total"].includes(e.name))return;lett=parseInt(e.name.split("initial_value")[1])+1,i=this.inputs.findIndex((e=>e.name==="initial_value"+t)),o=this.outputs.findIndex((e=>e.name==="value"+t));-1!==i&&this.removeInput(i),-1!==o&&this.removeOutput(o)}}}elseif(index_switch_nodes.includes(o))if(e){if(i.length>=20)returnvoidtoast.warn($t("The maximum number of inputs is 20"));lete=value_names[o]+i.length;this.addInput(e,"*")}elsea||s==this.inputs.length-2&&this.removeInput(s+1)}elseif(2==e){lete=this.outputs.filter((e=>!["flow","index"].includes(e.name))),t=e.every((e=>{vart;return(null==(t=e.links)?void0:t.length)>0}));if(loop_nodes.includes(o)){if(t){if(e.length>=20)returnvoidtoast.warn($t("The maximum number of outputs is 20"));lett=e[e.length-1],i=parseInt(t.name.split("value")[1])+1;if(this.inputs.find((e=>e.name==="initial_value"+i)))return;if(this.outputs.find((e=>e.name==="value"+i)))return;lets="initial_value"+i,o="value"+i;this.addInput(s,"*"),this.addOutput(o,"*")}elseif(!a){conste=i();lett=n.origin_slot,s=this.outputs.findLastIndex((e=>{vart;return(null==(t=e.links)?void0:t.length)>0}));if(t>=e&&(-1===s||t>=s)){lete=this.outputs[t];if(!e.name||["flow","index"].includes(e.name))return;leti=parseInt(e.name.split("value")[1])+1,s=this.inputs.findIndex((e=>e.name==="initial_value"+i)),o=this.outputs.findIndex((e=>e.name==="value"+i));if(-1!==s&&(null==(l=this.inputs[s])?void0:l.link))return;-1!==s&&this.removeInput(s),-1!==o&&this.removeOutput(o)}}}elseif(inverse_switch_nodes.includes(o))if(t){if(e.length>=20)returnvoidtoast.warn($t("The maximum number of outputs is 20"));lett=value_names[o]+e.length;this.addOutput(t,"*")}elseif(!a){lett=n.origin_slot;t==this.outputs.length-2&&0==(null==(r=e[t].links)?void0:r.length)&&this.removeOutput(t+1)}}}}if(["easy fluxLoader","easy fullLoader"].includes(o)&&(e.prototype.onConnectionsChange=asyncfunction(e,t){d&&d.apply(this,[]);consti=this.inputs.find((e=>"model_override"===e.name)),s=this.inputs.find((e=>"vae_override"===e.name));leto=getWidgetByName(this,"ckpt_name"),a=getWidgetByName(this,"vae_name");if((null==i?void0:i.link)&&0==t){conste=(null==o?void0:o.options.values)||[];setTimeout((t=>{this.widgets[0].value=(null==e?void0:e[0])||"None",toggleWidget(this,o,!(null==i?void0:i.link))}),1)}elsetoggleWidget(this,o,!(null==i?void0:i.link));if(!(null==s?void0:s.link)||1!=t&&2!=t)toggleWidget(this,a,!(null==s?void0:s.link));else{lete=this.widgets.findIndex((e=>"vae_name"==e.name));setTimeout((t=>{this.widgets[e].value="Baked VAE",toggleWidget(this,a,!(null==s?void0:s.link))}),1)}}),samplers_nodes.includes(o)||-1!==o.indexOf("workflow")){consti=(null==(s=null==t?void0:t.input)?void0:s.required)||{};if(!i.image_output&&!i["图像输出"]&&!i["视频输出"])return;e.prototype.onDrawBackground=function(e){try{unsafeDrawBackground(this,e)}catch(t){}}}},nodeCreated(e){if(e.comfyClass.startsWith("easy ")){if(e.widgets)for(constiofe.widgets){if(!allow_widgets.includes(i.name))continue;lett=i.value;toggleLogic(e,i),Object.defineProperty(i,"value",{get:e=>t,set(s){s!==t&&(t=s,requestAnimationFrame((t=>{toggleLogic(e,i)})))}})}constt=e.comfyClass;if("easy preDetailerFix"==t){constt=e.widgets.find((e=>"customtext"===e.type));if(!t)return;t.dynamicPrompts=!1,t.inputEl.placeholder="wildcard spec: if kept empty, this option will be ignored",t.serializeValue=()=>t.value}if(["easy wildcards","easy wildcardsMatrix"].includes(t)){constt=e.widgets.find((e=>"text"==e.name));leti=1;Object.defineProperty(e.widgets[i],"value",{set:e=>{if("Select the LoRA to add to the text"!=e){leti=e;i.endsWith(".safetensors")&&(i=i.slice(0,-12)),t.value+=`<lora:${i}>`}},get:e=>"Select the LoRA to add to the text"}),Object.defineProperty(e.widgets[i+1],"value",{set:e=>{"Select the Wildcard to add to the text"!=e&&(""!=t.value&&(t.value+=", "),t.value+=e)},get:e=>"Select the Wildcard to add to the text"}),e.widgets[i].serializeValue=e=>"Select the LoRA to add to the text",e.widgets[i+1].serializeValue=e=>"Select the Wildcard to add to the text"}if("easy prompt"==t){constt=e.widgets.find((e=>"text"==e.name));leti=1;Object.defineProperty(e.widgets[i],"value",{set:s=>{varo,a;"Select the prefix to add to the text"!=s&&(null==(a=null==(o=e.widgets[i])?void0:o.options)?void0:a.values.includes(s))&&(""==t.value?t.value+=s:t.value+=""+s)},get:e=>"Select the prefix to add to the text"}),Object.defineProperty(e.widgets[i+1],"value",{set:s=>{varo,a;"👤Select the subject add to the text"!=s&&(null==(a=null==(o=e.widgets[i+1])?void0:o.options)?void0:a.values.includes(s))&&(""==t.value?t.value+=s:t.value+=""+s)},get:e=>"👤Select the subject add to the text"}),Object.defineProperty(e.widgets[i+2],"value",{set:s=>{varo,a;"🎬Select the action add to the text"!=s&&(null==(a=null==(o=e.widgets[i+2])?void0:o.options)?void0:a.values.includes(s))&&(""==t.value?t.value+=s:t.value+=","+s)},get:e=>"🎬Select the action add to the text"}),Object.defineProperty(e.widgets[i+3],"value",{set:s=>{varo,a;"👚Select the clothes add to the text"!=s&&(null==(a=null==(o=e.widgets[i+3])?void0:o.options)?void0:a.values.includes(s))&&(""==t.value?t.value+=s:t.value+=","+s)},get:e=>"👚Select the clothes add to the text"}),Object.defineProperty(e.widgets[i+4],"value",{set:s=>{varo,a;"☀️Select the illumination environment add to the text"!=s&&(null==(a=null==(o=e.widgets[i+4])?void0:o.options)?void0:a.values.includes(s))&&(""==t.value?t.value+=s:t.value+=","+s)},get:e=>"☀️Select the illumination environment add to the text"}),Object.defineProperty(e.widgets[i+5],"value",{set:s=>{varo,a;"🎞️Select the background add to the text"!=s&&(null==(a=null==(o=e.widgets[i+5])?void0:o.options)?void0:a.values.includes(s))&&(""==t.value?t.value+=s:t.value+=""+s)},get:e=>"🎞️Select the background add to the text"}),Object.defineProperty(e.widgets[i+6],"value",{set:s=>{varo,a;"🔞Select the nsfw add to the text"!=s&&(null==(a=null==(o=e.widgets[i+6])?void0:o.options)?void0:a.values.includes(s))&&(""==t.value?t.value+=s:t.value+=","+s)},get:e=>"🔞Select the nsfw add to the text"}),e.widgets[i].serializeValue=e=>"Select the prefix add to the text",e.widgets[i+1].serializeValue=e=>"👤Select the subject add to the text",e.widgets[i+2].serializeValue=e=>"🎬Select the action add to the text",e.widgets[i+3].serializeValue=e=>"👚Select the clothes add to the text",e.widgets[i+4].serializeValue=e=>"☀️Select the illumination environment add to the text",e.widgets[i+5].serializeValue=e=>"🎞️Select the background add to the text",e.widgets[i+6].serializeValue=e=>"🔞Select the nsfw add to the text"}if(image_dynamic_nodes.includes(t)){constt=document.createElement("textarea");t.className="comfy-multiline-input",t.readOnly=!0;consti=e.addDOMWidget("info","customtext",t,{getValue:e=>t.value,setValue:e=>t.value=e,serialize:!1});i.inputEl=t,t.addEventListener("input",(()=>{vare;null==(e=i.callback)||e.call(i,i.value)}))}}}});constLGraphNode$1=LiteGraph.LGraphNode;app$1.registerExtension({name:"easy bookmark",registerCustomNodes(){classeextendsLGraphNode$1{constructor(){super("🔖"),__publicField(this,"type","easy bookmark"),__publicField(this,"title","🔖"),__publicField(this,"slot_start_y",-20),__publicField(this,"___collapsed_width",0),__publicField(this,"isVirtualNode",!0),__publicField(this,"serialize_widgets",!0),__publicField(this,"keypressBound",null),this.addWidget("text","shortcut_key","1",(e=>{""!==(e=e.trim()[0]||"1")&&(this.title="🔖 "+e)}),{y:8}),this.addWidget("number","zoom",1,(e=>{}),{y:8+LiteGraph.NODE_WIDGET_HEIGHT+4,max:2,min:.5,precision:2}),this.keypressBound=this.onKeypress.bind(this)}get_collapsed_width(){returnthis.___collapsed_width}set_collapsed_width(e){constt=app$1.canvas,i=t.canvas.getContext("2d");if(i){conste=i.font;i.font=t.title_text_font,this.___collapsed_width=40+i.measureText(this.title).width,i.font=e}}onAdded(){setTimeout((e=>{constt=this.widgets[0].value;t&&(this.title="🔖 "+t)}),1),window.addEventListener("keydown",this.keypressBound)}onRemoved(){window.removeEventListener("keydown",this.keypressBound)}onKeypress(e){constt=e.target;["input","textarea"].includes(t.localName)||this.widgets[0]&&e.key.toLocaleLowerCase()===this.widgets[0].value.toLocaleLowerCase()&&this.canvasToBookmark()}canvasToBookmark(){vare,t;consti=app$1.canvas;(null==(e=null==i?void0:i.ds)?void0:e.offset)&&(i.ds.offset[0]=16-this.pos[0],i.ds.offset[1]=40-this.pos[1]),null!=(null==(t=null==i?void0:i.ds)?void0:t.scale)&&(i.ds.scale=Number(this.widgets[1].value||1)),i.setDirty(!0,!0)}}LiteGraph.registerNodeType("easy bookmark",Object.assign(e,{title:"Bookmark 🔖"})),e.category="EasyUse/Util"}}),app$1.registerExtension({name:"Comfy.EasyUse.ChainNode",init(){app$1.canvas._mousemove_callback=e=>{getSetting("EasyUse.Nodes.ChainGetSet",null)&&chainNode()};conste=LGraphCanvas.prototype.showLinkMenu;LGraphCanvas.prototype.showLinkMenu=useTryCatchCallback(e,(function(t,i){returni.shiftKey?(convertLinkToGetSetNode(t),!1):(e.apply(this,[t,i]),!1)}))}});constcleanVRAM=async()=>{try{const{Running:e,Pending:t}=awaitapi.getQueue();if(e.length>0||t.length>0)returnvoidtoast.error($t("Clean Failed")+":"+$t("Please stop all running tasks before cleaning GPU"));200==(awaitapi.fetchApi("/easyuse/cleangpu",{method:"POST"})).status?toast.success($t("Clean SuccessFully")):toast.error($t("Clean Failed"))}catch(e){}},reboot=async()=>{if(confirm($t("Are you sure you'd like to reboot the server?")))try{api.fetchApi("/easyuse/reboot")}catch(e){}};letmodelsList={},isPyssssNode=!1;functionserializeParentNodeMenu(e){lett=[],i=[];returne.forEach((e=>{(null==e?void0:e.value)&&COMFYUI_NODE_BASIC_CATEGORY.includes(e.value.split("/")[0])?t.push(e):i.push(e)})),[{title:$t("ComfyUI Basic"),is_category_title:!0},...t,{title:$t("Others A~Z"),is_category_title:!0},...i.sort(((e,t)=>e.content.localeCompare(t.content)))]}functiononMenuAdd(e,t,i,s,o){vara=LGraphCanvas.active_canvas,n=a.getCanvasWindow(),l=a.graph;if(l)returnfunctione(t,s){varr=LiteGraph.getNodeTypesCategories(a.filter||l.filter).filter((function(e){returne.startsWith(t)})),d=[];r.map((function(i){if(i){vars=newRegExp("^("+t+")"),o=i.replace(s,"").split("/")[0],a=""===t?o+"/":t+o+"/",n=o;-1!=n.indexOf("::")&&(n=n.split("::")[1]),-1===d.findIndex((function(e){returne.value===a}))&&d.push({value:a,content:n,has_submenu:!0,callback:function(t,i,s,o){e(t.value,o)}})}})),LiteGraph.getNodeTypesInCategory(t.slice(0,-1),a.filter||l.filter).map((function(e){if(!e.skip_list){vart={value:e.type,content:e.title,has_submenu:!1,callback:function(e,t,i,s){varn=s.getFirstEvent();a.graph.beforeChange();varl=LiteGraph.createNode(e.value);l&&(l.pos=a.convertEventToCanvasOffset(n),a.graph.add(l)),o&&o(l),a.graph.afterChange()}};d.push(t)}}));constc=getSetting("EasyUse.ContextMenu.NodesSort",null);""===t&&c&&(d=serializeParentNodeMenu(d)),newLiteGraph.ContextMenu(d,{event:i,parentMenu:s},n)}("",s),!1}functionencodeRFC3986URIComponent(e){try{returnencodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))}catch(t){returne}}functioncontextMenuAddItem(e,t,i){vars=this;i=i||{};varo=document.createElement("div");o.className="litemenu-entry submenu";vara=!1;functionn(e){vart=this.value,o=!0;(s.current_submenu&&s.current_submenu.close(e),i.callback)&&(!0===i.callback.call(this,t,i,e,s,i.node)&&(o=!1));if(t){if(t.callback&&!i.ignore_item_callbacks&&!0!==t.disabled)!0===t.callback.call(this,t,i,e,s,i.extra)&&(o=!1);if(t.submenu){if(!t.submenu.options)throw"ContextMenu submenu needs options";news.constructor(t.submenu.options,{callback:t.submenu.callback,event:e,parentMenu:s,ignore_item_callbacks:t.submenu.ignore_item_callbacks,title:t.submenu.title,extra:t.submenu.extra,autoopen:i.autoopen}),o=!1}}o&&!s.lock&&s.close()}returnnull===t?o.classList.add("separator"):t.is_category_title?(o.classList.remove("litemenu-entry"),o.classList.remove("submenu"),o.classList.add("litemenu-title"),o.innerHTML=t.title):(o.innerHTML=t&&t.title?t.title:e,o.value=t,t&&(t.disabled&&(a=!0,o.classList.add("disabled")),(t.submenu||t.has_submenu)&&o.classList.add("has_submenu")),"function"==typeoft?(o.dataset.value=e,o.onclick_callback=t):o.dataset.value=t,t.className&&(o.className+=""+t.className)),o&&(null==t?void0:t.thumbnail)&&(o.addEventListener("mouseenter",showModelsThumbnail(o,t,this.root),{passive:!0}),o.addEventListener("mouseleave",closeModelsThumbnail(),{passive:!0}),o.addEventListener("click",closeModelsThumbnail(),{passive:!0})),this.root.appendChild(o),a||o.addEventListener("click",n),!a&&i.autoopen&&LiteGraph.pointerListenerAdd(o,"enter",(function(e){vart=this.value;if(!t||!t.has_submenu)return;n.call(this,e)})),o}functiongetExtensions(e){returnnull==e?void0:e.substring(e.lastIndexOf(".")+1)}app$1.registerExtension({name:"Comfy.EasyUse.ContextMenu",asyncsetup(){LGraphCanvas.onMenuAdd=onMenuAdd,getModelsList();conste=LiteGraph.ContextMenu;LiteGraph.ContextMenu=function(t,i){if(!(null==i?void0:i.callback)||t.some((e=>"string"!=typeofe))){if(i.parentMenu);elseif(i.extra);elseif(i.scale);else{conste=getSetting("EasyUse.ContextMenu.QuickOptions",null);if(i.hasOwnProperty("extra")&&"Disable"!==e){if("At the forefront"==e?t.unshift(null):t.push(null),isLocalNetwork(window.location.host)){consti={content:`<i class="mdi mdi-refresh-circle comfyui-easyuse-error" style="margin-right:2px;font-size:16px"></i>${$t("Reboot ComfyUI")}`,callback:e=>reboot()};"At the forefront"==e?t.unshift(i):t.push(i)}consti=getSetting("EasyUse.Hotkeys.cleanVRAMUsed",null)?"("+normalize("Shift+r")+")":"",s={content:`<i class="mdi mdi-rocket comfyui-easyuse-theme" style="margin-right:2px;font-size:16px"></i>${$t("Cleanup Of VRAM Usage")}${i}`,callback:e=>cleanVRAM()};"At the forefront"==e?t.unshift(s):t.push(s);consto=getSetting("EasyUse.Hotkeys.toggleNodesMap",null)?"("+normalize("Shift+m")+")":"",a={content:`<i class="mdi mdi-sitemap comfyui-easyuse-warning" style="margin-right:2px;font-size:14px"></i>${$t("Nodes Map")}${o}`,callback:e=>{vart,i,s;consto=(null==(t=app$1.extensionManager)?void0:t.sidebarTab)||app$1.extensionManager,a=(null==(i=app$1.extensionManager.sidebarTab)?void0:i.activeSidebarTabId)||(null==(s=app$1.extensionManager)?void0:s.activeSidebarTab);o.activeSidebarTabId=a==NODES_MAP_ID?null:NODES_MAP_ID}};"At the forefront"==e?t.unshift(a):t.push(a)}}returne.apply(this,[...arguments])}{consts=setComboOptions(t,i);returns?e.call(this,s,i):e.apply(this,[...arguments])}},LiteGraph.ContextMenu.prototype=e.prototype,getSetting("EasyUse.ContextMenu.NodesSort")&&(LiteGraph.ContextMenu.prototype.addItem=contextMenuAddItem),document.getElementById("graph-canvas").addEventListener("mouseenter",(e=>{setTimeout((e=>{constt=document.getElementById("easyuse-model-thumbnail");t&&0!=t.style.opacity&&(t.style.display="none",t.style.opacity=0,t.style.left="0px",t.style.top="0px")}),100)}))},asyncbeforeRegisterNodeDef(e,t,i){consts=e.prototype.onNodeCreated;["CheckpointLoader|pysssss","LoraLoader|pysssss"].includes(t.name)&&(e.prototype.onNodeCreated=asyncfunction(){s&&s.apply(this,[]);lete=getWidgetByName(this,"lora_name")||getWidgetByName(this,"ckpt_name");if(e){lett=e.onClick;e.onClick=function(e){returnisPyssssNode=!0,setTimeout((e=>{isPyssssNode=!1}),500),t.call(this,e)}}})}});constcalculateImagePosition=(e,t,i)=>{const{x:s}=e.getBoundingClientRect();let{top:o,left:a}=t;const{width:n,height:l}=i;s<=n&&(a+=t.width);returnt.top<=l||(o=l),{left:a,top:o}},getModelsList=async()=>{["checkpoints","loras","diffusion_models"].map((asynce=>{constt=awaitapi.getModels(e);(null==t?void0:t.length)>0&&t.map((t=>{modelsList[t.name]={folder:e,pathIndex:t.pathIndex}}))}))},showModelsThumbnail=(e,t,i)=>s=>{varo;consta=t=>{setTimeout((s=>{consto=i.getBoundingClientRect();if(!o)return;consta=document.body.getBoundingClientRect();if(!a)return;const{left:n,top:l}=calculateImagePosition(e,o,a),r=document.getElementById("easyuse-model-thumbnail");r.src=t,r.style.left=`${n}px`,r.style.top=`${l}px`,r.style.display="block",r.style.opacity=1,r.onerror=e=>{r.src=NO_PREVIEW_IMAGE}}),10)};if(null==(o=null==modelsList?void0:modelsList[t.fullName])?void0:o.img){lete=modelsList[t.fullName].img;a("no_preview_image"==e?NO_PREVIEW_IMAGE:e.src)}else{lete=newImage;e.src=t.thumbnail,e.onload=i=>{modelsList[t.fullName].img=e,a(t.thumbnail)},e.onerror=i=>{e=null,modelsList[t.fullName].img="no_preview_image",a(NO_PREVIEW_IMAGE)}}},closeModelsThumbnail=()=>e=>{constt=document.getElementById("easyuse-model-thumbnail");t&&0!=t.style.opacity&&(t.style.display="none",t.style.opacity=0,t.style.left="0px",t.style.top="0px")};functionsetComboOptions(e,t){consti=getSetting("EasyUse.ContextMenu.ModelsThumbnails",null),s=getSetting("EasyUse.ContextMenu.SubDirectories",null);if(!i&&!s)returnnull;if(isPyssssNode)returnnull;consto=["ckpt","pt","bin","pth","safetensors","gguf"];if((null==e?void0:e.length)>0){constt=getExtensions(e[e.length-1]);if(!o.includes(t))returnnull}consta=t.callback,n=[...e];t.callback=null;constl=(e,t)=>{["None","无","無","なし"].includes(e.content)?a("None",t):a(n.find((t=>t.endsWith(e.content)),t))};if(i&&!s)returne.map((e=>{vart,i;lets=null==(t=modelsList[e])?void0:t.folder,o=null==(i=modelsList[e])?void0:i.pathIndex;consta=window.location.protocol,n=window.location.host;letr=s?`${`${a}//${n}`}/api/experiment/models/preview/${s}/${o}/${encodeRFC3986URIComponent(e)}`:"";return{folder:s,content:e,fullName:e,title:$el("div.comfyui-easyuse-contextmenu-model",{},[$el("span",{},e)]).outerHTML,thumbnail:r,callback:l}}));constr=e,d={},c=[],u=[];for(consthofr){conste=h.indexOf("/")>-1?"/":"\\",t=h.split(e);if(t.length>1){consti=t.shift();d[i]=d[i]||[],d[i].push({value:t.join(e),fullValue:h})}else"CHOOSE"===h||h.startsWith("DISABLE ")?c.push({value:h,fullValue:h}):u.push({value:h,fullValue:h})}constp=Object.values(d).length,A=[],g=(e,t="",s)=>{varo,a;letn;n=$el("div.comfyui-easyuse-contextmenu-model",{},[$el("span",{},e)]);letr=null==(o=modelsList[s])?void0:o.folder,d=null==(a=modelsList[s])?void0:a.pathIndex;constc=window.location.protocol,u=window.location.host;letp=r?`${`${c}//${u}`}/api/experiment/models/preview/${r}/${d}/${encodeRFC3986URIComponent(s)}`:"";return{folder:r,content:e,fullName:s,thumbnail:i?p:null,title:n.outerHTML,callback:l}};if(p>0){conste=(t,i)=>{lets=[],o=[];consta=t.map((({value:e,fullValue:t})=>{consta={},n=e.indexOf("/")>-1?"/":"\\",l=e.split(n);if(l.length>1){conste=l.shift();a[e]=a[e]||[],a[e].push({value:l.join(n),fullValue:t})}if(Object.values(d).length>0){leti=Object.keys(a)[0];i&&a[i]?s.push({key:i,value:a[i][0]}):o.push(g(e,i,t))}returng(e,i,t)}));if(s.length>0){lett={};returns.forEach((e=>{t[e.key]=t[e.key]||[],t[e.key].push(e.value)})),[...Object.entries(t).map((t=>({content:t[0],has_submenu:!0,callback:()=>{},submenu:{options:e(t[1],t[0])}}))),...o]}returna};for(const[t,i]ofObject.entries(d))A.push({content:t,has_submenu:!0,callback:()=>{},submenu:{options:e(i,t)}})}returnA.push(...u.map((e=>g(e.value,"",e.fullValue)))),c.length>0&&A.push(...c.map((e=>g(e.value,"",e.fullValue)))),A}classMetadataDialogextendsComfyDialog{constructor(){super(),this.element.classList.add("easyuse-model-metadata")}show(e){super.show($el("div",Object.keys(e).map((t=>$el("div",[$el("label",{textContent:t}),$el("span",{textContent:e[t]})])))))}}classModelInfoDialogextendsComfyDialog{constructor(e){super(),this.name=e,this.element.classList.add("easyuse-model-info")}getcustomNotes(){returnthis.metadata["easyuse.notes"]}setcustomNotes(e){this.metadata["easyuse.notes"]=e}gethash(){returnthis.metadata["easyuse.sha256"]}asyncshow(e,t){this.type=e;consti=api.fetchApi("/easyuse/metadata/"+encodeURIComponent(`${e}/${t}`));this.info=$el("div",{style:{flex:"auto"}}),this.imgCurrent=0,this.imgList=$el("div.easyuse-preview-list",{style:{display:"none"}}),this.imgWrapper=$el("div.easyuse-preview",[$el("div.easyuse-preview-group",[this.imgList])]),this.main=$el("main",{style:{display:"flex"}},[this.imgWrapper,this.info]),this.content=$el("div.easyuse-model-content",[$el("div.easyuse-model-header",[$el("h2",{textContent:this.name})]),this.main]);consts=$el("div",{textContent:"ℹ️ Loading...",parent:this.content});super.show(this.content),this.metadata=await(awaiti).json(),this.viewMetadata.style.cursor=this.viewMetadata.style.opacity="",this.viewMetadata.removeAttribute("disabled"),s.remove(),this.addInfo()}createButtons(){conste=super.createButtons();returnthis.viewMetadata=$el("button",{type:"button",textContent:"View raw metadata",disabled:"disabled",style:{opacity:.5,cursor:"not-allowed"},onclick:e=>{this.metadata&&(newMetadataDialog).show(this.metadata)}}),e.unshift(this.viewMetadata),e}parseNote(){if(!this.customNotes)return[];lete=[];constt=newRegExp("(\\bhttps?:\\/\\/[^\\s]+)","g");leti,s=0;do{leto;i=t.exec(this.customNotes);leta=0;i?(o=i.index,a=i.index+i[0].length):o=this.customNotes.length;letn=this.customNotes.substring(s,o);n&&(n=n.replaceAll("\n","<br>"),e.push($el("span",{innerHTML:n}))),i&&e.push($el("a",{href:i[0],textContent:i[0],target:"_blank"})),s=a}while(i);returne}addInfoEntry(e,t){return$el("p",{parent:this.info},["string"==typeofe?$el("label",{textContent:e+": "}):e,"string"==typeoft?$el("span",{textContent:t}):t])}asyncgetCivitaiDetails(){conste=awaitfetch("https://civitai.com/api/v1/model-versions/by-hash/"+this.hash);if(200===e.status)returnawaite.json();throw404===e.status?newError("Model not found"):newError(`Error loading info (${e.status}) ${e.statusText}`)}addCivitaiInfo(){conste=this.getCivitaiDetails(),t=$el("span",{textContent:"ℹ️ Loading..."});returnthis.addInfoEntry($el("label",[$el("img",{style:{width:"18px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),$el("span",{textContent:"Civitai: "})]),t),e.then((e=>{vart,i;this.imgWrapper.style.display="block";lets=this.element.querySelector(".easyuse-model-header");s&&s.replaceChildren($el("h2",{textContent:this.name}),$el("div.easyuse-model-header-remark",[$el("h5",{textContent:$t("Updated At:")+formatTime(newDate(e.updatedAt),"yyyy/MM/dd")}),$el("h5",{textContent:$t("Created At:")+formatTime(newDate(e.updatedAt),"yyyy/MM/dd")})]));leto=null,a=this.parseNote.call(this),n=$t("✏️ Edit"),l=$el("div.easyuse-model-detail-textarea",[$el("p",(null==a?void0:a.length)>0?a:{textContent:$t("No notes")})]);if(a&&0!=a.length?l.classList.remove("empty"):l.classList.add("empty"),this.info.replaceChildren($el("div.easyuse-model-detail",[$el("div.easyuse-model-detail-head.flex-b",[$el("span",$t("Notes")),$el("a",{textContent:n,href:"#",style:{fontSize:"12px",float:"right",color:"var(--warning-color)",textDecoration:"none"},onclick:asynce=>{if(e.preventDefault(),o){if(o.value!=this.customNotes){toast.showLoading($t("Saving Notes...")),this.customNotes=o.value;conste=awaitapi.fetchApi("/easyuse/metadata/notes/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:this.customNotes});if(toast.hideLoading(),200!==e.status)returntoast.error($t("Saving Failed")),voidalert(`Error saving notes (${e.status}) ${e.statusText}`);toast.success($t("Saving Succeed")),a=this.parseNote.call(this),l.replaceChildren($el("p",(null==a?void0:a.length)>0?a:{textContent:$t("No notes")})),o.value?l.classList.remove("empty"):l.classList.add("empty")}elsel.replaceChildren($el("p",{textContent:$t("No notes")})),l.classList.add("empty");e.target.textContent=n,o.remove(),o=null}elsee.target.textContent="💾 Save",o=$el("textarea",{placeholder:$t("Type your notes here"),style:{width:"100%",minWidth:"200px",minHeight:"50px",height:"100px"},textContent:this.customNotes}),l.replaceChildren(o),o.focus()}})]),l]),$el("div.easyuse-model-detail",[$el("div.easyuse-model-detail-head",{textContent:$t("Details")}),$el("div.easyuse-model-detail-body",[$el("div.easyuse-model-detail-item",[$el("div.easyuse-model-detail-item-label",{textContent:$t("Type")}),$el("div.easyuse-model-detail-item-value",{textContent:e.model.type})]),$el("div.easyuse-model-detail-item",[$el("div.easyuse-model-detail-item-label",{textContent:$t("BaseModel")}),$el("div.easyuse-model-detail-item-value",{textContent:e.baseModel})]),$el("div.easyuse-model-detail-item",[$el("div.easyuse-model-detail-item-label",{textContent:$t("Download")}),$el("div.easyuse-model-detail-item-value",{textContent:(null==(t=e.stats)?void0:t.downloadCount)||0})]),$el("div.easyuse-model-detail-item",[$el("div.easyuse-model-detail-item-label",{textContent:$t("Trained Words")}),$el("div.easyuse-model-detail-item-value",{textContent:(null==e?void0:e.trainedWords.join(","))||"-"})]),$el("div.easyuse-model-detail-item",[$el("div.easyuse-model-detail-item-label",{textContent:$t("Source")}),$el("div.easyuse-model-detail-item-value",[$el("label",[$el("img",{style:{width:"14px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),$el("a",{href:"https://civitai.com/models/"+e.modelId,textContent:"View "+e.model.name,target:"_blank"})])])])])])),null==(i=e.images)?void0:i.length){this.imgCurrent=0,this.isSaving=!1,e.images.map((e=>e.url&&this.imgList.appendChild($el("div.easyuse-preview-slide",[$el("div.easyuse-preview-slide-content",[$el("img",{src:e.url}),$el("div.save",{textContent:"Save as preview",onclick:async()=>{if(this.isSaving)return;this.isSaving=!0,toast.showLoading($t("Saving Preview..."));constt=await(awaitfetch(e.url)).blob(),i="temp_preview."+newURL(e.url).pathname.split(".")[1],s=newFormData;s.append("image",newFile([t],i)),s.append("overwrite","true"),s.append("type","temp");if(200!==(awaitapi.fetchApi("/upload/image",{method:"POST",body:s})).status)returnthis.isSaving=!1,toast.error($t("Saving Failed")),toast.hideLoading(),voidalert(`Error saving preview (${req.status}) ${req.statusText}`);awaitapi.fetchApi("/easyuse/save/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:JSON.stringify({filename:i,type:"temp"}),headers:{"content-type":"application/json"}}).then((e=>{toast.success($t("Saving Succeed")),toast.hideLoading()})),this.isSaving=!1,app.refreshComboInNodes()}})])]))));lett=this;this.imgDistance=(-660*this.imgCurrent).toString(),this.imgList.style.display="",this.imgList.style.transform="translate3d("+this.imgDistance+"px, 0px, 0px)",this.slides=this.imgList.querySelectorAll(".easyuse-preview-slide"),this.slideLeftButton=$el("button.left",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'<svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" width="16" height="16" style="transform: rotate(90deg);"><path d="M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>',onclick:()=>{e.images.length<=2||(t.imgList.classList.remove("no-transition"),0==t.imgCurrent?(t.imgCurrent=e.images.length/2-1,this.slides[this.slides.length-1].style.transform="translate3d("+(-660*(this.imgCurrent+1)).toString()+"px, 0px, 0px)",this.slides[this.slides.length-2].style.transform="translate3d("+(-660*(this.imgCurrent+1)).toString()+"px, 0px, 0px)",t.imgList.style.transform="translate3d(660px, 0px, 0px)",setTimeout((e=>{this.slides[this.slides.length-1].style.transform="translate3d(0px, 0px, 0px)",this.slides[this.slides.length-2].style.transform="translate3d(0px, 0px, 0px)",t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)",t.imgList.classList.add("no-transition")}),500)):(t.imgCurrent=t.imgCurrent-1,t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)"))}}),this.slideRightButton=$el("button.right",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'<svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" width="16" height="16" style="transform: rotate(-90deg);"><path d="M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>',onclick:()=>{if(!(e.images.length<=2))if(t.imgList.classList.remove("no-transition"),t.imgCurrent>=e.images.length/2-1){t.imgCurrent=0;consti=e.images.length/2;this.slides[0].style.transform="translate3d("+(660*i).toString()+"px, 0px, 0px)",this.slides[1].style.transform="translate3d("+(660*i).toString()+"px, 0px, 0px)",t.imgList.style.transform="translate3d("+(-660*i).toString()+"px, 0px, 0px)",setTimeout((e=>{this.slides[0].style.transform="translate3d(0px, 0px, 0px)",this.slides[1].style.transform="translate3d(0px, 0px, 0px)",t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)",t.imgList.classList.add("no-transition")}),500)}elset.imgCurrent=t.imgCurrent+1,t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)"}})}returne.description&&$el("div",{parent:this.content,innerHTML:e.description,style:{marginTop:"10px"}}),e})).catch((e=>{this.imgWrapper.style.display="none",t.textContent="⚠️ "+e.message})).finally((e=>{}))}}classCheckpointInfoDialogextendsModelInfoDialog{asyncaddInfo(){awaitthis.addCivitaiInfo()}}constMAX_TAGS=500;classLoraInfoDialogextendsModelInfoDialog{getTagFrequency(){if(!this.metadata.ss_tag_frequency)return[];conste=JSON.parse(this.metadata.ss_tag_frequency),t={};for(constiine){consts=e[i];for(consteins)eint?t[e]+=s[e]:t[e]=s[e]}returnObject.entries(t).sort(((e,t)=>t[1]-e[1]))}getResolutions(){lete=[];if(this.metadata.ss_bucket_info){constt=JSON.parse(this.metadata.ss_bucket_info);if(null==t?void0:t.buckets)for(const{resolution:i,count:s}ofObject.values(t.buckets))e.push([s,`${i.join("x")} * ${s}`])}e=e.sort(((e,t)=>t[0]-e[0])).map((e=>e[1]));lett=this.metadata.ss_resolution;if(t){consti=t.split(","),s=i[0].replace("(",""),o=i[1].replace(")","");e.push(`${s.trim()}x${o.trim()} (Base res)`)}else(t=this.metadata["modelspec.resolution"])&&e.push(t+" (Base res");returne.length||e.push("⚠️ Unknown"),e}getTagList(e){returne.map((e=>$el("li.easyuse-model-tag",{dataset:{tag:e[0]},$:e=>{e.onclick=()=>{e.classList.toggle("easyuse-model-tag--selected")}}},[$el("p",{textContent:e[0]}),$el("span",{textContent:e[1]})])))}addTags(){lete,t=this.getTagFrequency();if(null==t?void0:t.length){consti=t.length;lets;i>MAX_TAGS&&(t=t.slice(0,MAX_TAGS),e=$el("p",[$el("span",{textContent:`⚠️ Only showing first ${MAX_TAGS} tags `}),$el("a",{href:"#",textContent:`Show all ${i}`,onclick:()=>{s.replaceChildren(...this.getTagList(this.getTagFrequency())),e.remove()}})])),s=$el("ol.easyuse-model-tags-list",this.getTagList(t)),this.tags=$el("div",[s])}elsethis.tags=$el("p",{textContent:"⚠️ No tag frequency metadata found"});this.content.append(this.tags),e&&this.content.append(e)}asyncaddInfo(){conste=this.addCivitaiInfo();this.addTags();constt=awaite;t&&$el("div",{parent:this.content,innerHTML:t.description,style:{maxHeight:"250px",overflow:"auto"}})}createButtons(){conste=super.createButtons();functiont(e,t){consti=$el("textarea",{parent:document.body,style:{position:"fixed"},textContent:t.map((e=>e.dataset.tag)).join(", ")});i.select();try{document.execCommand("copy"),e.target.dataset.text||(e.target.dataset.text=e.target.textContent),e.target.textContent="Copied "+t.length+" tags",setTimeout((()=>{e.target.textContent=e.target.dataset.text}),1e3)}catch(s){prompt("Copy to clipboard: Ctrl+C, Enter",text)}finally{document.body.removeChild(i)}}returne.unshift($el("button",{type:"button",textContent:"Copy Selected",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag--selected")])}}),$el("button",{type:"button",textContent:"Copy All",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag")])}})),e}}constswap={pipe:{category:"Easy Pipe",nodes:["easy pipeIn","easy pipeOut","easy pipeEdit","easy pipeEditPrompt","easy pipeBatchIndex"],input:{pipe:"pipe"},output:{pipe:"pipe"},widget:{optional_positive:"optional_positive",optional_negative:"optional_negative"}},loaders:{category:"Easy Loaders",nodes:["easy fullLoader","easy a1111Loader","easy comfyLoader","easy kolorsLoader","easy hunyuanDiTLoader","easy pixArtLoader","easy fluxLoader"],input:{optional_lora_stack:"optional_lora_stack",optional_controlnet_stack:"optional_controlnet_stack",positive:"positive",negative:"negative"},output:{pipe:"pipe",model:"model",vae:"vae",clip:null,positive:null,negative:null,latent:null},widget:{ckpt_name:"ckpt_name",vae_name:"vae_name",clip_skip:"clip_skip",lora_name:"lora_name",resolution:"resolution",empty_latent_width:"empty_latent_width",empty_latent_height:"empty_latent_height",positive:"positive",negative:"negative",batch_size:"batch_size",a1111_prompt_style:"a1111_prompt_style"}},preSampling:{category:"Easy PreSampling",nodes:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG","easy preSamplingNoiseIn","easy preSamplingCustom","easy preSamplingLayerDiffusion","easy fullkSampler"],input:{pipe:"pipe",image_to_latent:"image_to_latent",latent:"latent"},output:{pipe:"pipe"},widget:{steps:"steps",cfg:"cfg",cfg_scale_min:"cfg",sampler_name:"sampler_name",scheduler:"scheduler",denoise:"denoise",seed_num:"seed_num",seed:"seed"}},samplers:{category:"Custom Sampler",nodes:["KSamplerSelect","SamplerEulerAncestral","SamplerEulerAncestralCFG++","SamplerLMS","SamplerDPMPP_3M_SDE","SamplerDPMPP_2M_SDE","SamplerDPMPP_SDE","SamplerDPMAdaptative","SamplerLCMUpscale","SamplerTCD","SamplerTCD EulerA"],output:{SAMPLER:"SAMPLER"}},sigmas:{category:"Custom Sigmas",nodes:["BasicScheduler","KarrasScheduler","ExponentialScheduler","PolyexponentialScheduler","VPScheduler","BetaSamplingScheduler","SDTurboScheduler","SplitSigmas","SplitSigmasDenoise","FlipSigmas","AlignYourStepsScheduler","GITSScheduler"],output:{SIGMAS:"SIGMAS"}},kSampler:{category:"Easy kSampler",nodes:["easy kSampler","easy kSamplerTiled","easy kSamplerCustom","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerLayerDiffusion"],input:{pipe:"pipe",model:"model"},output:{pipe:"pipe",image:"image"},widget:{image_output:"image_output",save_prefix:"save_prefix",link_id:"link_id"}},controlNet:{category:"Easy ControlNet",nodes:["easy controlnetLoader","easy controlnetLoaderADV","easy controlnetLoader++","easy instantIDApply","easy instantIDApplyADV"],input:{pipe:"pipe",image:"image",image_kps:"image_kps",control_net:"control_net",positive:"positive",negative:"negative",mask:"mask"},output:{pipe:"pipe",positive:"positive",negative:"negative"},widget:{control_net_name:"control_net_name",strength:["strength","cn_strength"],scale_soft_weights:["scale_soft_weights","cn_soft_weights"],cn_strength:["strength","cn_strength"],cn_soft_weights:["scale_soft_weights","cn_soft_weights"]}},adapter:{category:"Easy Adapter",nodes:["easy ipadapterApply","easy ipadapterApplyADV","easy ipadapterApplyFaceIDKolors","easy ipadapterStyleComposition","easy ipadapterApplyFromParams","easy pulIDApply","easy pulIDApplyADV"],input:{model:"model",image:"image",image_style:"image",attn_mask:"attn_mask",optional_ipadapter:"optional_ipadapter"},output:{model:"model",tiles:"tiles",masks:"masks",ipadapter:"ipadapter"},widget:{preset:"preset",lora_strength:"lora_strength",provider:"provider",weight:"weight",weight_faceidv2:"weight_faceidv2",start_at:"start_at",end_at:"end_at",cache_mode:"cache_mode",use_tiled:"use_tiled",insightface:"insightface",pulid_file:"pulid_file"}},positive:{category:"Easy Positive",nodes:["easy positive","easy wildcards"],input:{},output:{text:"positive",positive:"text"},widget:{text:"positive",positive:"text"}},loadImage:{category:"Easy LoadImage",nodes:["easy loadImageBase64","LoadImage","LoadImageMask"],input:{pipe:"pipe",image:"image",mask:"mask"},output:{IMAGE:"IMAGE",MASK:"MASK"},widget:{image:"image",base64_data:"base64_data",channel:"channel"}},saveImage:{category:"Save/Preview Image",nodes:["SaveImage","PreviewImage"]},inPaint:{category:"Easy Inpaint",nodes:["easy applyBrushNet","easy applyPowerPaint","easy applyInpaint"],input:{},output:{pipe:"pipe"},widget:{dtype:"dtype",fitting:"fitting",function:"function",scale:"scale",start_at:"start_at",end_at:"end_at"}},showAny:{category:"Show Anything",nodes:["easy showAnything","Preview Any"],input:{anything:"anything"},output:{output:"output"}},saveText:{category:"Save Text",nodes:["easy saveText"],input:{image:"image",text:"text",output_file_path:"output_file_path",file_name:"file_name",file_extension:"file_extension",overwrite:"overwrite"},output:{text:"text",image:"image"},widget:{image:"image",text:"text",output_file_path:"output_file_path",file_name:"file_name",file_extension:"file_extension",overwrite:"overwrite"}},persona:{category:"LLM Party Persona",nodes:["load_persona","classify_persona","classify_persona_plus","custom_persona","translate_persona","flux_persona"],input:{file_content:"file_content"},output:{system_prompt:"system_prompt"},widget:{is_enable:"is_enable"}},llmModelLoader:{category:"LLM Model Loader",nodes:["LLM_api_loader","genai_api_loader","LLM_local_loader"],output:{model:"model"}},llmModelChain:{category:"LLM Model Chain",nodes:["LLM","LLM_local"],input:{model:"model",image:"images",images:"image",extra_parameters:"extra_parameters",system_prompt_input:"system_prompt_input",user_prompt_input:"user_prompt_input",tools:"tools",file_content:"file_content"},output:{assistant_response:"assistant_response",history:"history",tool:"tool",image:"image"},widget:{system_prompt:"system_prompt",user_prompt:"user_prompt",temperature:"temperature",is_memory:"is_memory",is_tools_in_sys_prompt:"is_tools_in_sys_prompt",max_length:"max_length",main_brain:"main_brain",conversation_rounds:"conversation_rounds",history_record:"history_record",is_enable:"is_enable"}},maskModify:{category:"Mask Modify",nodes:["CropMask","ThresholdMask","GrowMask","FeatherMask","LayerMask: MaskGrain","LayerMask: MaskEdgeUltraDetail","LayerMask: MaskEdgeUltraDetail V2"],input:{mask:"mask"},output:{MASK:"MASK",mask:"mask",image:"image"}},maskModifyWAS:{category:"Mask Modify (WAS)",nodes:["Mask Dilate Region","Mask Gaussian Region"],input:{masks:"masks"},output:{MASKS:"MASKS"}},fast_loaders:{category:"Fast Loaders",nodes:["fast ckptLoader","fast unetLoader"],input:{"开始加载":"开始加载"},output:{"模型加载器":"模型加载器",MODEL:"MODEL",VAE:"VAE",CLIP:"CLIP"}},fast_inputs:{category:"Fast Inputs",nodes:["fast sdInput","fast fluxInput","fast hiDreamInput","fast videoInput","fast qwenImageInput"],input:{"模型加载器":"模型加载器","更多Controlnet":"更多Controlnet","图像":"图像","遮罩":"遮罩","功能节点":"功能节点"},output:{"采样":"采样","正面条件":"正面条件","负面条件":"负面条件","潜空间":"潜空间"},widget:{Sigmas:"Sigmas","分离Sigmas步数":"分离Sigmas步数","分离降噪":"分离降噪","降噪":"降噪","添加噪声":"添加噪声",seed:"seed","生成数量":"生成数量"}},fast_outputResult:{category:"Fast Outputs",nodes:["fast outputResult","fast outputResultVideo","fast outputLatent"],input:{"采样":"采样","噪声":"噪声","模型加载器":"模型加载器"},output:{"图像":"图像序列","图像序列":"图像","输出":"输出","降噪输出":"降噪输出",VAE:"VAE"},widget:{"采样预览":"采样预览","VAE解码":"VAE解码","图像输出":"视频输出","视频输出":"图像输出","保存路径":"保存路径"}},fast_loadImage:{category:"Fast LoadImage",nodes:["fast loadImage","fast loadImageList"],output:{"图像":"图像","遮罩":"遮罩","文件名":"文件名"},widget:{"模式":"模式","图像":"图像","路径":"路径","最大张数":"最大张数","开始索引":"开始索引",Base64:"Base64","链接":"链接"}}};functionreplaceNode(e,t,i){vars;consto=LiteGraph.createNode(t);if(o){if(app$1.graph.add(o),o.pos=e.pos.slice(),o.size=e.size.slice(),(null==(s=e.widgets)?void0:s.length)>0&&e.widgets.forEach((e=>{vart,s;if(null==(s=null==(t=swap[i])?void0:t.widget)?void0:s[e.name]){constt=swap[i].widget[e.name];if(t&&o.widgets){consti=findWidgetByName(o,t);i&&(i.value=e.value,"seed_num"==e.name&&(i.linkedWidgets[0].value=e.linkedWidgets[0].value),"converted-widget"==e.type&&convertToInput(o,i,e))}}})),e.inputs&&e.inputs.forEach(((t,s)=>{vara,n,l;if(t&&t.link&&(null==(n=null==(a=swap[i])?void0:a.input)?void0:n[t.name])){consts=null==(l=swap[i])?void0:l.input[t.name];if(null===s)return;consta=o.findInputSlot(s);if(-1!==a){consti=e.graph.links[t.link];if(i){constt=e.graph.getNodeById(i.origin_id);t&&t.connect(i.origin_slot,o,a)}}}})),e.outputs&&e.outputs.forEach(((t,s)=>{vara,n;if(t&&t.links&&(null==(n=null==(a=swap[i])?void0:a.output)?void0:n[t.name])){consts=swap[i].output[t.name];if(null===s)return;consta=o.findOutputSlot(s);-1!==a&&t.links.forEach((t=>{consti=e.graph.links[t];if(i){constt=e.graph.getNodeById(i.target_id);t&&o.connect(a,t,i.target_slot)}}))}})),app$1.graph.remove(e),"easy fullkSampler"==o.type){conste=o.outputs[0].links;if(e&&e[0]){constt=app$1.graph._nodes.find((t=>t.inputs&&t.inputs[0]&&t.inputs[0].link==e[0]));t&&app$1.graph.remove(t)}}elseif(swap.preSampling.nodes.includes(o.type)){conste=o.outputs[0].links;if(!e||!e[0]){conste=LiteGraph.createNode("easy kSampler");app$1.graph.add(e),e.pos=o.pos.slice(),e.pos[0]=e.pos[0]+o.size[0]+20;constt=o.findInputSlot("pipe");-1!==t&&o&&o.connect(0,e,t)}}o.setSize([o.size[0],o.computeSize()[1]])}}functionfindWidgetByName(e,t){returne.widgets.find((e=>"object"==typeoft?t.includes(e.name):e.name===t))}functionreplaceNodeMenuCallback(e,t,i){returnfunction(){replaceNode(e,t,i)}}constaddMenuHandler=(e,t)=>{consti=e.prototype.getExtraMenuOptions;e.prototype.getExtraMenuOptions=function(){conste=i.apply(this,arguments);returnt.apply(this,arguments),e}},addMenu=(e,t,i,s,o=!0)=>{addMenuHandler(s,(function(s,a){a.unshift({content:e,has_submenu:o,callback:(e,s,o,a,n)=>showSwapMenu(e,s,o,a,n,t,i)}),"loaders"==t&&(a.unshift({content:$t("💎 View Lora Info..."),callback:(e,t,i,s,o)=>{leta=o.widgets.find((e=>"lora_name"==e.name)).value;a&&"None"!=a&&newLoraInfoDialog(a).show("loras",a)}}),a.unshift({content:$t("💎 View Checkpoint Info..."),callback:(e,t,i,s,o)=>{leta=o.widgets[0].value;a&&"None"!=a&&newCheckpointInfoDialog(a).show("checkpoints",a)}}))}))},showSwapMenu=(e,t,i,s,o,a,n)=>{constl=[];returnn.map((e=>{o.type!==e&&l.push({content:`${e}`,callback:replaceNodeMenuCallback(o,e,a)})})),newLiteGraph.ContextMenu(l,{event:i,callback:null,parentMenu:s,node:o}),!1},CONVERTED_TYPE="converted-widget",GET_CONFIG=Symbol();functionhideWidget(e,t,i=""){if(t.origType=t.type,t.origComputeSize=t.computeSize,t.origSerializeValue=t.serializeValue,t.computeSize=()=>[0,-4],t.type=CONVERTED_TYPE+i,t.serializeValue=()=>{if(!e.inputs)return;leti=e.inputs.find((e=>{vari;return(null==(i=e.widget)?void0:i.name)===t.name}));returni&&i.link?t.origSerializeValue?t.origSerializeValue():t.value:void0},t.linkedWidgets)for(constsoft.linkedWidgets)hideWidget(e,s,":"+t.name)}functionconvertToInput(e,t,i){hideWidget(e,t);const{type:s}=getWidgetType(i),o=e.size;t.options&&t.options.forceInput||e.addInput(t.name,s,{widget:{name:t.name,[GET_CONFIG]:()=>i}});for(constaofe.widgets)a.last_y+=LiteGraph.NODE_SLOT_HEIGHT;e.setSize([Math.max(o[0],e.size[0]),Math.max(o[1],e.size[1])])}functiongetWidgetType(e){lett=e[0];returntinstanceofArray&&(t="COMBO"),{type:t}}constreloadNode=function(e){vart,i,s,o;consta=e.constructor.type,n=e.properties.origVals||{},l=n.title||e.title,r=n.color||e.color,d=n.bgcolor||e.bgcolor,c=e,u={size:[...e.size],color:r,bgcolor:d,pos:[...e.pos]};letp=[],A=[];if(e.inputs)for(constfofe.inputs)if(f.link){constt=f.name,i=e.findInputSlot(t),s=e.getInputNode(i),o=e.getInputLink(i);p.push([o.origin_slot,s,t])}if(e.outputs)for(constfofe.outputs)if(f.links){conste=f.name;for(consttoff.links){consti=graph.links[t],s=graph._nodes_by_id[i.target_id];A.push([e,s,i.target_slot])}}app$1.graph.remove(e);letg=app$1.graph.add(LiteGraph.createNode(a,l,u));functionh(){if(c.widgets)for(leteofc.widgets)if("converted-widget"===e.type){constt=g.widgets.find((t=>t.name===e.name));for(letiofc.inputs)i.name===e.name&&convertToInput(g,t,i.widget)}for(leteofp){const[t,i,s]=e;i.connect(t,g.id,s)}for(leteofA){const[t,i,s]=e;g.connect(t,i,s)}}g.inputs.map(((t,i)=>{g.inputs[i].label=e.inputs[i].label})),g.outputs.map(((t,i)=>{g.outputs[i].label=e.outputs[i].label}));letm=c.widgets_values;if(!m&&(null==(t=g.widgets)?void0:t.length)>0)returng.widgets.forEach(((e,t)=>{consti=c.widgets[t];e.name===i.name&&e.type===i.type&&(e.value=i.value)})),voidh();if(m){lete=function(e,t){vari,s,o,a,n,l;if(!0===e||!1===e){if((null==(i=t.options)?void0:i.on)&&(null==(s=t.options)?void0:s.off))return{value:e,pass:!0}}elseif("number"==typeofe){if((null==(o=t.options)?void0:o.min)<=e&&e<=(null==(a=t.options)?void0:a.max))return{value:e,pass:!0}}else{if(null==(l=null==(n=t.options)?void0:n.values)?void0:l.includes(e))return{value:e,pass:!0};if(t.inputEl&&"string"==typeofe)return{value:e,pass:!0}}return{value:t.value,pass:!1}},t=!1;consta=(null==m?void0:m.length)<=(null==(i=g.widgets)?void0:i.length);letn=a?0:m.length-1;constl=i=>{vars;consto=c.widgets[i];letl=g.widgets[i];if(l.name===o.name&&l.type===o.type){for(;(a?n<m.length:n>=0)&&!t;){let{value:t,pass:i}=e(m[n],l);if(i&&null!==t){l.value=t;break}n+=a?1:-1}n++,a||(n=m.length-((null==(s=g.widgets)?void0:s.length)-1-i))}};if(a&&(null==(s=g.widgets)?void0:s.length)>0)for(leti=0;i<g.widgets.length;i++)l(i);elseif((null==(o=g.widgets)?void0:o.length)>0)for(leti=g.widgets.length-1;i>=0;i--)l(i)}h()};app$1.registerExtension({name:"Comfy.EasyUse.ExtraMenu",asyncbeforeRegisterNodeDef(e,t,i){addMenuHandler(e,(function(e,i){i.unshift({content:$t("🔃 Reload Node"),callback:(e,t,i,s,o)=>{leta=LGraphCanvas.active_canvas;if(!a.selected_nodes||Object.keys(a.selected_nodes).length<=1)reloadNode(o);elsefor(letnina.selected_nodes)reloadNode(a.selected_nodes[n])}}),"easy ckptNames"==t.name&&i.unshift({content:$t("💎 View Checkpoint Info..."),callback:(e,t,i,s,o)=>{o.widgets[0].value}})}));for(constsinswap)swap[s].nodes.includes(t.name)&&addMenu(`↪️ Swap ${swap[s].category}`,s,swap[s].nodes,e)}});constLGraphNode=LiteGraph.LGraphNode,setIcon="➡️",getIcon="⬅️";functionglobalSeedHandler(e){lett=app.graph._nodes_by_id;for(letiint){lets=t[i];if("easy globalSeed"==s.type){if(s.widgets){constt=s.widgets.find((e=>"value"==e.name));s.widgets.find((e=>"last_seed"==e.name)).value=t.value,t.value=e.detail.value}}elseif(s.widgets){constt=s.widgets.find((e=>"seed_num"==e.name||"seed"==e.name||"noise_seed"==e.name));t&&null!=e.detail.seed_map[s.id]&&(t.value=e.detail.seed_map[s.id])}}}app$1.registerExtension({name:"easy setNode",registerCustomNodes(){classeextendsLGraphNode{constructor(t){super("Set"),__publicField(this,"defaultVisibility",!0),__publicField(this,"serialize_widgets",!0),this.properties||(this.properties={previousName:""}),this.properties.showOutputText=e.defaultVisibility;consti=this;i.color=LGraphCanvas.node_colors.blue.color,this.addWidget("text","Constant","",((e,t,s,o,a)=>{i.validateName(i.graph),""!==this.widgets[0].value&&(this.title=setIcon+this.widgets[0].value),this.properties.previousName=this.widgets[0].value,this.update()}),{}),this.addInput("*","*"),this.onConnectionsChange=function(e,t,s,o,a){if(1!=e||s||(this.inputs[t].type="*",this.inputs[t].name="*",this.title="Set"),o&&i.graph&&1==e&&s){conste=i.graph._nodes.find((e=>e.id==o.origin_id)).outputs[o.origin_slot];if(!e)return;constt=e.type,s=i.is_auto_link?this.widgets[0].value:e.name;"Set"===this.title&&(this.title=setIcon+s,this.widgets[0].value=s),"*"===this.widgets[0].value&&(this.widgets[0].value=s),this.validateName(i.graph),this.inputs[0]&&(this.inputs[0].type=t,this.inputs[0].name=s),setTimeout((e=>{this.title=setIcon+this.widgets[0].value,this.properties.previousName=this.widgets[0].value}),1)}this.update()},this.validateName=function(e){lett=i.widgets[0].value;if(""!=t){lets=0,o=[];do{o=e._nodes.filter((e=>e!=this&&("easy setNode"==e.type&&e.widgets[0].value===t))),o.length>0&&(t=i.widgets[0].value+s),s++}while(o.length>0);i.widgets[0].value=t,this.update()}},this.clone=function(){constt=e.prototype.clone.apply(this);returnt.inputs[0].name="*",t.inputs[0].type="*",t.properties.previousName="",t.size=t.computeSize(),t},this.onAdded=function(e){this.validateName(e)},this.update=function(){if(i.graph){this.findGetters(i.graph).forEach((e=>{e.setType(this.inputs[0].type)})),this.widgets[0].value&&this.findGetters(i.graph,!0).forEach((e=>{e.setName(this.widgets[0].value)}));i.graph._nodes.filter((e=>"easy getNode"==e.type)).forEach((e=>{e.setComboValues&&e.setComboValues()}))}},this.findGetters=function(e,t){consti=t?this.properties.previousName:this.widgets[0].value;returne._nodes.filter((e=>"easy getNode"==e.type&&e.widgets[0].value===i&&""!=i))},this.isVirtualNode=!0}onRemoved(){this.graph._nodes.filter((e=>"easy getNode"==e.type)).forEach((e=>{e.setComboValues&&e.setComboValues([this])}))}}LiteGraph.registerNodeType("easy setNode",Object.assign(e,{title:"Set"})),e.category="EasyUse/Util"}}),app$1.registerExtension({name:"easy getNode",registerCustomNodes(){classeextendsLGraphNode{constructor(t){super("Get"),__publicField(this,"defaultVisibility",!0),__publicField(this,"serialize_widgets",!0),this.properties||(this.properties={}),this.properties.showOutputText=e.defaultVisibility;consti=this;i.color=LGraphCanvas.node_colors.blue.color,this.addWidget("combo","Constant","",(e=>{this.onRename()}),{values:()=>i.graph._nodes.filter((e=>"easy setNode"==e.type)).map((e=>e.widgets[0].value)).sort()}),this.addOutput("*","*"),this.onConnectionsChange=function(e,t,i,s,o){this.validateLinks(),2!=e||i?(this.onRename(),setTimeout((e=>{this.title=getIcon+this.widgets[0].value}),1)):(this.outputs[t].type="*",this.outputs[t].name="*",this.title="Get")},this.setName=function(e){i.widgets[0].value=e,i.onRename(),i.serialize()},this.onRename=function(e=0){constt=this.findSetter(i.graph);if(t){consti=t.inputs[0].type,s=t.inputs[0].name;this.setType(i,s),this.outputs[e].type=i,this.outputs[e].name=s,this.title=getIcon+t.widgets[0].value}elsethis.setType("*","*"),this.outputs[e].type="*",this.outputs[e].name="*"},this.clone=function(){constt=e.prototype.clone.apply(this);returnt.size=t.computeSize(),t},this.validateLinks=function(){"*"!=this.outputs[0].type&&this.outputs[0].links&&this.outputs[0].links.forEach((e=>{constt=i.graph.links[e];t&&t.type!=this.outputs[0].type&&"*"!=t.type&&i.graph.removeLink(e)}))},this.setType=function(e,t){this.outputs[0].name=t,this.outputs[0].type=e,this.validateLinks()},this.findSetter=function(e){constt=this.widgets[0].value;returne._nodes.find((e=>"easy setNode"==e.type&&e.widgets[0].value===t&&""!=t))},this.isVirtualNode=!0}getInputLink(e){constt=this.findSetter(this.graph);if(t){consti=t.inputs[e];returnthis.graph.links[i.link]}thrownewError("No setter found for "+this.widgets[0].value+"("+this.type+")")}onAdded(e){}}LiteGraph.registerNodeType("easy getNode",Object.assign(e,{title:"Get"})),e.category="EasyUse/Util"}}),api.addEventListener("easyuse-global-seed",globalSeedHandler);constoriginal_queuePrompt=api.queuePrompt;asyncfunctionqueuePrompt_with_seed(e,{output:t,workflow:i},s={}){i.seed_widgets={};for(letoinapp.graph._nodes_by_id){lete=app.graph._nodes_by_id[o].widgets;if(e)for(lettine)"seed_num"!=e[t].name&&"seed"!=e[t].name&&"noise_seed"!=e[t].name||"converted-widget"==e[t].type||(i.seed_widgets[o]=parseInt(t))}returnawaitoriginal_queuePrompt.call(api,e,{output:t,workflow:i},s)}api.queuePrompt=queuePrompt_with_seed;constextraNodes$1=["easy imageSave","easy fullkSampler","easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo","easy detailerFix"];app$1.registerExtension({name:"Comfy.EasyUse.SaveImageExtraOutput",asyncbeforeRegisterNodeDef(e,t,i){if(extraNodes$1.includes(t.name)){constt=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){conste=t?t.apply(this,arguments):void0,s=this.widgets.find((e=>"filename_prefix"===e.name||"save_prefix"===e.name));returns.serializeValue=()=>applyTextReplacements(i,s.value),e}}else{constt=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){conste=t?t.apply(this,arguments):void0;returnthis.properties&&"Node name for S&R"inthis.properties||this.addProperty("Node name for S&R",this.constructor.type,"string"),e}}}});constpropmts=["easy wildcards","easy positive","easy negative","easy stylesSelector","easy promptConcat","easy promptReplace"],preSamplingNodes=["easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingCustom","easy preSamplingDynamicCFG","easy preSamplingSdTurbo","easy preSamplingLayerDiffusion"],kSampler=["easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo"],controlNetNodes=["easy controlnetLoader","easy controlnetLoaderADV"],instantIDNodes=["easy instantIDApply","easy instantIDApplyADV"],ipadapterNodes=["easy ipadapterApply","easy ipadapterApplyADV","easy ipadapterApplyFaceIDKolors","easy ipadapterStyleComposition"],pipeNodes=["easy pipeIn","easy pipeOut","easy pipeEdit","easy pipeEditPrompt"],xyNodes=["easy XYPlot","easy XYPlotAdvanced"],extraNodes=["easy setNode"],modelNormalNodes=["RescaleCFG","LoraLoaderModelOnly","LoraLoader","FreeU","FreeU_v2",...ipadapterNodes,...extraNodes],suggestions={"easy seed":{from:{INT:[...preSamplingNodes,"easy fullkSampler"]}},"easy positive":{from:{STRING:[...propmts]}},"easy negative":{from:{STRING:[...propmts]}},"easy wildcards":{from:{STRING:["easy showAnything",...propmts]}},"easy stylesSelector":{from:{STRING:["easy showAnything",...propmts]}},"easy promptConcat":{from:{STRING:["easy showAnything",...propmts]}},"easy promptReplace":{from:{STRING:["easy showAnything",...propmts]}},"easy fullLoader":{from:{PIPE_LINE:[...preSamplingNodes,"easy fullkSampler",...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy a1111Loader":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy comfyLoader":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy hunyuanDiTLoader":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy kolorsLoader":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy pixArtLoader":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy fluxLoader":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy svdLoader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy zero123Loader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy sv3dLoader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{STRING:[...propmts]}},"easy preSampling":{from:{PIPE_LINE:[...kSampler,...pipeNodes,...controlNetNodes,...xyNodes,...extraNodes]}},"easy preSamplingAdvanced":{from:{PIPE_LINE:[...kSampler,...pipeNodes,...controlNetNodes,...xyNodes,...extraNodes]}},"easy preSamplingDynamicCFG":{from:{PIPE_LINE:[...kSampler,...pipeNodes,...controlNetNodes,...xyNodes,...extraNodes]}},"easy preSamplingCustom":{from:{PIPE_LINE:[...kSampler,...pipeNodes,...controlNetNodes,...xyNodes,...extraNodes]}},"easy preSamplingLayerDiffusion":{from:{PIPE_LINE:["easy kSamplerLayerDiffusion",...kSampler,...pipeNodes,...controlNetNodes,...xyNodes,...extraNodes]}},"easy preSamplingNoiseIn":{from:{PIPE_LINE:[...kSampler,...pipeNodes,...controlNetNodes,...xyNodes,...extraNodes]}},"easy fullkSampler":{from:{PIPE_LINE:[...pipeNodes.reverse(),"easy preDetailerFix","easy preMaskDetailerFix",...preSamplingNodes,...extraNodes]}},"easy kSampler":{from:{PIPE_LINE:[...pipeNodes.reverse(),"easy preDetailerFix","easy preMaskDetailerFix","easy hiresFix",...preSamplingNodes,...extraNodes]}},"easy controlnetLoader":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes]}},"easy controlnetLoaderADV":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes]}},"easy instantIDApply":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{COMBO:["easy promptLine"]}},"easy instantIDApplyADV":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes},to:{COMBO:["easy promptLine"]}},"easy ipadapterApply":{to:{COMBO:["easy promptLine"]}},"easy ipadapterApplyADV":{to:{STRING:["easy sliderControl",...propmts],COMBO:["easy promptLine"]}},"easy ipadapterStyleComposition":{to:{COMBO:["easy promptLine"]}},"easy preDetailerFix":{from:{PIPE_LINE:["easy detailerFix",...pipeNodes,...extraNodes]},to:{PIPE_LINE:["easy ultralyticsDetectorPipe","easy samLoaderPipe","easy kSampler","easy fullkSampler"]}},"easy preMaskDetailerFix":{from:{PIPE_LINE:["easy detailerFix",...pipeNodes,...extraNodes]}},"easy samLoaderPipe":{from:{PIPE_LINE:["easy preDetailerFix",...pipeNodes,...extraNodes]}},"easy ultralyticsDetectorPipe":{from:{PIPE_LINE:["easy preDetailerFix",...pipeNodes,...extraNodes]}},"easy cascadeLoader":{from:{PIPE_LINE:["easy fullCascadeKSampler","easy preSamplingCascade",...controlNetNodes,...pipeNodes,...extraNodes],MODEL:modelNormalNodes.filter((e=>!ipadapterNodes.includes(e)))}},"easy fullCascadeKSampler":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced",...pipeNodes,...extraNodes]}},"easy preSamplingCascade":{from:{PIPE_LINE:["easy cascadeKSampler",...pipeNodes,...extraNodes]}},"easy cascadeKSampler":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced",...pipeNodes,...extraNodes]}},"easy pipeEdit":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...extraNodes]},to:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes]}},"easy pipeEditPrompt":{from:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...extraNodes]},to:{PIPE_LINE:[...preSamplingNodes,...controlNetNodes,...instantIDNodes,...pipeNodes,...extraNodes]}}};classNullGraphErrorextendsError{constructor(e="Attempted to access LGraph reference that was null or undefined.",t){super(e,{cause:t}),this.name="NullGraphError"}}functiondrawTime(e,t){t&&(t=parseFloat(t).toFixed(3)+$t("s"),e.save(),e.fillStyle=LiteGraph.NODE_DEFAULT_BGCOLOR,drawRoundedRect(e,0,-LiteGraph.NODE_TITLE_HEIGHT-20,e.measureText(t).width+10,LiteGraph.NODE_TITLE_HEIGHT-10,4),e.fill(),drawText(e,t,8,-LiteGraph.NODE_TITLE_HEIGHT-6,LiteGraph.NODE_TITLE_COLOR),e.restore())}app$1.registerExtension({name:"Comfy.EasyUse.Suggestions",asyncsetup(e){constt=LGraphCanvas.prototype.createDefaultNodeForSlot;LGraphCanvas.prototype.createDefaultNodeForSlot=function(e){vari;consts=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,position:[],nodeType:null,posAdd:[0,0],posSizeFix:[0,0]},e||{}),o=this,a=s.nodeFrom&&null!==s.slotFrom,n=!a&&s.nodeTo&&null!==s.slotTo,l=a?s.nodeFrom:s.nodeTo;if(!l||!Object.keys(suggestions).includes(l.type))returnt.call(this,e);if(!a&&!n)return!1;if(!s.nodeType)return!1;constr=a?s.nodeFrom:s.nodeTo;if(!r)thrownewTypeError("nodeX was null when creating default node for slot.");constd=r.type;letc=a?s.slotFrom:s.slotTo,u=!1;switch(typeofc){case"string":u=a?r.findOutputSlot(c,!1):r.findInputSlot(c,!1),c=a?r.outputs[c]:r.inputs[c];break;case"object":if(null===c)return!1;u=a?r.findOutputSlot(c.name):r.findInputSlot(c.name);break;case"number":u=c,c=a?r.outputs[c]:r.inputs[c];break;default:return!1}varp=c.type==LiteGraph.EVENT?"_event_":c.type,A=a?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in;if(null==A?void0:A[p]){lete=!1;constt=a?"from":"to";if(suggestions[d]&&suggestions[d][t]&&(null==(i=suggestions[d][t][p])?void0:i.length)>0){for(varginsuggestions[d][t][p])if(s.nodeType==suggestions[d][t][p][g]||"AUTO"==s.nodeType){e=suggestions[d][t][p][g];break}}elseif("object"==typeofA[p]||"array"==typeofA[p]){for(varginA[p])if(s.nodeType==A[p][g]||"AUTO"==s.nodeType){e=A[p][g];break}}elses.nodeType!=A[p]&&"AUTO"!=s.nodeType||(e=A[p]);if(e){varh=!1;"object"==typeofe&&e.node&&(h=e,e=e.node);varm=LiteGraph.createNode(e);if(m){if(h){if(h.properties)for(varfinh.properties)m.addProperty(f,h.properties[f]);if(h.inputs)for(varfinm.inputs=[],h.inputs)m.addOutput(h.inputs[f][0],h.inputs[f][1]);if(h.outputs)for(varfinm.outputs=[],h.outputs)m.addOutput(h.outputs[f][0],h.outputs[f][1]);h.title&&(m.title=h.title),h.json&&m.configure(h.json)}o.graph.add(m),m.pos=[s.position[0]+s.posAdd[0]+(s.posSizeFix[0]?s.posSizeFix[0]*m.size[0]:0),s.position[1]+s.posAdd[1]+(s.posSizeFix[1]?s.posSizeFix[1]*m.size[1]:0)];conste={node:m,opts:s};if(!this.canvas.dispatchEvent(newCustomEvent("connect-new-default-node",{detail:e,cancelable:!0})))return!0;if(a){if(!s.nodeFrom)thrownewTypeError("createDefaultNodeForSlot - nodeFrom was null");s.nodeFrom.connectByType(u,m,p)}else{if(!s.nodeTo)thrownewTypeError("createDefaultNodeForSlot - nodeTo was null");s.nodeTo.connectByTypeOutput(u,m,p)}return!0}}}return!1};leti=LGraphCanvas.prototype.showConnectionMenu;LGraphCanvas.prototype.showConnectionMenu=function(e){vart;consts=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,e:void0,allow_searchbox:this.allow_searchbox,showSearchBox:this.showSearchBox},e||{}),o=this,{graph:a}=this,{afterRerouteId:n}=s,l=s.nodeFrom&&s.slotFrom,r=!l&&s.nodeTo&&s.slotTo,d=l?s.nodeFrom:s.nodeTo;if(!d||!Object.keys(suggestions).includes(d.type))returni.call(this,e);if(!l&&!r)return!1;constc=l?s.nodeFrom:s.nodeTo;if(!c)thrownewTypeError("nodeX was null when creating default node for slot.");letu=l?s.slotFrom:s.slotTo,p=!1;switch(typeofu){case"string":p=l?c.findOutputSlot(u,!1):c.findInputSlot(u,!1),u=l?c.outputs[u]:c.inputs[u];break;case"object":if(null===u)return;p=l?c.findOutputSlot(u.name):c.findInputSlot(u.name);break;case"number":p=u,u=l?c.outputs[u]:c.inputs[u];break;default:return!1}constA=["Add Node","Add Reroute",null];s.allow_searchbox&&A.push("Search",null);varg=u.type==LiteGraph.EVENT?"_event_":u.type,h=l?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in,m=c.type;if(h&&h[g]){conste=l?"from":"to";if(suggestions[m]&&suggestions[m][e]&&(null==(t=suggestions[m][e][g])?void0:t.length)>0)for(varfinsuggestions[m][e][g])A.push(suggestions[m][e][g][f]);elseif("object"==typeofh[g]||"array"==typeofh[g])for(varfinh[g])A.push(h[g][f]);elseA.push(h[g])}vary=newLiteGraph.ContextMenu(A,{event:s.e,extra:u,title:(u&&""!=u.name?u.name+(g?" | ":""):"")+(u&&g?g:""),callback:function(e,t,i){varr,d;switch(e){case"Add Node":LGraphCanvas.onMenuAdd(null,null,i,y,(function(e){vart,i;e&&(l?null==(t=s.nodeFrom)||t.connectByType(p,e,g,{afterRerouteId:n}):null==(i=s.nodeTo)||i.connectByTypeOutput(p,e,g,{afterRerouteId:n}))}));break;case"Add Reroute":constc=l?s.nodeFrom:s.nodeTo,A=t.extra;if(!a)thrownewNullGraphError;if(!c)thrownewTypeError("Cannot add reroute: node was null");if(!A)thrownewTypeError("Cannot add reroute: slot was null");if(!s.e)thrownewTypeError("Cannot add reroute: CanvasPointerEvent was null");if(!c.connectFloatingReroute([s.e.canvasX,s.e.canvasY],A,n))thrownewError("Failed to create reroute");o.dirty_canvas=!0,o.dirty_bgcanvas=!0;break;case"Search":l?s.showSearchBox(i,{node_from:s.nodeFrom,slot_from:u,type_filter_in:g}):s.showSearchBox(i,{node_to:s.nodeTo,slot_from:u,type_filter_out:g});break;default:consth={position:[(null==(r=s.e)?void0:r.canvasX)??0,(null==(d=s.e)?void0:d.canvasY)??0],nodeType:e,afterRerouteId:n};o.createDefaultNodeForSlot(Object.assign(s,h))}}});returny}}}),app$1.registerExtension({name:"Comfy.EasyUse.TimeTaken",setup(){lete=newMap,t=0;api.addEventListener("execution_start",(e=>{graph&&graph._nodes.forEach((e=>{e.executionDuration&&deletee.executionDuration}))})),api.addEventListener("executing",(i=>{if(!getSetting("EasyUse.Nodes.Runtime",null))return;consts=(null==i?void0:i.node)||(null==i?void0:i.detail)||null,o=e.get(t);if(e.delete(t),t&&o){conste=Date.now()-o,i=getNodeById(t);i&&(i.executionDuration||(i.executionDuration=0),i.executionDuration=i.executionDuration+e/1e3)}t=s,e.set(s,Date.now())}))},beforeRegisterNodeDef(e,t){consti=e.prototype.onDrawForeground;e.prototype.onDrawForeground=function(...e){const[t]=e;returndrawTime(t,this.executionDuration),null==i?void0:i.apply(this,e)}}});letnodesStore=null;app$1.registerExtension({name:"Comfy.EasyUse.HotKeys",setup(){if(void0!==hotkeys){hotkeys("up,down,left,right",(function(e,t){vari,s,o,a,n,l,r,d,c,u,p,A,g,h,m;e.preventDefault();if(!getSetting("EasyUse.Hotkeys.JumpNearestNodes",null))return;constf=getSelectedNodes();if(0===f.length)return;consty=f[0];switch(t.key){case"up":case"left":lete=null;if(isGetNode(y)){conste=null==(i=y.widgets_values)?void0:i[0],t=null==(s=y.graph)?void0:s._nodes,o=null==t?void0:t.find((t=>{vari;if(isSetNode(t)){if((null==(i=t.widgets_values)?void0:i[0])===e)returnt}returnnull}));o&&jumpToNode(o)}elseif((null==(o=y.inputs)?void0:o.length)>0){for(lett=0;t<y.inputs.length;t++)if(y.inputs[t].link){e=y.inputs[t].link;break}if(e){constt=null==(a=y.graph)?void0:a.links;if(t[e]){consti=null==(n=t[e])?void0:n.origin_id,s=null==(r=null==(l=y.graph)?void0:l._nodes_by_id)?void0:r[i];s&&jumpToNode(s)}}}break;case"down":case"right":lett=null;if(isSetNode(y)){conste=null==(d=y.widgets_values)?void0:d[0],t=null==(c=y.graph)?void0:c._nodes,i=null==t?void0:t.find((t=>{vari;if(isGetNode(t)){if((null==(i=t.widgets_values)?void0:i[0])===e)returnt}returnnull}));i&&jumpToNode(i)}elseif((null==(u=y.outputs)?void0:u.length)>0){for(lete=0;e<y.outputs.length;e++)if((null==(p=y.outputs[e].links)?void0:p.length)>0&&y.outputs[e].links[0]){t=y.outputs[e].links[0];break}if(t){conste=null==(A=y.graph)?void0:A.links;if(e[t]){consti=null==(g=e[t])?void0:g.target_id,s=null==(m=null==(h=y.graph)?void0:h._nodes_by_id)?void0:m[i];s&&jumpToNode(s)}}}}})),hotkeys("shift+up,shift+down,shift+left,shift+right,shift+alt+⌘+left,shift+alt+⌘+right,shift+alt+ctrl+left,shift+alt+ctrl+right",(function(e,t){e.preventDefault();if(!getSetting("EasyUse.Hotkeys.AlignSelectedNodes",null))return;consti=getSelectedNodes();if(i.length<=1)return;consts=i;switch(t.key){case"shift+up":LGraphCanvas.alignNodes(s,"top",s[0]);break;case"shift+down":LGraphCanvas.alignNodes(s,"bottom",s[0]);break;case"shift+left":LGraphCanvas.alignNodes(s,"left",s[0]);break;case"shift+right":LGraphCanvas.alignNodes(s,"right",s[0]);break;case"shift+alt+ctrl+left":case"shift+alt+⌘+left":distributeNodes(s,"horizontal");break;case"shift+alt+ctrl+right":case"shift+alt+⌘+right":distributeNodes(s,"vertical")}nodesStore||(nodesStore=useNodesStore()),nodesStore&&nodesStore.update()})),hotkeys("shift+⌘+left,shift+⌘+right,shift+ctrl+left,shift+ctrl+right",(function(e,t){e.preventDefault();if(!getSetting("EasyUse.Hotkeys.NormalizeSelectedNodes",null))return;consti=getSelectedNodes();if(i.length<=1)return;consts=i;switch(t.key){case"shift+ctrl+left":case"shift+⌘+left":setNodesSameSize(s,"width");break;case"shift+ctrl+right":case"shift+⌘+right":setNodesSameSize(s,"height")}nodesStore||(nodesStore=useNodesStore()),nodesStore&&nodesStore.update()})),hotkeys("shift+g",(function(e,t){e.preventDefault();getSetting("EasyUse.Hotkeys.AddGroup",null)&&(addSelectedNodesToGroup(),nodesStore||(nodesStore=useNodesStore()),nodesStore&&nodesStore.update())})),hotkeys("shift+r",(function(e,t){e.preventDefault();getSetting("EasyUse.Hotkeys.cleanVRAMused",null)&&cleanVRAM()})),hotkeys("shift+m",(function(e,t){vari,s,o;if(!getSetting("EasyUse.Hotkeys.toggleNodesMap",null))return;leta=(null==(i=app$1.extensionManager)?void0:i.sidebarTab)||app$1.extensionManager,n=(null==(s=app$1.extensionManager.sidebarTab)?void0:s.activeSidebarTabId)||(null==(o=app$1.extensionManager)?void0:o.activeSidebarTab);a.activeSidebarTabId=n==NODES_MAP_ID?null:NODES_MAP_ID}));conste=[];Array.from(Array(10).keys()).forEach((t=>e.push(`alt+${t}`))),hotkeys(e.join(","),(asyncfunction(e,t){e.preventDefault();if(!getSetting("EasyUse.Hotkeys.NodesTemplate",null))return;consti=t.key;lets=parseInt(i.split("+")[1]);consto=awaitapi.getUserData("comfy.templates.json");leta=null;if(200==o.status)try{a=awaito.json()}catch(l){toast.error($t("Get Node Templates File Failed"))}elselocalStorage["Comfy.NodeTemplates"]?a=JSON.parse(localStorage["Comfy.NodeTemplates"]):toast.warn($t("No Node Templates Found"));if(!a)returnvoidtoast.warn($t("No Node Templates Found"));s=0===s?9:s-1;constn=a[s];if(n)try{conste=(null==n?void0:n.name)||"Group",t=(null==n?void0:n.data)?JSON.parse(n.data):[];clipboardAction((async()=>{awaitGroupNodeConfig.registerFromWorkflow(t.groupNodes,{}),localStorage.litegrapheditor_clipboard=n.data,app$1.canvas.pasteFromClipboard(),t.groupNodes||addSelectedNodesToGroup(e)}))}catch(l){toast.error(l)}elsetoast.warn($t("Node template with {key} not set").replace("{key}",i))}));constt=asyncfunction(e){if(("b"===e.key||"m"==e.key)&&(e.metaKey||e.ctrlKey)){if(0===getSelectedNodes().length)return;nodesStore||(nodesStore=useNodesStore()),nodesStore&&nodesStore.update()}};window.addEventListener("keydown",t,!0)}}});constclipboardAction=asynce=>{constt=localStorage.litegrapheditor_clipboard;awaite(),localStorage.litegrapheditor_clipboard=t},addSelectedNodesToGroup=e=>{constt=getSelectedNodes();if(0===t.length)return;consti=t;lets=newLiteGraph.LGraphGroup;s.title=e||"Group",addNodesToGroup(s,i),app$1.canvas.graph.add(s)},chooserClassName="easy imageChooser",isChooserNode=e=>(null==e?void0:e.comfyClass)===chooserClassName,getPreviewFormatParam=e=>`&type=${e.type}&subfolder=${e.subfolder}&rand=${e.random}`,cancelSelection=e=>{vart;Object.values(null==(t=app$1.graph)?void0:t._nodes_by_id).forEach((e=>{isChooserNode(e)&&e.cancelSelection("interrupt")}))};app$1.registerExtension({name:"Comfy.EasyUse.imageChooser",setup(){conste=api.interrupt;api.interrupt=function(){vart;(null==(t=app$1.graph)?void0:t._nodes_by_id)&&cancelSelection(),e.apply(this,arguments)},api.addEventListener("easyuse-image-choose",(e=>{vart;consti=e.detail,s=app$1.graph._nodes_by_id[i.id];if(!s||!isChooserNode(s))return;s.setExecutingState(!1),s.selected_images.clear(),s.anti_selected.clear(),s.isWaitingSelection=["Always Pause","Keep Last Selection"].includes(s.currentMode),s.isCanceling=!1,s.overIndex=null;consto=(null==(t=i.urls)?void0:t.map(((e,t)=>({index:t,filename:e.filename,subfolder:e.subfolder,type:e.type}))))||[];s.imageData=o,s.imgs=[],o.forEach((e=>{constt=newImage;t.onload=()=>{app$1.graph.setDirtyCanvas(!0)},t.src=`/view?filename=${encodeURIComponent(e.filename)}${getPreviewFormatParam(e)}`,s.imgs.push(t)})),s.update(),"Always Pause"===s.currentMode&&s.setExecutingState(!0)})),api.addEventListener("easyuse-image-keep-selection",(e=>{constt=e.detail,i=app$1.graph._nodes_by_id[t.id];i&&isChooserNode(i)&&(i.isWaitingSelection=!1,i.isCancelling=!1,t.selected&&Array.isArray(t.selected)&&(i.selected_images.clear(),t.selected.forEach((e=>{i.selected_images.add(e)}))),i.update())}))},beforeRegisterNodeDef(e,t){if(t.name==chooserClassName){e.prototype.confirmSelection=function(){api.fetchApi("/easyuse/image_chooser_message",{method:"POST",body:JSON.stringify({node_id:this.id.toString(),action:"select",selected:Array.from(this.selected_images)})}).catch((e=>{})).finally((e=>{this.isWaitingSelection=!1,this.update(),this.setExecutingState(!1)}))},e.prototype.cancelSelection=function(e){api.fetchApi("/easyuse/image_chooser_message",{method:"POST",body:JSON.stringify({node_id:this.id.toString(),action:"cancel",selected:[]})}).catch((e=>{})).finally((e=>{this.isCanceling=!1,this.isWaitingSelection=!1,this.update(),this.setExecutingState(!1)}))},e.prototype.updateWidgets=function(){vare;if(!this.confirm_button_widget||!this.cancel_button_widget)return;constt=this.selected_images.size,i=(null==(e=this.imgs)?void0:e.length)||0;if(this.isCanceling)this.confirm_button_widget.name=$t("Canceling"),this.cancel_button_widget.name="",this.confirm_button_widget.disabled=!0,this.cancel_button_widget.disabled=!0;elseif(this.isWaitingSelection)t>0?(this.confirm_button_widget.name=t>1?`${$t("Progress selected")} (${t}/${i})`:`${$t("Progress selected image")}`,this.confirm_button_widget.disabled=!1):(this.confirm_button_widget.name=$t("Please select images to continue"),this.confirm_button_widget.disabled=!0),this.cancel_button_widget.name=$t("Cancel current run"),this.cancel_button_widget.disabled=!1;else{conste={"Always Pause":$t("Waiting for selection..."),"Keep Last Selection":$t("Using last selection")};this.confirm_button_widget.name=(t>0&&"Always Pause"==this.currentMode?$t("Please run first"):null==e?void0:e[this.currentMode])||$t("Unknown Mode"),this.cancel_button_widget.name="",this.confirm_button_widget.disabled=!0,this.cancel_button_widget.disabled=!0}this.setDirtyCanvas(!0,!0)},e.prototype.serialize=function(){conste=LiteGraph.LGraphNode.prototype.serialize.call(this);returne.isWaitingSelection=this.isWaitingSelection,e.currentMode=this.currentMode,this.imageData&&this.imageData.length>0&&(e.imageData=this.imageData),this.selected_images&&this.selected_images.size>0&&(e.selected_images=Array.from(this.selected_images)),e.isExecuting=this.isExecuting||!1,e},e.prototype.configure=function(e){LiteGraph.LGraphNode.prototype.configure.call(this,e),this.isWaitingSelection=e.isWaitingSelection||!1,this.currentMode=e.currentMode||"Always Pause",this.imgs=[],this.updateWidgets()},e.prototype.setExecutingState=function(e){this.isExecuting=e,app$1.graph&&app$1.graph.setDirtyCanvas(!0,!1)};constt=e.prototype.update;e.prototype.update=function(){null==t||t.call(this,arguments),this.updateWidgets()};consti=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){null==i||i.call(this,arguments),this.selected_images=newSet,this.anti_selected=newSet,this.currentMode="Always Pause",this.isWaitingSelection=!1,this.isCanceling=!1,this.imageData=[],this.imgs,this.confirm_button_widget=this.addWidget("button","","",(()=>{this.confirmSelection()})),this.cancel_button_widget=this.addWidget("button","","",(()=>{this.cancelSelection()})),this.confirm_button_widget.serialize=!1,this.cancel_button_widget.serialize=!1,setTimeout((e=>{constt=getWidgetByName(this,"mode");t.callback=e=>{requestAnimationFrame((t=>{this.currentMode=e,this.updateWidgets(),this.setDirtyCanvas(!0,!0)}))},this.currentMode=t.value||"Always Pause",this.updateWidgets()}),1),Object.defineProperty(this.confirm_button_widget,"clicked",{get:function(){returnthis._clicked},set:function(e){this._clicked=e&&""!=this.name}}),Object.defineProperty(this.cancel_button_widget,"clicked",{get:function(){returnthis._clicked},set:function(e){this._clicked=e&&""!=this.name}}),Object.defineProperty(this,"imageIndex",{get:function(){returnnull},set:function(e){this.overIndex=e}}),Object.defineProperty(this,"imagey",{get:function(){vare,t;return(null==(t=null==(e=this.widgets)?void0:e[this.widgets.length-1])?void0:t.last_y)+LiteGraph.NODE_WIDGET_HEIGHT},set:function(e){this.imagey=e}});conste=this.onMouseDown;this.onMouseDown=function(t,i,s){if(t.isPrimary){conste=click_is_in_image(this,i);e>=0&&this.toggleImageSelection(e)}returne&&e.apply(this,arguments)},this.update()},e.prototype.onDrawBackground,e.prototype.onDrawBackground=function(e){additionalDrawBackground(this,e,this.imagey||0)},e.prototype.toggleImageSelection=function(e){this.selected_images.has(e)?this.selected_images.delete(e):this.selected_images.add(e),this.update()}}}});constclick_is_in_image=(e,t)=>{vari,s;if((null==(i=e.imgs)?void0:i.length)>1)for(varo=0;o<e.imageRects.length;o++){consti=t[0]-e.imageRects[o][0],s=t[1]-e.imageRects[o][1];if(i>0&&i<e.imageRects[o][2]&&s>0&&s<e.imageRects[o][3])returno}elseif(1==(null==(s=e.imgs)?void0:s.length)&&t[1]>e.imagey)return0;return-1};functiondrawRect(e,t,i){vars;if(e.imageRects)s=e.imageRects[t];else{constt=e.imagey;s=[1,t+1,e.size[0]-2,e.size[1]-t-2]}i.strokeRect(s[0]+1,s[1]+1,s[2]-2,s[3]-2)}constis_all_same_aspect_ratio=e=>{if(!e.length||1===e.length)return!0;constt=e[0].naturalWidth/e[0].naturalHeight;for(leti=1;i<e.length;i++){if(t!=e[i].naturalWidth/e[i].naturalHeight)return!1}return!0};functioncalculateImageGrid(e,t,i){lets=0,o=e[0].naturalWidth,a=e[0].naturalHeight;constn=e.length;letl,r,d,c,u;for(letp=1;p<=n;p++){conste=Math.ceil(n/p),A=t/p,g=A/o,h=i/e/a,m=Math.min(g,h,1),f=o*m,y=a*m,v=f*y*n;v>s&&(s=v,l=f,r=y,d=p,c=e,u=p*((A-f)/2))}return{cellWidth:l,cellHeight:r,cols:d,rows:c,shiftX:u}}functionadditionalDrawBackground(e,t,i=0){vars,o;if(!e.imgs||!e.imgs.length)return;consta=app$1.canvas,n=a.graph_mouse,l=e.size[0];letr=e.size[1]-i-15;if(r<200&&(r=200,requestAnimationFrame((t=>{e.size[1]=i+15+200}))),null==e.imageIndex){leto,d,c,u;if(is_all_same_aspect_ratio(e.imgs))({cellWidth:o,cellHeight:d,cols:u,shiftX:c}=calculateImageGrid(e.imgs,l,r));else{constt=e.imgs.reduce(((e,t)=>Math.max(e,t.naturalWidth,t.naturalHeight)),0),i=[];i.length=null==(s=e.imgs)?void0:s.length,i[0]={naturalWidth:t,naturalHeight:t},({cellWidth:o,cellHeight:d,cols:u,shiftX:c}=calculateImageGrid(i,l,r))}letp=!1,A=e.imgs.length;e.imageRects=[];for(lets=0;s<A;s++){e.imgs[s];constl=s%u*o+c,r=Math.floor(s/u)*d+i;if(!p&&(p=LiteGraph.isInsideRectangle(n[0],n[1],l+e.pos[0],r+e.pos[1],o,d),p)){e.overIndex=s;leti=110;a.pointer_is_down&&(e.pointerDown&&e.pointerDown.index===s||(e.pointerDown={index:s,pos:[...n]}),i=125),t.filter=`contrast(${i}%) brightness(${i}%)`,a.canvas.style.cursor="pointer"}e.imageRects.push([l,r,o,d])}}if(e.imageRects)for(letc=0;c<e.imgs.length;c++){t.fillStyle="#000",t.fillRect(...e.imageRects[c]);consti=e.imgs[c],s=e.imageRects[c][2],o=e.imageRects[c][3];leta=s/i.width,n=o/i.height;vard=Math.min(a,n);letl=d*i.height,r=d*i.width;constu=e.imageRects[c][0]+(s-r)/2,p=e.imageRects[c][1]+(o-l)/2,A=2;t.drawImage(i,u+A,p+A,r-2*A,l-2*A)}t.lineWidth=2,t.strokeStyle="green",e&&e.selected_images&&e.selected_images.forEach((i=>{drawRect(e,i,t)})),t.strokeStyle="#F88",null==(o=null==e?void0:e.anti_selected)||o.forEach((i=>{drawRect(e,i,t)}))}functionaccSub(e,t){leti,s,o,a,n,l;n="string"==typeofe?e:e.toString(),l="string"==typeoft?t:t.toString();try{i=n.split(".")[1].length}catch(r){i=0}try{s=l.split(".")[1].length}catch(r){s=0}returno=Math.pow(10,Math.max(i,s)),a=i>=s?i:s,((e*o-t*o)/o).toFixed(a)}functionaccDiv(e,t){leti,s,o=0,a=0,n="string"==typeofe?e:e.toString(),l="string"==typeoft?t:t.toString();try{o=n.toString().split(".")[1].length}catch(r){}try{a=l.toString().split(".")[1].length}catch(r){}returni=Number(n.toString().replace(".","")),s=Number(l.toString().replace(".","")),i/s*Math.pow(10,a-o)}Number.prototype.div=function(e){returnaccDiv(this,e)};letapi_keys=[],api_current=0;constapi_cost={sd3:6.5,"sd3-turbo":4};classAccountDialogextendsComfyDialog{constructor(){super(),this.lists=[],this.dialog_div=null,this.user_div=null}addItem(e,t){return$el("div.easyuse-account-dialog-item",[$el("input",{type:"text",placeholder:"Enter name",oninput:e=>{constt=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);api_keys[t].name=e.target.value},value:api_keys[e].name}),$el("input.key",{type:"text",oninput:e=>{constt=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);api_keys[t].key=e.target.value},placeholder:"Enter APIKEY",value:api_keys[e].key}),$el("button.choose",{textContent:$t("Choose"),onclick:asynce=>{vari,s,o;consta=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);letn=api_keys[a].name,l=api_keys[a].key;if(!n)returnvoidtoast.error($t("Please enter the account name"));if(!l)returnvoidtoast.error($t("Please enter the APIKEY"));letr=!0;for(lett=0;t<api_keys.length;t++)if(!api_keys[t].key){r=!1;break}if(!r)returnvoidtoast.error($t("APIKEY is not Empty"));api_current=a;constd=newFormData;d.append("api_keys",JSON.stringify(api_keys)),d.append("current",api_current);constc=awaitapi.fetchApi("/easyuse/stability/set_api_keys",{method:"POST",body:d});if(200==c.status){conste=awaitc.json();if((null==e?void0:e.account)&&(null==e?void0:e.balance)){consta=(null==(i=e.account)?void0:i.profile_picture)||null,n=(null==(s=e.account)?void0:s.email)||null,l=(null==(o=e.balance)?void0:o.credits)||0;t.replaceChildren($el("div.easyuse-account-user-info",{onclick:e=>{(newAccountDialog).show(t)}},[$el("div.user",[$el("div.avatar",a?[$el("img",{src:a})]:"😀"),$el("div.info",[$el("h5.name",n),$el("h6.remark","Credits: "+l)])]),$el("div.edit",{textContent:$t("Edit")})])),toast.success($t("Save Succeed"))}elsetoast.success($t("Save Succeed"));this.close()}elsetoast.error($t("Save Failed"))}}),$el("button.delete",{textContent:$t("Delete"),onclick:e=>{constt=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);api_keys.length<=1?toast.error($t("At least one account is required")):(api_keys.splice(t,1),this.dialog_div.removeChild(e.target.parentNode))}})])}show(e){api_keys.forEach(((t,i)=>{this.lists.push(this.addItem(i,e))})),this.dialog_div=$el("div.easyuse-account-dialog",this.lists),super.show($el("div.easyuse-account-dialog-main",[$el("div",[$el("a",{href:"https://platform.stability.ai/account/keys",target:"_blank",textContent:$t("Getting Your APIKEY")})]),this.dialog_div]))}createButtons(){conste=super.createButtons();returne.unshift($el("button",{type:"button",textContent:$t("Save Account Info"),onclick:e=>{lett=!0;for(leti=0;i<api_keys.length;i++)if(!api_keys[i].key){t=!1;break}if(t){conste=newFormData;e.append("api_keys",JSON.stringify(api_keys)),api.fetchApi("/easyuse/stability/set_api_keys",{method:"POST",body:e}).then((e=>{200==e.status?toast.success($t("Save Succeed")):toast.error($t("Save Failed"))}))}elsetoast.error($t("APIKEY is not Empty"))}})),e.unshift($el("button",{type:"button",textContent:$t("Add Account"),onclick:e=>{constt="Account "+api_keys.length.toString();api_keys.push({name:t,key:""});consti=this.addItem(api_keys.length-1);this.lists.push(i),this.dialog_div.appendChild(i)}})),e}}app$1.registerExtension({name:"Comfy.EasyUse.API.SD3",asyncbeforeRegisterNodeDef(e,t,i){if("easy stableDiffusion3API"==t.name){constt=e.prototype.onNodeCreated;e.prototype.onNodeCreated=asyncfunction(){vare,i,s;t&&(null==t||t.apply(this,arguments));consto=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),a=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));letn=this.widgets.find((e=>"model"==e.name));n.callback=e=>{l.value="-"+api_cost[e]};constl=this.addWidget("text","cost_credit","0",(e=>{}),{serialize:!1});l.disabled=!0,a&&setTimeout((e=>{"control before generate"==a.name&&0===o.value&&(o.value=Math.floor(4294967294*Math.random())),l.value="-"+api_cost[n.value]}),100);letr=$el("div.easyuse-account-user",[$t("Loading UserInfo...")]);this.addDOMWidget("account","btn",$el("div.easyuse-account",r)),api.addEventListener("stable-diffusion-api-generate-succeed",(async({detail:e})=>{vart;leti=r.querySelectorAll(".remark");if(i&&i[0]){constt=(null==e?void0:e.model)?api_cost[e.model]:0;if(t){lete=accSub(parseFloat(i[0].innerText.replace(/Credits: /g,"")),t);e>0&&(i[0].innerText="Credits: "+e.toString())}}awaitsleep(1e4);consts=awaitapi.fetchApi("/easyuse/stability/balance");if(200==s.status){conste=awaits.json();if(null==e?void0:e.balance){consts=(null==(t=e.balance)?void0:t.credits)||0;i&&i[0]&&(i[0].innerText="Credits: "+s)}}}));constd=awaitapi.fetchApi("/easyuse/stability/api_keys");if(200==d.status){lett=awaitd.json();if(api_keys=t.keys,api_current=t.current,api_keys.length>0&&void0!==api_current){constt=api_keys[api_current].key,o=api_keys[api_current].name;if(t){constt=awaitapi.fetchApi("/easyuse/stability/user_info");if(200==t.status){consto=awaitt.json();if((null==o?void0:o.account)&&(null==o?void0:o.balance)){constt=(null==(e=o.account)?void0:e.profile_picture)||null,a=(null==(i=o.account)?void0:i.email)||null,n=(null==(s=o.balance)?void0:s.credits)||0;r.replaceChildren($el("div.easyuse-account-user-info",{onclick:e=>{(newAccountDialog).show(r)}},[$el("div.user",[$el("div.avatar",t?[$el("img",{src:t})]:"😀"),$el("div.info",[$el("h5.name",a),$el("h6.remark","Credits: "+n)])]),$el("div.edit",{textContent:$t("Edit")})]))}}}elser.replaceChildren($el("div.easyuse-account-user-info",{onclick:e=>{(newAccountDialog).show(r)}},[$el("div.user",[$el("div.avatar","😀"),$el("div.info",[$el("h5.name",o),$el("h6.remark",$t("Click to set the APIKEY first"))])]),$el("div.edit",{textContent:$t("Edit")})]))}}}}}});letactiveDropdown=null;functionremoveDropdown(){activeDropdown&&(activeDropdown.removeEventListeners(),activeDropdown.dropdown.remove(),activeDropdown=null)}functioncreateDropdown(e,t,i,s=!1){removeDropdown(),newDropdown(e,t,i,s)}classDropdown{constructor(e,t,i,s=!1){this.dropdown=document.createElement("ul"),this.dropdown.setAttribute("role","listbox"),this.dropdown.classList.add("easy-dropdown"),this.selectedIndex=-1,this.inputEl=e,this.suggestions=t,this.onSelect=i,this.isDict=s,this.focusedDropdown=this.dropdown,this.buildDropdown(),this.onKeyDownBound=this.onKeyDown.bind(this),this.onWheelBound=this.onWheel.bind(this),this.onClickBound=this.onClick.bind(this),this.addEventListeners()}buildDropdown(){this.isDict?this.buildNestedDropdown(this.suggestions,this.dropdown):this.suggestions.forEach(((e,t)=>{this.addListItem(e,t,this.dropdown)}));conste=this.inputEl.getBoundingClientRect();this.dropdown.style.top=e.top+e.height-10+"px",this.dropdown.style.left=e.left+"px",document.body.appendChild(this.dropdown),activeDropdown=this}buildNestedDropdown(e,t){leti=0;Object.keys(e).forEach((s=>{consto=e[s];if("object"==typeofo&&null!==o){conste=document.createElement("ul");e.setAttribute("role","listbox"),e.classList.add("easy-nested-dropdown");consta=document.createElement("li");a.classList.add("folder"),a.textContent=s,a.appendChild(e),a.addEventListener("mouseover",this.onMouseOver.bind(this,i,t)),t.appendChild(a),this.buildNestedDropdown(o,e),i+=1}else{conste=document.createElement("li");e.classList.add("item"),e.setAttribute("role","option"),e.textContent=s,e.addEventListener("mouseover",this.onMouseOver.bind(this,i,t)),e.addEventListener("mousedown",this.onMouseDown.bind(this,s)),t.appendChild(e),i+=1}}))}addListItem(e,t,i){consts=document.createElement("li");s.setAttribute("role","option"),s.textContent=e,s.addEventListener("mouseover",this.onMouseOver.bind(this,t)),s.addEventListener("mousedown",this.onMouseDown.bind(this,e)),i.appendChild(s)}addEventListeners(){document.addEventListener("keydown",this.onKeyDownBound),this.dropdown.addEventListener("wheel",this.onWheelBound),document.addEventListener("click",this.onClickBound)}removeEventListeners(){document.removeEventListener("keydown",this.onKeyDownBound),this.dropdown.removeEventListener("wheel",this.onWheelBound),document.removeEventListener("click",this.onClickBound)}onMouseOver(e,t){t&&(this.focusedDropdown=t),this.selectedIndex=e,this.updateSelection()}onMouseOut(){this.selectedIndex=-1,this.updateSelection()}onMouseDown(e,t){t.preventDefault(),this.onSelect(e),this.dropdown.remove(),this.removeEventListeners()}onKeyDown(e){constt=Array.from(this.focusedDropdown.children),i=t[this.selectedIndex];if(activeDropdown)if(38===e.keyCode)e.preventDefault(),this.selectedIndex=Math.max(0,this.selectedIndex-1),this.updateSelection();elseif(40===e.keyCode)e.preventDefault(),this.selectedIndex=Math.min(t.length-1,this.selectedIndex+1),this.updateSelection();elseif(39===e.keyCode){if(e.preventDefault(),i&&i.classList.contains("folder")){conste=i.querySelector(".easy-nested-dropdown");e&&(this.focusedDropdown=e,this.selectedIndex=0,this.updateSelection())}}elseif(37===e.keyCode&&this.focusedDropdown!==this.dropdown){conste=this.focusedDropdown.closest(".easy-dropdown, .easy-nested-dropdown").parentNode.closest(".easy-dropdown, .easy-nested-dropdown");e&&(this.focusedDropdown=e,this.selectedIndex=Array.from(e.children).indexOf(this.focusedDropdown.parentNode),this.updateSelection())}elseif((13===e.keyCode||9===e.keyCode)&&this.selectedIndex>=0){e.preventDefault(),i.classList.contains("item")&&(this.onSelect(t[this.selectedIndex].textContent),this.dropdown.remove(),this.removeEventListeners());consts=i.querySelector(".easy-nested-dropdown");s&&(this.focusedDropdown=s,this.selectedIndex=0,this.updateSelection())}else27===e.keyCode&&(this.dropdown.remove(),this.removeEventListeners())}onWheel(e){constt=parseInt(this.dropdown.style.top);localStorage.getItem("Comfy.Settings.Comfy.InvertMenuScrolling")?this.dropdown.style.top=t+(e.deltaY<0?10:-10)+"px":this.dropdown.style.top=t+(e.deltaY<0?-10:10)+"px"}onClick(e){this.dropdown.contains(e.target)||e.target===this.inputEl||(this.dropdown.remove(),this.removeEventListeners())}updateSelection(){Array.from(this.focusedDropdown.children).forEach(((e,t)=>{t===this.selectedIndex?e.classList.add("selected"):e.classList.remove("selected")}))}}functiongenerateNumList(e){constt=e.min||0,i=e.max||0,s=e.step||1;if(0===s)return[];consto=[];leta=t;for(;a<=i;){if(Number.isInteger(s))o.push(Math.round(a)+"; ");else{lete=a.toFixed(3);-0==e&&(e="0.000"),/\.\d{3}$/.test(e)||(e+="0"),o.push(e+"; ")}a+=s}returni>=0&&t>=0?o:o.reverse()}letplotDict={},currentOptionsDict={};functiongetCurrentOptionLists(e,t){String(e.id);consti=t.name,s=t.value.replace(/^(loader|preSampling):\s/,"");currentOptionsDict[i]?currentOptionsDict[i]!=plotDict[s]&&(currentOptionsDict[i]=plotDict[s]):currentOptionsDict={...currentOptionsDict,[i]:plotDict[s]}}functionaddGetSetters(e){if(e.widgets)for(consttofe.widgets)if("x_axis"===t.name||"y_axis"===t.name){leti=t.value;Object.defineProperty(t,"value",{get:()=>i,set(s){s!==i&&(i=s,getCurrentOptionLists(e,t))}})}}functiondropdownCreator(e){if(e.widgets){constt=e.widgets.filter((e=>"customtext"===e.type&&!1!==e.dynamicPrompts||e.dynamicPrompts));for(consteoft){lett=function(e,t,s,o){returne&&(t[s]=e),t.map((e=>i(e,o))).filter((e=>""!==e)).join("")},i=function(e,t){if(e=s(e),o(e,t))returne+"; ";leti=a(e,t);return1===i.length||2===i.length?i[0]:o(n(e),t)?n(e)+"; ":""},s=function(e){returne.replace(/(\n|;| )/g,"")},o=function(e,t){returnt.includes(e+"; ")},a=function(e,t){returnt.filter((t=>t.toLowerCase().includes(e.toLowerCase())))},n=function(e){returnNumber(e)?Number(e).toFixed(3):["0","0.","0.0","0.00","00"].includes(e)?"0.000":e};constl=function(){consti=e.name[0]+"_axis";lets=(null==currentOptionsDict?void0:currentOptionsDict[i])||[];if(0===s.length)return;consto=e.inputEl.value,a=e.inputEl.selectionStart;letn=o.split("; ");constl=o.substring(0,a).split("; ").length-1,r=n[l].replace(/\n/g,"").toLowerCase(),d=s.filter((e=>e.toLowerCase().includes(r))).map((e=>e.replace(/; /g,"")));if(d.length>0)createDropdown(e.inputEl,d,(i=>{consto=t(i,n,l,s);e.inputEl.value=o}));else{removeDropdown();consti=t(null,n,l,s);e.inputEl.value=i}};e.inputEl.removeEventListener("input",l),e.inputEl.addEventListener("input",l),e.inputEl.removeEventListener("mouseup",l),e.inputEl.addEventListener("mouseup",l)}}}app$1.registerExtension({name:"Comfy.EasyUse.XYPlot",asyncbeforeRegisterNodeDef(e,t,i){if("easy XYPlot"===t.name){plotDict=t.input.hidden.plot_dict[0];for(consteinplotDict){constt=plotDict[e];if(Array.isArray(t)){leti=[];for(consteoft)i.push(e+"; ");plotDict[e]=i}elseplotDict[e]="object"==typeoft?"seed"==e?t+"; ":generateNumList(t):t+"; "}plotDict.None=[],plotDict["---------------------"]=[]}},nodeCreated(e){"easy XYPlot"===e.comfyClass&&(addGetSetters(e),dropdownCreator(e))}});constuseDomWidgetStore=defineStore("domWidget",(()=>{conste=ref(newMap);return{widgetStates:e,registerWidget:t=>{e.value.set(t.id,{widget:markRaw(t),visible:!0,readonly:!1,zIndex:0,pos:[0,0],size:[0,0]})},unregisterWidget:t=>{e.value.delete(t)}}})),generateUUID=()=>"undefined"!=typeofcrypto&&"function"==typeofcrypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{constt=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),isDOMWidget=e=>"element"ine&&!!e.element,isComponentWidget=e=>"component"ine&&!!e.component,_BaseDOMWidgetImpl=classe{constructor(e){this.type=e.type,this.name=e.name,this.options=e.options,this.id=generateUUID(),this.node=e.node,this.y=0}getvalue(){vare,t;return(null==(t=(e=this.options).getValue)?void0:t.call(e))??""}setvalue(e){vart,i,s;null==(i=(t=this.options).setValue)||i.call(t,e),null==(s=this.callback)||s.call(this,this.value)}getmargin(){returnthis.options.margin??e.DEFAULT_MARGIN}isVisible(){return!["hidden"].includes(this.type)&&this.node.isWidgetVisible(this)}draw(e,t,i,s,o,a){varn,l;if(this.options.hideOnZoom&&a&&this.isVisible()){constt=e.fillStyle;e.beginPath(),e.fillStyle=LiteGraph.WIDGET_BGCOLOR,e.rect(this.margin,s+this.margin,i-2*this.margin,(this.computedHeight??o)-2*this.margin),e.fill(),e.fillStyle=t}null==(l=(n=this.options).onDraw)||l.call(n,this)}onRemove(){useDomWidgetStore().unregisterWidget(this.id)}};__publicField(_BaseDOMWidgetImpl,"DEFAULT_MARGIN",10);letBaseDOMWidgetImpl=_BaseDOMWidgetImpl;classComponentWidgetImplextendsBaseDOMWidgetImpl{constructor(e){super({...e,type:"custom"}),this.component=e.component,this.inputSpec=e.inputSpec}computeLayoutSize(){vare,t,i,s;return{minHeight:(null==(t=(e=this.options).getMinHeight)?void0:t.call(e))??45,maxHeight:(null==(s=(i=this.options).getMaxHeight)?void0:s.call(i))??45,minWidth:120}}serializeValue(){returntoRaw(this.value)}}const_hoisted_1$8={class:"w-full flex justify-between items-center"},_hoisted_2$4={class:"flex justify-start items-center flex-1 gap-2"},_hoisted_3$3={class:"flex justify-end items-center tool ml-2 position-relative"},_sfc_main$8={__name:"promptAwait",props:{widget:{required:!0},widgetModifiers:{}},emits:["update:widget"],setup(e){constt=useModel(e,"widget"),i=ref(!1),s=ref(!1);leto=null;consta=()=>{if(s.value)return;conste=window.SpeechRecognition||window.webkitSpeechRecognition;e&&(s.value=!0,o||(o=newe,o.interimResults=!1),o.start(),o.addEventListener("result",(e=>{vari;consts=e.results[0][0].transcript;leto=null==(i=t.value)?void0:i.node,a=getWidgetByName(o,"prompt");a&&(a.value+=s)})),o.addEventListener("end",(()=>{s.value=!1,o=null})),o.addEventListener("error",(e=>{})))},n=()=>{s.value&&o&&o.stop()};onMounted((e=>{api.addEventListener("easyuse_prompt_await",(e=>{vars,o,a,n,l,d;constc=e.detail.id,u=-1!==(null==(s=t.value)?void0:s.node.id).toString().indexOf(":")?(null==(o=t.value)?void0:o.node.id).toString().split(":")[0]:null==(a=t.value)?void0:a.node.id;parseInt(c)===parseInt(u)&&(i.value=!0,r("last_seed",(null==(n=t.value.value)?void0:n.seed)||0),(null==(l=t.value.value)?void0:l.unlock)?r("seed",Math.floor(Math.random()*MAX_SEED_NUM)):r("seed",(null==(d=t.value.value)?void0:d.last_seed)||0))}));consts=api.interrupt;api.interrupt=function(){!i.value&&app$1.runningNodeId||(l(JSON.stringify({result:-1,prompt:"",select:"now"}),!0),i.value=!1),s.apply(this,arguments)}}));constl=(e,s)=>{varo,a,n,l,d,c,u,p,A;if(!i.value&&!s)return;constg=newFormData,h=null==(o=t.value)?void0:o.node,m=-1!==(null==(a=t.value)?void0:a.node.id).toString().indexOf(":")?(null==(n=t.value)?void0:n.node.id).toString().split(":")[0]:null==(l=t.value)?void0:l.node.id,f=(null==(d=getWidgetByName(h,"prompt"))?void0:d.value)||"";lety=null==(c=t.value.value)?void0:c.select,v=(null==(u=t.value.value)?void0:u.last_seed)||0,_=(null==(p=t.value.value)?void0:p.seed)||0,b=(null==(A=t.value.value)?void0:A.unlock)||!1;g.append("message",JSON.stringify({result:e,prompt:f,select:y,last_seed:v,seed:_,unlock:b})),g.append("id",m),i.value=!1,api.fetchApi("/easyuse/message_callback",{method:"POST",body:g}).then((e=>{r("select","now")}))},r=(e,i)=>{t.value.value||(t.value.value={}),t.value.value[e]=i};return(e,o)=>(openBlock(),createElementBlock("div",_hoisted_1$8,[createBaseVNode("div",_hoisted_2$4,[createVNode(unref(script),{disabled:!Boolean(i.value),label:unref($t)("Continue"),size:"small",style:{height:"20px","font-size":"12px","white-space":"nowrap",padding:"0 8px"},onClick:o[0]||(o[0]=e=>l(1))},null,8,["disabled","label"]),createVNode(unref(script),{disabled:!Boolean(i.value),label:unref($t)("Stop"),severity:"danger",size:"small",style:{height:"20px","font-size":"12px","white-space":"nowrap",padding:"0 8px"},onClick:o[1]||(o[1]=e=>l(-1))},null,8,["disabled","label"]),createVNode(unref(script$1),{class:"easyuse-prompt-await-select",modelValue:t.value.value.select,"onUpdate:modelValue":o[2]||(o[2]=e=>t.value.value.select=e),options:[{name:unref($t)("now"),value:"now"},{name:unref($t)("prev"),value:"prev"}],optionLabel:"name",optionValue:"value",size:"small",style:{flex:"1",height:"24px","line-height":"10px","min-width":"70px","max-width":"100px"}},null,8,["modelValue","options"])]),createBaseVNode("div",_hoisted_3$3,[withDirectives(createVNode(unref(script),{style:{"--p-button-sm-font-size":"11px"},size:"small",icon:t.value.value.unlock?"pi pi-unlock":"pi pi-lock",severity:t.value.value.unlock?"contrast":"warn",variant:"text",onClick:o[3]||(o[3]=e=>t.value.value.unlock=!t.value.value.unlock),rounded:""},null,8,["icon","severity"]),[[unref(Tooltip),{value:t.value.value.unlock?"随机种子":"锁定种子值",class:"jm-tooltip"},"top"]]),s.value?withDirectives((openBlock(),createBlock(unref(script),{key:0,size:"small",icon:"pi pi-pause-circle",severity:"info",variant:"outlined",onClick:n,rounded:""},null,512)),[[unref(Tooltip),{value:unref($t)("Stop Recording"),class:"jm-tooltip"},"top"]]):withDirectives((openBlock(),createBlock(unref(script),{key:1,size:"small",icon:"pi pi-microphone",severity:"contrast",variant:"text",onClick:a,rounded:""},null,512)),[[unref(Tooltip),{value:unref($t)("Voice input"),class:"jm-tooltip"},"top"]])])]))}},_hoisted_1$7={class:"easyuse-multiselect"},_sfc_main$7={__name:"multiSelectWidget",props:mergeModels(["widget"],{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){vart,i,s,o;consta=Object.keys(HUMAN_SEGMENTATION).reduce(((e,t)=>(Array.isArray(HUMAN_SEGMENTATION[t])?e[t]=HUMAN_SEGMENTATION[t].map(((e,t)=>({label:e,value:t}))):"object"==typeofHUMAN_SEGMENTATION[t]?e[t]=Object.entries(HUMAN_SEGMENTATION[t]).map((([e,t])=>({label:e,value:t}))):e[t]=[],e)),{}),n=useModel(e,"modelValue"),l=e.widget.inputSpec,r=(null==(t=l.multi_select)?void0:t.max_selected_labels)??3,d=l.optionLabel??"label",c=l.optionValue??"value",u=(null==(i=l.multi_select)?void0:i.placeholder)?$t(null==(s=l.multi_select)?void0:s.placeholder):$t("select items"),p=(null==(o=l.multi_select)?void0:o.chip)?"chip":"comma",A=ref(l.options??[]),g=e=>{e&&a[e]?A.value=a[e].map(((e,t)=>({label:$t(e.label),value:e.value}))):A.value=[]};returnonMounted((t=>{if("easy humanSegmentation"==e.widget.node.type){constt=getWidgetByName(e.widget.node,"method");g(t.value),t.callback=e=>{n.value=[],g(e)}}})),(e,t)=>(openBlock(),createElementBlock("div",_hoisted_1$7,[createVNode(unref(script$2),{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value=e),options:A.value,optionLabel:unref(d),optionValue:unref(c),appendTo:"self",filter:"",placeholder:unref(u),"max-selected-labels":unref(r),display:unref(p),class:"w-full easyuse-multiselect-container"},null,8,["modelValue","options","optionLabel","optionValue","placeholder","max-selected-labels","display"])]))}},_export_sfc=(e,t)=>{consti=e.__vccOpts||e;for(const[s,o]oft)i[s]=o;returni},_hoisted_1$6={class:"relative rounded-t-lg overflow-hidden select-none"},_hoisted_2$3={key:1,class:"w-full h-full flex items-center justify-center"},_sfc_main$6={__name:"baseThumbnail",props:{hoverZoom:{type:"number",default:4},isHovered:{type:Boolean,default:!1}},setup(e){constt=ref(!1),i=ref(null);returnonMounted((()=>{vare;Array.from((null==(e=i.value)?void0:e.getElementsByTagName("img"))??[]).forEach((e=>{useEventListener(e,"error",(()=>{t.value=!0}))}))})),(s,o)=>(openBlock(),createElementBlock("div",_hoisted_1$6,[t.value?(openBlock(),createElementBlock("div",_hoisted_2$3,o[0]||(o[0]=[createBaseVNode("i",{class:"pi pi-file text-4xl"},null,-1)]))):(openBlock(),createElementBlock("div",{key:0,ref_key:"contentRef",ref:i,class:"w-full h-full transform-gpu transition-transform duration-1000 ease-out",style:normalizeStyle(e.isHovered?{transform:`scale(${1+e.hoverZoom/100})`}:void0)},[renderSlot(s.$slots,"default",{},void0,!0)],4))]))}},BaseThumbnail=_export_sfc(_sfc_main$6,[["__scopeId","data-v-604a4248"]]),_hoisted_1$5=["src","alt"],_sfc_main$5={__name:"lazyImage",props:{src:{type:String,required:!0},alt:{type:String,default:""},imageClass:{type:[String,Array,Object],default:""},imageStyle:{type:[String,Object],default:()=>({})},placeholderClass:{type:[String,Array,Object],default:""},errorClass:{type:[String,Array,Object],default:""},rootMargin:{type:String,default:"50px"},threshold:{type:Number,default:.1},immediate:{type:Boolean,default:!1}},emits:["load","error","visible"],setup(e,{emit:t}){consti=e,s=t,o=ref(null),a=ref(i.immediate),n=ref(!1),l=ref(!1),r=computed((()=>i.src));watch((()=>i.src),(()=>{n.value=!1,l.value=!1,i.immediate||(a.value=!1)}),{immediate:!0});const{stop:d}=useIntersectionObserver(o,(([e])=>{(null==e?void0:e.isIntersecting)&&!a.value&&(a.value=!0,s("visible"),d())}),{rootMargin:i.rootMargin,threshold:i.threshold}),c=e=>{n.value=!0,l.value=!1,s("load",e)},u=e=>{l.value=!0,n.value=!1,s("error",e)};return(t,i)=>(openBlock(),createElementBlock("div",{ref_key:"containerRef",ref:o,class:"lazy-image-container"},[l.value?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["lazy-image-error","w-full h-full flex items-center justify-center bg-surface-100 dark:bg-surface-800",e.errorClass])},[renderSlot(t.$slots,"error",{},(()=>[i[0]||(i[0]=createBaseVNode("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]),!0)],2)):a.value&&r.value?(openBlock(),createElementBlock("img",{key:1,src:r.value,alt:e.alt,class:normalizeClass(e.imageClass),style:normalizeStyle(e.imageStyle),draggable:"false",onLoad:c,onError:u},null,46,_hoisted_1$5)):a.value?createCommentVNode("",!0):(openBlock(),createElementBlock("div",{key:2,class:normalizeClass(["lazy-image-placeholder","w-full h-full flex items-center justify-center bg-surface-100 dark:bg-surface-800",e.placeholderClass])},[renderSlot(t.$slots,"placeholder",{},(()=>[i[1]||(i[1]=createBaseVNode("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]),!0)],2))],512))}},LazyImage=_export_sfc(_sfc_main$5,[["__scopeId","data-v-4bfc03bf"]]),_hoisted_1$4={class:"overflow-hidden w-full h-full flex items-center justify-center"},_sfc_main$4={__name:"defaultThumbnail",props:{src:{type:String,required:!0},alt:{type:String,required:!0},hoverZoom:{type:Number,required:!0},isHovered:{type:Boolean,default:!1},isVideo:{type:Boolean,default:!1},rootMargin:{type:String,default:"50px"},threshold:{type:Number,default:.1},immediate:{type:Boolean,default:!1}},emits:["load","error","visible"],setup(e,{emit:t}){consti=e,{src:s,isVideo:o}=i;returno??(null==s||s.toLowerCase().endsWith(".webp")),(t,i)=>(openBlock(),createBlock(BaseThumbnail,{"hover-zoom":e.hoverZoom,"is-hovered":e.isHovered},{default:withCtx((()=>[createBaseVNode("div",_hoisted_1$4,[createVNode(LazyImage,{src:unref(s),"image-class":["transform-gpu transition-transform duration-300 ease-out","w-full h-full object-cover"],"image-style":e.isHovered?{transform:`scale(${1+e.hoverZoom/100})`}:void0,"root-margin":e.rootMargin,threshold:e.threshold,immediate:e.immediate,onLoad:i[0]||(i[0]=e=>t.$emit("load",e)),onError:i[1]||(i[1]=e=>t.$emit("error",e)),onVisible:i[2]||(i[2]=e=>t.$emit("visible",e))},{placeholder:withCtx((()=>[renderSlot(t.$slots,"placeholder",{},(()=>[i[3]||(i[3]=createBaseVNode("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:withCtx((()=>[renderSlot(t.$slots,"error",{},(()=>[i[4]||(i[4]=createBaseVNode("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]))])),_:3},8,["src","image-style","root-margin","threshold","immediate"])])])),_:3},8,["hover-zoom","is-hovered"]))}},_hoisted_1$3={class:"overflow-hidden w-full h-full flex items-center justify-center relative"},SLIDER_START_POSITION=50,_sfc_main$3={__name:"compareSliderThumbnail",props:{baseImageSrc:{type:String,required:!0},overlayImageSrc:{type:String,required:!0},alt:{type:String,required:!0},isHovered:{type:Boolean,default:!1},isVideo:{type:Boolean,default:!1},rootMargin:{type:String,default:"50px"},threshold:{type:Number,default:.1},immediate:{type:Boolean,default:!1}},emits:["load","error","visible"],setup(e,{emit:t}){vari,s;consto=e;o.isVideo||(null==(i=o.baseImageSrc)?void0:i.toLowerCase().endsWith(".webp"))||null==(s=o.overlayImageSrc)||s.toLowerCase().endsWith(".webp");consta=ref(SLIDER_START_POSITION),n=ref(null),{elementX:l,elementWidth:r,isOutside:d}=useMouseInElement(n);returnwatch([()=>o.isHovered,l,r,d],(([e,t,i,s])=>{e&&(s||(a.value=t/i*100))})),(t,i)=>(openBlock(),createBlock(BaseThumbnail,{"is-hovered":e.isHovered},{default:withCtx((()=>[createBaseVNode("div",_hoisted_1$3,[createVNode(LazyImage,{src:e.baseImageSrc,"image-class":["transform-gpu transition-transform duration-300 ease-out","w-full h-full object-cover block"],"root-margin":e.rootMargin,threshold:e.threshold,immediate:e.immediate,onLoad:i[0]||(i[0]=e=>t.$emit("load",e)),onError:i[1]||(i[1]=e=>t.$emit("error",e)),onVisible:i[2]||(i[2]=e=>t.$emit("visible",e))},{placeholder:withCtx((()=>[renderSlot(t.$slots,"placeholder",{},(()=>[i[3]||(i[3]=createBaseVNode("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:withCtx((()=>[renderSlot(t.$slots,"error",{},(()=>[i[4]||(i[4]=createBaseVNode("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]))])),_:3},8,["src","root-margin","threshold","immediate"]),createBaseVNode("div",{ref_key:"containerRef",ref:n,class:"absolute inset-0"},[createVNode(LazyImage,{src:e.overlayImageSrc,"image-class":["transform-gpu transition-transform duration-300 ease-out","w-full h-full object-cover block"],"image-style":{clipPath:`inset(0 ${100-a.value}% 0 0)`},"root-margin":e.rootMargin,threshold:e.threshold,immediate:e.immediate},{placeholder:withCtx((()=>[renderSlot(t.$slots,"placeholder",{},(()=>[i[5]||(i[5]=createBaseVNode("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:withCtx((()=>[renderSlot(t.$slots,"error",{},(()=>[i[6]||(i[6]=createBaseVNode("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]))])),_:3},8,["src","image-style","root-margin","threshold","immediate"]),createBaseVNode("div",{class:"absolute inset-y-0 bg-white/30 backdrop-blur-sm z-10 pointer-events-none",style:normalizeStyle({left:`${a.value}%`,width:"1px"})},null,4)],512)])])),_:3},8,["is-hovered"]))}},_hoisted_1$2={class:"selector-card-wrapper"},_hoisted_2$2={class:"card-image-container"},_hoisted_3$2={key:2,class:"selection-badge"},_hoisted_4$2={class:"card-content"},_hoisted_5$1={class:"card-title"},_sfc_main$2={__name:"selectorCard",props:{item:{type:Object,required:!0},uniqueKey:{type:String,default:"id"},selectable:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},showDescription:{type:Boolean,default:!0},showMeta:{type:Boolean,default:!1},showActions:{type:Boolean,default:!1},actions:{type:Array,default:()=>[]},itemFields:{type:Object,default:()=>({id:"id",title:"title",description:"description",image:"image",meta:"meta"})},locale:{type:String,default:"en"}},emits:["select","action","item-hover","item-leave"],setup(e,{emit:t}){consti=e,s=t,o=ref(null),a=useElementHover(o),n=()=>{i.selectable&&s("select",i.item)},l=()=>{s("item-hover",i.item)},r=()=>{s("item-leave",i.item)};return(t,i)=>(openBlock(),createElementBlock("div",_hoisted_1$2,[createBaseVNode("div",{ref_key:"cardRef",ref:o,class:normalizeClass(["card-item",{selected:e.isSelected,clickable:e.selectable}]),onClick:n,onMouseenter:l,onMouseleave:r},[createBaseVNode("div",_hoisted_2$2,["compareSlider"===e.item.thumbnailVariant?(openBlock(),createBlock(_sfc_main$3,{key:0,"base-image-src":e.item.thumbnail[0],"overlay-image-src":e.item.thumbnail[1],alt:t.title,"is-hovered":unref(a),"is-video":"video"===e.item.mediaType||"webp"===e.item.mediaSubtype,class:"card-image"},null,8,["base-image-src","overlay-image-src","alt","is-hovered","is-video"])):(openBlock(),createBlock(_sfc_main$4,{key:1,src:e.item.thumbnail||"",alt:"zh"==e.locale?e.item.name_cn:e.item.name,"hover-zoom":4,"is-hovered":!1,class:"card-image"},null,8,["src","alt"])),e.selectable&&e.isSelected?(openBlock(),createElementBlock("div",_hoisted_3$2,i[0]||(i[0]=[createBaseVNode("i",{class:"pi pi-check text-white"},null,-1)]))):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_4$2,[createBaseVNode("div",_hoisted_5$1,toDisplayString("zh"==e.locale?e.item.name_cn:e.item.name),1)])],34)]))}},SelectorCard=_export_sfc(_sfc_main$2,[["__scopeId","data-v-88af28b0"]]),_hoisted_1$1={class:"list-item"},_hoisted_2$1=["name","checked"],_hoisted_3$1={class:"list-item-content"},_hoisted_4$1={class:"list-title"},_sfc_main$1={__name:"selectorList",props:{item:{type:Object,required:!0},uniqueKey:{type:String,default:"id"},selectable:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},showDescription:{type:Boolean,default:!0},showActions:{type:Boolean,default:!1},actions:{type:Array,default:()=>[]},itemFields:{type:Object,default:()=>({id:"id",title:"title",description:"description"})},locale:{type:String,default:"en"}},emits:["select","action","item-hover","item-leave"],setup(e,{emit:t}){consti=e,s=t,o=()=>{i.selectable&&s("select",i.item)},a=()=>{s("item-hover",i.item)},n=()=>{s("item-leave",i.item)};return(t,i)=>(openBlock(),createElementBlock("div",_hoisted_1$1,[createBaseVNode("span",{class:normalizeClass(["list-item__tag",{selected:e.isSelected}]),onClick:o,onMouseenter:a,onMouseleave:n},[e.selectable?(openBlock(),createElementBlock("input",{key:0,type:"checkbox",name:e.item.name,checked:e.isSelected,onClick:i[0]||(i[0]=withModifiers((()=>{}),["stop"]))},null,8,_hoisted_2$1)):createCommentVNode("",!0),createBaseVNode("span",_hoisted_3$1,[createBaseVNode("div",_hoisted_4$1,toDisplayString("zh"==e.locale?e.item.name_cn:e.item.name),1)])],34)]))}},SelectorList=_export_sfc(_sfc_main$1,[["__scopeId","data-v-c93b1734"]]),useGraphStore=defineStore("graphStore",{state:e=>({selectors:[],selectors_styles:{},seg_selectors:[],slider_controls:[]}),actions:{setSelectors(e){this.selectors=cloneDeep(e)},setStyles(e,t){this.selectors_styles[e]||(this.selectors_styles[e]=t)},setSegSelectors(e){this.seg_selectors=cloneDeep(e)},setSliderControls(e){this.slider_controls=cloneDeep(e)}}}),_hoisted_1={class:"easyuse-styles-selector"},_hoisted_2={class:"easyuse-styles-selector-header flex justify-between gap-2"},_hoisted_3={class:"flex align-center gap-1"},_hoisted_4={class:"flex-1"},_hoisted_5={key:0,class:"grid-container gap-2"},_hoisted_6={key:1,class:"list-container"},_hoisted_7={key:0,class:"easyuse-styles-selector-previewer"},_hoisted_8={class:"easyuse-styles-selector-previewer__text"},_hoisted_9=["src"],_hoisted_10={class:"title"},_hoisted_11={class:"easyuse-styles-selector-previewer__prompt"},_hoisted_12={key:0},_hoisted_13={class:"comfyui-easyuse-success"},_hoisted_14={key:1},_hoisted_15={class:"comfyui-easyuse-error"},_sfc_main={__name:"stylesSelector",props:mergeModels(["widget"],{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){constt=useGraphStore(),{selectors_styles:i}=storeToRefs(t),s=ref(""),o=useModel(e,"modelValue");e.widget.inputSpec;consta=computed((e=>getSetting("Comfy.Locale")||"en")),n=ref(getSetting("EasyUse.StylesSelector.DisplayType")||"Gird"),l=ref([]),r=ref("");watch((e=>n.value),(e=>{setSetting("EasyUse.StylesSelector.DisplayType",e)}));constd=computed((()=>{if(!r.value.trim())returnl.value;conste=o.value||[],t=r.value.toLowerCase(),i=[],s=[];returnl.value.forEach((o=>{if(e.includes(o.name))i.push(o);else{conste="zh"===a.value&&o.name_cn?o.name_cn:o.name,i=o.prompt||"",n=o.negative_prompt||"";(e.toLowerCase().includes(t)||i.toLowerCase().includes(t)||n.toLowerCase().includes(t))&&s.push(o)}})),[...i,...s]})),c=reactive({name:"",positive:"",negative:"",src:""}),u=asynce=>{if(i.value[e])return!0;consts=awaitapi.fetchApi(`/easyuse/prompt/styles?name=${e}`);if(200===s.status){leti=(awaits.json()).map(((e,t)=>(e.index=t,e)));returnawaitt.setStyles(e,i),!0}returntoast.error($t("Get styles list Failed")),!1},p=e=>{vart,i;c.name="zh"==a.value&&e.name_cn?e.name_cn:e.name,c.src=e.thumbnailVariant&&"default"!=e.thumbnailVariant?(null==(t=e.thumbnail)?void0:t[1])||(null==(i=e.thumbnail)?void0:i[0]):e.thumbnail,c.positive=e.prompt,c.negative=e.negative_prompt},A=()=>{c.name="",c.src="",c.positive="",c.negative=""},g=e=>{constt=o.value||[],a=cloneDeep(i.value[s.value]);l.value=[...a.sort(((e,t)=>e.index-t.index)).sort(((e,i)=>t.includes(i.name)-t.includes(e.name)))]},h=e=>(o.value||[]).includes(e.name),m=e=>{lett=[...o.value||[]];consti=e.name,s=t.findIndex((e=>e===i));s>-1?t.splice(s,1):t.push(i),o.value=t},f=()=>{o.value=[]};returnonMounted((t=>{consti=getWidgetByName(e.widget.node,"styles");leto=i.value;s.value=o,u(o).then((e=>e&&g())),i.callback=e=>{s.value=e,f(),u(e).then((e=>e&&g()))}})),(t,i)=>(openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createBaseVNode("div",_hoisted_3,[withDirectives(createVNode(unref(script),{icon:"pi pi-trash",severity:"secondary",outlined:"",size:"small",onClick:f},null,512),[[unref(Tooltip),unref($t)("Reset")]])]),createBaseVNode("div",_hoisted_4,[createVNode(unref(script$5),null,{default:withCtx((()=>[createVNode(unref(script$3),{class:"pi pi-search"}),createVNode(unref(script$4),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=e=>r.value=e),placeholder:unref($t)("Search styles..."),class:"w-full"},null,8,["modelValue","placeholder"])])),_:1})]),createVNode(unref(script$6),{modelValue:n.value,"onUpdate:modelValue":i[1]||(i[1]=e=>n.value=e),options:["Gird","List"],"allow-empty":!1},{option:withCtx((({option:e})=>[createBaseVNode("i",{class:normalizeClass(["List"===e?"pi pi-bars":"pi pi-table"])},null,2)])),_:1},8,["modelValue"])]),createBaseVNode("div",{class:"easyuse-styles-selector-content",onMouseleave:i[2]||(i[2]=t=>g(e.widget.node.name))},["Gird"===n.value?(openBlock(),createElementBlock("div",_hoisted_5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(d.value,((e,t)=>(openBlock(),createBlock(SelectorCard,{key:`${e.name}-${t}`,item:e,"unique-key":"name",locale:a.value,selectable:!0,"is-selected":h(e),"show-description":!0,"preview-enabled":!0,onSelect:m,onItemHover:p,onItemLeave:A},null,8,["item","locale","is-selected"])))),128))])):(openBlock(),createElementBlock("div",_hoisted_6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(d.value,((e,t)=>(openBlock(),createBlock(SelectorList,{key:`${e.name}-${t}`,item:e,"unique-key":"name",locale:a.value,selectable:!0,"is-selected":h(e),"show-description":!0,onSelect:m,onItemHover:p,onItemLeave:A},null,8,["item","locale","is-selected"])))),128))]))],32),(null==c?void0:c.positive)||(null==c?void0:c.negative)?(openBlock(),createElementBlock("div",_hoisted_7,[createBaseVNode("div",_hoisted_8,[createBaseVNode("img",{src:c.src,alt:"",style:{width:"100%",height:"auto","object-fit":"contain","border-radius":"6px"}},null,8,_hoisted_9),createBaseVNode("span",_hoisted_10,toDisplayString(c.name),1),createBaseVNode("div",_hoisted_11,[c.positive?(openBlock(),createElementBlock("h6",_hoisted_12,[createBaseVNode("span",_hoisted_13,toDisplayString(unref($t)("Positive"))+":",1),createBaseVNode("span",null,toDisplayString(c.positive),1)])):createCommentVNode("",!0),c.negative?(openBlock(),createElementBlock("h6",_hoisted_14,[createBaseVNode("span",_hoisted_15,toDisplayString(unref($t)("Negative"))+":",1),createBaseVNode("span",null,toDisplayString(c.negative),1)])):createCommentVNode("",!0)])])])):createCommentVNode("",!0)]))}};app$1.registerExtension({name:"Comfy.EasyUse.CustomWidget",getCustomWidgets:e=>({EASY_PROMPT_AWAIT_BAR:(e,t,i,s)=>{consto=ref({select:"now",unlock:!0,last_seed:0,seed:0}),a=newComponentWidgetImpl({node:e,name:t,component:_sfc_main$8,inputSpec:{type:"custom",name:t},options:{getValue:()=>o.value,setValue:e=>{e&&(o.value=e)}}});returne.addCustomWidget(a),e.onRemoved=useChainCallback(e.onRemoved,(()=>{vare;null==(e=a.onRemove)||e.call(a)})),e.onResize=useChainCallback(e.onResize,(()=>{vart,i;null==(t=a.options.beforeResize)||t.call(a,e),null==(i=a.options.afterResize)||i.call(a,e)})),useDomWidgetStore().registerWidget(a),a},EASY_COMBO:(e,t,i,s)=>{consto=ref([]),a={type:"custom",name:t,options:null==i?void0:i[1].options,multi_select:null==i?void0:i[1].multi_select},n=!!["obsidian","obsidian_dark","milk_white"].includes(getSetting("Comfy.ColorPalette"))?22:26,l=newComponentWidgetImpl({node:e,name:t,component:_sfc_main$7,inputSpec:a,options:{margin:0,getMinHeight:()=>n,getMaxHeight:()=>n,getValue:()=>o.value,setValue:e=>{e&&(Array.isArray(e)?o.value=e:o.value=e.split(",").map((e=>parseInt(e))))}}});returne.addCustomWidget(l),e.onRemoved=useChainCallback(e.onRemoved,(()=>{vare;null==(e=l.onRemove)||e.call(l)})),e.onResize=useChainCallback(e.onResize,(()=>{vart,i;null==(t=l.options.beforeResize)||t.call(l,e),null==(i=l.options.afterResize)||i.call(l,e)})),useDomWidgetStore().registerWidget(l),l},EASY_PROMPT_STYLES:(e,t,i,s)=>{consto=ref([]),a=newComponentWidgetImpl({node:e,name:t,component:_sfc_main,inputSpec:{type:"custom",name:t},options:{margin:10,getMinHeight:()=>180,getMaxHeight:()=>e.size[1]-75,getValue:()=>o.value,setValue:e=>{e&&(Array.isArray(e)?o.value=e:o.value=e.split(","))}}});returne.addCustomWidget(a),e.onRemoved=useChainCallback(e.onRemoved,(()=>{vare;null==(e=a.onRemove)||e.call(a)})),e.onResize=useChainCallback(e.onResize,(()=>{vart,i;null==(t=a.options.beforeResize)||t.call(a,e),null==(i=a.options.afterResize)||i.call(a,e)})),useDomWidgetStore().registerWidget(a),a}})});export{$tas$,NODE_MODEasN,_export_sfcas_,app$1asa,useNodesStoreasb,getSettingasc,cleanVRAMasd,isComponentWidgetase,useDomWidgetStoreasf,getWidgetByNameasg,useChainCallbackash,isDOMWidgetasi,jumpToNodeIdasj,NODES_MAP_IDask,apiasl,getSettingsLookupasm,sleepass,toastast,useGraphStoreasu};