diff --git a/ComfyUI-Easy-Use-Frontend b/ComfyUI-Easy-Use-Frontend index 9e34002..16e70be 160000 --- a/ComfyUI-Easy-Use-Frontend +++ b/ComfyUI-Easy-Use-Frontend @@ -1 +1 @@ -Subproject commit 9e34002f61636df72ce6237350ac34fe090b2cd1 +Subproject commit 16e70bec9043f25fc845c04642208f3c39c2ee49 diff --git a/web_version/v2/assets/extensions-DcWKQGos.js b/web_version/v2/assets/extensions-BcsTHXcg.js similarity index 74% rename from web_version/v2/assets/extensions-DcWKQGos.js rename to web_version/v2/assets/extensions-BcsTHXcg.js index a51773c..d6f6157 100644 --- a/web_version/v2/assets/extensions-DcWKQGos.js +++ b/web_version/v2/assets/extensions-BcsTHXcg.js @@ -1 +1 @@ -var e,t,i,s,n,a,o,l,r,d,u,c,A,p,h,m,f=Object.defineProperty,g=e=>{throw TypeError(e)},v=(e,t,i)=>((e,t,i)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),y=(e,t,i)=>t.has(e)||g("Cannot "+i),w=(e,t,i)=>(y(e,t,"read from private field"),i?i.call(e):t.get(e)),b=(e,t,i)=>t.has(e)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),_=(e,t,i,s)=>(y(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i);import{d as S,h as x,s as L,a as k,T as E,b as N,c as C,e as I,f as T,g as O,i as M,j as D}from"./vendor-DrOEdrAG.js";import{c as R}from"./lodash-DkvwM0Z9.js";import{r as P,m as G,w as z,o as V,a as j,c as U,b as W,d as F,u as X,e as Z,f as H,g as q,h as Y,F as K,i as J,n as B,j as Q,v as $,t as ee,k as te,l as ie,p as se,q as ne,s as ae,x as oe,y as le,z as re,A as de,B as ue}from"./vue-DfGw76ex.js";import{u as ce,a as Ae,b as pe,c as he}from"./vueuse-Bf7Wy5dB.js";import{P as me}from"./primevue-keNb8gkp.js";let fe=(null==(t=null==(e=window.comfyAPI)?void 0:e.app)?void 0:t.app)||null,ge=(null==(s=null==(i=window.comfyAPI)?void 0:i.api)?void 0:s.api)||null,ve=(null==(a=null==(n=window.comfyAPI)?void 0:n.ui)?void 0:a.$el)||null,ye=(null==(l=null==(o=window.comfyAPI)?void 0:o.dialog)?void 0:l.ComfyDialog)||null,we=(null==(d=null==(r=window.comfyAPI)?void 0:r.widgets)?void 0:d.ComfyWidgets)||null,be=(null==(c=null==(u=window.comfyAPI)?void 0:u.utils)?void 0:c.applyTextReplacements)||null,_e=(null==(p=null==(A=window.comfyAPI)?void 0:A.groupNode)?void 0:p.GroupNodeConfig)||null;const Se=e=>{var t,i;return e?null==(i=null==(t=null==fe?void 0:fe.ui)?void 0:t.settings)?void 0:i.getSettingValue(e):null};function xe(e,t=null){try{let i=e?Se(e):null;return null==i&&(i=t?localStorage[t]:localStorage[e]||null),i}catch(i){return null}}function Le(e,t=e=>{}){var i;const s=null==(i=fe.ui.settings.settingsLookup)?void 0:i[e];s&&(s.onChange=e=>t(e))}async function ke(e,t,i=null){var s,n;if(!e)throw new Error("Invalid arguments");try{(null==(n=null==(s=null==fe?void 0:fe.ui)?void 0:s.settings)?void 0:n.setSettingValue)?fe.ui.settings.setSettingValue(e,t):await ge.storeSetting(e,t),i&&(localStorage[i]="object"==typeof t?JSON.stringify(t):t)}catch(a){}}const Ee={"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 'Grid', it will display as a Grid, 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:"上一步","Add New Tab":"添加新标签","Add Angle Prompt":"添加角度提示词","Invert Rotate Mode":"反转旋转",Hollow:"镂空展示",Reset:"重置","Angle Prompt":"角度词",Image:"图像",F:"前",B:"后",U:"顶",D:"底",L:"左",R:"右",Rotate:"旋转",Vertical:"垂直",Zoom:"缩放"},Ne=(e,t=!1)=>{switch(xe("Comfy.Locale")){case"zh-CN":case"zh":return Ee[e]||e;default:return e}};const Ce="comfyui-easyuse-",Ie="dark-theme",Te={PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd",FLOW_CONTROL:"#373780"},Oe=0x4000000000000,Me=["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"],De={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"]},Re={ALWAYS:0,NEVER:2,BYPASS:4},Pe="easyuse_nodes_map",Ge="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkq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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/9k=",ze="rgba(24,24,27,.9)",Ve={ColorPalette:{version:112,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:"#60a5fa",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:ze,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:ze,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:ze,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:ze,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:ze,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:ze,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:ze,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:ze,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:ze,groupcolor:"#444"}}};let je=JSON.parse(JSON.stringify(Ve));delete je.NODE_COLORS,je.ColorPalette.id="obsidian_dark",je.ColorPalette.name="Obsidian Dark",je.ColorPalette.colors.litegraph_base.BACKGROUND_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGlmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDEgNzkuMTQ2Mjg5OSwgMjAyMy8wNi8yNS0yMDowMTo1NSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8v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04OTg0LTA4NGE2MGE1ZTMzNSIgc3RFdnQ6d2hlbj0iMjAyMy0xMS0xNVQwMjowNDo1OSswMTowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDI1LjEgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpiMmM0YTYwOS1iZmE3LWE4NDAtYjhhZS05NzMxNmYzNWRiMjciIHN0RXZ0OndoZW49IjIwMjMtMTEtMTVUMDI6MDQ6NTkrMDE6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyNS4xIChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4OTe6GAAAAx0lEQVR42u3WMQoAIQxFwRzJys77X8vSLiRgITif7bYbgrwYc/mKXyBoY4VVBgsWLFiwYFmOlTv+9jfDOjHmr8u6eVkGCxYsWLBgmc5S8ApewXvgYRksWLBgKXidpeBdloL3wMOCBctgwVLwCl7BuyyDBQsWLFiwTGcpeAWv4D3wsAwWLFiwFLzOUvAuS8F74GHBgmWwYCl4Ba/gXZbBggULFixYprMUvIJX8B54WAYLFixYCl5nKXiXpeA98LBgwTJYsGC9tg1o8f4TTtqzNQAAAABJRU5ErkJggg==",je.ColorPalette.colors.litegraph_base.CLEAR_BACKGROUND_COLOR="#09090b";const Ue="#FFFFFF",We={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:Ue,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:Ue,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:Ue,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:Ue,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:Ue,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:Ue,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:Ue,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:Ue,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:Ue,groupcolor:"#444"}}},Fe={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 'Grid', it will display as a Grid, if set to 'List', it will display as a list",type:"combo",options:["Grid","List"],defaultValue:"Grid"},enableAddAnglePrompt:{id:"EasyUse.MultiAngle.AddAnglePrompt",name:"Add angle prompt in easy multiAngle",type:"boolean",defaultValue:!1},enableHollowMode:{id:"EasyUse.MultiAngle.HollowMode",name:"Enable hollow display mode in easy multiAngle",type:"boolean",defaultValue:!1},enableInvertRotate:{id:"EasyUse.MultiAngle.InvertRotate",name:"Invert rotate mode in easy multiAngle",tooltip:"Enable invert rotate mode in easy multiAngle to match the rotation direction of most 3D software",type:"boolean",defaultValue:!1}};function Xe(e=100,t){return new Promise((i=>{setTimeout((()=>{i(t)}),e)}))}function Ze(e,t){if(e="number"==typeof e?e:e instanceof Date?e.getTime():parseInt(e),isNaN(e))return null;let i=new Date(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()];let s={MM:1,dd:2,yyyy:3,hh:4,mm:5,ss:6};return t.replace(/([Mmdhs]|y{2})\1/g,(t=>e[s[t]]))}const He=/Mac|iPod|iPhone|iPad/.test(navigator.platform),qe=e=>He?e.replace(/Ctrl/g,"⌘").replace(/Alt/g,"⌥").replace(/Shift/g,"⇧"):e;const Ye=new class{constructor(){v(this,"element",ve(`div.${Ce}toast`)),v(this,"children",HTMLElement),v(this,"container",document.body),v(this,"info_icon",`mdi mdi-information ${Ce}theme`),v(this,"success_icon",`mdi mdi-check-circle ${Ce}success`),v(this,"error_icon",`mdi mdi-close-circle ${Ce}error`),v(this,"warn_icon",`mdi mdi-alert-circle ${Ce}warning`),v(this,"loading_icon","mdi mdi-rotate-right loading"),this.container.appendChild(this.element)}async show(e){let t=ve(`div.${Ce}toast-container`,[ve("div",[ve("span",[...e.icon?[ve("i",{className:e.icon})]:[],ve("span",e.content)])])]);t.setAttribute("toast-id",e.id),this.element.replaceChildren(t),this.container.appendChild(this.element),await Xe(64),t.style.marginTop=`-${t.offsetHeight}px`,await Xe(64),t.classList.add("show"),e.duration&&(await Xe(e.duration),this.hide(e.id))}async hide(e){const t=document.querySelector(`.${Ce}toast > [toast-id="${e}"]`);(null==t?void 0:t.classList.contains("show"))&&(t.classList.remove("show"),await Xe(750)),t&&t.remove()}async clearAllMessages(){let e=document.querySelector(`.${Ce}container`);e&&(e.innerHTML="")}async info(e,t=3e3,i=[]){this.show({id:"toast-info",icon:this.info_icon,content:e,duration:t})}async success(e,t=3e3){this.show({id:"toast-success",icon:this.success_icon,content:e,duration:t})}async error(e,t=3e3){this.show({id:"toast-error",icon:this.error_icon,content:e,duration:t})}async warn(e,t=3e3){this.show({id:"toast-warn",icon:this.warn_icon,content:e,duration:t})}async showLoading(e,t=0){this.show({id:"toast-loading",icon:this.loading_icon,content:e,duration:t})}async hideLoading(){this.hide("toast-loading")}},Ke=S("groups",{state:e=>({groups:[],nodes:[],isWatching:!1}),getters:{groups_nodes(){var e;let t=[],i=[];const s=e=>{var t;return{info:e,children:(null==(t=e.sub_groups)?void 0: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)?void 0:e.length)>0){const e=(e,t)=>e[0]>=t.x1&&e[0]<=t.x2&&e[1]>=t.y1&&e[1]<=t.y2,s=(t,i)=>{let s=null,n=-1;const a=(i,o)=>{i.bounds&&e(t.pos,i.bounds)&&(o>n&&(n=o,s=i),i.children.forEach((e=>a(e,o+1))))};return i.forEach((e=>a(e,0))),s};this.nodes.forEach((e=>{const n=s(e,t);n?(n.children||(n.children=[]),n.children.push(e)):i.push({info:e})}))}return[...t,...i]}},actions:{setGroups(e){let t=R(e.map((e=>new Object({id:e.id,pos:Array.isArray(e.pos)?[...e.pos]:e.pos,size:Array.isArray(e.size)?[...e.size]:e.size,title:e.title,pinned:e.pinned,show_nodes:e.show_nodes}))));t.forEach((e=>{e.sub_groups=[],t.forEach((t=>{t!==e&&t.pos[0]>e.pos[0]&&t.pos[0]e.pos[1]&&t.pos[1]{t=t.filter((t=>t!==e))}))})),this.groups="Manual drag&drop sorting"==xe("EasyUse.NodesMap.Sorting")?R(t):R(t.sort(((e,t)=>e.pos[0]-t.pos[0])).sort(((e,t)=>e.pos[1]-t.pos[1])))},setNodes(e){this.nodes=R(e.map((e=>new Object({id:e.id,pos:e.pos,size:e.size,type:e.type,is_edit:e.is_edit,title:e.title,mode:e.mode}))))},update(){var e,t,i;(((null==(e=fe.extensionManager)?void 0:e.activeSidebarTab)||(null==(i=null==(t=fe.extensionManager.sidebarTab)?void 0:t.activeSidebarTab)?void 0:i.id))===Pe||this.isWatching)&&setTimeout((e=>{this.setGroups(fe.canvas.graph._groups),this.setNodes(fe.canvas.graph._nodes)}),1)},watchGraph(e=!1){e&&(this.isWatching=!0);let t=this;this.update();const i=fe.graph.onNodeAdded;fe.graph.onNodeAdded=function(e){t.update();const s=e.onRemoved;return e.onRemoved=function(){return t.update(),null==s?void 0:s.apply(this,arguments)},null==i?void 0:i.apply(this,arguments)},fe.canvas.onNodeMoved=function(e){t.update()};const s=LGraphCanvas.onNodeAlign;LGraphCanvas.onNodeAlign=function(e){return t.update(),null==s?void 0:s.apply(this,arguments)};const n=LGraphCanvas.onGroupAdd;LGraphCanvas.onGroupAdd=function(){return t.update(),null==n?void 0:n.apply(this,arguments)};const a=LGraphCanvas.onGroupAlign;LGraphCanvas.onGroupAlign=function(e){return t.update(),null==a?void 0:a.apply(this,arguments)};const o=LGraphCanvas.onMenuNodeRemove;LGraphCanvas.onMenuNodeRemove=function(e){return t.update(),null==o?void 0:o.apply(this,arguments)}},unwatchGraph(){this.isWatching=!1}}});const Je={BOX:1,ROUND:2,CIRCLE:3,CARD:4,ARROW:5,GRID:6,HollowCircle:7};function Be(e,t,i={}){const{shape:s=Je.BOX,round_radius:n=LiteGraph.ROUND_RADIUS,title_height:a=LiteGraph.NODE_TITLE_HEIGHT,title_mode:o=LiteGraph.NORMAL_TITLE,color:l=LiteGraph.NODE_BOX_OUTLINE_COLOR,padding:r=6,collapsed:d=!1,thickness:u=1}=i;o===LiteGraph.TRANSPARENT_TITLE&&(t[1]-=a,t[3]+=a);const{lineWidth:c,strokeStyle:A}=e;e.lineWidth=u,e.globalAlpha=.8,e.strokeStyle=l,e.beginPath();const[p,h,m,f]=t;switch(s){case Je.BOX:e.rect(p-r,h-r,m+2*r,f+2*r);break;case Je.ROUND:case Je.CARD:{const t=n+r,i=s===Je.CARD&&d||s===Je.ROUND?[t]:[t,2,t,2];e.roundRect(p-r,h-r,m+2*r,f+2*r,i);break}case Je.CIRCLE:{const t=p+m/2,i=h+f/2,s=Math.max(m,f)/2+r;e.arc(t,i,s,0,2*Math.PI);break}}e.stroke(),e.lineWidth=c,e.strokeStyle=A,e.globalAlpha=1}function Qe(e,t,i){var s,n;let a=0,o=null==(s=e[0])?void 0:s.naturalWidth,l=null==(n=e[0])?void 0:n.naturalHeight;const r=e.length;let d,u,c,A,p;for(let h=1;h<=r;h++){const e=Math.ceil(r/h),s=t/h,n=s/o,m=i/e/l,f=Math.min(n,m,1),g=o*f,v=l*f,y=g*v*r;y>a&&(a=y,d=g,u=v,c=h,A=e,p=h*((s-g)/2))}return{cellWidth:d,cellHeight:u,cols:c,rows:A,shiftX:p}}class $e{constructor(e,t){this.type="custom",this.name=e,this.options=t,this.value=""}draw(e,t,i,s,n){((e,t,i)=>{const s=fe.canvas,n=s.graph_mouse;!s.pointer_is_down&&t.pointerDown&&(n[0]===t.pointerDown.pos[0]&&n[1]===t.pointerDown.pos[1]&&(t.imageIndex=t.pointerDown.index),t.pointerDown=null);const a=t.imgs??[];let{imageIndex:o}=t;const l=a.length;1!==l||o||(t.imageIndex=o=0);const r=t.size[0],d=t.size[1]-i-15;if(null==o){let o,u,c,A,p;const h=(e=>{if(!e.length||1===e.length)return!0;const t=e[0].naturalWidth/e[0].naturalHeight;for(let i=1;iMath.max(e,t.naturalWidth,t.naturalHeight)),0),t=[];t.length=a.length,t[0]={naturalWidth:e,naturalHeight:e},({cellWidth:o,cellHeight:u,cols:p,shiftX:c}=Qe(t,r,d))}let m=!1;t.imageRects=[];for(let r=0;r{let r="#333",d="#fff",u=!1;return LiteGraph.isInsideRectangle(n[0],n[1],i+t.pos[0],a+t.pos[1],o,o)&&(s.canvas.style.cursor="pointer",s.pointer_is_down?(r="#1e90ff",u=!0):(r="#eee",d="#000")),e.fillStyle=r,e.beginPath(),e.roundRect(i,a,o,o,[4]),e.fill(),e.fillStyle=d,e.font="12px Arial",e.textAlign="center",e.fillText(l,i+15,a+20),u};if(!(l>1))return;const b=(t.imageIndex??0)+1;if(w(r-40,d+i-40,30,`${b}/${l}`)){const e=b>=l?0:b;t.pointerDown&&t.pointerDown.index===e||(t.pointerDown={index:e,pos:[...n]})}w(r-40,i+10,30,"x")&&(t.pointerDown&&null===t.pointerDown.index||(t.pointerDown={index:null,pos:[...n]}))})(e,t,s)}computeLayoutSize(e,t){return{minHeight:220,minWidth:1}}}const et=()=>(e,t)=>e.addCustomWidget(new $e(t.name,{serialize:!1}));function tt(e,t,i,s,n,a){return e>=i&&e=s&&t=i&&e=s&&t=e[0]&&this.y+this.height>=e[1]}containsRect(e){return this.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){return this.xe[0]&&this.y+this.height>e[1]}findContainingCorner(e,t,i){return this.isInTopLeftCorner(e,t,i)?"NW":this.isInTopRightCorner(e,t,i)?"NE":this.isInBottomLeftCorner(e,t,i)?"SW":this.isInBottomRightCorner(e,t,i)?"SE":void 0}isInTopLeftCorner(e,t,i){return tt(e,t,this.x,this.y,i,i)}isInTopRightCorner(e,t,i){return tt(e,t,this.right-i,this.y,i,i)}isInBottomLeftCorner(e,t,i){return tt(e,t,this.x,this.bottom-i,i,i)}isInBottomRightCorner(e,t,i){return tt(e,t,this.right-i,this.bottom-i,i,i)}isInTopEdge(e,t,i){return tt(e,t,this.x,this.y,this.width,i)}isInBottomEdge(e,t,i){return tt(e,t,this.x,this.bottom-i,this.width,i)}isInLeftEdge(e,t,i){return tt(e,t,this.x,this.y,i,this.height)}isInRightEdge(e,t,i){return tt(e,t,this.right-i,this.y,i,this.height)}getCentre(){return[this.centreX,this.centreY]}getArea(){return this.width*this.height}getPerimeter(){return 2*(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){const t=this[2];this[2]=e,this[0]+=t-e}setHeightBottomAnchored(e){const t=this[3];this[3]=e,this[1]+=t-e}toArray(){return this.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}}}h=new WeakMap,m=new WeakMap;const st=(e,...t)=>function(...i){try{t.forEach((e=>null==e?void 0:e.call(this,...i)))}catch(s){null==e||e.call(this,...i,s)}};let nt=null;const at=new Image;at.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='white' stroke-linecap='round' stroke-width='1.3' d='M9.18613 3.09999H6.81377M9.18613 12.9H7.55288c-3.08678 0-5.35171-2.99581-4.60305-6.08843l.3054-1.26158M14.7486 2.1721l-.5931 2.45c-.132.54533-.6065.92789-1.1508.92789h-2.2993c-.77173 0-1.33797-.74895-1.1508-1.5221l.5931-2.45c.132-.54533.6065-.9279 1.1508-.9279h2.2993c.7717 0 1.3379.74896 1.1508 1.52211Zm-8.3033 0-.59309 2.45c-.13201.54533-.60646.92789-1.15076.92789H2.4021c-.7717 0-1.33793-.74895-1.15077-1.5221l.59309-2.45c.13201-.54533.60647-.9279 1.15077-.9279h2.29935c.77169 0 1.33792.74896 1.15076 1.52211Zm8.3033 9.8-.5931 2.45c-.132.5453-.6065.9279-1.1508.9279h-2.2993c-.77173 0-1.33797-.749-1.1508-1.5221l.5931-2.45c.132-.5453.6065-.9279 1.1508-.9279h2.2993c.7717 0 1.3379.7489 1.1508 1.5221Z'/%3E%3C/svg%3E %3C/svg%3E";const ot=["custom_obsidian","custom_obsidian_dark","custom_milk_white","obsidian_dark","obsidian","milk_white"],lt={"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"};let rt=LGraphCanvas.node_colors,dt=null,ut=null,ct=null,At=new it;for(let Aa in Fe)pt=Fe[Aa],fe.ui.settings.settingsLookup[pt.id]||fe.ui.settings.addSetting(pt);var pt;function ht(e,t,i,s,n,a){var o,l,r;t.strokeStyle=s,t.fillStyle=n;const d=LiteGraph.NODE_TITLE_HEIGHT,{low_quality:u}=this,{collapsed:c}=e.flags,A=e.renderingShape,{title_mode:p}=e.constructor,h=p!=LiteGraph.TRANSPARENT_TITLE&&p!=LiteGraph.NO_TITLE,m=At;m.set(e.boundingRect),m[0]-=e.pos[0],m[1]-=e.pos[1];let f=t.globalAlpha;if(t.lineWidth=1,t.beginPath(),A==LiteGraph.BOX_SHAPE||u?t.fillRect(m[0],m[1],m[2],m[3]):A==LiteGraph.ROUND_SHAPE||A==LiteGraph.CARD_SHAPE?t.roundRect(m[0],m[1],m[2],m[3],A==LiteGraph.CARD_SHAPE?[this.round_radius,this.round_radius,0,0]:[this.round_radius]):A==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&&Be(t,m,{shape:A,title_mode:p,title_height:d,padding:12,color:LiteGraph.NODE_ERROR_COLOUR,collapsed:c,thickness:10}),!c&&h&&(t.shadowColor="transparent",t.fillStyle="rgba(0,0,0,0.2)",t.fillRect(0,-1,m[2],2)),t.shadowColor="transparent",e.onDrawBackground&&e.onDrawBackground(t,this,this.canvas,this.graph_mouse),h||p==LiteGraph.TRANSPARENT_TITLE){const s="dark"==function(e){let t=e.replace("#","");return i=parseInt(t.substring(0,2),16),s=parseInt(t.substring(2,4),16),n=parseInt(t.substring(4,6),16),.299*i+.587*s+.114*n>127.5?"light":"dark";var i,s,n}((null==e?void 0:e.color)||"#ffffff");e.drawTitleBarBackground(t,{scale:this.ds.scale,low_quality:u});let n=!1;LiteGraph.node_box_coloured_by_mode&&LiteGraph.NODE_MODES_COLORS[e.mode]&&(n=LiteGraph.NODE_MODES_COLORS[e.mode]),LiteGraph.node_box_coloured_when_on&&(n=e.action_triggered?"#FFF":e.execute_triggered?"#AAA":n);let l=10;if(e.onDrawTitleBox)e.onDrawTitleBox(t,d,i,this.ds.scale);else if([LiteGraph.ROUND_SHAPE,LiteGraph.CIRCLE_SHAPE,LiteGraph.CARD_SHAPE].includes(A))if(u&&(t.fillStyle="black",t.beginPath(),t.arc(.5*d,-.5*d,.5*l+1,0,2*Math.PI),t.fill()),e.subgraph&&!e.skip_subgraph_button)t.save(),t.fillStyle="#3b82f6",t.beginPath(),t.roundRect(6,-24.5,22,20,5),t.fill(),u||(t.translate(25,23),t.scale(-1.5,1.5),t.drawImage(at,0,-d,l,l)),t.restore();else{const i=s?"#ffffff":LiteGraph.NODE_SELECTED_TITLE_COLOR,o=s?"#eeeeee":e.boxcolor||n||LiteGraph.NODE_DEFAULT_BOXCOLOR;t.fillStyle=a?i:o,t.beginPath(),t.fillRect(10,0-1.05*l-1,1.1*l,.125*l),t.fillRect(10,0-1.45*l-1,1.1*l,.125*l),t.fillRect(10,0-1.85*l-1,1.1*l,.125*l)}else u&&(t.fillStyle="black",t.fillRect(.5*(d-l)-1,-.5*(d+l)-1,l+2,l+2)),t.fillStyle=e.renderingBoxColor,t.fillRect(.5*(d-l),-.5*(d+l),l,l);if(t.globalAlpha=f,e.onDrawTitleText&&e.onDrawTitleText(t,d,i,this.ds.scale,this.title_text_font,a),!u){t.font=this.title_text_font;const i=e.getTitle()??`❌ ${e.type}`,n=String(i)+(e.pinned?"📌":"");n&&(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(n),t.fillText(n.substr(0,20),d,LiteGraph.NODE_TITLE_TEXT_Y-d),t.textAlign="left"):(t.textAlign="left",t.fillText(n,d,LiteGraph.NODE_TITLE_TEXT_Y-d)))}null==(o=e.onDrawTitle)||o.call(e,t)}if(null==e?void 0:e.strokeStyles){for(const i of Object.values(e.strokeStyles)){const s=i.call(e);s&&Be(t,m,{shape:A,title_height:d,title_mode:p,collapsed:c,...s})}null==e||e.drawProgressBar(t)}else if(a){null==(l=e.onBounding)||l.call(e,m),p==LiteGraph.TRANSPARENT_TITLE&&(m[1]-=d,m[3]+=d),t.lineWidth=2,t.globalAlpha=.8,t.beginPath();let n=0,a=0,o=1;A==LiteGraph.BOX_SHAPE?t.rect(n+m[0],n+m[1],a+m[2],a+m[3]):A==LiteGraph.ROUND_SHAPE||A==LiteGraph.CARD_SHAPE&&e.flags.collapsed?t.roundRect(n+m[0],n+m[1],a+m[2],a+m[3],[this.round_radius*o]):A==LiteGraph.CARD_SHAPE?t.roundRect(n+m[0],n+m[1],a+m[2],a+m[3],[this.round_radius*o,o,this.round_radius*o,o]):A==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}null==(r=e.drawProgressBar)||r.call(e,t),e.execute_triggered>0&&e.execute_triggered--,e.action_triggered>0&&e.action_triggered--}function mt(e,t,i,s,n){return new LiteGraph.ContextMenu(LiteGraph.NODE_MODES,{event:i,callback:function(e){if(!n)return;var t=Object.values(LiteGraph.NODE_MODES).indexOf(e),i=function(e){t>=0&&LiteGraph.NODE_MODES[t]?e.changeMode(t):e.changeMode(LiteGraph.ALWAYS),nt||(nt=Ke()),nt.update()},s=LGraphCanvas.active_canvas;if(!s.selected_nodes||Object.keys(s.selected_nodes).length<=1)i(n);else for(var a in s.selected_nodes)i(s.selected_nodes[a])},parentMenu:s,node:n}),!1}function ft(e,t,i,s,n){if(!n)throw"no node for color";var a=[];for(var o in a.push({value:null,content:"No color"}),LGraphCanvas.node_colors){var l=LGraphCanvas.node_colors[o];e={value:o,content:""+o+""};a.push(e)}return new LiteGraph.ContextMenu(a,{event:i,callback:function(e){if(!n)return;var t=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):(delete e.color,delete e.bgcolor),nt||(nt=Ke()),nt.update()},s=LGraphCanvas.active_canvas;if(!s.selected_nodes||Object.keys(s.selected_nodes).length<=1)i(n);else for(var a in s.selected_nodes)i(s.selected_nodes[a]);n.setDirtyCanvas(!0,!0)},parentMenu:s,node:n}),!1}function gt(e,t,i,s,n){var a=e.property||"title",o=n[a],l=document.createElement("div");l.is_modified=!1,l.className="graphdialog",l.innerHTML="",l.close=function(){l.parentNode&&l.parentNode.removeChild(l)},l.querySelector(".name").innerText=a;var r=l.querySelector(".value");r&&(r.value=o,r.addEventListener("blur",(function(e){this.focus()})),r.addEventListener("keydown",(function(e){if(l.is_modified=!0,27==e.keyCode)l.close();else if(13==e.keyCode)h();else if(13!=e.keyCode&&"textarea"!=e.target.localName)return;e.preventDefault(),e.stopPropagation()})));var d=LGraphCanvas.active_canvas.canvas,u=d.getBoundingClientRect(),c=-20,A=-20;u&&(c-=u.left,A-=u.top),event?(l.style.left=event.clientX+c+"px",l.style.top=event.clientY+A+"px"):(l.style.left=.5*d.width+c+"px",l.style.top=.5*d.height+A+"px"),l.querySelector("button").addEventListener("click",h),d.parentNode.appendChild(l),r&&r.focus();var p=null;function h(){r&&function(t){"Number"==e.type?t=Number(t):"Boolean"==e.type&&(t=Boolean(t));n[a]=t,l.parentNode&&l.parentNode.removeChild(l);n.setDirtyCanvas(!0,!0),nt||(nt=Ke());nt.update()}(r.value)}l.addEventListener("mouseleave",(function(e){LiteGraph.dialog_close_on_mouse_leave&&!l.is_modified&&LiteGraph.dialog_close_on_mouse_leave&&(p=setTimeout(l.close,LiteGraph.dialog_close_on_mouse_leave_delay))})),l.addEventListener("mouseenter",(function(e){LiteGraph.dialog_close_on_mouse_leave&&p&&clearTimeout(p)}))}(e=>{try{fe.registerExtension(e)}catch(t){}})({name:"Comfy.EasyUse.UI",init(){var e,t;const i="Comfy.CustomColorPalettes",s="Comfy.Settings.Comfy.CustomColorPalettes";if(dt||(dt=xe(i,s)),ut||(ut=xe("Comfy.ColorPalette","Comfy.Settings.Comfy.ColorPalette")||"dark"),(!(null==(e=null==dt?void 0:dt.obsidian)?void 0:e.version)||dt.obsidian.version{(null==e?void 0:e.value)&&(null==e?void 0:e.oldValue)&&(await Xe(1),Object.assign(fe.canvas.default_connection_color_byType,Te),Object.assign(LGraphCanvas.link_type_colors,Te)),"custom_milk_white"==e.value&&document.body.classList.remove(Ie)})),setTimeout((e=>vt(xe("Comfy.UseNewMenu")||"Disabled")),1);const t=null==(e=fe.ui.settings.settingsLookup)?void 0:e["Comfy.UseNewMenu"];t&&(t.onChange=e=>vt(e)),ge.addEventListener("easyuse-toast",(e=>{const t=e.detail.content,i=e.detail.type,s=e.detail.duration;i?Ye.show({id:`toast-${i}`,icon:Ye[i+"_icon"],content:`${t}`,duration:s||3e3}):Ye.info(t,s)}))},async nodeCreated(e){if(lt.hasOwnProperty(e.comfyClass)){const t=lt[e.comfyClass],i=rt[t];if(!i)return;!e.bgcolor&&i.bgcolor&&(e.bgcolor=i.bgcolor),!e.color&&i.color&&(e.color=i.color)}}});const vt=e=>{var t;const i=(null==(t=document.getElementById("crystools-root"))?void 0:t.children)||null,s=xe("Comfy.Workflow.WorkflowTabsPosition",null);if((null==i?void 0:i.length)>0&&s)if(ct||(ct=document.getElementById("MonitorUI")),"Disabled"==e){document.getElementById("crystools-root").appendChild(ct)}else{let e=document.getElementById("crystools-root-easyuse");if(e)e.appendChild(ct);else{const e=document.getElementsByClassName("comfyui-menu-right");e.length>0&&e[0].before(ve("div",{id:"crystools-root-easyuse"},ct))}}};let yt={};const wt=(e,t)=>e.widgets.find((e=>e.name===t)),bt=(e,t,i=!1,s="")=>{var n;if(!t||((e,t,i)=>!!e.inputs&&e.inputs.some((e=>e.name===t&&e.link&&!i)))(e,t.name,i))return;yt[t.name]||(yt[t.name]={origType:t.type,origComputeSize:t.computeSize});const a=e.size;t.hidden=!i,t.type=i?yt[t.name].origType:"easyHidden"+s,t.computeSize=i?yt[t.name].origComputeSize:()=>[0,-4],null==(n=t.linkedWidgets)||n.forEach((s=>bt(e,s,":"+t.name,i)));const o=i?Math.max(e.computeSize()[1],a[1]):e.size[1];e.setSize([e.size[0],o])},_t=(e,t=0)=>{var i,s;if(e)return(null==(i=e.widgets)?void 0:i[t])?e.widgets[t].value:e.widgets_values?null==(s=e.widgets_values)?void 0:s[t]:void 0},St=e=>e.setSize([e.size[0],e.computeSize()[1]]),xt=(e,t)=>graph.getNodeById(e),Lt=e=>{var t;try{return Object.values(null==(t=null==graph?void 0:graph.list_of_graphcanvas[0])?void 0:t.selected_nodes)}catch(i){return[]}};function kt(e,t,i){return e+(s=i,(.5-.5*Math.cos(Math.PI*s))*(t-e));var s}const Et=(e,t=!0)=>{var i,s;const n=(null==(s=null==(i=e.graph)?void 0:i.list_of_graphcanvas)?void 0:s[0])||null;if(!n)return;const[a,o]=e.pos,[l,r]=e.size;(([e,t],i)=>{const s=i.ds,n=document.body.clientWidth,a=document.body.clientHeight,o=s.scale,l=.5*n/o-e,r=.5*a/o-t,d=Date.now()+250,u=s.offset[0],c=s.offset[1],A=()=>{const e=d-Date.now();if(!(Date.now(){const t=xt(e);t&&Et(t)},Ct=(e,t=(()=>graph.links??[])())=>t[e],It=e=>e.toLowerCase().replace(/_./g,(e=>e.replace("_","").toUpperCase())),Tt=e=>"easy getNode"===e.type,Ot=e=>"easy setNode"===e.type,Mt=e=>Tt(e)||Ot(e),Dt=(e=(()=>graph._nodes??[])())=>e.filter((e=>Mt(e)));let Rt={},Pt={};const Gt=(e,t,i=0)=>{e.widgets_values||(e.widgets_values=[]),e.widgets_values[i]=t,e.widgets[i].value=t},zt=e=>graph.add(e),Vt=e=>graph.remove(e),jt=(e,t=0)=>{var i,s;if("Reroute"!==e.type)return[e,t];const n=e,a=null==(s=null==(i=n.inputs)?void 0:i[0])?void 0:s.link;if(!a)return[n,t];const o=Ct(a);if(!o)return[n,t];const l=xt(o.origin_id);return l?(setTimeout((()=>{Vt(n)})),jt(l,o.origin_slot)):[n,t]},Ut=e=>{var t,i,s;if("Reroute"!==e.type)return e;const n=e,a=null==(i=null==(t=n.outputs)?void 0:t[0])?void 0:i.links;if(!a)return n;const o=a[0];if(!o)return n;const l=Ct(o);if(!l)return n;const r=xt(l.target_id);return r?(1===(null==(s=n.outputs[0].links)?void 0:s.length)&&setTimeout((()=>{Vt(n)})),Ut(r)):n},Wt=(e,t="width")=>{var i;const s=e[0],n="width"==t?0:1,a=null==(i=s.size)?void 0:i[n];a&&(e.forEach((e=>{e.size[n]=a})),LGraphCanvas.active_canvas.setDirty(!0,!0))},Ft=(e,t="horizontal")=>{if(e.length<3)return;const i="horizontal"===t?0:1;e.sort(((e,t)=>e.pos[i]-t.pos[i]));const s=Math.min(...e.map((e=>e.pos[i]))),n=(Math.max(...e.map((e=>e.pos[i]+e.size[i])))-s-e.reduce(((e,t)=>e+t.size[i]),0))/(e.length-1);let a=s;e.forEach((e=>{e.pos[i]=a,a+=e.size[i]+n})),LGraphCanvas.active_canvas.setDirty(!0,!0)},Xt="$$canvas-image-preview";const Zt="$$comfy_animation_preview";const Ht="video_upload",qt=(e,t)=>{if(!e)return!1;const i=(e=>{var t;return null==(t=e.constructor)?void 0:t.nodeData})(e);if(!(null==i?void 0:i.input))return!1;return(e=>{if(!e)return[];const{required:t,optional:i}=e,s=[];if(t)for(const n of Object.values(t))s.push(n);if(i)for(const n of Object.values(i))s.push(n);return s})(i.input).some((e=>{var i;return null==(i=null==e?void 0:e[1])?void 0:i[t]}))};const Yt=e=>null==e?void 0:e.id.toString(),Kt=e=>fe.nodeOutputs[Yt(e)],Jt=e=>fe.nodePreviewImages[Yt(e)];function Bt(e){var t;const i=Jt(e),s=Kt(e);if((null==i?void 0:i.length)&&!e.isOutputFinal)return i;if(!(null==(t=null==s?void 0:s.images)?void 0:t.length))return(null==i?void 0:i.length)?i:void 0;const n=fe.getRandParam(),a=(e=>e.animatedImages?"":fe.getPreviewFormatParam())(e);return s.images.map((e=>{const t=new URLSearchParams(e);return ge.apiURL(`/view?${t}${a}${n}`)}))}const Qt="video-preview",$t={playsInline:!0,controls:!0,loop:!0},ei=(e,t)=>{const{loadElement:i,onLoaded:s,onFailedLoading:n}=t,a=async(e,t=0)=>{const s=await Promise.race([i(e),(n=8192,new Promise((e=>setTimeout((()=>e(null)),n))))]);var n;return null===s&&t<1?a(e,t+1):s};return{showPreview:function(){var i;if(e.isLoading)return;const o=(null==(i=e.videos)?void 0:i.length)>0?e.videos.map((e=>{return t=e,ge.apiURL(`/view?filename=${encodeURIComponent(t.filename)}&type=${t.type}&subfolder=${t.subfolder}&rand=${Math.random()}`);var t})):Bt(e);(null==o?void 0:o.length)&&((null==t?void 0:t.block)&&(e.isLoading=!0),(async e=>Promise.all(e.map((e=>a(e)))))(o).then((e=>{const t=e.filter((e=>null!==e));t.length&&(null==s||s(t))})).catch((()=>{null==n||n()})).finally((()=>{e.isLoading=!1})))}}},ti=e=>{e.previewMediaType="image";return ei(e,{loadElement:e=>new Promise((t=>{const i=new Image;i.onload=()=>t(i),i.onerror=()=>t(null),i.src=e})),onLoaded:t=>{e.imageIndex=null,e.imgs=t},onFailedLoading:()=>{e.imgs=void 0}})},ii=e=>{e.previewMediaType="video";return ei(e,{loadElement:e=>new Promise((t=>{const i=document.createElement("video");Object.assign(i,$t),i.onloadeddata=()=>t(i),i.onerror=()=>t(null),i.src=e})),onLoaded:t=>{const i=t[0];var s,n;i&&(e.videoContainer||(e.imgs&&(e.imgs=void 0),e.videoContainer=(()=>{const e=document.createElement("div");return e.classList.add("comfy-img-preview"),e})(),e.videoContainer.style.pointerEvents="auto",s=e.videoContainer,(null==(n=e.widgets)?void 0:n.some((e=>e.name===Qt)))||e.addDOMWidget(Qt,"video",s,{hideOnZoom:!1,serialize:!1})),e.videoContainer.replaceChildren(i),e.imageOffset=64)},onFailedLoading:()=>{e.videoContainer=void 0}})};function si(e,t){var i;if(e.flags.collapsed)return;const{showCanvasImagePreview:s,removeCanvasImagePreview:n}=function(){const e=et();return{showCanvasImagePreview:function(t){var i;(null==(i=t.imgs)?void 0:i.length)&&t.widgets&&(t.widgets.find((e=>e.name===Xt))||e(t,{type:"IMAGE_PREVIEW",name:Xt}))},removeCanvasImagePreview:function(e){var t,i;if(!e.widgets)return;const s=e.widgets.findIndex((e=>e.name===Xt));s>-1&&(null==(i=(t=e.widgets[s]).onRemove)||i.call(t),e.widgets.splice(s,1))}}}(),{showVideoPreview:a,removeVideoPreview:o}={showVideoPreview:function(e){var t;(null==(t=e.video)?void 0:t.length)&&e.widgets&&e.widgets.findIndex((e=>e.name===Zt))},removeVideoPreview:function(e){var t,i;if(!e.widgets)return;const s=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))}},l=Kt(e),r=Jt(e),d=l&&(e.images!==l.images||e.videos!==l.videos),u=r&&e.preview!==r;if(u&&(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||u){e.animatedImages=null==l?void 0:l.animated;const t=e.animatedImages&&l.images.some((e=>{var t;return null==(t=e.filename)?void 0:t.includes("webp")})),i=e.animatedImages&&!t||!!(c=this)&&(!!c.videoContainer||!!c.widgets&&qt(c,Ht));d&&(null==l?void 0:l.videos)||i?ii(e).showPreview():ti(e).showPreview()}var c;e.id!=fe.runningNodeId&&!e.isTwiceRendered&&e.isOutputFinal&&(e.videos?ii(e.videos):ti(e).showPreview(),e.isTwiceRendered=!0),(null==(i=e.imgs)?void 0:i.length)&&(e.animatedImages||d&&(null==l?void 0:l.videos)?(n(e),a(e)):(o(e),s(e)))}const ni=["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"],ai=["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"],oi=["FACEID","FACEID PLUS - SD1.5 only","FACEID PLUS V2","FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"],li=["easy seed","easy latentNoisy","easy wildcards","easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingSdTurbo","easy preSamplingCascade","easy preSamplingDynamicCFG","easy preSamplingLayerDiffusion","easy fullkSampler","easy fullCascadeKSampler"],ri=["easy fullLoader","easy a1111Loader","easy comfyLoader","easy hyditLoader","easy pixArtLoader"],di=["easy fullkSampler","easy kSampler","easy kSamplerCustom","easy kSamplerTiled","easy kSamplerLayerDiffusion","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo","easy fullCascadeKSampler","easy cascadeKSampler"],ui=["easy imageSize","easy imageSizeBySide","easy imageSizeByLongerSide","easy imageSizeShow","easy imageRatio","easy imagePixelPerfect"],ci=["easy forLoopStart","easy forLoopEnd","easy whileLoopStart","easy whileLoopEnd"],Ai=["easy anythingIndexSwitch","easy imageIndexSwitch","easy textIndexSwitch","easy conditioningIndexSwitch"],pi=["easy anythingInversedSwitch"],hi=["easy loadImagesForLoop",...ci,...Ai,...pi],mi={"easy anythingInversedSwitch":"out","easy anythingIndexSwitch":"value","easy imageIndexSwitch":"image","easy textIndexSwitch":"text","easy conditioningIndexSwitch":"cond"};function fi(e,t){var i;const s=e.comfyClass;let n=t.value;switch(t.name){case"range_mode":bt(e,wt(e,"step"),"step"==n),bt(e,wt(e,"num_steps"),"num_steps"==n),St(e);break;case"text_combine_mode":bt(e,wt(e,"replace_text"),"replace"==n);break;case"lora_name":["lora_model_strength","lora_clip_strength"].map((t=>bt(e,wt(e,t),"None"!==n)));break;case"resolution":"自定义 x 自定义"===n&&(t.value="width x height (custom)"),["empty_latent_width","empty_latent_height","width","height"].map((t=>bt(e,wt(e,t),"width x height (custom)"===n)));break;case"ratio":["empty_latent_width","empty_latent_height"].map((t=>bt(e,wt(e,t),"custom"===n)));break;case"num_loras":var a=n+1,o=null==(i=wt(e,"mode"))?void 0:i.value;requestAnimationFrame((t=>{for(let i=0;ibt(e,wt(e,t),"simple"!==o)));for(let i=a;i<99;i++)["lora_"+i+"_name","lora_"+i+"_strength","lora_"+i+"_model_strength","lora_"+i+"_clip_strength"].map((t=>bt(e,wt(e,t),!1)));St(e)}));break;case"num_controlnet":a=n+1,o=wt(e,"mode").value;for(let t=0;tbt(e,wt(e,t),!0))),["start_percent_"+t,"end_percent_"+t].map((t=>bt(e,wt(e,t),"simple"!==o)));for(let t=a;t<21;t++)["controlnet_"+t,"controlnet_"+t+"_strength","scale_soft_weight_"+t,"start_percent_"+t,"end_percent_"+t].map((t=>bt(e,wt(e,t),!1)));St(e);break;case"mode":switch(null==e?void 0:e.comfyClass){case"easy loraStack":a=wt(e,"num_loras").value+1,o=n;for(let t=0;tbt(e,wt(e,t),"simple"!==o)));St(e);break;case"easy controlnetStack":a=wt(e,"num_controlnet").value+1,o=n;for(let t=0;tbt(e,wt(e,t),"simple"!==o)));St(e);break;case"easy icLightApply":o=n;["lighting","remove_bg"].map((t=>bt(e,wt(e,t),"Foreground"===o))),bt(e,wt(e,"source"),"Foreground"!==o),St(e)}break;case"toggle":t.type="toggle",t.options={on:"Enabled",off:"Disabled"};break;case"t5_type":["clip_name","padding"].map((t=>bt(e,wt(e,t),"sd3"==n))),["t5_name","device","dtype"].map((t=>bt(e,wt(e,t),"t5v11"==n))),St(e);break;case"preset":if("FLUX.1-dev"==n&&(t.value="REGULAR - FLUX and SD3.5 only (high strength)"),ai.includes(n)){let t=wt(e,"use_tiled");bt(e,wt(e,"lora_strength")),bt(e,wt(e,"provider"),!!["REGULAR - FLUX and SD3.5 only (high strength)"].includes(n)),bt(e,wt(e,"weight_faceidv2")),bt(e,wt(e,"weight_kolors")),bt(e,wt(e,"use_tiled"),!0),bt(e,wt(e,"sharpening"),t&&t.value)}else oi.includes(n)&&(bt(e,wt(e,"weight_faceidv2"),!!["FACEID PLUS V2","FACEID PLUS KOLORS"].includes(n)),bt(e,wt(e,"weight_kolors"),!!["FACEID PLUS KOLORS"].includes(t.value)),["FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"].includes(n)?bt(e,wt(e,"lora_strength"),!1):bt(e,wt(e,"lora_strength"),!0),bt(e,wt(e,"provider"),!0),bt(e,wt(e,"use_tiled")),bt(e,wt(e,"sharpening")));St(e);break;case"use_tiled":bt(e,wt(e,"sharpening"),!!n),St(e);break;case"num_embeds":a=n+1;for(let t=0;tbt(e,wt(e,t),!1)));break;case"brushnet_random":case"brushnet_segmentation":["dtype","scale","start_at","end_at"].map((t=>bt(e,wt(e,t),!0))),["fitting","function"].map((t=>bt(e,wt(e,t),!1)));break;case"powerpaint":["dtype","fitting","function","scale","start_at","end_at"].map((t=>bt(e,wt(e,t),!0)))}St(e);break;case"encode":bt(e,wt(e,"noise_mask"),!!["inpaint_model_conditioning","different_diffusion"].includes(n)),St(e);break;case"image_output":bt(e,wt(e,"link_id"),!!["Sender","Sender&Save"].includes(n)),bt(e,wt(e,"decode_vae_name"),!!["Hide","Hide&Save"].includes(n)),["save_prefix","output_path","embed_workflow","number_padding","overwrite_existing"].map((t=>bt(e,wt(e,t),!!["Save","Hide&Save","Sender&Save"].includes(n))));break;case"add_noise":var l=wt(e,"control_before_generate"),r=wt(e,"control_after_generate")||l;"disable"===n?(bt(e,wt(e,"seed")),r&&(r.last_value=r.value,r.value="fixed",bt(e,r))):("enable"===n&&(t.value="enable (CPU)"),bt(e,wt(e,"seed"),!0),r&&((null==r?void 0:r.last_value)&&(r.value=r.last_value),bt(e,r,!0))),St(e);break;case"guider":switch(n){case"Basic":case"IP2P+Basic":["cfg_negative"].map((t=>bt(e,wt(e,t))));break;case"CFG":case"IP2P+CFG":bt(e,wt(e,"cfg"),!0),bt(e,wt(e,"cfg_negative"));break;case"DualCFG":case"IP2P+DualCFG":["cfg","cfg_negative"].map((t=>bt(e,wt(e,t),!0)))}St(e);break;case"scheduler":"easy preSamplingCustom"==s&&(["karrasADV","exponentialADV","polyExponential"].includes(n)?(["sigma_max","sigma_min"].map((t=>bt(e,wt(e,t),!0))),["denoise","beta_d","beta_min","eps_s","coeff"].map((t=>bt(e,wt(e,t))),!1),bt(e,wt(e,"rho"),"exponentialADV"!=n)):"vp"==n?(["sigma_max","sigma_min","denoise","rho","coeff"].map((t=>bt(e,wt(e,t)))),["beta_d","beta_min","eps_s"].map((t=>bt(e,wt(e,t),!0)))):(["sigma_max","sigma_min","beta_d","beta_min","eps_s","rho"].map((t=>bt(e,wt(e,t)))),bt(e,wt(e,"coeff"),"gits"==n),bt(e,wt(e,"denoise"),!0)),St(e));break;case"conditioning_mode":["replace","concat","combine"].includes(n)?["average_strength","old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>bt(e,wt(e,t)))):"average"==n?(bt(e,wt(e,"average_strength"),!0),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>bt(e,wt(e,t),!1)))):"timestep"==n&&(["average_strength"].map((t=>bt(e,wt(e,t),!1))),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>bt(e,wt(e,t),!0))));break;case"rescale":wt(e,"rescale_after_model").value,bt(e,wt(e,"width"),"to Width/Height"===n),bt(e,wt(e,"height"),"to Width/Height"===n),bt(e,wt(e,"percent"),"by percentage"===n),bt(e,wt(e,"longer_side"),"to longer side - maintain aspect"===n),St(e);break;case"upscale_method":["factor","crop"].map((t=>bt(e,wt(e,t),"None"!==n)));break;case"target_parameter":switch(s){case"easy XYInputs: Steps":["first_step","last_step"].map((t=>bt(e,wt(e,t),"steps"==n))),["first_start_step","last_start_step"].map((t=>bt(e,wt(e,t),"start_at_step"==n))),["first_end_step","last_end_step"].map((t=>bt(e,wt(e,t),"end_at_step"==n)));break;case"easy XYInputs: Sampler/Scheduler":let t=wt(e,"input_count").value+1;for(let i=0;ibt(e,wt(e,t),"strength"==n))),["first_start_percent","last_start_percent"].map((t=>bt(e,wt(e,t),"start_percent"==n))),["first_end_percent","last_end_percent"].map((t=>bt(e,wt(e,t),"end_percent"==n))),["strength","start_percent","end_percent"].map((t=>bt(e,wt(e,t),n!=t))),St(e)}case"replace_count":a=n+1;for(let t=0;tbt(e,wt(e,t),!d)));for(let t=a;t<11;t++)["lora_name_"+t,"model_str_"+t,"clip_str_"+t].map((t=>bt(e,wt(e,t),!1)));St(e);break;case"ckpt_count":a=n+1;var u=-1!=wt(e,"input_mode").value.indexOf("ClipSkip"),c=-1!=wt(e,"input_mode").value.indexOf("VAE");for(let t=0;tbt(e,wt(e,t),!1)));St(e);break;case"input_count":a=n+1;var A=wt(e,"target_parameter").value;for(let t=0;tbt(e,wt(e,i),!!t)));["model_strength","clip_strength"].map((i=>bt(e,wt(e,i),!t)));break;case"easy XYInputs: Checkpoint":a=wt(e,"ckpt_count").value+1,u=-1!=wt(e,"input_mode").value.indexOf("ClipSkip"),c=-1!=wt(e,"input_mode").value.indexOf("VAE");for(let i=0;ie.name===t));if(-1!==e){for(let t=e;t"info"===e.name));if(-1!==t&&this.widgets[t]){this.widgets[t].value=e}}};e.prototype.onExecuted=function(e){null==r||r.apply(this,arguments);var i="";for(let t=0;t"prompt"==e.name));this.addWidget("button","get values from COMBO link","",(()=>{var t,s;const n=(null==(s=null==(t=this.outputs[1])?void 0:t.links)?void 0:s.length)>0?this.outputs[1].links[0]:null,a=i.graph._nodes.find((e=>{var t;return null==(t=e.inputs)?void 0:t.find((e=>e.link==n))}));if(n&&a){const t=a.inputs.find((e=>e.link==n)).widget.name,i=a.widgets.find((e=>e.name==t));let s=(null==i?void 0:i.options.values)||null;s&&(s=s.join("\n"),e.value=s)}else Ye.error(Ne("No COMBO link"),3e3)}),{serialize:!1})}),ri.includes(t.name)){let t=function(e){var t="";for(let i=0;ie.name===t+"_prompt")),s="comfy-multiline-input wildcard_"+t+"_"+this.id.toString();if(-1==i&&e){const i=document.createElement("textarea");i.className=s,i.placeholder="Wildcard Prompt ("+t+")";const n=this.addDOMWidget(t+"_prompt","customtext",i,{getValue:e=>i.value,setValue(e){i.value=e},serialize:!1});n.inputEl=i,n.inputEl.readOnly=!0,i.addEventListener("input",(()=>{var e;null==(e=n.callback)||e.call(n,n.value)})),n.value=e}else if(this.widgets[i])if(e){this.widgets[i].value=e}else{this.widgets.splice(i,1);const e=document.getElementsByClassName(s);e&&e[0]&&e[0].remove()}}};e.prototype.onExecuted=function(e){null==r||r.apply(this,arguments);const s=t(e.positive),n=t(e.negative);i.call(this,s,"positive"),i.call(this,n,"negative")}}if(["easy sv3dLoader"].includes(t.name)){let t=function(e,t,i){switch(e){case"azimuth":return i.readOnly=!0,i.style.opacity=.6,"0:(0.0,0.0)"+(t>1?`\n${t-1}:(360.0,0.0)`:"");case"elevation":return i.readOnly=!0,i.style.opacity=.6,"0:(-90.0,0.0)"+(t>1?`\n${t-1}:(90.0,0.0)`:"");case"custom":return i.readOnly=!1,i.style.opacity=1,"0:(0.0,0.0)\n9:(180.0,0.0)\n20:(360.0,0.0)"}};e.prototype.onNodeCreated=async function(){o&&o.apply(this,[]);const e=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((n=>{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(li.includes(n)&&(e.prototype.onNodeCreated=async function(){o&&o.apply(this,[]);const e=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){const t=this.addWidget("button","🎲 Manual Random Seed",null,(t=>{"fixed"!=s.value&&(s.value="fixed"),e.value=Math.floor(Math.random()*Oe),i.queuePrompt(0,1)}),{serialize:!1});e.linkedWidgets=[t,s]}},e.prototype.onAdded=async function(){a&&a.apply(this,[]);const e=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()*Oe))}),1)}),"easy convertAnything"==n&&(e.prototype.onNodeCreated=async function(){o&&o.apply(this,[]);const e=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"==n){let t=function(e){const t=e.widgets[0];for(let i=1;i<=4;i++)"Pixels"===t.value?(e.widgets[i].options.step=80,void 0!==e.widgets[i].options.step2&&(e.widgets[i].options.step2=8),e.widgets[i].options.max=8192):(e.widgets[i].options.step=10,void 0!==e.widgets[i].options.step2&&(e.widgets[i].options.step2=1),e.widgets[i].options.max=99)};e.prototype.onAdded=async function(e){const i=this.widgets[0];let s=i.callback;i.callback=(...e)=>{t(this),s&&s.apply(i,[...e])},setTimeout((e=>{t(this)}),1)}}if(hi.includes(n)){const t=e=>{switch(n){case"easy forLoopStart":case"easy whileLoopStart":return 0;case"easy forLoopEnd":case"easy whileLoopEnd":return 1}},i=e=>{switch(n){case"easy forLoopStart":return 2;case"easy forLoopEnd":case"easy whileLoopEnd":return 0;case"easy whileLoopStart":return 1}};e.prototype.onNodeCreated=async function(){if("easy loadImagesForLoop"==n&&(this.outputs[0].shape=5),ci.includes(n)){const e=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())),St(this)}return Ai.includes(n)&&("easy textIndexSwitch"==n&&(this.widgets=this.widgets.filter(((e,t)=>t<=2))),this.inputs=this.inputs.filter(((e,t)=>t<=1||e.widget)),St(this)),null==o?void 0:o.apply(this,arguments)},e.prototype.onConnectionsChange=function(e,s,a,o){var l,r;if(o)if(1==e){let e=this.inputs.every((e=>null!==e.link||e.widget)),i=this.inputs.filter((e=>!["condition","index","total"].includes(e.name)));if(ci.includes(n)){if(e){if(i.length>=20)return void Ye.warn(Ne("The maximum number of inputs is 20"));let e=i[i.length-1],t=parseInt(e.name.split("initial_value")[1])+1;if(this.inputs.find((e=>e.name==="initial_value"+t)))return;let s="initial_value"+t,n="value"+t;this.addInput(s,"*"),this.addOutput(n,"*")}else if(!a){const e=t();let i=this.inputs.findLastIndex((e=>e.link));if(s>=e&&(-1===i||s>=i)){let e=this.inputs[s];if(!e.name||["condition","total"].includes(e.name))return;let t=parseInt(e.name.split("initial_value")[1])+1,i=this.inputs.findIndex((e=>e.name==="initial_value"+t)),n=this.outputs.findIndex((e=>e.name==="value"+t));-1!==i&&this.removeInput(i),-1!==n&&this.removeOutput(n)}}}else if(Ai.includes(n))if(e){if(i.length>=20)return void Ye.warn(Ne("The maximum number of inputs is 20"));let e=mi[n]+i.length;this.addInput(e,"*")}else a||s==this.inputs.length-2&&this.removeInput(s+1)}else if(2==e){let e=this.outputs.filter((e=>!["flow","index"].includes(e.name))),t=e.every((e=>{var t;return(null==(t=e.links)?void 0:t.length)>0}));if(ci.includes(n)){if(t){if(e.length>=20)return void Ye.warn(Ne("The maximum number of outputs is 20"));let t=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;let s="initial_value"+i,n="value"+i;this.addInput(s,"*"),this.addOutput(n,"*")}else if(!a){const e=i();let t=o.origin_slot,s=this.outputs.findLastIndex((e=>{var t;return(null==(t=e.links)?void 0:t.length)>0}));if(t>=e&&(-1===s||t>=s)){let e=this.outputs[t];if(!e.name||["flow","index"].includes(e.name))return;let i=parseInt(e.name.split("value")[1])+1,s=this.inputs.findIndex((e=>e.name==="initial_value"+i)),n=this.outputs.findIndex((e=>e.name==="value"+i));if(-1!==s&&(null==(l=this.inputs[s])?void 0:l.link))return;-1!==s&&this.removeInput(s),-1!==n&&this.removeOutput(n)}}}else if(pi.includes(n))if(t){if(e.length>=20)return void Ye.warn(Ne("The maximum number of outputs is 20"));let t=mi[n]+e.length;this.addOutput(t,"*")}else if(!a){let t=o.origin_slot;t==this.outputs.length-2&&0==(null==(r=e[t].links)?void 0:r.length)&&this.removeOutput(t+1)}}}}if(["easy fluxLoader","easy fullLoader"].includes(n)&&(e.prototype.onConnectionsChange=async function(e,t){d&&d.apply(this,[]);const i=this.inputs.find((e=>"model_override"===e.name)),s=this.inputs.find((e=>"vae_override"===e.name));let n=wt(this,"ckpt_name"),a=wt(this,"vae_name");if((null==i?void 0:i.link)&&0==t){const e=(null==n?void 0:n.options.values)||[];setTimeout((t=>{this.widgets[0].value=(null==e?void 0:e[0])||"None",bt(this,n,!(null==i?void 0:i.link))}),1)}else bt(this,n,!(null==i?void 0:i.link));if(!(null==s?void 0:s.link)||1!=t&&2!=t)bt(this,a,!(null==s?void 0:s.link));else{let e=this.widgets.findIndex((e=>"vae_name"==e.name));setTimeout((t=>{this.widgets[e].value="Baked VAE",bt(this,a,!(null==s?void 0:s.link))}),1)}}),di.includes(n)||-1!==n.indexOf("workflow")){const i=(null==(s=null==t?void 0:t.input)?void 0:s.required)||{};if(!i.image_output&&!i["图像输出"]&&!i["视频输出"])return;e.prototype.onDrawBackground=function(e){try{si(this)}catch(t){}}}},nodeCreated(e){if(e.comfyClass.startsWith("easy ")){if(e.widgets)for(const i of e.widgets){if(!ni.includes(i.name))continue;let t=i.value;fi(e,i),Object.defineProperty(i,"value",{get:e=>t,set(s){s!==t&&(t=s,requestAnimationFrame((t=>{fi(e,i)})))}})}const t=e.comfyClass;if("easy preDetailerFix"==t){const t=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)){const t=e.widgets.find((e=>"text"==e.name));let i=1;Object.defineProperty(e.widgets[i],"value",{set:e=>{if("Select the LoRA to add to the text"!=e){let i=e;i.endsWith(".safetensors")&&(i=i.slice(0,-12)),t.value+=``}},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){const t=e.widgets.find((e=>"text"==e.name));let i=1;Object.defineProperty(e.widgets[i],"value",{set:s=>{var n,a;"Select the prefix to add to the text"!=s&&(null==(a=null==(n=e.widgets[i])?void 0:n.options)?void 0: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=>{var n,a;"👤Select the subject add to the text"!=s&&(null==(a=null==(n=e.widgets[i+1])?void 0:n.options)?void 0: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=>{var n,a;"🎬Select the action add to the text"!=s&&(null==(a=null==(n=e.widgets[i+2])?void 0:n.options)?void 0: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=>{var n,a;"👚Select the clothes add to the text"!=s&&(null==(a=null==(n=e.widgets[i+3])?void 0:n.options)?void 0: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=>{var n,a;"☀️Select the illumination environment add to the text"!=s&&(null==(a=null==(n=e.widgets[i+4])?void 0:n.options)?void 0: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=>{var n,a;"🎞️Select the background add to the text"!=s&&(null==(a=null==(n=e.widgets[i+5])?void 0:n.options)?void 0: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=>{var n,a;"🔞Select the nsfw add to the text"!=s&&(null==(a=null==(n=e.widgets[i+6])?void 0:n.options)?void 0: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(ui.includes(t)){const t=document.createElement("textarea");t.className="comfy-multiline-input",t.readOnly=!0;const i=e.addDOMWidget("info","customtext",t,{getValue:e=>t.value,setValue:e=>t.value=e,serialize:!1});i.inputEl=t,t.addEventListener("input",(()=>{var e;null==(e=i.callback)||e.call(i,i.value)}))}}}});const gi=LiteGraph.LGraphNode;fe.registerExtension({name:"easy bookmark",registerCustomNodes(){class e extends gi{constructor(){super("🔖"),v(this,"type","easy bookmark"),v(this,"title","🔖"),v(this,"slot_start_y",-20),v(this,"___collapsed_width",0),v(this,"isVirtualNode",!0),v(this,"serialize_widgets",!0),v(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(){return this.___collapsed_width}set _collapsed_width(e){const t=fe.canvas,i=t.canvas.getContext("2d");if(i){const e=i.font;i.font=t.title_text_font,this.___collapsed_width=40+i.measureText(this.title).width,i.font=e}}onAdded(){setTimeout((e=>{const t=this.widgets[0].value;t&&(this.title="🔖 "+t)}),1),window.addEventListener("keydown",this.keypressBound)}onRemoved(){window.removeEventListener("keydown",this.keypressBound)}onKeypress(e){const t=e.target;["input","textarea"].includes(t.localName)||this.widgets[0]&&e.key.toLocaleLowerCase()===this.widgets[0].value.toLocaleLowerCase()&&this.canvasToBookmark()}canvasToBookmark(){var e,t;const i=fe.canvas;(null==(e=null==i?void 0:i.ds)?void 0:e.offset)&&(i.ds.offset[0]=16-this.pos[0],i.ds.offset[1]=40-this.pos[1]),null!=(null==(t=null==i?void 0:i.ds)?void 0: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"}}),fe.registerExtension({name:"Comfy.EasyUse.ChainNode",init(){fe.canvas._mousemove_callback=e=>{xe("EasyUse.Nodes.ChainGetSet",null)&&((e=!1,t={})=>{var i,s,n,a,o;const l=Dt();if(!l||l.length<1)return;const r=Lt();if(0===r.length)return;let d=t.inputX||160,u=t.ouputX||60;if(r.filter((e=>Mt(e))).length>1)return;for(const A of r){let a=t.inputY||10,o=t.outputY||30;const l=[],c=A.id;if(A.graph){Rt[c]||(Rt[c]=[]);for(const e of A.inputs??[]){const t=e.link;if(!t)continue;const{origin_id:i,target_slot:s}=Ct(t),n=xt(i);if(!n)continue;if(!Mt(n))continue;let o=A.getConnectionPos(!0,s);Rt[c][s]||(Rt[c][s]=o),!Rt[c]||Rt[c][s][1]===o[1]&&Rt[c][s][0]===o[0]||(d=o[0]-Rt[c][s][0],a=o[1]-Rt[c][s][1],n.pos=[n.pos[0]+d,n.pos[1]+a]),Rt[c][s]=o,l.push(n)}Pt[c]||(Pt[c]=[]);for(const e of A.outputs??[])if(e.links&&A.graph)for(const t of e.links){const{target_id:e,target_slot:s,origin_slot:n}=Ct(t),a=xt(e);if(!a)continue;if(!Mt(a))continue;const r=null==(i=a.outputs)?void 0:i.links;if((null==r?void 0:r.length)>1)return;const d=A.getConnectionPos(!1,n);Pt[c][n]||(Pt[c][n]=d),!Pt[c]||Pt[c][n][0]===d[0]&&Pt[c][n][1]===d[1]||(u=d[0]-Pt[c][n][0],o=d[1]-Pt[c][n][1],a.pos=[a.pos[0]+u,a.pos[1]+o]),Pt[c][n]=d,l.push(a)}if(e&&1===r.length){const e=[A,...l];(null==(n=null==(s=A.graph)?void 0:s.list_of_graphcanvas)?void 0:n[0]).selectNodes(e)}}}const c=r[0];if(!c)return;(null==(o=null==(a=c.graph)?void 0:a.list_of_graphcanvas)?void 0:o[0]).setDirty(!0,!0)})()};const e=LGraphCanvas.prototype.showLinkMenu;LGraphCanvas.prototype.showLinkMenu=st(e,(function(t,i){return i.shiftKey?(((e,t=!1)=>{var i,s,n,a,o,l,r,d,u,c;const{type:A}=e;if("*"===A)return;let{origin_id:p,target_id:h,origin_slot:m,target_slot:f}=e,g=xt(p),v=xt(h);if(!g||!v)return!1;if("Reroute"===g.type){let e=0;[g,e]=jt(g),p=null==g?void 0:g.id,m=e,void 0!==m&&-1!==m||(m=0)}if("Reroute"===v.type&&(v=Ut(v),h=null==v?void 0:v.id,f=null==v?void 0:v.inputs.findIndex((e=>e.type===A)),void 0!==f&&-1!==f||(f=0)),void 0===p||void 0===h||!g||!v)return!1;if(t&&(Mt(g)||Mt(v)))return!1;let y=It((null==(i=v.getInputInfo(f))?void 0:i.name)??A.toLowerCase());y||(y=It((null==(n=null==(s=null==g?void 0:g.outputs)?void 0:s[m])?void 0:n.name)??(null==(o=null==(a=null==g?void 0:g.outputs)?void 0:a[m])?void 0:o.type.toString())??y+`_from_${p}_to_${h}`));let w,b=!1,_=!1;if(Mt(g))y=_t(g),_=!0;else{const e=null==(r=null==(l=g.outputs)?void 0:l[m])?void 0:r.links;if(e)for(const t of e){const e=xt((null==(d=Ct(t))?void 0:d.target_id)??-1);e&&Mt(e)&&Ot(e)&&(y=_t(e),_=!0)}if(!_){for(const e of Dt()){if(y!==_t(e)||!Ot(e))continue;const t=null==(u=e.inputs[0])?void 0:u.link;(null==(c=Ct(t))?void 0:c.origin_id)===g.id?_=!0:b=!0}b&&(y+=`_from_${p}_to_${h}`)}}if(!_){w=LiteGraph.createNode("easy setNode"),w.is_auto_link=!0;const e=g.getConnectionPos(!1,m);w.pos=[e[0]+20,e[1]],w.inputs[0].name=y,w.inputs[0].type=A,w.inputs[0].widget=v.inputs[f].widget,Gt(w,y),zt(w),w.flags.collapsed=!0;let t=[];g.widgets?t=Object.values(g.widgets).map((e=>e.value)):g.widgets_values&&(t=JSON.parse(JSON.stringify(g.widgets_values))),g.connect(m,w,0),g.widgets_values=t,"PrimitiveNode"===g.type&&setTimeout((()=>{if(g){g.connect(m,w,0);for(const[e,i]of t.entries())Gt(g,i,e);null!==w&&w.setSize(w.computeSize())}}))}const S=LiteGraph.createNode("easy getNode"),x=v.getConnectionPos(!0,f);S.pos=[x[0]-150,x[1]],S.outputs[0].name=y,S.outputs[0].type=A,S.outputs[0].widget=v.inputs[f].widget,zt(S),Gt(S,y),null===S||(S.flags.collapsed=!0,S.setSize(S.computeSize()),S.connect(0,v,f))})(t),!1):(e.apply(this,[t,i]),!1)}))}});const vi=async()=>{try{const{Running:e,Pending:t}=await ge.getQueue();if(e.length>0||t.length>0)return void Ye.error(Ne("Clean Failed")+":"+Ne("Please stop all running tasks before cleaning GPU"));200==(await ge.fetchApi("/easyuse/cleangpu",{method:"POST"})).status?Ye.success(Ne("Clean SuccessFully")):Ye.error(Ne("Clean Failed"))}catch(e){}};let yi={},wi=!1;function bi(e,t,i,s,n){var a=LGraphCanvas.active_canvas,o=a.getCanvasWindow(),l=a.graph;if(l)return function e(t,s){var r=LiteGraph.getNodeTypesCategories(a.filter||l.filter).filter((function(e){return e.startsWith(t)})),d=[];r.map((function(i){if(i){var s=new RegExp("^("+t+")"),n=i.replace(s,"").split("/")[0],a=""===t?n+"/":t+n+"/",o=n;-1!=o.indexOf("::")&&(o=o.split("::")[1]),-1===d.findIndex((function(e){return e.value===a}))&&d.push({value:a,content:o,has_submenu:!0,callback:function(t,i,s,n){e(t.value,n)}})}})),LiteGraph.getNodeTypesInCategory(t.slice(0,-1),a.filter||l.filter).map((function(e){if(!e.skip_list){var t={value:e.type,content:e.title,has_submenu:!1,callback:function(e,t,i,s){var o=s.getFirstEvent();a.graph.beforeChange();var l=LiteGraph.createNode(e.value);l&&(l.pos=a.convertEventToCanvasOffset(o),a.graph.add(l)),n&&n(l),a.graph.afterChange()}};d.push(t)}}));const u=xe("EasyUse.ContextMenu.NodesSort",null);""===t&&u&&(d=function(e){let t=[],i=[];return e.forEach((e=>{(null==e?void 0:e.value)&&Me.includes(e.value.split("/")[0])?t.push(e):i.push(e)})),[{title:Ne("ComfyUI Basic"),is_category_title:!0},...t,{title:Ne("Others A~Z"),is_category_title:!0},...i.sort(((e,t)=>e.content.localeCompare(t.content)))]}(d)),new LiteGraph.ContextMenu(d,{event:i,parentMenu:s},o)}("",s),!1}function _i(e){try{return encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))}catch(t){return e}}function Si(e,t,i){var s=this;i=i||{};var n=document.createElement("div");n.className="litemenu-entry submenu";var a=!1;function o(e){var t=this.value,n=!0;(s.current_submenu&&s.current_submenu.close(e),i.callback)&&(!0===i.callback.call(this,t,i,e,s,i.node)&&(n=!1));if(t){if(t.callback&&!i.ignore_item_callbacks&&!0!==t.disabled)!0===t.callback.call(this,t,i,e,s,i.extra)&&(n=!1);if(t.submenu){if(!t.submenu.options)throw"ContextMenu submenu needs options";new s.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}),n=!1}}n&&!s.lock&&s.close()}return null===t?n.classList.add("separator"):t.is_category_title?(n.classList.remove("litemenu-entry"),n.classList.remove("submenu"),n.classList.add("litemenu-title"),n.innerHTML=t.title):(n.innerHTML=t&&t.title?t.title:e,n.value=t,t&&(t.disabled&&(a=!0,n.classList.add("disabled")),(t.submenu||t.has_submenu)&&n.classList.add("has_submenu")),"function"==typeof t?(n.dataset.value=e,n.onclick_callback=t):n.dataset.value=t,t.className&&(n.className+=" "+t.className)),n&&(null==t?void 0:t.thumbnail)&&(n.addEventListener("mouseenter",Li(n,t,this.root),{passive:!0}),n.addEventListener("mouseleave",ki(),{passive:!0}),n.addEventListener("click",ki(),{passive:!0})),this.root.appendChild(n),a||n.addEventListener("click",o),!a&&i.autoopen&&LiteGraph.pointerListenerAdd(n,"enter",(function(e){var t=this.value;if(!t||!t.has_submenu)return;o.call(this,e)})),n}fe.registerExtension({name:"Comfy.EasyUse.ContextMenu",async setup(){LGraphCanvas.onMenuAdd=bi,xi();const e=LiteGraph.ContextMenu;LiteGraph.ContextMenu=function(t,i){if(!(null==i?void 0:i.callback)||t.some((e=>"string"!=typeof e))){if(i.parentMenu);else if(i.extra);else if(i.scale);else{const e=xe("EasyUse.ContextMenu.QuickOptions",null);if(i.hasOwnProperty("extra")&&"Disable"!==e){if("At the forefront"==e?t.unshift(null):t.push(null),s=window.location.host,["192.168.","10.","127.",/^172\.((1[6-9]|2[0-9]|3[0-1])\.)/].some((e=>"string"==typeof e?s.startsWith(e):e.test(s)))){const i={content:`${Ne("Reboot ComfyUI")}`,callback:e=>(async()=>{if(confirm(Ne("Are you sure you'd like to reboot the server?")))try{ge.fetchApi("/easyuse/reboot")}catch(e){}})()};"At the forefront"==e?t.unshift(i):t.push(i)}const i=xe("EasyUse.Hotkeys.cleanVRAMUsed",null)?"("+qe("Shift+r")+")":"",n={content:`${Ne("Cleanup Of VRAM Usage")} ${i}`,callback:e=>vi()};"At the forefront"==e?t.unshift(n):t.push(n);const a=xe("EasyUse.Hotkeys.toggleNodesMap",null)?"("+qe("Shift+m")+")":"",o={content:`${Ne("Nodes Map")} ${a}`,callback:e=>{var t,i,s;const n=(null==(t=fe.extensionManager)?void 0:t.sidebarTab)||fe.extensionManager,a=(null==(i=fe.extensionManager.sidebarTab)?void 0:i.activeSidebarTabId)||(null==(s=fe.extensionManager)?void 0:s.activeSidebarTab);n.activeSidebarTabId=a==Pe?null:Pe}};"At the forefront"==e?t.unshift(o):t.push(o)}}return e.apply(this,[...arguments])}{const s=function(e,t){const i=xe("EasyUse.ContextMenu.ModelsThumbnails",null),s=xe("EasyUse.ContextMenu.SubDirectories",null);if(!i&&!s)return null;if(wi)return null;const n=["ckpt","pt","bin","pth","safetensors","gguf"];if((null==e?void 0:e.length)>0){const t=null==(a=e[e.length-1])?void 0:a.substring(a.lastIndexOf(".")+1);if(!n.includes(t))return null}var a;const o=t.callback,l=[...e];t.callback=null;const r=(e,t)=>{["None","无","無","なし"].includes(e.content)?o("None",t):o(l.find((t=>t.endsWith(e.content)),t))};if(i&&!s)return e.map((e=>{var t,i;let s=null==(t=yi[e])?void 0:t.folder,n=null==(i=yi[e])?void 0:i.pathIndex;const a=window.location.protocol,o=window.location.host;let l=s?`${`${a}//${o}`}/api/experiment/models/preview/${s}/${n}/${_i(e)}`:"";return{folder:s,content:e,fullName:e,title:ve("div.comfyui-easyuse-contextmenu-model",{},[ve("span",{},e)]).outerHTML,thumbnail:l,callback:r}}));const d=e,u={},c=[],A=[];for(const f of d){const e=f.indexOf("/")>-1?"/":"\\",t=f.split(e);if(t.length>1){const i=t.shift();u[i]=u[i]||[],u[i].push({value:t.join(e),fullValue:f})}else"CHOOSE"===f||f.startsWith("DISABLE ")?c.push({value:f,fullValue:f}):A.push({value:f,fullValue:f})}const p=Object.values(u).length,h=[],m=(e,t="",s)=>{var n,a;let o;o=ve("div.comfyui-easyuse-contextmenu-model",{},[ve("span",{},e)]);let l=null==(n=yi[s])?void 0:n.folder,d=null==(a=yi[s])?void 0:a.pathIndex;const u=window.location.protocol,c=window.location.host;let A=l?`${`${u}//${c}`}/api/experiment/models/preview/${l}/${d}/${_i(s)}`:"";return{folder:l,content:e,fullName:s,thumbnail:i?A:null,title:o.outerHTML,callback:r}};if(p>0){const e=(t,i)=>{let s=[],n=[];const a=t.map((({value:e,fullValue:t})=>{const a={},o=e.indexOf("/")>-1?"/":"\\",l=e.split(o);if(l.length>1){const e=l.shift();a[e]=a[e]||[],a[e].push({value:l.join(o),fullValue:t})}if(Object.values(u).length>0){let i=Object.keys(a)[0];i&&a[i]?s.push({key:i,value:a[i][0]}):n.push(m(e,i,t))}return m(e,i,t)}));if(s.length>0){let t={};return s.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])}}))),...n]}return a};for(const[t,i]of Object.entries(u))h.push({content:t,has_submenu:!0,callback:()=>{},submenu:{options:e(i,t)}})}h.push(...A.map((e=>m(e.value,"",e.fullValue)))),c.length>0&&h.push(...c.map((e=>m(e.value,"",e.fullValue))));return h}(t,i);return s?e.call(this,s,i):e.apply(this,[...arguments])}var s},LiteGraph.ContextMenu.prototype=e.prototype,xe("EasyUse.ContextMenu.NodesSort")&&(LiteGraph.ContextMenu.prototype.addItem=Si),document.getElementById("graph-canvas").addEventListener("mouseenter",(e=>{setTimeout((e=>{const t=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)}))},async beforeRegisterNodeDef(e,t,i){const s=e.prototype.onNodeCreated;["CheckpointLoader|pysssss","LoraLoader|pysssss"].includes(t.name)&&(e.prototype.onNodeCreated=async function(){s&&s.apply(this,[]);let e=wt(this,"lora_name")||wt(this,"ckpt_name");if(e){let t=e.onClick;e.onClick=function(e){return wi=!0,setTimeout((e=>{wi=!1}),500),t.call(this,e)}}})}});const xi=async()=>{["checkpoints","loras","diffusion_models"].map((async e=>{const t=await ge.getModels(e);(null==t?void 0:t.length)>0&&t.map((t=>{yi[t.name]={folder:e,pathIndex:t.pathIndex}}))}))},Li=(e,t,i)=>s=>{var n;const a=t=>{setTimeout((s=>{const n=i.getBoundingClientRect();if(!n)return;const a=document.body.getBoundingClientRect();if(!a)return;const{left:o,top:l}=((e,t,i)=>{const{x:s}=e.getBoundingClientRect();let{top:n,left:a}=t;const{width:o,height:l}=i;return s<=o&&(a+=t.width),t.top<=l||(n=l),{left:a,top:n}})(e,n,a),r=document.getElementById("easyuse-model-thumbnail");r.src=t,r.style.left=`${o}px`,r.style.top=`${l}px`,r.style.display="block",r.style.opacity=1,r.onerror=e=>{r.src=Ge}}),10)};if(null==(n=null==yi?void 0:yi[t.fullName])?void 0:n.img){let e=yi[t.fullName].img;a("no_preview_image"==e?Ge:e.src)}else{let e=new Image;e.src=t.thumbnail,e.onload=i=>{yi[t.fullName].img=e,a(t.thumbnail)},e.onerror=i=>{e=null,yi[t.fullName].img="no_preview_image",a(Ge)}}},ki=()=>e=>{const t=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")};class Ei extends ye{constructor(){super(),this.element.classList.add("easyuse-model-metadata")}show(e){super.show(ve("div",Object.keys(e).map((t=>ve("div",[ve("label",{textContent:t}),ve("span",{textContent:e[t]})])))))}}class Ni extends ye{constructor(e){super(),this.name=e,this.element.classList.add("easyuse-model-info")}get customNotes(){return this.metadata["easyuse.notes"]}set customNotes(e){this.metadata["easyuse.notes"]=e}get hash(){return this.metadata["easyuse.sha256"]}async show(e,t){this.type=e;const i=ge.fetchApi("/easyuse/metadata/"+encodeURIComponent(`${e}/${t}`));this.info=ve("div",{style:{flex:"auto"}}),this.imgCurrent=0,this.imgList=ve("div.easyuse-preview-list",{style:{display:"none"}}),this.imgWrapper=ve("div.easyuse-preview",[ve("div.easyuse-preview-group",[this.imgList])]),this.main=ve("main",{style:{display:"flex"}},[this.imgWrapper,this.info]),this.content=ve("div.easyuse-model-content",[ve("div.easyuse-model-header",[ve("h2",{textContent:this.name})]),this.main]);const s=ve("div",{textContent:"ℹ️ Loading...",parent:this.content});super.show(this.content),this.metadata=await(await i).json(),this.viewMetadata.style.cursor=this.viewMetadata.style.opacity="",this.viewMetadata.removeAttribute("disabled"),s.remove(),this.addInfo()}createButtons(){const e=super.createButtons();return this.viewMetadata=ve("button",{type:"button",textContent:"View raw metadata",disabled:"disabled",style:{opacity:.5,cursor:"not-allowed"},onclick:e=>{this.metadata&&(new Ei).show(this.metadata)}}),e.unshift(this.viewMetadata),e}parseNote(){if(!this.customNotes)return[];let e=[];const t=new RegExp("(\\bhttps?:\\/\\/[^\\s]+)","g");let i,s=0;do{let n;i=t.exec(this.customNotes);let a=0;i?(n=i.index,a=i.index+i[0].length):n=this.customNotes.length;let o=this.customNotes.substring(s,n);o&&(o=o.replaceAll("\n","
"),e.push(ve("span",{innerHTML:o}))),i&&e.push(ve("a",{href:i[0],textContent:i[0],target:"_blank"})),s=a}while(i);return e}addInfoEntry(e,t){return ve("p",{parent:this.info},["string"==typeof e?ve("label",{textContent:e+": "}):e,"string"==typeof t?ve("span",{textContent:t}):t])}async getCivitaiDetails(){const e=await fetch("https://civitai.com/api/v1/model-versions/by-hash/"+this.hash);if(200===e.status)return await e.json();throw 404===e.status?new Error("Model not found"):new Error(`Error loading info (${e.status}) ${e.statusText}`)}addCivitaiInfo(){const e=this.getCivitaiDetails(),t=ve("span",{textContent:"ℹ️ Loading..."});return this.addInfoEntry(ve("label",[ve("img",{style:{width:"18px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),ve("span",{textContent:"Civitai: "})]),t),e.then((e=>{var t,i;this.imgWrapper.style.display="block";let s=this.element.querySelector(".easyuse-model-header");s&&s.replaceChildren(ve("h2",{textContent:this.name}),ve("div.easyuse-model-header-remark",[ve("h5",{textContent:Ne("Updated At:")+Ze(new Date(e.updatedAt),"yyyy/MM/dd")}),ve("h5",{textContent:Ne("Created At:")+Ze(new Date(e.updatedAt),"yyyy/MM/dd")})]));let n=null,a=this.parseNote.call(this),o=Ne("✏️ Edit"),l=ve("div.easyuse-model-detail-textarea",[ve("p",(null==a?void 0:a.length)>0?a:{textContent:Ne("No notes")})]);if(a&&0!=a.length?l.classList.remove("empty"):l.classList.add("empty"),this.info.replaceChildren(ve("div.easyuse-model-detail",[ve("div.easyuse-model-detail-head.flex-b",[ve("span",Ne("Notes")),ve("a",{textContent:o,href:"#",style:{fontSize:"12px",float:"right",color:"var(--warning-color)",textDecoration:"none"},onclick:async e=>{if(e.preventDefault(),n){if(n.value!=this.customNotes){Ye.showLoading(Ne("Saving Notes...")),this.customNotes=n.value;const e=await ge.fetchApi("/easyuse/metadata/notes/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:this.customNotes});if(Ye.hideLoading(),200!==e.status)return Ye.error(Ne("Saving Failed")),void alert(`Error saving notes (${e.status}) ${e.statusText}`);Ye.success(Ne("Saving Succeed")),a=this.parseNote.call(this),l.replaceChildren(ve("p",(null==a?void 0:a.length)>0?a:{textContent:Ne("No notes")})),n.value?l.classList.remove("empty"):l.classList.add("empty")}else l.replaceChildren(ve("p",{textContent:Ne("No notes")})),l.classList.add("empty");e.target.textContent=o,n.remove(),n=null}else e.target.textContent="💾 Save",n=ve("textarea",{placeholder:Ne("Type your notes here"),style:{width:"100%",minWidth:"200px",minHeight:"50px",height:"100px"},textContent:this.customNotes}),l.replaceChildren(n),n.focus()}})]),l]),ve("div.easyuse-model-detail",[ve("div.easyuse-model-detail-head",{textContent:Ne("Details")}),ve("div.easyuse-model-detail-body",[ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("Type")}),ve("div.easyuse-model-detail-item-value",{textContent:e.model.type})]),ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("BaseModel")}),ve("div.easyuse-model-detail-item-value",{textContent:e.baseModel})]),ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("Download")}),ve("div.easyuse-model-detail-item-value",{textContent:(null==(t=e.stats)?void 0:t.downloadCount)||0})]),ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("Trained Words")}),ve("div.easyuse-model-detail-item-value",{textContent:(null==e?void 0:e.trainedWords.join(","))||"-"})]),ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("Source")}),ve("div.easyuse-model-detail-item-value",[ve("label",[ve("img",{style:{width:"14px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),ve("a",{href:"https://civitai.com/models/"+e.modelId,textContent:"View "+e.model.name,target:"_blank"})])])])])])),null==(i=e.images)?void 0:i.length){this.imgCurrent=0,this.isSaving=!1,e.images.map((e=>e.url&&this.imgList.appendChild(ve("div.easyuse-preview-slide",[ve("div.easyuse-preview-slide-content",[ve("img",{src:e.url}),ve("div.save",{textContent:"Save as preview",onclick:async()=>{if(this.isSaving)return;this.isSaving=!0,Ye.showLoading(Ne("Saving Preview..."));const t=await(await fetch(e.url)).blob(),i="temp_preview."+new URL(e.url).pathname.split(".")[1],s=new FormData;s.append("image",new File([t],i)),s.append("overwrite","true"),s.append("type","temp");if(200!==(await ge.fetchApi("/upload/image",{method:"POST",body:s})).status)return this.isSaving=!1,Ye.error(Ne("Saving Failed")),Ye.hideLoading(),void alert(`Error saving preview (${req.status}) ${req.statusText}`);await ge.fetchApi("/easyuse/save/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:JSON.stringify({filename:i,type:"temp"}),headers:{"content-type":"application/json"}}).then((e=>{Ye.success(Ne("Saving Succeed")),Ye.hideLoading()})),this.isSaving=!1,app.refreshComboInNodes()}})])]))));let t=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=ve("button.left",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'',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=ve("button.right",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'',onclick:()=>{if(!(e.images.length<=2))if(t.imgList.classList.remove("no-transition"),t.imgCurrent>=e.images.length/2-1){t.imgCurrent=0;const i=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)}else t.imgCurrent=t.imgCurrent+1,t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)"}})}return e.description&&ve("div",{parent:this.content,innerHTML:e.description,style:{marginTop:"10px"}}),e})).catch((e=>{this.imgWrapper.style.display="none",t.textContent="⚠️ "+e.message})).finally((e=>{}))}}class Ci extends Ni{async addInfo(){await this.addCivitaiInfo()}}class Ii extends Ni{getTagFrequency(){if(!this.metadata.ss_tag_frequency)return[];const e=JSON.parse(this.metadata.ss_tag_frequency),t={};for(const i in e){const s=e[i];for(const e in s)e in t?t[e]+=s[e]:t[e]=s[e]}return Object.entries(t).sort(((e,t)=>t[1]-e[1]))}getResolutions(){let e=[];if(this.metadata.ss_bucket_info){const t=JSON.parse(this.metadata.ss_bucket_info);if(null==t?void 0:t.buckets)for(const{resolution:i,count:s}of Object.values(t.buckets))e.push([s,`${i.join("x")} * ${s}`])}e=e.sort(((e,t)=>t[0]-e[0])).map((e=>e[1]));let t=this.metadata.ss_resolution;if(t){const i=t.split(","),s=i[0].replace("(",""),n=i[1].replace(")","");e.push(`${s.trim()}x${n.trim()} (Base res)`)}else(t=this.metadata["modelspec.resolution"])&&e.push(t+" (Base res");return e.length||e.push("⚠️ Unknown"),e}getTagList(e){return e.map((e=>ve("li.easyuse-model-tag",{dataset:{tag:e[0]},$:e=>{e.onclick=()=>{e.classList.toggle("easyuse-model-tag--selected")}}},[ve("p",{textContent:e[0]}),ve("span",{textContent:e[1]})])))}addTags(){let e,t=this.getTagFrequency();if(null==t?void 0:t.length){const i=t.length;let s;i>500&&(t=t.slice(0,500),e=ve("p",[ve("span",{textContent:"⚠️ Only showing first 500 tags "}),ve("a",{href:"#",textContent:`Show all ${i}`,onclick:()=>{s.replaceChildren(...this.getTagList(this.getTagFrequency())),e.remove()}})])),s=ve("ol.easyuse-model-tags-list",this.getTagList(t)),this.tags=ve("div",[s])}else this.tags=ve("p",{textContent:"⚠️ No tag frequency metadata found"});this.content.append(this.tags),e&&this.content.append(e)}async addInfo(){const e=this.addCivitaiInfo();this.addTags();const t=await e;t&&ve("div",{parent:this.content,innerHTML:t.description,style:{maxHeight:"250px",overflow:"auto"}})}createButtons(){const e=super.createButtons();function t(e,t){const i=ve("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)}}return e.unshift(ve("button",{type:"button",textContent:"Copy Selected",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag--selected")])}}),ve("button",{type:"button",textContent:"Copy All",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag")])}})),e}}const Ti={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"}},indextts_emotions:{category:"IndexTTS Emotions",nodes:["easy indexTTSEmotionVector","easy indexTTSEmotionText","easy indexTTSEmotionAudio"],input:{reference_audio:"reference_audio"},output:{emotions:"emotions"}},indextts_generate:{category:"IndexTTS Generate",nodes:["easy indexTTSGenerate","easy indexTTSGenerateSimple"],input:{indextts_model:"indextts_model",reference_audio:"reference_audio",reference_audios:"reference_audios",emotions:"emotions"},output:{audio:"audio",seed:"seed",subtitle:"subtitle"},widget:{text:"text",unload_model:"unload_model",seed:"seed"}},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","链接":"链接"}}};function Oi(e,t,i){return function(){!function(e,t,i){var s;const n=LiteGraph.createNode(t);if(n){if(fe.graph.add(n),n.pos=e.pos.slice(),n.size=e.size.slice(),(null==(s=e.widgets)?void 0:s.length)>0&&e.widgets.forEach((e=>{var t,s,a;if(null==(s=null==(t=Ti[i])?void 0:t.widget)?void 0:s[e.name]){const t=Ti[i].widget[e.name];if(t&&n.widgets){const i=(a=t,n.widgets.find((e=>"object"==typeof a?a.includes(e.name):e.name===a)));i&&(i.value=e.value,"seed_num"==e.name&&(i.linkedWidgets[0].value=e.linkedWidgets[0].value),"converted-widget"==e.type&&Vi(n,i,e))}}})),e.inputs&&e.inputs.forEach(((t,s)=>{var a,o,l;if(t&&t.link&&(null==(o=null==(a=Ti[i])?void 0:a.input)?void 0:o[t.name])){const s=null==(l=Ti[i])?void 0:l.input[t.name];if(null===s)return;const a=n.findInputSlot(s);if(-1!==a){const i=e.graph.links[t.link];if(i){const t=e.graph.getNodeById(i.origin_id);t&&t.connect(i.origin_slot,n,a)}}}})),e.outputs&&e.outputs.forEach(((t,s)=>{var a,o;if(t&&t.links&&(null==(o=null==(a=Ti[i])?void 0:a.output)?void 0:o[t.name])){const s=Ti[i].output[t.name];if(null===s)return;const a=n.findOutputSlot(s);-1!==a&&t.links.forEach((t=>{const i=e.graph.links[t];if(i){const t=e.graph.getNodeById(i.target_id);t&&n.connect(a,t,i.target_slot)}}))}})),fe.graph.remove(e),"easy fullkSampler"==n.type){const e=n.outputs[0].links;if(e&&e[0]){const t=fe.graph._nodes.find((t=>t.inputs&&t.inputs[0]&&t.inputs[0].link==e[0]));t&&fe.graph.remove(t)}}else if(Ti.preSampling.nodes.includes(n.type)){const e=n.outputs[0].links;if(!e||!e[0]){const e=LiteGraph.createNode("easy kSampler");fe.graph.add(e),e.pos=n.pos.slice(),e.pos[0]=e.pos[0]+n.size[0]+20;const t=n.findInputSlot("pipe");-1!==t&&n&&n.connect(0,e,t)}}n.setSize([n.size[0],n.computeSize()[1]])}}(e,t,i)}}const Mi=(e,t)=>{const i=e.prototype.getExtraMenuOptions;e.prototype.getExtraMenuOptions=function(){const e=i.apply(this,arguments);return t.apply(this,arguments),e}},Di=(e,t,i,s,n=!0)=>{Mi(s,(function(s,a){a.unshift({content:e,has_submenu:n,callback:(e,s,n,a,o)=>Ri(e,s,n,a,o,t,i)}),"loaders"==t&&(a.unshift({content:Ne("💎 View Lora Info..."),callback:(e,t,i,s,n)=>{let a=n.widgets.find((e=>"lora_name"==e.name)).value;a&&"None"!=a&&new Ii(a).show("loras",a)}}),a.unshift({content:Ne("💎 View Checkpoint Info..."),callback:(e,t,i,s,n)=>{let a=n.widgets[0].value;a&&"None"!=a&&new Ci(a).show("checkpoints",a)}}))}))},Ri=(e,t,i,s,n,a,o)=>{const l=[];return o.map((e=>{n.type!==e&&l.push({content:`${e}`,callback:Oi(n,e,a)})})),new LiteGraph.ContextMenu(l,{event:i,callback:null,parentMenu:s,node:n}),!1},Pi="converted-widget",Gi=Symbol();function zi(e,t,i=""){if(t.origType=t.type,t.origComputeSize=t.computeSize,t.origSerializeValue=t.serializeValue,t.computeSize=()=>[0,-4],t.type=Pi+i,t.serializeValue=()=>{if(!e.inputs)return;let i=e.inputs.find((e=>{var i;return(null==(i=e.widget)?void 0:i.name)===t.name}));return i&&i.link?t.origSerializeValue?t.origSerializeValue():t.value:void 0},t.linkedWidgets)for(const s of t.linkedWidgets)zi(e,s,":"+t.name)}function Vi(e,t,i){zi(e,t);const{type:s}=function(e){let t=e[0];t instanceof Array&&(t="COMBO");return{type:t}}(i),n=e.size;t.options&&t.options.forceInput||e.addInput(t.name,s,{widget:{name:t.name,[Gi]:()=>i}});for(const a of e.widgets)a.last_y+=LiteGraph.NODE_SLOT_HEIGHT;e.setSize([Math.max(n[0],e.size[0]),Math.max(n[1],e.size[1])])}const ji=function(e){var t,i,s,n,a,o,l,r,d,u,c,A,p,h,m,f,g,v,y,w;const b=e.constructor.type,_=(null==(t=e.properties)?void 0:t.origVals)||{},S=_.title||e.title,x=_.color||e.color,L=_.bgcolor||e.bgcolor,k=e.graph||fe.graph,E={size:[...e.size],color:x,bgcolor:L,pos:[...e.pos]},N=e=>{var t,i,s,n;return(null==(t=k.getLink)?void 0:t.call(k,e))||(null==(s=null==(i=k.links)?void 0:i.get)?void 0:s.call(i,e))||(null==(n=k.links)?void 0:n[e])},C=[],I=[],T=new Map((null==(i=e.inputs)?void 0:i.map((e=>[e.name,e.label])))||[]),O=new Map((null==(s=e.outputs)?void 0:s.map((e=>[e.name,e.label])))||[]),M=(null==(n=e.widgets)?void 0:n.map((e=>({name:e.name,type:e.origType||e.type,value:e.value}))))||[],D=[];null==(a=e.inputs)||a.forEach(((e,t)=>{var i,s;if(null==e.link)return;const n=N(e.link);if(!n)return;const a=k.getNodeById(n.origin_id);C.push({inputName:e.name,inputSlot:t,originId:n.origin_id,originName:null==(s=null==(i=null==a?void 0:a.outputs)?void 0:i[n.origin_slot])?void 0:s.name,originSlot:n.origin_slot})})),null==(o=e.outputs)||o.forEach(((e,t)=>{var i,s;for(const n of e.links||[]){const a=N(n);if(!a)continue;const o=k.getNodeById(a.target_id);I.push({outputName:e.name,outputSlot:t,targetId:a.target_id,targetName:null==(s=null==(i=null==o?void 0:o.inputs)?void 0:i[a.target_slot])?void 0:s.name,targetSlot:a.target_slot})}})),null==(l=e.widgets)||l.forEach((t=>{var i,s,n;if(t.type!==Pi)return;const a=null==(i=e.inputs)?void 0:i.find((e=>{var i;return(null==(i=e.widget)?void 0:i.name)===t.name||e.name===t.name})),o=null==(n=null==(s=null==a?void 0:a.widget)?void 0:s[Gi])?void 0:n.call(s);o&&D.push({name:t.name,config:o})}));const R=LiteGraph.createNode(b,S,E);if(!R)return;k.remove(e),k.add(R);const P=(e,t,i)=>{var s,n,a,o,l,r,d;const u=e.origType||e.type;if(u!==t||null==i)return!1;const c=null==(s=e.options)?void 0:s.values;if(null!=c){const t="function"==typeof c?c(e,R):c;return Array.isArray(t)?t.includes(i):!(!t||"object"!=typeof t)&&(Object.prototype.hasOwnProperty.call(t,i)||Number.isInteger(i)&&i>=0&&ie.name===G));e&&P(e,z,V)&&(e.value=V)}for(const{name:G,config:z}of D){const e=null==(d=R.widgets)?void 0:d.find((e=>e.name===G));e&&Vi(R,e,z)}null==(u=R.inputs)||u.forEach((e=>{T.has(e.name)&&(e.label=T.get(e.name))})),null==(c=R.outputs)||c.forEach((e=>{O.has(e.name)&&(e.label=O.get(e.name))}));for(const{inputName:G,inputSlot:z,originId:V,originName:j,originSlot:U}of C){const e=k.getNodeById(V);if(!e)continue;const t=(null==(p=null==(A=e.outputs)?void 0:A[U])?void 0:p.name)===j?U:e.findOutputSlot(j),i=(null==(m=null==(h=R.inputs)?void 0:h[z])?void 0:m.name)===G?z:R.findInputSlot(G);t>=0&&i>=0&&e.connect(t,R,i)}for(const{outputName:G,outputSlot:z,targetId:V,targetName:j,targetSlot:U}of I){const e=k.getNodeById(V);if(!e)continue;const t=(null==(g=null==(f=R.outputs)?void 0:f[z])?void 0:g.name)===G?z:R.findOutputSlot(G),i=(null==(y=null==(v=e.inputs)?void 0:v[U])?void 0:y.name)===j?U:e.findInputSlot(j);t>=0&&i>=0&&R.connect(t,e,i)}R.setSize(E.size),null==(w=R.setDirtyCanvas)||w.call(R,!0,!0)};fe.registerExtension({name:"Comfy.EasyUse.ExtraMenu",async beforeRegisterNodeDef(e,t,i){Mi(e,(function(e,i){i.unshift({content:Ne("🔃 Reload Node"),callback:(e,t,i,s,n)=>{let a=LGraphCanvas.active_canvas;if(!a.selected_nodes||Object.keys(a.selected_nodes).length<=1)ji(n);else for(let o in a.selected_nodes)ji(a.selected_nodes[o])}}),"easy ckptNames"==t.name&&i.unshift({content:Ne("💎 View Checkpoint Info..."),callback:(e,t,i,s,n)=>{n.widgets[0].value}})}));for(const s in Ti)Ti[s].nodes.includes(t.name)&&Di(`↪️ Swap ${Ti[s].category}`,s,Ti[s].nodes,e)}});const Ui=LiteGraph.LGraphNode,Wi="➡️";fe.registerExtension({name:"easy setNode",registerCustomNodes(){class e extends Ui{constructor(t){super("Set"),v(this,"defaultVisibility",!0),v(this,"serialize_widgets",!0),this.properties||(this.properties={previousName:""}),this.properties.showOutputText=e.defaultVisibility;const i=this;i.color=LGraphCanvas.node_colors.blue.color,this.addWidget("text","Constant","",((e,t,s,n,a)=>{i.validateName(i.graph),""!==this.widgets[0].value&&(this.title=Wi+this.widgets[0].value),this.properties.previousName=this.widgets[0].value,this.update()}),{}),this.addInput("*","*"),this.onConnectionsChange=function(e,t,s,n,a){if(1!=e||s||(this.inputs[t].type="*",this.inputs[t].name="*",this.title="Set"),n&&i.graph&&1==e&&s){const e=i.graph._nodes.find((e=>e.id==n.origin_id)).outputs[n.origin_slot];if(!e)return;const t=e.type,s=i.is_auto_link?this.widgets[0].value:e.name;"Set"===this.title&&(this.title=Wi+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=Wi+this.widgets[0].value,this.properties.previousName=this.widgets[0].value}),1)}this.update()},this.validateName=function(e){let t=i.widgets[0].value;if(""!=t){let s=0,n=[];do{n=e._nodes.filter((e=>e!=this&&("easy setNode"==e.type&&e.widgets[0].value===t))),n.length>0&&(t=i.widgets[0].value+s),s++}while(n.length>0);i.widgets[0].value=t,this.update()}},this.clone=function(){const t=e.prototype.clone.apply(this);return t.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){const i=t?this.properties.previousName:this.widgets[0].value;return e._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"}}),fe.registerExtension({name:"easy getNode",registerCustomNodes(){class e extends Ui{constructor(t){super("Get"),v(this,"defaultVisibility",!0),v(this,"serialize_widgets",!0),this.properties||(this.properties={}),this.properties.showOutputText=e.defaultVisibility;const i=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,n){this.validateLinks(),2!=e||i?(this.onRename(),setTimeout((e=>{this.title="⬅️"+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){const t=this.findSetter(i.graph);if(t){const i=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="⬅️"+t.widgets[0].value}else this.setType("*","*"),this.outputs[e].type="*",this.outputs[e].name="*"},this.clone=function(){const t=e.prototype.clone.apply(this);return t.size=t.computeSize(),t},this.validateLinks=function(){"*"!=this.outputs[0].type&&this.outputs[0].links&&this.outputs[0].links.forEach((e=>{const t=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){const t=this.widgets[0].value;return e._nodes.find((e=>"easy setNode"==e.type&&e.widgets[0].value===t&&""!=t))},this.isVirtualNode=!0}getInputLink(e){const t=this.findSetter(this.graph);if(t){const i=t.inputs[e];return this.graph.links[i.link]}throw new Error("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"}}),ge.addEventListener("easyuse-global-seed",(function(e){let t=fe.graph._nodes_by_id;for(let i in t){let s=t[i];if("easy globalSeed"==s.type){if(s.widgets){const t=s.widgets.find((e=>"value"==e.name));s.widgets.find((e=>"last_seed"==e.name)).value=t.value,t.value=e.detail.value}}else if(s.widgets){const t=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])}}}));const Fi=fe.graphToPrompt;fe.graphToPrompt=function(...e){const t=e[0]||fe.rootGraph||fe.graph;return Promise.resolve(Fi.apply(this,e)).then((e=>function(e,t){const i=null==e?void 0:e.workflow;if(!i||"object"!=typeof i)return e;i.seed_widgets={};const s=(null==t?void 0:t._nodes_by_id)||{};for(let n in s){let e=s[n].widgets;if(e)for(let t in e)"seed_num"!=e[t].name&&"seed"!=e[t].name&&"noise_seed"!=e[t].name||"converted-widget"==e[t].type||(i.seed_widgets[n]=parseInt(t))}return e}(e,t)))};const Xi=["easy imageSave","easy fullkSampler","easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo","easy detailerFix"];fe.registerExtension({name:"Comfy.EasyUse.SaveImageExtraOutput",async beforeRegisterNodeDef(e,t,i){if(Xi.includes(t.name)){const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){const e=t?t.apply(this,arguments):void 0,s=this.widgets.find((e=>"filename_prefix"===e.name||"save_prefix"===e.name));return s.serializeValue=()=>be(i,s.value),e}}else{const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){const e=t?t.apply(this,arguments):void 0;return this.properties&&"Node name for S&R"in this.properties||this.addProperty("Node name for S&R",this.constructor.type,"string"),e}}}});const Zi=["easy wildcards","easy positive","easy negative","easy stylesSelector","easy promptConcat","easy promptReplace"],Hi=["easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingCustom","easy preSamplingDynamicCFG","easy preSamplingSdTurbo","easy preSamplingLayerDiffusion"],qi=["easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo"],Yi=["easy controlnetLoader","easy controlnetLoaderADV"],Ki=["easy instantIDApply","easy instantIDApplyADV"],Ji=["easy ipadapterApply","easy ipadapterApplyADV","easy ipadapterApplyFaceIDKolors","easy ipadapterStyleComposition"],Bi=["easy pipeIn","easy pipeOut","easy pipeEdit","easy pipeEditPrompt"],Qi=["easy XYPlot","easy XYPlotAdvanced"],$i=["easy setNode"],es=["RescaleCFG","LoraLoaderModelOnly","LoraLoader","FreeU","FreeU_v2",...Ji,...$i],ts={"easy seed":{from:{INT:[...Hi,"easy fullkSampler"]}},"easy positive":{from:{STRING:[...Zi]}},"easy negative":{from:{STRING:[...Zi]}},"easy wildcards":{from:{STRING:["easy showAnything",...Zi]}},"easy stylesSelector":{from:{STRING:["easy showAnything",...Zi]}},"easy promptConcat":{from:{STRING:["easy showAnything",...Zi]}},"easy promptReplace":{from:{STRING:["easy showAnything",...Zi]}},"easy fullLoader":{from:{PIPE_LINE:[...Hi,"easy fullkSampler",...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy a1111Loader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy comfyLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy hunyuanDiTLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy kolorsLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy pixArtLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy fluxLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy svdLoader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy zero123Loader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy sv3dLoader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy preSampling":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingAdvanced":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingDynamicCFG":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingCustom":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingLayerDiffusion":{from:{PIPE_LINE:["easy kSamplerLayerDiffusion",...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingNoiseIn":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy fullkSampler":{from:{PIPE_LINE:[...Bi.reverse(),"easy preDetailerFix","easy preMaskDetailerFix",...Hi,...$i]}},"easy kSampler":{from:{PIPE_LINE:[...Bi.reverse(),"easy preDetailerFix","easy preMaskDetailerFix","easy hiresFix",...Hi,...$i]}},"easy controlnetLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i]}},"easy controlnetLoaderADV":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i]}},"easy instantIDApply":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{COMBO:["easy promptLine"]}},"easy instantIDApplyADV":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{COMBO:["easy promptLine"]}},"easy ipadapterApply":{to:{COMBO:["easy promptLine"]}},"easy ipadapterApplyADV":{to:{STRING:["easy sliderControl",...Zi],COMBO:["easy promptLine"]}},"easy ipadapterStyleComposition":{to:{COMBO:["easy promptLine"]}},"easy preDetailerFix":{from:{PIPE_LINE:["easy detailerFix",...Bi,...$i]},to:{PIPE_LINE:["easy ultralyticsDetectorPipe","easy samLoaderPipe","easy kSampler","easy fullkSampler"]}},"easy preMaskDetailerFix":{from:{PIPE_LINE:["easy detailerFix",...Bi,...$i]}},"easy samLoaderPipe":{from:{PIPE_LINE:["easy preDetailerFix",...Bi,...$i]}},"easy ultralyticsDetectorPipe":{from:{PIPE_LINE:["easy preDetailerFix",...Bi,...$i]}},"easy cascadeLoader":{from:{PIPE_LINE:["easy fullCascadeKSampler","easy preSamplingCascade",...Yi,...Bi,...$i],MODEL:es.filter((e=>!Ji.includes(e)))}},"easy fullCascadeKSampler":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced",...Bi,...$i]}},"easy preSamplingCascade":{from:{PIPE_LINE:["easy cascadeKSampler",...Bi,...$i]}},"easy cascadeKSampler":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced",...Bi,...$i]}},"easy pipeEdit":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...$i]},to:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i]}},"easy pipeEditPrompt":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...$i]},to:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i]}}};class is extends Error{constructor(e="Attempted to access LGraph reference that was null or undefined.",t){super(e,{cause:t}),this.name="NullGraphError"}}fe.registerExtension({name:"Comfy.EasyUse.Suggestions",async setup(e){const t=LGraphCanvas.prototype.createDefaultNodeForSlot;LGraphCanvas.prototype.createDefaultNodeForSlot=function(e){var i;const s=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,position:[],nodeType:null,posAdd:[0,0],posSizeFix:[0,0]},e||{}),n=this,a=s.nodeFrom&&null!==s.slotFrom,o=!a&&s.nodeTo&&null!==s.slotTo,l=a?s.nodeFrom:s.nodeTo;if(!l||!Object.keys(ts).includes(l.type))return t.call(this,e);if(!a&&!o)return!1;if(!s.nodeType)return!1;const r=a?s.nodeFrom:s.nodeTo;if(!r)throw new TypeError("nodeX was null when creating default node for slot.");const d=r.type;let u=a?s.slotFrom:s.slotTo,c=!1;switch(typeof u){case"string":c=a?r.findOutputSlot(u,!1):r.findInputSlot(u,!1),u=a?r.outputs[u]:r.inputs[u];break;case"object":if(null===u)return!1;c=a?r.findOutputSlot(u.name):r.findInputSlot(u.name);break;case"number":c=u,u=a?r.outputs[u]:r.inputs[u];break;default:return!1}var A=u.type==LiteGraph.EVENT?"_event_":u.type,p=a?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in;if(null==p?void 0:p[A]){let e=!1;const t=a?"from":"to";if(ts[d]&&ts[d][t]&&(null==(i=ts[d][t][A])?void 0:i.length)>0){for(var h in ts[d][t][A])if(s.nodeType==ts[d][t][A][h]||"AUTO"==s.nodeType){e=ts[d][t][A][h];break}}else if("object"==typeof p[A]||"array"==typeof p[A]){for(var h in p[A])if(s.nodeType==p[A][h]||"AUTO"==s.nodeType){e=p[A][h];break}}else s.nodeType!=p[A]&&"AUTO"!=s.nodeType||(e=p[A]);if(e){var m=!1;"object"==typeof e&&e.node&&(m=e,e=e.node);var f=LiteGraph.createNode(e);if(f){if(m){if(m.properties)for(var g in m.properties)f.addProperty(g,m.properties[g]);if(m.inputs)for(var g in f.inputs=[],m.inputs)f.addOutput(m.inputs[g][0],m.inputs[g][1]);if(m.outputs)for(var g in f.outputs=[],m.outputs)f.addOutput(m.outputs[g][0],m.outputs[g][1]);m.title&&(f.title=m.title),m.json&&f.configure(m.json)}n.graph.add(f),f.pos=[s.position[0]+s.posAdd[0]+(s.posSizeFix[0]?s.posSizeFix[0]*f.size[0]:0),s.position[1]+s.posAdd[1]+(s.posSizeFix[1]?s.posSizeFix[1]*f.size[1]:0)];const e={node:f,opts:s};if(!this.canvas.dispatchEvent(new CustomEvent("connect-new-default-node",{detail:e,cancelable:!0})))return!0;if(a){if(!s.nodeFrom)throw new TypeError("createDefaultNodeForSlot - nodeFrom was null");s.nodeFrom.connectByType(c,f,A)}else{if(!s.nodeTo)throw new TypeError("createDefaultNodeForSlot - nodeTo was null");s.nodeTo.connectByTypeOutput(c,f,A)}return!0}}}return!1};let i=LGraphCanvas.prototype.showConnectionMenu;LGraphCanvas.prototype.showConnectionMenu=function(e){var t;const s=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,e:void 0,allow_searchbox:this.allow_searchbox,showSearchBox:this.showSearchBox},e||{}),n=this,{graph:a}=this,{afterRerouteId:o}=s,l=s.nodeFrom&&s.slotFrom,r=!l&&s.nodeTo&&s.slotTo,d=l?s.nodeFrom:s.nodeTo;if(!d||!Object.keys(ts).includes(d.type))return i.call(this,e);if(!l&&!r)return!1;const u=l?s.nodeFrom:s.nodeTo;if(!u)throw new TypeError("nodeX was null when creating default node for slot.");let c=l?s.slotFrom:s.slotTo,A=!1;switch(typeof c){case"string":A=l?u.findOutputSlot(c,!1):u.findInputSlot(c,!1),c=l?u.outputs[c]:u.inputs[c];break;case"object":if(null===c)return;A=l?u.findOutputSlot(c.name):u.findInputSlot(c.name);break;case"number":A=c,c=l?u.outputs[c]:u.inputs[c];break;default:return!1}const p=["Add Node","Add Reroute",null];s.allow_searchbox&&p.push("Search",null);var h=c.type==LiteGraph.EVENT?"_event_":c.type,m=l?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in,f=u.type;if(m&&m[h]){const e=l?"from":"to";if(ts[f]&&ts[f][e]&&(null==(t=ts[f][e][h])?void 0:t.length)>0)for(var g in ts[f][e][h])p.push(ts[f][e][h][g]);else if("object"==typeof m[h]||"array"==typeof m[h])for(var g in m[h])p.push(m[h][g]);else p.push(m[h])}var v=new LiteGraph.ContextMenu(p,{event:s.e,extra:c,title:(c&&""!=c.name?c.name+(h?" | ":""):"")+(c&&h?h:""),callback:function(e,t,i){var r,d;switch(e){case"Add Node":LGraphCanvas.onMenuAdd(null,null,i,v,(function(e){var t,i;e&&(l?null==(t=s.nodeFrom)||t.connectByType(A,e,h,{afterRerouteId:o}):null==(i=s.nodeTo)||i.connectByTypeOutput(A,e,h,{afterRerouteId:o}))}));break;case"Add Reroute":const u=l?s.nodeFrom:s.nodeTo,p=t.extra;if(!a)throw new is;if(!u)throw new TypeError("Cannot add reroute: node was null");if(!p)throw new TypeError("Cannot add reroute: slot was null");if(!s.e)throw new TypeError("Cannot add reroute: CanvasPointerEvent was null");if(!u.connectFloatingReroute([s.e.canvasX,s.e.canvasY],p,o))throw new Error("Failed to create reroute");n.dirty_canvas=!0,n.dirty_bgcanvas=!0;break;case"Search":l?s.showSearchBox(i,{node_from:s.nodeFrom,slot_from:c,type_filter_in:h}):s.showSearchBox(i,{node_to:s.nodeTo,slot_from:c,type_filter_out:h});break;default:const m={position:[(null==(r=s.e)?void 0:r.canvasX)??0,(null==(d=s.e)?void 0:d.canvasY)??0],nodeType:e,afterRerouteId:o};n.createDefaultNodeForSlot(Object.assign(s,m))}}});return v}}}),fe.registerExtension({name:"Comfy.EasyUse.TimeTaken",setup(){let e=new Map,t=0;ge.addEventListener("execution_start",(e=>{graph&&graph._nodes.forEach((e=>{e.executionDuration&&delete e.executionDuration}))})),ge.addEventListener("executing",(i=>{if(!xe("EasyUse.Nodes.Runtime",null))return;const s=(null==i?void 0:i.node)||(null==i?void 0:i.detail)||null,n=e.get(t);if(e.delete(t),t&&n){const e=Date.now()-n,i=xt(t);i&&(i.executionDuration||(i.executionDuration=0),i.executionDuration=i.executionDuration+e/1e3)}t=s,e.set(s,Date.now())}))},beforeRegisterNodeDef(e,t){const i=e.prototype.onDrawForeground;e.prototype.onDrawForeground=function(...e){const[t]=e;return function(e,t){if(!t)return;t=parseFloat(t).toFixed(3)+Ne("s"),e.save(),e.fillStyle=LiteGraph.NODE_DEFAULT_BGCOLOR,function(e,t,i,s,n,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+n-a),e.arcTo(t+s,i+n,t+s-a,i+n,a),e.lineTo(t+a,i+n),e.arcTo(t,i+n,t,i+n-a,a),e.lineTo(t,i+a),e.arcTo(t,i,t+a,i,a),e.closePath()}(e,0,-LiteGraph.NODE_TITLE_HEIGHT-20,e.measureText(t).width+10,LiteGraph.NODE_TITLE_HEIGHT-10,4),e.fill(),function(e,t,i,s,n="#000",a=12,o="Inter"){e.font=`${a}px ${o}`,e.fillStyle=n,e.fillText(t,i,s)}(e,t,8,-LiteGraph.NODE_TITLE_HEIGHT-6,LiteGraph.NODE_TITLE_COLOR),e.restore()}(t,this.executionDuration),null==i?void 0:i.apply(this,e)}}});let ss=null;fe.registerExtension({name:"Comfy.EasyUse.HotKeys",setup(){if(void 0!==x){x("up,down,left,right",(function(e,t){var i,s,n,a,o,l,r,d,u,c,A,p,h,m,f;e.preventDefault();if(!xe("EasyUse.Hotkeys.JumpNearestNodes",null))return;const g=Lt();if(0===g.length)return;const v=g[0];switch(t.key){case"up":case"left":let e=null;if(Tt(v)){const e=null==(i=v.widgets_values)?void 0:i[0],t=null==(s=v.graph)?void 0:s._nodes,n=null==t?void 0:t.find((t=>{var i;if(Ot(t)){if((null==(i=t.widgets_values)?void 0:i[0])===e)return t}return null}));n&&Et(n)}else if((null==(n=v.inputs)?void 0:n.length)>0){for(let t=0;t{var i;if(Tt(t)){if((null==(i=t.widgets_values)?void 0:i[0])===e)return t}return null}));i&&Et(i)}else if((null==(c=v.outputs)?void 0:c.length)>0){for(let e=0;e0&&v.outputs[e].links[0]){t=v.outputs[e].links[0];break}if(t){const e=null==(p=v.graph)?void 0:p.links;if(e[t]){const i=null==(h=e[t])?void 0:h.target_id,s=null==(f=null==(m=v.graph)?void 0:m._nodes_by_id)?void 0:f[i];s&&Et(s)}}}}})),x("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(!xe("EasyUse.Hotkeys.AlignSelectedNodes",null))return;const i=Lt();if(i.length<=1)return;const s=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":Ft(s,"horizontal");break;case"shift+alt+ctrl+right":case"shift+alt+⌘+right":Ft(s,"vertical")}ss||(ss=Ke()),ss&&ss.update()})),x("shift+⌘+left,shift+⌘+right,shift+ctrl+left,shift+ctrl+right",(function(e,t){e.preventDefault();if(!xe("EasyUse.Hotkeys.NormalizeSelectedNodes",null))return;const i=Lt();if(i.length<=1)return;const s=i;switch(t.key){case"shift+ctrl+left":case"shift+⌘+left":Wt(s,"width");break;case"shift+ctrl+right":case"shift+⌘+right":Wt(s,"height")}ss||(ss=Ke()),ss&&ss.update()})),x("shift+g",(function(e,t){e.preventDefault();xe("EasyUse.Hotkeys.AddGroup",null)&&(as(),ss||(ss=Ke()),ss&&ss.update())})),x("shift+r",(function(e,t){e.preventDefault();xe("EasyUse.Hotkeys.cleanVRAMused",null)&&vi()})),x("shift+m",(function(e,t){var i,s,n;if(!xe("EasyUse.Hotkeys.toggleNodesMap",null))return;let a=(null==(i=fe.extensionManager)?void 0:i.sidebarTab)||fe.extensionManager,o=(null==(s=fe.extensionManager.sidebarTab)?void 0:s.activeSidebarTabId)||(null==(n=fe.extensionManager)?void 0:n.activeSidebarTab);a.activeSidebarTabId=o==Pe?null:Pe}));const e=[];Array.from(Array(10).keys()).forEach((t=>e.push(`alt+${t}`))),x(e.join(","),(async function(e,t){e.preventDefault();if(!xe("EasyUse.Hotkeys.NodesTemplate",null))return;const i=t.key;let s=parseInt(i.split("+")[1]);const n=await ge.getUserData("comfy.templates.json");let a=null;if(200==n.status)try{a=await n.json()}catch(l){Ye.error(Ne("Get Node Templates File Failed"))}else localStorage["Comfy.NodeTemplates"]?a=JSON.parse(localStorage["Comfy.NodeTemplates"]):Ye.warn(Ne("No Node Templates Found"));if(!a)return void Ye.warn(Ne("No Node Templates Found"));s=0===s?9:s-1;const o=a[s];if(o)try{const e=(null==o?void 0:o.name)||"Group",t=(null==o?void 0:o.data)?JSON.parse(o.data):[];ns((async()=>{await _e.registerFromWorkflow(t.groupNodes,{}),localStorage.litegrapheditor_clipboard=o.data,fe.canvas.pasteFromClipboard(),t.groupNodes||as(e)}))}catch(l){Ye.error(l)}else Ye.warn(Ne("Node template with {key} not set").replace("{key}",i))}));const t=async function(e){if(("b"===e.key||"m"==e.key)&&(e.metaKey||e.ctrlKey)){if(0===Lt().length)return;ss||(ss=Ke()),ss&&ss.update()}};window.addEventListener("keydown",t,!0)}}});const ns=async e=>{const t=localStorage.litegrapheditor_clipboard;await e(),localStorage.litegrapheditor_clipboard=t},as=e=>{const t=Lt();if(0===t.length)return;const i=t;let s=new LiteGraph.LGraphGroup;s.title=e||"Group",((e,t=[],i=20)=>{var s,n,a,o,l,r,d,u,c,A;for(var p of(n=a=o=l=-1,r=d=u=c=-1,[e._nodes,t]))for(var h in p)r=(A=p[h]).pos[0],d=A.pos[1],u=A.pos[0]+A.size[0],c=A.pos[1]+A.size[1],"Reroute"!=A.type&&(d-=LiteGraph.NODE_TITLE_HEIGHT),(null==(s=A.flags)?void 0:s.collapsed)&&(c=d+LiteGraph.NODE_TITLE_HEIGHT,(null==A?void 0:A._collapsed_width)&&(u=r+Math.round(A._collapsed_width))),(-1==n||ro)&&(o=u),(-1==l||c>l)&&(l=c);a-=Math.round(1.4*e.font_size),e.pos=[n-i,a-i],e.size=[o-n+2*i,l-a+2*i]})(s,i),fe.canvas.graph.add(s)},os="easy imageChooser",ls=e=>(null==e?void 0:e.comfyClass)===os;fe.registerExtension({name:"Comfy.EasyUse.imageChooser",setup(){const e=ge.interrupt;ge.interrupt=function(){var t;(null==(t=fe.graph)?void 0:t._nodes_by_id)&&(()=>{var e;Object.values(null==(e=fe.graph)?void 0:e._nodes_by_id).forEach((e=>{ls(e)&&e.cancelSelection("interrupt")}))})(),e.apply(this,arguments)},ge.addEventListener("easyuse-image-choose",(e=>{var t;const i=e.detail,s=fe.graph._nodes_by_id[i.id];if(!s||!ls(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;const n=(null==(t=i.urls)?void 0:t.map(((e,t)=>({index:t,filename:e.filename,subfolder:e.subfolder,type:e.type}))))||[];s.imageData=n,s.imgs=[],n.forEach((e=>{const t=new Image;t.onload=()=>{fe.graph.setDirtyCanvas(!0)},t.src=`/view?filename=${encodeURIComponent(e.filename)}${(e=>`&type=${e.type}&subfolder=${e.subfolder}&rand=${e.random}`)(e)}`,s.imgs.push(t)})),s.update(),"Always Pause"===s.currentMode&&s.setExecutingState(!0)})),ge.addEventListener("easyuse-image-keep-selection",(e=>{const t=e.detail,i=fe.graph._nodes_by_id[t.id];i&&ls(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==os){e.prototype.confirmSelection=function(){ge.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){ge.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(){var e;if(!this.confirm_button_widget||!this.cancel_button_widget)return;const t=this.selected_images.size,i=(null==(e=this.imgs)?void 0:e.length)||0;if(this.isCanceling)this.confirm_button_widget.name=Ne("Canceling"),this.cancel_button_widget.name="",this.confirm_button_widget.disabled=!0,this.cancel_button_widget.disabled=!0;else if(this.isWaitingSelection)t>0?(this.confirm_button_widget.name=t>1?`${Ne("Progress selected")} (${t}/${i})`:`${Ne("Progress selected image")}`,this.confirm_button_widget.disabled=!1):(this.confirm_button_widget.name=Ne("Please select images to continue"),this.confirm_button_widget.disabled=!0),this.cancel_button_widget.name=Ne("Cancel current run"),this.cancel_button_widget.disabled=!1;else{const e={"Always Pause":Ne("Waiting for selection..."),"Keep Last Selection":Ne("Using last selection")};this.confirm_button_widget.name=(t>0&&"Always Pause"==this.currentMode?Ne("Please run first"):null==e?void 0:e[this.currentMode])||Ne("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(){const e=LiteGraph.LGraphNode.prototype.serialize.call(this);return e.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,fe.graph&&fe.graph.setDirtyCanvas(!0,!1)};const t=e.prototype.update;e.prototype.update=function(){null==t||t.call(this,arguments),this.updateWidgets()};const i=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){null==i||i.call(this,arguments),this.selected_images=new Set,this.anti_selected=new Set,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=>{const t=wt(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(){return this._clicked},set:function(e){this._clicked=e&&""!=this.name}}),Object.defineProperty(this.cancel_button_widget,"clicked",{get:function(){return this._clicked},set:function(e){this._clicked=e&&""!=this.name}}),Object.defineProperty(this,"imageIndex",{get:function(){return null},set:function(e){this.overIndex=e}}),Object.defineProperty(this,"imagey",{get:function(){var e,t;return(null==(t=null==(e=this.widgets)?void 0:e[this.widgets.length-1])?void 0:t.last_y)+LiteGraph.NODE_WIDGET_HEIGHT},set:function(e){this.imagey=e}});const e=this.onMouseDown;this.onMouseDown=function(t,i,s){if(t.isPrimary){const e=rs(this,i);e>=0&&this.toggleImageSelection(e)}return e&&e.apply(this,arguments)},this.update()},e.prototype.onDrawBackground,e.prototype.onDrawBackground=function(e){!function(e,t,i=0){var s,n;if(!e.imgs||!e.imgs.length)return;const a=fe.canvas,o=a.graph_mouse,l=15,r=e.size[0];let d=e.size[1]-i-l;d<200&&(d=200,requestAnimationFrame((t=>{e.size[1]=i+l+200})));if(null==e.imageIndex){let n,l,u,c;if(us(e.imgs))({cellWidth:n,cellHeight:l,cols:c,shiftX:u}=cs(e.imgs,r,d));else{const t=e.imgs.reduce(((e,t)=>Math.max(e,t.naturalWidth,t.naturalHeight)),0),i=[];i.length=null==(s=e.imgs)?void 0:s.length,i[0]={naturalWidth:t,naturalHeight:t},({cellWidth:n,cellHeight:l,cols:c,shiftX:u}=cs(i,r,d))}let A=!1,p=e.imgs.length;e.imageRects=[];for(let s=0;s{ds(e,i,t)}));t.strokeStyle="#F88",null==(n=null==e?void 0:e.anti_selected)||n.forEach((i=>{ds(e,i,t)}))}(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()}}}});const rs=(e,t)=>{var i,s;if((null==(i=e.imgs)?void 0:i.length)>1)for(var n=0;n0&&i0&&se.imagey)return 0;return-1};function ds(e,t,i){var s;if(e.imageRects)s=e.imageRects[t];else{const t=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)}const us=e=>{if(!e.length||1===e.length)return!0;const t=e[0].naturalWidth/e[0].naturalHeight;for(let i=1;is&&(s=y,l=g,r=v,d=A,u=e,c=A*((p-g)/2))}return{cellWidth:l,cellHeight:r,cols:d,rows:u,shiftX:c}}Number.prototype.div=function(e){return function(e,t){let i,s,n=0,a=0,o="string"==typeof e?e:e.toString(),l="string"==typeof t?t:t.toString();try{n=o.toString().split(".")[1].length}catch(r){}try{a=l.toString().split(".")[1].length}catch(r){}return i=Number(o.toString().replace(".","")),s=Number(l.toString().replace(".","")),i/s*Math.pow(10,a-n)}(this,e)};let As=[],ps=0;const hs={sd3:6.5,"sd3-turbo":4};class ms extends ye{constructor(){super(),this.lists=[],this.dialog_div=null,this.user_div=null}addItem(e,t){return ve("div.easyuse-account-dialog-item",[ve("input",{type:"text",placeholder:"Enter name",oninput:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);As[t].name=e.target.value},value:As[e].name}),ve("input.key",{type:"text",oninput:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);As[t].key=e.target.value},placeholder:"Enter APIKEY",value:As[e].key}),ve("button.choose",{textContent:Ne("Choose"),onclick:async e=>{var i,s,n;const a=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);let o=As[a].name,l=As[a].key;if(!o)return void Ye.error(Ne("Please enter the account name"));if(!l)return void Ye.error(Ne("Please enter the APIKEY"));let r=!0;for(let t=0;t{(new ms).show(t)}},[ve("div.user",[ve("div.avatar",a?[ve("img",{src:a})]:"😀"),ve("div.info",[ve("h5.name",o),ve("h6.remark","Credits: "+l)])]),ve("div.edit",{textContent:Ne("Edit")})])),Ye.success(Ne("Save Succeed"))}else Ye.success(Ne("Save Succeed"));this.close()}else Ye.error(Ne("Save Failed"))}}),ve("button.delete",{textContent:Ne("Delete"),onclick:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);As.length<=1?Ye.error(Ne("At least one account is required")):(As.splice(t,1),this.dialog_div.removeChild(e.target.parentNode))}})])}show(e){As.forEach(((t,i)=>{this.lists.push(this.addItem(i,e))})),this.dialog_div=ve("div.easyuse-account-dialog",this.lists),super.show(ve("div.easyuse-account-dialog-main",[ve("div",[ve("a",{href:"https://platform.stability.ai/account/keys",target:"_blank",textContent:Ne("Getting Your APIKEY")})]),this.dialog_div]))}createButtons(){const e=super.createButtons();return e.unshift(ve("button",{type:"button",textContent:Ne("Save Account Info"),onclick:e=>{let t=!0;for(let i=0;i{200==e.status?Ye.success(Ne("Save Succeed")):Ye.error(Ne("Save Failed"))}))}else Ye.error(Ne("APIKEY is not Empty"))}})),e.unshift(ve("button",{type:"button",textContent:Ne("Add Account"),onclick:e=>{const t="Account "+As.length.toString();As.push({name:t,key:""});const i=this.addItem(As.length-1);this.lists.push(i),this.dialog_div.appendChild(i)}})),e}}fe.registerExtension({name:"Comfy.EasyUse.API.SD3",async beforeRegisterNodeDef(e,t,i){if("easy stableDiffusion3API"==t.name){const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=async function(){var e,i,s;t&&(null==t||t.apply(this,arguments));const n=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),a=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));let o=this.widgets.find((e=>"model"==e.name));o.callback=e=>{l.value="-"+hs[e]};const l=this.addWidget("text","cost_credit","0",(e=>{}),{serialize:!1});l.disabled=!0,a&&setTimeout((e=>{"control before generate"==a.name&&0===n.value&&(n.value=Math.floor(4294967294*Math.random())),l.value="-"+hs[o.value]}),100);let r=ve("div.easyuse-account-user",[Ne("Loading UserInfo...")]);this.addDOMWidget("account","btn",ve("div.easyuse-account",r)),ge.addEventListener("stable-diffusion-api-generate-succeed",(async({detail:e})=>{var t;let i=r.querySelectorAll(".remark");if(i&&i[0]){const t=(null==e?void 0:e.model)?hs[e.model]:0;if(t){let e=function(e,t){let i,s,n,a,o,l;o="string"==typeof e?e:e.toString(),l="string"==typeof t?t:t.toString();try{i=o.split(".")[1].length}catch(r){i=0}try{s=l.split(".")[1].length}catch(r){s=0}return n=Math.pow(10,Math.max(i,s)),a=i>=s?i:s,((e*n-t*n)/n).toFixed(a)}(parseFloat(i[0].innerText.replace(/Credits: /g,"")),t);e>0&&(i[0].innerText="Credits: "+e.toString())}}await Xe(1e4);const s=await ge.fetchApi("/easyuse/stability/balance");if(200==s.status){const e=await s.json();if(null==e?void 0:e.balance){const s=(null==(t=e.balance)?void 0:t.credits)||0;i&&i[0]&&(i[0].innerText="Credits: "+s)}}}));const d=await ge.fetchApi("/easyuse/stability/api_keys");if(200==d.status){let t=await d.json();if(As=t.keys,ps=t.current,As.length>0&&void 0!==ps){const t=As[ps].key,n=As[ps].name;if(t){const t=await ge.fetchApi("/easyuse/stability/user_info");if(200==t.status){const n=await t.json();if((null==n?void 0:n.account)&&(null==n?void 0:n.balance)){const t=(null==(e=n.account)?void 0:e.profile_picture)||null,a=(null==(i=n.account)?void 0:i.email)||null,o=(null==(s=n.balance)?void 0:s.credits)||0;r.replaceChildren(ve("div.easyuse-account-user-info",{onclick:e=>{(new ms).show(r)}},[ve("div.user",[ve("div.avatar",t?[ve("img",{src:t})]:"😀"),ve("div.info",[ve("h5.name",a),ve("h6.remark","Credits: "+o)])]),ve("div.edit",{textContent:Ne("Edit")})]))}}}else r.replaceChildren(ve("div.easyuse-account-user-info",{onclick:e=>{(new ms).show(r)}},[ve("div.user",[ve("div.avatar","😀"),ve("div.info",[ve("h5.name",n),ve("h6.remark",Ne("Click to set the APIKEY first"))])]),ve("div.edit",{textContent:Ne("Edit")})]))}}}}}});let fs=null;function gs(){fs&&(fs.removeEventListeners(),fs.dropdown.remove(),fs=null)}function vs(e,t,i,s=!1){gs(),new ys(e,t,i,s)}class ys{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)}));const e=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),fs=this}buildNestedDropdown(e,t){let i=0;Object.keys(e).forEach((s=>{const n=e[s];if("object"==typeof n&&null!==n){const e=document.createElement("ul");e.setAttribute("role","listbox"),e.classList.add("easy-nested-dropdown");const a=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(n,e),i+=1}else{const e=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){const s=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){const t=Array.from(this.focusedDropdown.children),i=t[this.selectedIndex];if(fs)if(38===e.keyCode)e.preventDefault(),this.selectedIndex=Math.max(0,this.selectedIndex-1),this.updateSelection();else if(40===e.keyCode)e.preventDefault(),this.selectedIndex=Math.min(t.length-1,this.selectedIndex+1),this.updateSelection();else if(39===e.keyCode){if(e.preventDefault(),i&&i.classList.contains("folder")){const e=i.querySelector(".easy-nested-dropdown");e&&(this.focusedDropdown=e,this.selectedIndex=0,this.updateSelection())}}else if(37===e.keyCode&&this.focusedDropdown!==this.dropdown){const e=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())}else if((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());const s=i.querySelector(".easy-nested-dropdown");s&&(this.focusedDropdown=s,this.selectedIndex=0,this.updateSelection())}else 27===e.keyCode&&(this.dropdown.remove(),this.removeEventListeners())}onWheel(e){const t=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")}))}}function ws(e){const t=e.min||0,i=e.max||0,s=e.step||1;if(0===s)return[];const n=[];let a=t;for(;a<=i;){if(Number.isInteger(s))n.push(Math.round(a)+"; ");else{let e=a.toFixed(3);-0==e&&(e="0.000"),/\.\d{3}$/.test(e)||(e+="0"),n.push(e+"; ")}a+=s}return i>=0&&t>=0?n:n.reverse()}let bs={},_s={};function Ss(e,t){String(e.id);const i=t.name,s=t.value.replace(/^(loader|preSampling):\s/,"");_s[i]?_s[i]!=bs[s]&&(_s[i]=bs[s]):_s={..._s,[i]:bs[s]}}fe.registerExtension({name:"Comfy.EasyUse.XYPlot",async beforeRegisterNodeDef(e,t,i){if("easy XYPlot"===t.name){bs=t.input.hidden.plot_dict[0];for(const e in bs){const t=bs[e];if(Array.isArray(t)){let i=[];for(const e of t)i.push(e+"; ");bs[e]=i}else bs[e]="object"==typeof t?"seed"==e?t+"; ":ws(t):t+"; "}bs.None=[],bs["---------------------"]=[]}},nodeCreated(e){"easy XYPlot"===e.comfyClass&&(function(e){if(e.widgets)for(const t of e.widgets)if("x_axis"===t.name||"y_axis"===t.name){let i=t.value;Object.defineProperty(t,"value",{get:()=>i,set(s){s!==i&&(i=s,Ss(e,t))}})}}(e),function(e){if(e.widgets){const t=e.widgets.filter((e=>"customtext"===e.type&&!1!==e.dynamicPrompts||e.dynamicPrompts));for(const e of t){let t=function(e,t,s,n){return e&&(t[s]=e),t.map((e=>i(e,n))).filter((e=>""!==e)).join("")},i=function(e,t){if(e=s(e),n(e,t))return e+"; ";let i=a(e,t);return 1===i.length||2===i.length?i[0]:n(o(e),t)?o(e)+"; ":""},s=function(e){return e.replace(/(\n|;| )/g,"")},n=function(e,t){return t.includes(e+"; ")},a=function(e,t){return t.filter((t=>t.toLowerCase().includes(e.toLowerCase())))},o=function(e){return Number(e)?Number(e).toFixed(3):["0","0.","0.0","0.00","00"].includes(e)?"0.000":e};const l=function(){const i=e.name[0]+"_axis";let s=(null==_s?void 0:_s[i])||[];if(0===s.length)return;const n=e.inputEl.value,a=e.inputEl.selectionStart;let o=n.split("; ");const l=n.substring(0,a).split("; ").length-1,r=o[l].replace(/\n/g,"").toLowerCase(),d=s.filter((e=>e.toLowerCase().includes(r))).map((e=>e.replace(/; /g,"")));if(d.length>0)vs(e.inputEl,d,(i=>{const n=t(i,o,l,s);e.inputEl.value=n}));else{gs();const i=t(null,o,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)}}}(e))}}),S("domWidget",(()=>{const e=P(new Map);return{widgetStates:e,registerWidget:t=>{e.value.set(t.id,{widget:G(t),visible:!0,readonly:!1,zIndex:0,pos:[0,0],size:[0,0]})},unregisterWidget:t=>{e.value.delete(t)}}}));const xs={class:"w-full flex justify-between items-center"},Ls={class:"flex justify-start items-center flex-1 gap-2"},ks={class:"flex justify-end items-center tool ml-2 position-relative"},Es={__name:"promptAwait",props:["widget"],setup(e){const t=P({select:"now",unlock:!0,last_seed:0,seed:0}),i=P(!1),s=P(!1);let n=null;const a=()=>{if(s.value)return;const t=window.SpeechRecognition||window.webkitSpeechRecognition;t&&(s.value=!0,n||(n=new t,n.interimResults=!1),n.start(),n.addEventListener("result",(t=>{var i;const s=t.results[0][0].transcript;let n=null==(i=e.widget.value)?void 0:i.node,a=wt(n,"prompt");a&&(a.value+=s)})),n.addEventListener("end",(()=>{s.value=!1,n=null})),n.addEventListener("error",(e=>{})))},o=()=>{s.value&&n&&n.stop()};z((t=>e.widget.value),(e=>{t.value="object"==typeof e?e:JSON.parse(e)}),{immediate:!0}),V((s=>{ge.addEventListener("easyuse_prompt_await",(t=>{var s,n,a,o,l,d;const u=t.detail.id,c=-1!==(null==(s=e.widget.value)?void 0:s.node.id).toString().indexOf(":")?(null==(n=e.widget.value)?void 0:n.node.id).toString().split(":")[0]:null==(a=e.widget.value)?void 0:a.node.id;parseInt(u)===parseInt(c)&&(i.value=!0,r("last_seed",(null==(o=e.widget.value.value)?void 0:o.seed)||0),(null==(l=e.widget.value.value)?void 0:l.unlock)?r("seed",Math.floor(Math.random()*Oe)):r("seed",(null==(d=e.widget.value.value)?void 0:d.last_seed)||0))}));const n=ge.interrupt;ge.interrupt=function(){!i.value&&fe.runningNodeId||(l(JSON.stringify({result:-1,prompt:"",select:"now"}),!0),i.value=!1),n.apply(this,arguments)},e.widget.serializeValue=async({node:e},i)=>{try{let s=JSON.stringify(t.value);return(null==e?void 0:e.widgets_values)&&(e.widgets_values[i]=s,e.widgets[i].value=s),s}catch(s){return[]}}}));const l=(s,n)=>{var a,o,l,d,u,c,A,p,h;if(!i.value&&!n)return;const m=new FormData,f=null==(a=e.widget.value)?void 0:a.node,g=-1!==(null==(o=e.widget.value)?void 0:o.node.id).toString().indexOf(":")?(null==(l=e.widget.value)?void 0:l.node.id).toString().split(":")[0]:null==(d=e.widget.value)?void 0:d.node.id,v=(null==(u=wt(f,"prompt"))?void 0:u.value)||"";let y=null==(c=t.value)?void 0:c.select,w=(null==(A=t.value)?void 0:A.last_seed)||0,b=(null==(p=t.value)?void 0:p.seed)||0,_=(null==(h=t.value)?void 0:h.unlock)||!1;m.append("message",JSON.stringify({result:s,prompt:v,select:y,last_seed:w,seed:b,unlock:_})),m.append("id",g),i.value=!1,ge.fetchApi("/easyuse/message_callback",{method:"POST",body:m}).then((e=>{r("select","now")}))},r=(e,i)=>{t.value.value||(t.value={}),t.value[e]=i};return(e,n)=>(j(),U("div",xs,[W("div",Ls,[F(X(L),{disabled:!Boolean(i.value),label:X(Ne)("Continue"),size:"small",style:{height:"20px","font-size":"12px","white-space":"nowrap",padding:"0 8px"},onClick:n[0]||(n[0]=e=>l(1))},null,8,["disabled","label"]),F(X(L),{disabled:!Boolean(i.value),label:X(Ne)("Stop"),severity:"danger",size:"small",style:{height:"20px","font-size":"12px","white-space":"nowrap",padding:"0 8px"},onClick:n[1]||(n[1]=e=>l(-1))},null,8,["disabled","label"]),F(X(k),{class:"easyuse-prompt-await-select",modelValue:t.value.select,"onUpdate:modelValue":n[2]||(n[2]=e=>t.value.select=e),options:[{name:X(Ne)("now"),value:"now"},{name:X(Ne)("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"])]),W("div",ks,[Z(F(X(L),{style:{"--p-button-sm-font-size":"11px"},size:"small",icon:t.value.unlock?"pi pi-unlock":"pi pi-lock",severity:t.value.unlock?"contrast":"warn",variant:"text",onClick:n[3]||(n[3]=e=>t.value.unlock=!t.value.value.unlock),rounded:""},null,8,["icon","severity"]),[[X(E),{value:t.value.unlock?"随机种子":"锁定种子值",class:"jm-tooltip"},"top"]]),s.value?Z((j(),H(X(L),{key:0,size:"small",icon:"pi pi-pause-circle",severity:"info",variant:"outlined",onClick:o,rounded:""},null,512)),[[X(E),{value:X(Ne)("Stop Recording"),class:"jm-tooltip"},"top"]]):Z((j(),H(X(L),{key:1,size:"small",icon:"pi pi-microphone",severity:"contrast",variant:"text",onClick:a,rounded:""},null,512)),[[X(E),{value:X(Ne)("Voice input"),class:"jm-tooltip"},"top"]])])]))}},Ns={class:"easyuse-multiselect"},Cs={__name:"multiSelectWidget",props:["widget"],setup(e){var t,i,s,n;const a=Object.keys(De).reduce(((e,t)=>(Array.isArray(De[t])?e[t]=De[t].map(((e,t)=>({label:e,value:t}))):"object"==typeof De[t]?e[t]=Object.entries(De[t]).map((([e,t])=>({label:e,value:t}))):e[t]=[],e)),{}),o=P([]),l=e.widget.inputSpec,r=(null==(t=null==l?void 0:l.multi_select)?void 0:t.max_selected_labels)??3,d=(null==l?void 0:l.optionLabel)??"label",u=(null==l?void 0:l.optionValue)??"value",c=(null==(i=null==l?void 0:l.multi_select)?void 0:i.placeholder)?Ne(null==(s=l.multi_select)?void 0:s.placeholder):Ne("select items"),A=(null==(n=null==l?void 0:l.multi_select)?void 0:n.chip)?"chip":"comma",p=P((null==l?void 0:l.options)??[]),h=e=>{e&&a[e]?p.value=a[e].map(((e,t)=>({label:Ne(e.label),value:e.value}))):p.value=[]};return z((t=>e.widget.value),(e=>{o.value=e.split(",").map((e=>e&&parseInt(e.trim())))})),V((t=>{setTimeout((t=>{const i=wt(e.widget.node,"method");h(i.value),i.callback=e=>{o.value=[],h(e)}}),1),e.widget.serializeValue=async({node:e},t)=>{try{let i=o.value||[];return i=i.join(","),(null==e?void 0:e.widgets_values)&&(e.widgets_values[t]=i,e.widgets[t].value=i),i}catch(i){return[]}}})),(e,t)=>(j(),U("div",Ns,[F(X(N),{modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=e=>o.value=e),options:p.value,optionLabel:X(d),optionValue:X(u),appendTo:"self",filter:"",placeholder:X(c),"max-selected-labels":X(r),display:X(A),class:"w-full easyuse-multiselect-container"},null,8,["modelValue","options","optionLabel","optionValue","placeholder","max-selected-labels","display"])]))}},Is={class:"flex flex-col easyuse-multiangle-widget"},Ts={class:"easyuse-multiangle-tabs flex items-center gap-1 px-1 relative z-10 overflow-x-auto no-scrollbar w-full min-w-0"},Os=["onClick"],Ms={class:"tab-number"},Ds=["onClick"],Rs=["title"],Ps={class:"easyuse-multiangle-content flex flex-col gap-2"},Gs=["title"],zs={class:"settings-item flex items-center"},Vs={for:"add-angle-prompt",class:"whitespace-nowrap"},js={class:"settings-item flex items-center"},Us={for:"hollow-mode",class:"whitespace-nowrap"},Ws={class:"settings-item flex items-center"},Fs={for:"rotate-3d-mode",class:"whitespace-nowrap"},Xs=["title"],Zs=["onDblclick"],Hs={key:0},qs={key:0,style:{filter:"grayscale(10)"}},Ys={key:0,class:"absolute inset-0 flex flex-col items-center justify-center",style:{"pointer-events":"none"}},Ks={key:1,class:"easyuse-cube-face-label"},Js={class:"flex flex-col gap-2 px-2 w-full easyuse-mulitangle-slider"},Bs={class:"flex flex-col gap-2 w-full"},Qs={class:"flex justify-between items-center"},$s={class:"font-semibold opacity-80"},en={class:"font-mono text-primary font-bold"},tn={class:"flex flex-col gap-2 w-full"},sn={class:"flex justify-between items-center"},nn={class:"font-semibold opacity-80"},an={class:"font-mono text-primary font-bold"},on={class:"flex flex-col gap-2 w-full"},ln={class:"flex justify-between items-center"},rn={class:"font-semibold opacity-80"},dn={class:"font-mono text-primary font-bold"},un={__name:"multiAngleWidget",props:["widget"],emits:["update:value","change"],setup(e,{emit:t}){const i=P([{rotate:0,vertical:0,zoom:5,add_angle_prompt:!1}]),s=P(0),n=i.value[s.value]||{rotate:0,vertical:0,zoom:5,add_angle_prompt:!1},a=P(n.rotate??0),o=P(n.vertical??0),l=P(n.zoom??5),r=P(n.add_angle_prompt??!1),d=P(xe("EasyUse.MultiAngle.HollowMode")||!1),u=P(xe("EasyUse.MultiAngle.3DRotate")||!1),c=P(!1),A=()=>{c.value=!c.value},p=()=>{c.value&&(c.value=!1)};V((()=>{window.addEventListener("click",p)})),q((()=>{window.removeEventListener("click",p),L()})),z((t=>e.widget.value),(e=>{Array.isArray(e)?i.value=e:i.value=JSON.parse(e)}),{immediate:!0}),z((()=>{var e;return null==(e=i.value)?void 0:e[s.value]}),(e=>{if(e){let t=xe("EasyUse.MultiAngle.AddAnglePrompt")??!1;void 0!==e.rotate&&(a.value=e.rotate),void 0!==e.vertical&&(o.value=e.vertical),void 0!==e.zoom&&(l.value=e.zoom),null!=r&&(r.value=t)}}),{deep:!0}),z(d,(e=>{ke("EasyUse.MultiAngle.HollowMode",e)})),z(u,(e=>{ke("EasyUse.MultiAngle.InvertRotate",e)})),z(r,(e=>{ke("EasyUse.MultiAngle.AddAnglePrompt",e),i.value.forEach((t=>{t.add_angle_prompt=e}))}));const h=e=>{s.value=e;const t=i.value[e];t&&(a.value=t.rotate??0,o.value=t.vertical??0,l.value=t.zoom??5,r.value=t.add_angle_prompt??!0)},m=()=>{i.value[s.value];const e={rotate:a.value,vertical:o.value,zoom:l.value,add_angle_prompt:r.value};i.value.push(JSON.parse(JSON.stringify(e))),s.value=i.value.length-1,h(s.value)},f=(e=!1)=>{e&&(c.value=!1);const t={rotate:a.value,vertical:o.value,zoom:l.value,add_angle_prompt:r.value};Array.isArray(i.value)||(i.value=[]),i.value[s.value]=JSON.parse(JSON.stringify(t))},g=()=>{a.value=0,o.value=0,l.value=5,f()},v=Y((()=>[{name:"front",text:"",style:{transform:"translateZ(40px)"}},{name:"back",text:Ne("B"),style:{transform:"rotateY(180deg) translateZ(40px)"}},{name:"up",text:Ne("U"),style:{transform:"rotateX(90deg) translateZ(40px)"}},{name:"down",text:Ne("D"),style:{transform:"rotateX(-90deg) translateZ(40px)"}},{name:"left",text:Ne("L"),style:{transform:"rotateY(-90deg) translateZ(40px)"}},{name:"right",text:Ne("R"),style:{transform:"rotateY(90deg) translateZ(40px)"}},{name:"center",style:{transform:"translateZ(0.1px)",border:"none",background:"transparent",backfaceVisibility:"hidden"}},{name:"center-back",style:{transform:"rotateY(180deg) translateZ(0.1px)",border:"none",backfaceVisibility:"hidden",background:"transparent"}}])),y=P(!1),w={x:0,y:0},b={rotate:0,vertical:0},_=e=>{const t=e.deltaY;let i=l.value-.05*t;i=Math.max(0,Math.min(10,i)),l.value=Math.round(10*i)/10,f()},S=e=>{y.value=!0,w.x=e.clientX??e.touches[0].clientX,w.y=e.clientY??e.touches[0].clientY,b.rotate=a.value,b.vertical=o.value,window.addEventListener("mousemove",x),window.addEventListener("mouseup",L),window.addEventListener("touchmove",x),window.addEventListener("touchend",L)},x=e=>{if(!y.value)return;const t=e.clientX??e.touches[0].clientX,i=e.clientY??e.touches[0].clientY;let s=t-w.x,n=i-w.y;u.value&&(s=-s,n=-n);let l=b.rotate+.5*s,r=b.vertical+.5*n;l=(l%360+360)%360,r=Math.max(-90,Math.min(90,r)),a.value=Math.round(l),o.value=Math.round(r),f()},L=()=>{y.value=!1,window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",L),window.removeEventListener("touchmove",x),window.removeEventListener("touchend",L)},k=Y((()=>({transform:`scale(${1+.1*l.value}) rotateX(${-o.value}deg) rotateY(${-a.value}deg)`})));return V((t=>{d.value=xe("EasyUse.MultiAngle.HollowMode"),u.value=xe("EasyUse.MultiAngle.InvertRotate"),r.value=xe("EasyUse.MultiAngle.AddAnglePrompt")||!1,e.widget.serializeValue=async({node:e},t)=>{try{let s=JSON.stringify(i.value);return(null==e?void 0:e.widgets_values)&&(e.widgets_values[t]=s,e.widgets[t].value=s),s}catch(s){return[]}}})),(e,t)=>(j(),U("div",Is,[W("div",Ts,[(j(!0),U(K,null,J(i.value,((e,t)=>(j(),U("div",{key:t,class:B(["tab-item whitespace-nowrap flex-shrink-0",{active:s.value===t}]),onClick:e=>h(t)},[W("span",Ms,ee(t+1),1),i.value.length>1&&0!==t?(j(),U("i",{key:0,class:"pi pi-times tab-close",onClick:Q((e=>(e=>{i.value.length<=1||(i.value.splice(e,1),s.value>=i.value.length&&(s.value=i.value.length-1),h(s.value))})(t)),["stop"])},null,8,Ds)):te("",!0)],10,Os)))),128)),W("button",{class:"tab-add-btn flex-shrink-0",onClick:m,title:X(Ne)("Add New Tab")},t[10]||(t[10]=[W("i",{class:"pi pi-plus"},null,-1)]),8,Rs)]),W("div",Ps,[W("div",{class:B(["easyuse-multiangle-cube w-full flex items-center justify-center bg-black overflow-hidden select-none",{"is-hollow":d.value}]),onMousedown:S,onTouchstart:S,onWheel:Q(_,["prevent"])},[W("div",{class:"settings-icon",onMousedown:t[5]||(t[5]=Q((()=>{}),["stop"])),onClick:Q(A,["stop"]),title:X(Ne)("Settings")},[t[11]||(t[11]=W("i",{class:"pi pi-cog"},null,-1)),c.value?(j(),U("div",{key:0,class:"settings-dropdown",onClick:t[4]||(t[4]=Q((()=>{}),["stop"]))},[W("div",zs,[Z(W("input",{type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=e=>r.value=e),onChange:t[1]||(t[1]=e=>f(!1)),id:"add-angle-prompt"},null,544),[[$,r.value]]),W("label",Vs,ee(X(Ne)("Angle Prompt")),1)]),W("div",js,[Z(W("input",{type:"checkbox","onUpdate:modelValue":t[2]||(t[2]=e=>d.value=e),id:"hollow-mode"},null,512),[[$,d.value]]),W("label",Us,ee(X(Ne)("Hollow")),1)]),W("div",Ws,[Z(W("input",{type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=e=>u.value=e),id:"rotate-3d-mode"},null,512),[[$,u.value]]),W("label",Fs,ee(X(Ne)("Invert Rotate Mode")),1)])])):te("",!0)],40,Gs),W("div",{class:"reset-icon",onMousedown:t[6]||(t[6]=Q((()=>{}),["stop"])),onClick:Q(g,["stop"]),title:X(Ne)("Reset")},t[12]||(t[12]=[W("i",{class:"pi pi-refresh"},null,-1)]),40,Xs),W("div",{class:"relative transition-transform duration-75 ease-out",style:ie([{"transform-style":"preserve-3d",width:"80px",height:"80px"},k.value])},[(j(!0),U(K,null,J(v.value,(e=>(j(),U("div",{key:e.name,class:"absolute flex items-center justify-center font-bold text-xs easyuse-multiangle-cube-face",style:ie([{width:"80px",height:"80px","backface-visibility":"visible"},e.style]),onDblclick:Q((t=>(e=>{switch(e){case"front":a.value=0;break;case"back":a.value=180;break;case"left":a.value=270;break;case"right":a.value=90;break;case"up":o.value=90;break;case"down":o.value=-90}f()})(e.name)),["stop"])},["center"===e.name?(j(),U(K,{key:0},[d.value?(j(),U("div",Hs,t[13]||(t[13]=[W("div",{style:{"font-size":"20px","text-align":"center"}},"🤓",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👕",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👖",-1)]))):te("",!0)],64)):"center-back"===e.name?(j(),U(K,{key:1},[d.value?(j(),U("div",qs,t[14]||(t[14]=[W("div",{style:{"font-size":"20px","text-align":"center"}},"🌕",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👕",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👖",-1)]))):te("",!0)],64)):(j(),U(K,{key:2},["front"!==e.name||d.value?te("",!0):(j(),U("div",Ys,t[15]||(t[15]=[W("div",{style:{"font-size":"20px","text-align":"center"}},"🤓",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👕",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👖",-1)]))),e.text?(j(),U("div",Ks,ee(e.text),1)):te("",!0)],64))],44,Zs)))),128))],4)],34),W("div",Js,[W("div",Bs,[W("div",Qs,[W("span",$s,ee(X(Ne)("Rotate")),1),W("span",en,ee(a.value)+"°",1)]),F(X(C),{modelValue:a.value,"onUpdate:modelValue":[t[7]||(t[7]=e=>a.value=e),f],min:0,max:360,class:"w-full"},null,8,["modelValue"])]),W("div",tn,[W("div",sn,[W("span",nn,ee(X(Ne)("Vertical")),1),W("span",an,ee(o.value)+"°",1)]),F(X(C),{modelValue:o.value,"onUpdate:modelValue":[t[8]||(t[8]=e=>o.value=e),f],min:-90,max:90,class:"w-full"},null,8,["modelValue"])]),W("div",on,[W("div",ln,[W("span",rn,ee(X(Ne)("Zoom")),1),W("span",dn,ee(l.value),1)]),F(X(C),{modelValue:l.value,"onUpdate:modelValue":[t[9]||(t[9]=e=>l.value=e),f],min:0,max:10,step:.1,class:"w-full"},null,8,["modelValue"])])])])]))}},cn=(e,t)=>{const i=e.__vccOpts||e;for(const[s,n]of t)i[s]=n;return i},An={class:"tew-toolbar"},pn={class:"tew-mode-tabs"},hn={key:0,class:"tew-actions"},mn={key:1,class:"tew-actions"},fn={key:0,class:"tew-table-wrapper"},gn={class:"tew-table"},vn={class:"tew-cell-inner"},yn=["value","onInput","onKeydown"],wn=["onClick"],bn={class:"tew-row-handle"},_n=["onClick"],Sn=["value","onInput","onKeydown"],xn={key:1,class:"tew-md-wrapper"},Ln=cn({__name:"tableEditorWidget",props:["widget","node"],setup(e){const t=P("table"),i=se({headers:["列1","列2","列3"],rows:[["","",""],["","",""]]}),s=P("");function n(e){const t=e.headers.map(((t,i)=>{let s=String(t).length;for(const n of e.rows)s=Math.max(s,String(n[i]??"").replace(/\n/g,"
").length);return Math.max(s,3)})),i=(e,t)=>String(e).padEnd(t," ");return["| "+e.headers.map(((e,s)=>i(e,t[s]))).join(" | ")+" |","| "+t.map((e=>"-".repeat(e))).join(" | ")+" |",...e.rows.map((s=>"| "+e.headers.map(((e,n)=>i(String(s[n]??"").replace(/\n/g,"
"),t[n]))).join(" | ")+" |"))].join("\n")}function a(e){const t=e.split("\n").map((e=>e.trim())).filter(Boolean);if(t.length<2)return null;const i=e=>e.replace(/^\||\|$/g,"").split("|").map((e=>e.trim().replace(//gi,"\n")));let s=-1;for(let r=0;r{for(;e.lengthv()))}}function l(e){let t=0;for(const i of String(e||"").replace(/\*\*/g,""))t+=/[\u4e00-\u9fff\u3000-\u303f\uff00-\uffef]/.test(i)?14:8;return t}const r=Y((()=>{const e=Math.max(i.headers.length,...i.rows.map((e=>e.length)));return Array.from({length:e},((e,t)=>{let s=120;for(const n of i.rows){const e=String(n[t]??"");for(const t of e.split("\n"))s=Math.max(s,l(t)+28)}return Math.min(s,200)+"px"}))}));function d(e){if(!e)return;const t=Array.from(e.querySelectorAll(".tew-cell-textarea"));if(0===t.length)return;t.forEach((e=>{e.style.height="auto"}));const i=Math.max(...t.map((e=>e.scrollHeight)));t.forEach((e=>{e.style.height=i+"px"}))}function u(){i.rows.push(Array(i.headers.length).fill("")),y()}function c(){i.headers.push(`列${i.headers.length+1}`),i.rows.forEach((e=>e.push(""))),y()}function A(e,t,s,n=!1){oe((()=>{const t=e.target.closest("table");if(!t)return;const s=Array.from(t.querySelectorAll(".tew-cell-input")),a=s.indexOf(e.target);if(-1===a)return;const o=s[a+(n?i.headers.length:1)];o&&o.focus()}))}let p=null;function h(){clearTimeout(p),p=setTimeout((()=>{y()}),300)}function m(){const e=a(s.value);e&&(i.headers=e.headers,i.rows=e.rows,s.value=n(i)),y()}function f(){return JSON.stringify({mode:t.value,headers:i.headers,rows:i.rows,markdown:"markdown"===t.value?s.value:n(i)})}function g(e){try{const a="string"==typeof e?JSON.parse(e):e;if(a&&a.headers)return i.headers=a.headers,i.rows=a.rows||[],t.value=a.mode||"table",s.value=a.markdown||n(i),void oe((()=>v()))}catch(o){}if("string"==typeof e&&e.includes("|")){const t=a(e);t&&(i.headers=t.headers,i.rows=t.rows,s.value=e,oe((()=>v())))}}function v(){const e=document.querySelector(".tew-table");if(!e)return;Array.from(e.querySelectorAll("tbody tr")).forEach((e=>d(e)))}function y(){e.widget&&(e.widget.value=f())}return V((()=>{var a;(null==(a=e.widget)?void 0:a.value)&&g(e.widget.value),e.widget.serializeValue=async({node:e},a)=>{const o="markdown"===t.value?s.value:n(i);return(null==e?void 0:e.widgets_values)&&(e.widgets_values[a]=o,e.widgets[a].value=f()),o},z((()=>e.widget.value),(e=>{e!==f()&&g(e)}))})),(e,n)=>(j(),U("div",{class:"table-editor-widget",onMousedown:n[3]||(n[3]=Q((()=>{}),["stop"])),onWheel:n[4]||(n[4]=Q((()=>{}),["stop"]))},[W("div",An,[W("div",pn,[W("button",{class:B(["tew-tab","table"===t.value?"active":""]),onClick:n[0]||(n[0]=e=>o("table"))},n[5]||(n[5]=[W("i",{class:"pi pi-table"},null,-1),ne(" 表格 ")]),2),W("button",{class:B(["tew-tab","markdown"===t.value?"active":""]),onClick:n[1]||(n[1]=e=>o("markdown"))},n[6]||(n[6]=[W("i",{class:"pi pi-code"},null,-1),ne(" Markdown ")]),2)]),"table"===t.value?(j(),U("div",hn,[W("button",{class:"tew-btn",onClick:u,title:"添加行"},n[7]||(n[7]=[W("i",{class:"pi pi-plus"},null,-1),ne(" 行 ")])),W("button",{class:"tew-btn",onClick:c,title:"添加列"},n[8]||(n[8]=[W("i",{class:"pi pi-plus"},null,-1),ne(" 列 ")]))])):(j(),U("div",mn,[W("button",{class:"tew-btn",onClick:m,title:"格式化"},n[9]||(n[9]=[W("i",{class:"pi pi-align-left"},null,-1),ne(" 格式化 ")]))]))]),"table"===t.value?(j(),U("div",fn,[W("table",gn,[W("thead",null,[W("tr",null,[n[10]||(n[10]=W("th",{class:"tew-row-handle"},null,-1)),(j(!0),U(K,null,J(i.headers,((e,t)=>(j(),U("th",{key:"h"+t,class:"tew-header-cell",style:ie({width:r.value[t]})},[W("div",vn,[W("input",{class:"tew-cell-input tew-header-input",value:e,onInput:e=>function(e,t){i.headers[e]=t,y()}(t,e.target.value),onKeydown:le(Q((e=>A(e)),["prevent"]),["tab"]),placeholder:"列标题"},null,40,yn),W("button",{class:"tew-col-del",onClick:e=>function(e){i.headers.length<=1||(i.headers.splice(e,1),i.rows.forEach((t=>t.splice(e,1))),y())}(t),title:"删除列"},"×",8,wn)])],4)))),128))])]),W("tbody",null,[(j(!0),U(K,null,J(i.rows,((e,t)=>(j(),U("tr",{key:"r"+t},[W("td",bn,[W("button",{class:"tew-row-del",onClick:e=>function(e){i.rows.length<=1||(i.rows.splice(e,1),y())}(t),title:"删除行"},"×",8,_n)]),(j(!0),U(K,null,J(e,((e,s)=>(j(),U("td",{key:"c"+s,class:"tew-body-cell",style:ie({width:r.value[s]})},[W("textarea",{class:"tew-cell-input tew-cell-textarea",value:e,onInput:e=>{var n;!function(e,t,s){i.rows[e][t]=s,y()}(t,s,e.target.value),(n=e.target)&&(n.style.height="auto",n.style.height=n.scrollHeight+"px",d(n.closest("tr")))},onKeydown:le(Q((e=>A(e)),["prevent"]),["tab"]),rows:"1"},null,40,Sn)],4)))),128))])))),128))])])])):(j(),U("div",xn,[Z(W("textarea",{class:"tew-md-textarea","onUpdate:modelValue":n[2]||(n[2]=e=>s.value=e),onInput:h,placeholder:"| 列1 | 列2 | 列3 |\n| --- | --- | --- |\n| 值1 | 值2 | 值3 |",spellcheck:"false"},null,544),[[ae,s.value]])]))],32))}},[["__scopeId","data-v-7e0ef36e"]]),kn={class:"relative rounded-t-lg overflow-hidden select-none"},En={key:1,class:"w-full h-full flex items-center justify-center"},Nn=cn({__name:"baseThumbnail",props:{hoverZoom:{type:"number",default:4},isHovered:{type:Boolean,default:!1}},setup(e){const t=P(!1),i=P(null);return V((()=>{var e;Array.from((null==(e=i.value)?void 0:e.getElementsByTagName("img"))??[]).forEach((e=>{ce(e,"error",(()=>{t.value=!0}))}))})),(s,n)=>(j(),U("div",kn,[t.value?(j(),U("div",En,n[0]||(n[0]=[W("i",{class:"pi pi-file text-4xl"},null,-1)]))):(j(),U("div",{key:0,ref_key:"contentRef",ref:i,class:"w-full h-full transform-gpu transition-transform duration-1000 ease-out",style:ie(e.isHovered?{transform:`scale(${1+e.hoverZoom/100})`}:void 0)},[re(s.$slots,"default",{},void 0,!0)],4))]))}},[["__scopeId","data-v-604a4248"]]),Cn=["src","alt"],In=cn({__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}){const i=e,s=t,n=P(null),a=P(i.immediate),o=P(!1),l=P(!1),r=Y((()=>i.src));z((()=>i.src),(()=>{o.value=!1,l.value=!1,i.immediate||(a.value=!1)}),{immediate:!0});const{stop:d}=Ae(n,(([e])=>{(null==e?void 0:e.isIntersecting)&&!a.value&&(a.value=!0,s("visible"),d())}),{rootMargin:i.rootMargin,threshold:i.threshold}),u=e=>{o.value=!0,l.value=!1,s("load",e)},c=e=>{l.value=!0,o.value=!1,s("error",e)};return(t,i)=>(j(),U("div",{ref_key:"containerRef",ref:n,class:"lazy-image-container"},[l.value?(j(),U("div",{key:0,class:B(["lazy-image-error","w-full h-full flex items-center justify-center bg-surface-100 dark:bg-surface-800",e.errorClass])},[re(t.$slots,"error",{},(()=>[i[0]||(i[0]=W("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]),!0)],2)):a.value&&r.value?(j(),U("img",{key:1,src:r.value,alt:e.alt,class:B(e.imageClass),style:ie(e.imageStyle),draggable:"false",onLoad:u,onError:c},null,46,Cn)):a.value?te("",!0):(j(),U("div",{key:2,class:B(["lazy-image-placeholder","w-full h-full flex items-center justify-center bg-surface-100 dark:bg-surface-800",e.placeholderClass])},[re(t.$slots,"placeholder",{},(()=>[i[1]||(i[1]=W("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]),!0)],2))],512))}},[["__scopeId","data-v-4bfc03bf"]]),Tn={class:"overflow-hidden w-full h-full flex items-center justify-center"},On={__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}){const i=e,{src:s,isVideo:n}=i;return n??(null==s||s.toLowerCase().endsWith(".webp")),(t,i)=>(j(),H(Nn,{"hover-zoom":e.hoverZoom,"is-hovered":e.isHovered},{default:de((()=>[W("div",Tn,[F(In,{src:X(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})`}:void 0,"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:de((()=>[re(t.$slots,"placeholder",{},(()=>[i[3]||(i[3]=W("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:de((()=>[re(t.$slots,"error",{},(()=>[i[4]||(i[4]=W("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"]))}},Mn={class:"overflow-hidden w-full h-full flex items-center justify-center relative"},Dn={__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}){var i,s;const n=e;n.isVideo||(null==(i=n.baseImageSrc)?void 0:i.toLowerCase().endsWith(".webp"))||null==(s=n.overlayImageSrc)||s.toLowerCase().endsWith(".webp");const a=P(50),o=P(null),{elementX:l,elementWidth:r,isOutside:d}=pe(o);return z([()=>n.isHovered,l,r,d],(([e,t,i,s])=>{e&&(s||(a.value=t/i*100))})),(t,i)=>(j(),H(Nn,{"is-hovered":e.isHovered},{default:de((()=>[W("div",Mn,[F(In,{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:de((()=>[re(t.$slots,"placeholder",{},(()=>[i[3]||(i[3]=W("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:de((()=>[re(t.$slots,"error",{},(()=>[i[4]||(i[4]=W("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]))])),_:3},8,["src","root-margin","threshold","immediate"]),W("div",{ref_key:"containerRef",ref:o,class:"absolute inset-0"},[F(In,{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:de((()=>[re(t.$slots,"placeholder",{},(()=>[i[5]||(i[5]=W("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:de((()=>[re(t.$slots,"error",{},(()=>[i[6]||(i[6]=W("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]))])),_:3},8,["src","image-style","root-margin","threshold","immediate"]),W("div",{class:"absolute inset-y-0 bg-white/30 backdrop-blur-sm z-10 pointer-events-none",style:ie({left:`${a.value}%`,width:"1px"})},null,4)],512)])])),_:3},8,["is-hovered"]))}},Rn={class:"selector-card-wrapper"},Pn={class:"card-image-container"},Gn={key:2,class:"selection-badge"},zn={class:"card-content"},Vn={class:"card-title"},jn=cn({__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}){const i=e,s=t,n=P(null),a=he(n),o=()=>{i.selectable&&s("select",i.item)},l=()=>{s("item-hover",i.item)},r=()=>{s("item-leave",i.item)};return(t,i)=>(j(),U("div",Rn,[W("div",{ref_key:"cardRef",ref:n,class:B(["card-item",{selected:e.isSelected,clickable:e.selectable}]),onClick:o,onMouseenter:l,onMouseleave:r},[W("div",Pn,["compareSlider"===e.item.thumbnailVariant?(j(),H(Dn,{key:0,"base-image-src":e.item.thumbnail[0],"overlay-image-src":e.item.thumbnail[1],alt:t.title,"is-hovered":X(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"])):(j(),H(On,{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?(j(),U("div",Gn,i[0]||(i[0]=[W("i",{class:"pi pi-check text-white"},null,-1)]))):te("",!0)]),W("div",zn,[W("div",Vn,ee("zh"==e.locale?e.item.name_cn:e.item.name),1)])],34)]))}},[["__scopeId","data-v-88af28b0"]]),Un={class:"list-item"},Wn=["name","checked"],Fn={class:"list-item-content"},Xn={class:"list-title"},Zn=cn({__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}){const i=e,s=t,n=()=>{i.selectable&&s("select",i.item)},a=()=>{s("item-hover",i.item)},o=()=>{s("item-leave",i.item)};return(t,i)=>(j(),U("div",Un,[W("span",{class:B(["list-item__tag",{selected:e.isSelected}]),onClick:n,onMouseenter:a,onMouseleave:o},[e.selectable?(j(),U("input",{key:0,type:"checkbox",name:e.item.name,checked:e.isSelected,onClick:i[0]||(i[0]=Q((()=>{}),["stop"]))},null,8,Wn)):te("",!0),W("span",Fn,[W("div",Xn,ee("zh"==e.locale?e.item.name_cn:e.item.name),1)])],34)]))}},[["__scopeId","data-v-c93b1734"]]),Hn=S("graphStore",{state:e=>({selectors:[],selectors_styles:{},seg_selectors:[],slider_controls:[]}),actions:{setSelectors(e){this.selectors=R(e)},setStyles(e,t){this.selectors_styles[e]||(this.selectors_styles[e]=t)},setSegSelectors(e){this.seg_selectors=R(e)},setSliderControls(e){this.slider_controls=R(e)}}}),qn={class:"easyuse-styles-selector"},Yn={class:"easyuse-styles-selector-header flex justify-between gap-2"},Kn={class:"flex align-center gap-1"},Jn={class:"flex-1"},Bn={key:0,class:"grid-container gap-2"},Qn={key:1,class:"list-container"},$n={key:0,class:"easyuse-styles-selector-previewer"},ea={class:"easyuse-styles-selector-previewer__text"},ta=["src"],ia={class:"title"},sa={class:"easyuse-styles-selector-previewer__prompt"},na={key:0},aa={class:"comfyui-easyuse-success"},oa={key:1},la={class:"comfyui-easyuse-error"},ra={__name:"stylesSelector",props:["widget"],setup(e){const t=Hn(),{selectors_styles:i}=I(t),s=P(""),n=P([]),a=Y((e=>xe("Comfy.Locale")||"en")),o=P(xe("EasyUse.StylesSelector.DisplayType")||"Grid");"Gird"==o.value&&(o.value="Grid",ke("EasyUse.StylesSelector.DisplayType","Grid"));const l=P([]),r=P("");z((e=>o.value),(e=>{ke("EasyUse.StylesSelector.DisplayType",e)})),z((t=>e.widget.value),(e=>{n.value=e.split(",").map((e=>e.trim()))}));const d=Y((()=>{if(!r.value.trim())return l.value;const e=n.value||[],t=r.value.toLowerCase(),i=[],s=[];return l.value.forEach((n=>{if(e.includes(n.name))i.push(n);else{const e="zh"===a.value&&n.name_cn?n.name_cn:n.name,i=n.prompt||"",o=n.negative_prompt||"";(e.toLowerCase().includes(t)||i.toLowerCase().includes(t)||o.toLowerCase().includes(t))&&s.push(n)}})),[...i,...s]})),u=se({name:"",positive:"",negative:"",src:""}),c=async e=>{if(i.value[e])return!0;const s=await ge.fetchApi(`/easyuse/prompt/styles?name=${e}`);if(200===s.status){let i=(await s.json()).map(((e,t)=>(e.index=t,e)));return await t.setStyles(e,i),!0}return Ye.error(Ne("Get styles list Failed")),!1},A=e=>{var t,i;u.name="zh"==a.value&&e.name_cn?e.name_cn:e.name,u.src=e.thumbnailVariant&&"default"!=e.thumbnailVariant?(null==(t=e.thumbnail)?void 0:t[1])||(null==(i=e.thumbnail)?void 0:i[0]):e.thumbnail,u.positive=e.prompt,u.negative=e.negative_prompt},p=()=>{u.name="",u.src="",u.positive="",u.negative=""},h=e=>{const t=n.value||[],a=R(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)))]},m=e=>(n.value||[]).includes(e.name),f=e=>{let t=[...n.value||[]];const i=e.name,s=t.findIndex((e=>e===i));s>-1?t.splice(s,1):t.push(i),n.value=t},g=()=>{n.value=[]};return V((t=>{setTimeout((t=>{const i=wt(e.widget.node,"styles");let n=i.value;s.value=n,c(n).then((e=>e&&h())),i.callback=e=>{s.value=e,g(),c(e).then((e=>e&&h()))}}),1),e.widget.serializeValue=async({node:e},t)=>{try{let i=n.value||[];return i=i.join(","),(null==e?void 0:e.widgets_values)&&(e.widgets_values[t]=i,e.widgets[t].value=i),i}catch(i){return[]}}})),(t,i)=>(j(),U("div",qn,[W("div",Yn,[W("div",Kn,[Z(F(X(L),{icon:"pi pi-trash",severity:"secondary",outlined:"",size:"small",onClick:g},null,512),[[X(E),X(Ne)("Reset")]])]),W("div",Jn,[F(X(M),null,{default:de((()=>[F(X(T),{class:"pi pi-search"}),F(X(O),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=e=>r.value=e),placeholder:X(Ne)("Search styles..."),class:"w-full"},null,8,["modelValue","placeholder"])])),_:1})]),F(X(D),{modelValue:o.value,"onUpdate:modelValue":i[1]||(i[1]=e=>o.value=e),options:["Grid","List"],"allow-empty":!1},{option:de((({option:e})=>[W("i",{class:B(["List"===e?"pi pi-bars":"pi pi-table"])},null,2)])),_:1},8,["modelValue"])]),W("div",{class:"easyuse-styles-selector-content",onMouseleave:i[2]||(i[2]=t=>h(e.widget.node.name))},["Grid"===o.value?(j(),U("div",Bn,[(j(!0),U(K,null,J(d.value,((e,t)=>(j(),H(jn,{key:`${e.name}-${t}`,item:e,"unique-key":"name",locale:a.value,selectable:!0,"is-selected":m(e),"show-description":!0,"preview-enabled":!0,onSelect:f,onItemHover:A,onItemLeave:p},null,8,["item","locale","is-selected"])))),128))])):(j(),U("div",Qn,[(j(!0),U(K,null,J(d.value,((e,t)=>(j(),H(Zn,{key:`${e.name}-${t}`,item:e,"unique-key":"name",locale:a.value,selectable:!0,"is-selected":m(e),"show-description":!0,onSelect:f,onItemHover:A,onItemLeave:p},null,8,["item","locale","is-selected"])))),128))]))],32),(null==u?void 0:u.positive)||(null==u?void 0:u.negative)?(j(),U("div",$n,[W("div",ea,[W("img",{src:u.src,alt:"",style:{width:"100%",height:"auto","object-fit":"contain","border-radius":"6px"}},null,8,ta),W("span",ia,ee(u.name),1),W("div",sa,[u.positive?(j(),U("h6",na,[W("span",aa,ee(X(Ne)("Positive"))+":",1),W("span",null,ee(u.positive),1)])):te("",!0),u.negative?(j(),U("h6",oa,[W("span",la,ee(X(Ne)("Negative"))+":",1),W("span",null,ee(u.negative),1)])):te("",!0)])])])):te("",!0)]))}},da=new Map,ua={width:"100%",height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},ca=(e,t)=>{const i=document.createElement("div"),s=e.node,n=e.options||{getMinHeight:()=>100,hideOnZoom:!0,serialize:!0},a=e.styles||null;i.id=`easyuse-vue-widget-${s.id}`,Object.assign(i.style,ua,a||{});const o=s.addDOMWidget(e.name||"ustom_vue_component_basic","vue-basic",i,n);e.inputSpec&&(o.inputSpec=e.inputSpec);const l=ue(t,{widget:o,node:s});return l.use(me),l.mount(i),da.set(s.id,l),o.onRemove=()=>{const e=da.get(s.id);e&&(e.unmount(),da.delete(s.id))},{widget:o}};fe.registerExtension({name:"Comfy.EasyUse.CustomWidget",getCustomWidgets:e=>({EASY_PROMPT_AWAIT_BAR:e=>{const t=P(JSON.stringify({select:"now",unlock:!0,last_seed:0,seed:0})),i=!!["obsidian","obsidian_dark","milk_white"].includes(xe("Comfy.ColorPalette"))?48:54;return ca({name:"toolbar",node:e,options:{getMinHeight:()=>i,getMaxHeight:()=>i,getValue:()=>t.value,setValue:e=>{try{t.value="object"==typeof e?JSON.stringify(e):e}catch(i){}}}},Es)},EASY_PROMPT_STYLES:e=>{const t=P("");return ca({name:"select_styles",node:e,options:{getMinHeight:()=>180,getMaxHeight:()=>e.size[1]-75,getValue:()=>t.value,setValue:e=>{t.value=Array.isArray(e)?e.join(","):e}},styles:{overflow:"visible"}},ra)},EASY_COMBO:(e,t,i)=>{const s=P(""),n=!!["obsidian","obsidian_dark","milk_white"].includes(xe("Comfy.ColorPalette"))?22:26;return ca({name:"mask_components",node:e,options:{margin:0,getMinHeight:()=>n,getMaxHeight:()=>n,getValue:()=>s.value,setValue:e=>{s.value=Array.isArray(e)?e.join(","):e}},inputSpec:null==i?void 0:i[1],styles:{overflow:"visible"}},Cs)},EASY_MULTI_ANGLE:e=>{const t=P(JSON.stringify([{rotate:0,vertical:0,zoom:5,add_angle_prompt:!0}]));return ca({name:"multi_angle",node:e,options:{getMinHeight:()=>350,getMaxHeight:()=>e.size[1]-80,getValue:()=>t.value,setValue:e=>{try{t.value=Array.isArray(e)?JSON.stringify(e):e}catch(i){}}},styles:{overflow:"visible"}},un)},EASY_TABLE_EDITOR:(e,t,i,s)=>{const n=P(JSON.stringify({mode:"table",headers:["列1","列2","列3"],rows:[["","",""],["","",""]],markdown:"| 列1 | 列2 | 列3 |\n| --- | --- | --- |\n| | | |\n| | | |"}));return ca({name:"table_data",node:e,options:{getMinHeight:()=>200,getMaxHeight:()=>e.size[1],getValue:()=>n.value,setValue:e=>{n.value="object"==typeof e?JSON.stringify(e):e}},styles:{overflow:"hidden"}},Ln)}})});export{Ne as $,Re as N,fe as a,Ke as b,xe as c,vi as d,Pe as e,ge as f,wt as g,Le as h,Nt as j,Xe as s,Ye as t,Hn as u}; +var e,t,i,s,n,a,o,l,r,d,u,c,A,p,h,m,f=Object.defineProperty,g=e=>{throw TypeError(e)},v=(e,t,i)=>((e,t,i)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),y=(e,t,i)=>t.has(e)||g("Cannot "+i),w=(e,t,i)=>(y(e,t,"read from private field"),i?i.call(e):t.get(e)),b=(e,t,i)=>t.has(e)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),_=(e,t,i,s)=>(y(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i);import{d as S,h as x,s as L,a as k,T as E,b as N,c as C,e as I,f as T,g as O,i as M,j as D}from"./vendor-DrOEdrAG.js";import{c as R}from"./lodash-DkvwM0Z9.js";import{r as P,m as G,w as z,o as V,a as j,c as U,b as W,d as F,u as X,e as Z,f as H,g as q,h as Y,F as K,i as J,n as B,j as Q,v as $,t as ee,k as te,l as ie,p as se,q as ne,s as ae,x as oe,y as le,z as re,A as de,B as ue}from"./vue-DfGw76ex.js";import{u as ce,a as Ae,b as pe,c as he}from"./vueuse-Bf7Wy5dB.js";import{P as me}from"./primevue-keNb8gkp.js";let fe=(null==(t=null==(e=window.comfyAPI)?void 0:e.app)?void 0:t.app)||null,ge=(null==(s=null==(i=window.comfyAPI)?void 0:i.api)?void 0:s.api)||null,ve=(null==(a=null==(n=window.comfyAPI)?void 0:n.ui)?void 0:a.$el)||null,ye=(null==(l=null==(o=window.comfyAPI)?void 0:o.dialog)?void 0:l.ComfyDialog)||null,we=(null==(d=null==(r=window.comfyAPI)?void 0:r.widgets)?void 0:d.ComfyWidgets)||null,be=(null==(c=null==(u=window.comfyAPI)?void 0:u.utils)?void 0:c.applyTextReplacements)||null,_e=(null==(p=null==(A=window.comfyAPI)?void 0:A.groupNode)?void 0:p.GroupNodeConfig)||null;const Se=e=>{var t,i;return e?null==(i=null==(t=null==fe?void 0:fe.ui)?void 0:t.settings)?void 0:i.getSettingValue(e):null};function xe(e,t=null){try{let i=e?Se(e):null;return null==i&&(i=t?localStorage[t]:localStorage[e]||null),i}catch(i){return null}}function Le(e,t=e=>{}){var i;const s=null==(i=fe.ui.settings.settingsLookup)?void 0:i[e];s&&(s.onChange=e=>t(e))}async function ke(e,t,i=null){var s,n;if(!e)throw new Error("Invalid arguments");try{(null==(n=null==(s=null==fe?void 0:fe.ui)?void 0:s.settings)?void 0:n.setSettingValue)?fe.ui.settings.setSettingValue(e,t):await ge.storeSetting(e,t),i&&(localStorage[i]="object"==typeof t?JSON.stringify(t):t)}catch(a){}}const Ee={"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 'Grid', it will display as a Grid, 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:"上一步","Add New Tab":"添加新标签","Add Angle Prompt":"添加角度提示词","Invert Rotate Mode":"反转旋转",Hollow:"镂空展示",Reset:"重置","Angle Prompt":"角度词",Image:"图像",F:"前",B:"后",U:"顶",D:"底",L:"左",R:"右",Rotate:"旋转",Vertical:"垂直",Zoom:"缩放"},Ne=(e,t=!1)=>{switch(xe("Comfy.Locale")){case"zh-CN":case"zh":return Ee[e]||e;default:return e}};const Ce="comfyui-easyuse-",Ie="dark-theme",Te={PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd",FLOW_CONTROL:"#373780"},Oe=0x4000000000000,Me=["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"],De={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"]},Re={ALWAYS:0,NEVER:2,BYPASS:4},Pe="easyuse_nodes_map",Ge="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABkAAD/4QMyaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA5LjEtYzAwMSA3OS4xNDYyODk5Nzc3LCAyMDIzLzA2LzI1LTIzOjU3OjE0ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1J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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:"#60a5fa",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:ze,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:ze,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:ze,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:ze,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:ze,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:ze,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:ze,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:ze,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:ze,groupcolor:"#444"}}};let je=JSON.parse(JSON.stringify(Ve));delete je.NODE_COLORS,je.ColorPalette.id="obsidian_dark",je.ColorPalette.name="Obsidian Dark",je.ColorPalette.colors.litegraph_base.BACKGROUND_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGlmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDEgNzkuMTQ2M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zJys77X8vSLiRgITif7bYbgrwYc/mKXyBoY4VVBgsWLFiwYFmOlTv+9jfDOjHmr8u6eVkGCxYsWLBgmc5S8ApewXvgYRksWLBgKXidpeBdloL3wMOCBctgwVLwCl7BuyyDBQsWLFiwTGcpeAWv4D3wsAwWLFiwFLzOUvAuS8F74GHBgmWwYCl4Ba/gXZbBggULFixYprMUvIJX8B54WAYLFixYCl5nKXiXpeA98LBgwTJYsGC9tg1o8f4TTtqzNQAAAABJRU5ErkJggg==",je.ColorPalette.colors.litegraph_base.CLEAR_BACKGROUND_COLOR="#09090b";const Ue="#FFFFFF",We={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:Ue,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:Ue,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:Ue,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:Ue,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:Ue,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:Ue,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:Ue,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:Ue,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:Ue,groupcolor:"#444"}}},Fe={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 'Grid', it will display as a Grid, if set to 'List', it will display as a list",type:"combo",options:["Grid","List"],defaultValue:"Grid"},enableAddAnglePrompt:{id:"EasyUse.MultiAngle.AddAnglePrompt",name:"Add angle prompt in easy multiAngle",type:"boolean",defaultValue:!1},enableHollowMode:{id:"EasyUse.MultiAngle.HollowMode",name:"Enable hollow display mode in easy multiAngle",type:"boolean",defaultValue:!1},enableInvertRotate:{id:"EasyUse.MultiAngle.InvertRotate",name:"Invert rotate mode in easy multiAngle",tooltip:"Enable invert rotate mode in easy multiAngle to match the rotation direction of most 3D software",type:"boolean",defaultValue:!1}};function Xe(e=100,t){return new Promise((i=>{setTimeout((()=>{i(t)}),e)}))}function Ze(e,t){if(e="number"==typeof e?e:e instanceof Date?e.getTime():parseInt(e),isNaN(e))return null;let i=new Date(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()];let s={MM:1,dd:2,yyyy:3,hh:4,mm:5,ss:6};return t.replace(/([Mmdhs]|y{2})\1/g,(t=>e[s[t]]))}const He=/Mac|iPod|iPhone|iPad/.test(navigator.platform),qe=e=>He?e.replace(/Ctrl/g,"⌘").replace(/Alt/g,"⌥").replace(/Shift/g,"⇧"):e;const Ye=new class{constructor(){v(this,"element",ve(`div.${Ce}toast`)),v(this,"children",HTMLElement),v(this,"container",document.body),v(this,"info_icon",`mdi mdi-information ${Ce}theme`),v(this,"success_icon",`mdi mdi-check-circle ${Ce}success`),v(this,"error_icon",`mdi mdi-close-circle ${Ce}error`),v(this,"warn_icon",`mdi mdi-alert-circle ${Ce}warning`),v(this,"loading_icon","mdi mdi-rotate-right loading"),this.container.appendChild(this.element)}async show(e){let t=ve(`div.${Ce}toast-container`,[ve("div",[ve("span",[...e.icon?[ve("i",{className:e.icon})]:[],ve("span",e.content)])])]);t.setAttribute("toast-id",e.id),this.element.replaceChildren(t),this.container.appendChild(this.element),await Xe(64),t.style.marginTop=`-${t.offsetHeight}px`,await Xe(64),t.classList.add("show"),e.duration&&(await Xe(e.duration),this.hide(e.id))}async hide(e){const t=document.querySelector(`.${Ce}toast > [toast-id="${e}"]`);(null==t?void 0:t.classList.contains("show"))&&(t.classList.remove("show"),await Xe(750)),t&&t.remove()}async clearAllMessages(){let e=document.querySelector(`.${Ce}container`);e&&(e.innerHTML="")}async info(e,t=3e3,i=[]){this.show({id:"toast-info",icon:this.info_icon,content:e,duration:t})}async success(e,t=3e3){this.show({id:"toast-success",icon:this.success_icon,content:e,duration:t})}async error(e,t=3e3){this.show({id:"toast-error",icon:this.error_icon,content:e,duration:t})}async warn(e,t=3e3){this.show({id:"toast-warn",icon:this.warn_icon,content:e,duration:t})}async showLoading(e,t=0){this.show({id:"toast-loading",icon:this.loading_icon,content:e,duration:t})}async hideLoading(){this.hide("toast-loading")}},Ke=S("groups",{state:e=>({groups:[],nodes:[],isWatching:!1}),getters:{groups_nodes(){var e;let t=[],i=[];const s=e=>{var t;return{info:e,children:(null==(t=e.sub_groups)?void 0: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)?void 0:e.length)>0){const e=(e,t)=>e[0]>=t.x1&&e[0]<=t.x2&&e[1]>=t.y1&&e[1]<=t.y2,s=(t,i)=>{let s=null,n=-1;const a=(i,o)=>{i.bounds&&e(t.pos,i.bounds)&&(o>n&&(n=o,s=i),i.children.forEach((e=>a(e,o+1))))};return i.forEach((e=>a(e,0))),s};this.nodes.forEach((e=>{const n=s(e,t);n?(n.children||(n.children=[]),n.children.push(e)):i.push({info:e})}))}return[...t,...i]}},actions:{setGroups(e){let t=R(e.map((e=>new Object({id:e.id,pos:Array.isArray(e.pos)?[...e.pos]:e.pos,size:Array.isArray(e.size)?[...e.size]:e.size,title:e.title,pinned:e.pinned,show_nodes:e.show_nodes}))));t.forEach((e=>{e.sub_groups=[],t.forEach((t=>{t!==e&&t.pos[0]>e.pos[0]&&t.pos[0]e.pos[1]&&t.pos[1]{t=t.filter((t=>t!==e))}))})),this.groups="Manual drag&drop sorting"==xe("EasyUse.NodesMap.Sorting")?R(t):R(t.sort(((e,t)=>e.pos[0]-t.pos[0])).sort(((e,t)=>e.pos[1]-t.pos[1])))},setNodes(e){this.nodes=R(e.map((e=>new Object({id:e.id,pos:e.pos,size:e.size,type:e.type,is_edit:e.is_edit,title:e.title,mode:e.mode}))))},update(){var e,t,i;(((null==(e=fe.extensionManager)?void 0:e.activeSidebarTab)||(null==(i=null==(t=fe.extensionManager.sidebarTab)?void 0:t.activeSidebarTab)?void 0:i.id))===Pe||this.isWatching)&&setTimeout((e=>{this.setGroups(fe.canvas.graph._groups),this.setNodes(fe.canvas.graph._nodes)}),1)},watchGraph(e=!1){e&&(this.isWatching=!0);let t=this;this.update();const i=fe.graph.onNodeAdded;fe.graph.onNodeAdded=function(e){t.update();const s=e.onRemoved;return e.onRemoved=function(){return t.update(),null==s?void 0:s.apply(this,arguments)},null==i?void 0:i.apply(this,arguments)},fe.canvas.onNodeMoved=function(e){t.update()};const s=LGraphCanvas.onNodeAlign;LGraphCanvas.onNodeAlign=function(e){return t.update(),null==s?void 0:s.apply(this,arguments)};const n=LGraphCanvas.onGroupAdd;LGraphCanvas.onGroupAdd=function(){return t.update(),null==n?void 0:n.apply(this,arguments)};const a=LGraphCanvas.onGroupAlign;LGraphCanvas.onGroupAlign=function(e){return t.update(),null==a?void 0:a.apply(this,arguments)};const o=LGraphCanvas.onMenuNodeRemove;LGraphCanvas.onMenuNodeRemove=function(e){return t.update(),null==o?void 0:o.apply(this,arguments)}},unwatchGraph(){this.isWatching=!1}}});const Je={BOX:1,ROUND:2,CIRCLE:3,CARD:4,ARROW:5,GRID:6,HollowCircle:7};function Be(e,t,i={}){const{shape:s=Je.BOX,round_radius:n=LiteGraph.ROUND_RADIUS,title_height:a=LiteGraph.NODE_TITLE_HEIGHT,title_mode:o=LiteGraph.NORMAL_TITLE,color:l=LiteGraph.NODE_BOX_OUTLINE_COLOR,padding:r=6,collapsed:d=!1,thickness:u=1}=i;o===LiteGraph.TRANSPARENT_TITLE&&(t[1]-=a,t[3]+=a);const{lineWidth:c,strokeStyle:A}=e;e.lineWidth=u,e.globalAlpha=.8,e.strokeStyle=l,e.beginPath();const[p,h,m,f]=t;switch(s){case Je.BOX:e.rect(p-r,h-r,m+2*r,f+2*r);break;case Je.ROUND:case Je.CARD:{const t=n+r,i=s===Je.CARD&&d||s===Je.ROUND?[t]:[t,2,t,2];e.roundRect(p-r,h-r,m+2*r,f+2*r,i);break}case Je.CIRCLE:{const t=p+m/2,i=h+f/2,s=Math.max(m,f)/2+r;e.arc(t,i,s,0,2*Math.PI);break}}e.stroke(),e.lineWidth=c,e.strokeStyle=A,e.globalAlpha=1}function Qe(e,t,i){var s,n;let a=0,o=null==(s=e[0])?void 0:s.naturalWidth,l=null==(n=e[0])?void 0:n.naturalHeight;const r=e.length;let d,u,c,A,p;for(let h=1;h<=r;h++){const e=Math.ceil(r/h),s=t/h,n=s/o,m=i/e/l,f=Math.min(n,m,1),g=o*f,v=l*f,y=g*v*r;y>a&&(a=y,d=g,u=v,c=h,A=e,p=h*((s-g)/2))}return{cellWidth:d,cellHeight:u,cols:c,rows:A,shiftX:p}}class $e{constructor(e,t){this.type="custom",this.name=e,this.options=t,this.value=""}draw(e,t,i,s,n){((e,t,i)=>{const s=fe.canvas,n=s.graph_mouse;!s.pointer_is_down&&t.pointerDown&&(n[0]===t.pointerDown.pos[0]&&n[1]===t.pointerDown.pos[1]&&(t.imageIndex=t.pointerDown.index),t.pointerDown=null);const a=t.imgs??[];let{imageIndex:o}=t;const l=a.length;1!==l||o||(t.imageIndex=o=0);const r=t.size[0],d=t.size[1]-i-15;if(null==o){let o,u,c,A,p;const h=(e=>{if(!e.length||1===e.length)return!0;const t=e[0].naturalWidth/e[0].naturalHeight;for(let i=1;iMath.max(e,t.naturalWidth,t.naturalHeight)),0),t=[];t.length=a.length,t[0]={naturalWidth:e,naturalHeight:e},({cellWidth:o,cellHeight:u,cols:p,shiftX:c}=Qe(t,r,d))}let m=!1;t.imageRects=[];for(let r=0;r{let r="#333",d="#fff",u=!1;return LiteGraph.isInsideRectangle(n[0],n[1],i+t.pos[0],a+t.pos[1],o,o)&&(s.canvas.style.cursor="pointer",s.pointer_is_down?(r="#1e90ff",u=!0):(r="#eee",d="#000")),e.fillStyle=r,e.beginPath(),e.roundRect(i,a,o,o,[4]),e.fill(),e.fillStyle=d,e.font="12px Arial",e.textAlign="center",e.fillText(l,i+15,a+20),u};if(!(l>1))return;const b=(t.imageIndex??0)+1;if(w(r-40,d+i-40,30,`${b}/${l}`)){const e=b>=l?0:b;t.pointerDown&&t.pointerDown.index===e||(t.pointerDown={index:e,pos:[...n]})}w(r-40,i+10,30,"x")&&(t.pointerDown&&null===t.pointerDown.index||(t.pointerDown={index:null,pos:[...n]}))})(e,t,s)}computeLayoutSize(e,t){return{minHeight:220,minWidth:1}}}const et=()=>(e,t)=>e.addCustomWidget(new $e(t.name,{serialize:!1}));function tt(e,t,i,s,n,a){return e>=i&&e=s&&t=i&&e=s&&t=e[0]&&this.y+this.height>=e[1]}containsRect(e){return this.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){return this.xe[0]&&this.y+this.height>e[1]}findContainingCorner(e,t,i){return this.isInTopLeftCorner(e,t,i)?"NW":this.isInTopRightCorner(e,t,i)?"NE":this.isInBottomLeftCorner(e,t,i)?"SW":this.isInBottomRightCorner(e,t,i)?"SE":void 0}isInTopLeftCorner(e,t,i){return tt(e,t,this.x,this.y,i,i)}isInTopRightCorner(e,t,i){return tt(e,t,this.right-i,this.y,i,i)}isInBottomLeftCorner(e,t,i){return tt(e,t,this.x,this.bottom-i,i,i)}isInBottomRightCorner(e,t,i){return tt(e,t,this.right-i,this.bottom-i,i,i)}isInTopEdge(e,t,i){return tt(e,t,this.x,this.y,this.width,i)}isInBottomEdge(e,t,i){return tt(e,t,this.x,this.bottom-i,this.width,i)}isInLeftEdge(e,t,i){return tt(e,t,this.x,this.y,i,this.height)}isInRightEdge(e,t,i){return tt(e,t,this.right-i,this.y,i,this.height)}getCentre(){return[this.centreX,this.centreY]}getArea(){return this.width*this.height}getPerimeter(){return 2*(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){const t=this[2];this[2]=e,this[0]+=t-e}setHeightBottomAnchored(e){const t=this[3];this[3]=e,this[1]+=t-e}toArray(){return this.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}}}h=new WeakMap,m=new WeakMap;const st=(e,...t)=>function(...i){try{t.forEach((e=>null==e?void 0:e.call(this,...i)))}catch(s){null==e||e.call(this,...i,s)}};let nt=null;const at=new Image;at.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='white' stroke-linecap='round' stroke-width='1.3' d='M9.18613 3.09999H6.81377M9.18613 12.9H7.55288c-3.08678 0-5.35171-2.99581-4.60305-6.08843l.3054-1.26158M14.7486 2.1721l-.5931 2.45c-.132.54533-.6065.92789-1.1508.92789h-2.2993c-.77173 0-1.33797-.74895-1.1508-1.5221l.5931-2.45c.132-.54533.6065-.9279 1.1508-.9279h2.2993c.7717 0 1.3379.74896 1.1508 1.52211Zm-8.3033 0-.59309 2.45c-.13201.54533-.60646.92789-1.15076.92789H2.4021c-.7717 0-1.33793-.74895-1.15077-1.5221l.59309-2.45c.13201-.54533.60647-.9279 1.15077-.9279h2.29935c.77169 0 1.33792.74896 1.15076 1.52211Zm8.3033 9.8-.5931 2.45c-.132.5453-.6065.9279-1.1508.9279h-2.2993c-.77173 0-1.33797-.749-1.1508-1.5221l.5931-2.45c.132-.5453.6065-.9279 1.1508-.9279h2.2993c.7717 0 1.3379.7489 1.1508 1.5221Z'/%3E%3C/svg%3E %3C/svg%3E";const ot=["custom_obsidian","custom_obsidian_dark","custom_milk_white","obsidian_dark","obsidian","milk_white"],lt={"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"};let rt=LGraphCanvas.node_colors,dt=null,ut=null,ct=null,At=new it;for(let Aa in Fe)pt=Fe[Aa],fe.ui.settings.settingsLookup[pt.id]||fe.ui.settings.addSetting(pt);var pt;function ht(e,t,i,s,n,a){var o,l,r;t.strokeStyle=s,t.fillStyle=n;const d=LiteGraph.NODE_TITLE_HEIGHT,{low_quality:u}=this,{collapsed:c}=e.flags,A=e.renderingShape,{title_mode:p}=e.constructor,h=p!=LiteGraph.TRANSPARENT_TITLE&&p!=LiteGraph.NO_TITLE,m=At;m.set(e.boundingRect),m[0]-=e.pos[0],m[1]-=e.pos[1];let f=t.globalAlpha;if(t.lineWidth=1,t.beginPath(),A==LiteGraph.BOX_SHAPE||u?t.fillRect(m[0],m[1],m[2],m[3]):A==LiteGraph.ROUND_SHAPE||A==LiteGraph.CARD_SHAPE?t.roundRect(m[0],m[1],m[2],m[3],A==LiteGraph.CARD_SHAPE?[this.round_radius,this.round_radius,0,0]:[this.round_radius]):A==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&&Be(t,m,{shape:A,title_mode:p,title_height:d,padding:12,color:LiteGraph.NODE_ERROR_COLOUR,collapsed:c,thickness:10}),!c&&h&&(t.shadowColor="transparent",t.fillStyle="rgba(0,0,0,0.2)",t.fillRect(0,-1,m[2],2)),t.shadowColor="transparent",e.onDrawBackground&&e.onDrawBackground(t,this,this.canvas,this.graph_mouse),h||p==LiteGraph.TRANSPARENT_TITLE){const s="dark"==function(e){let t=e.replace("#","");return i=parseInt(t.substring(0,2),16),s=parseInt(t.substring(2,4),16),n=parseInt(t.substring(4,6),16),.299*i+.587*s+.114*n>127.5?"light":"dark";var i,s,n}((null==e?void 0:e.color)||"#ffffff");e.drawTitleBarBackground(t,{scale:this.ds.scale,low_quality:u});let n=!1;LiteGraph.node_box_coloured_by_mode&&LiteGraph.NODE_MODES_COLORS[e.mode]&&(n=LiteGraph.NODE_MODES_COLORS[e.mode]),LiteGraph.node_box_coloured_when_on&&(n=e.action_triggered?"#FFF":e.execute_triggered?"#AAA":n);let l=10;if(e.onDrawTitleBox)e.onDrawTitleBox(t,d,i,this.ds.scale);else if([LiteGraph.ROUND_SHAPE,LiteGraph.CIRCLE_SHAPE,LiteGraph.CARD_SHAPE].includes(A))if(u&&(t.fillStyle="black",t.beginPath(),t.arc(.5*d,-.5*d,.5*l+1,0,2*Math.PI),t.fill()),e.subgraph&&!e.skip_subgraph_button)t.save(),t.fillStyle="#3b82f6",t.beginPath(),t.roundRect(6,-24.5,22,20,5),t.fill(),u||(t.translate(25,23),t.scale(-1.5,1.5),t.drawImage(at,0,-d,l,l)),t.restore();else{const i=s?"#ffffff":LiteGraph.NODE_SELECTED_TITLE_COLOR,o=s?"#eeeeee":e.boxcolor||n||LiteGraph.NODE_DEFAULT_BOXCOLOR;t.fillStyle=a?i:o,t.beginPath(),t.fillRect(10,0-1.05*l-1,1.1*l,.125*l),t.fillRect(10,0-1.45*l-1,1.1*l,.125*l),t.fillRect(10,0-1.85*l-1,1.1*l,.125*l)}else u&&(t.fillStyle="black",t.fillRect(.5*(d-l)-1,-.5*(d+l)-1,l+2,l+2)),t.fillStyle=e.renderingBoxColor,t.fillRect(.5*(d-l),-.5*(d+l),l,l);if(t.globalAlpha=f,e.onDrawTitleText&&e.onDrawTitleText(t,d,i,this.ds.scale,this.title_text_font,a),!u){t.font=this.title_text_font;const i=e.getTitle()??`❌ ${e.type}`,n=String(i)+(e.pinned?"📌":"");n&&(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(n),t.fillText(n.substr(0,20),d,LiteGraph.NODE_TITLE_TEXT_Y-d),t.textAlign="left"):(t.textAlign="left",t.fillText(n,d,LiteGraph.NODE_TITLE_TEXT_Y-d)))}null==(o=e.onDrawTitle)||o.call(e,t)}if(null==e?void 0:e.strokeStyles){for(const i of Object.values(e.strokeStyles)){const s=i.call(e);s&&Be(t,m,{shape:A,title_height:d,title_mode:p,collapsed:c,...s})}null==e||e.drawProgressBar(t)}else if(a){null==(l=e.onBounding)||l.call(e,m),p==LiteGraph.TRANSPARENT_TITLE&&(m[1]-=d,m[3]+=d),t.lineWidth=2,t.globalAlpha=.8,t.beginPath();let n=0,a=0,o=1;A==LiteGraph.BOX_SHAPE?t.rect(n+m[0],n+m[1],a+m[2],a+m[3]):A==LiteGraph.ROUND_SHAPE||A==LiteGraph.CARD_SHAPE&&e.flags.collapsed?t.roundRect(n+m[0],n+m[1],a+m[2],a+m[3],[this.round_radius*o]):A==LiteGraph.CARD_SHAPE?t.roundRect(n+m[0],n+m[1],a+m[2],a+m[3],[this.round_radius*o,o,this.round_radius*o,o]):A==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}null==(r=e.drawProgressBar)||r.call(e,t),e.execute_triggered>0&&e.execute_triggered--,e.action_triggered>0&&e.action_triggered--}function mt(e,t,i,s,n){return new LiteGraph.ContextMenu(LiteGraph.NODE_MODES,{event:i,callback:function(e){if(!n)return;var t=Object.values(LiteGraph.NODE_MODES).indexOf(e),i=function(e){t>=0&&LiteGraph.NODE_MODES[t]?e.changeMode(t):e.changeMode(LiteGraph.ALWAYS),nt||(nt=Ke()),nt.update()},s=LGraphCanvas.active_canvas;if(!s.selected_nodes||Object.keys(s.selected_nodes).length<=1)i(n);else for(var a in s.selected_nodes)i(s.selected_nodes[a])},parentMenu:s,node:n}),!1}function ft(e,t,i,s,n){if(!n)throw"no node for color";var a=[];for(var o in a.push({value:null,content:"No color"}),LGraphCanvas.node_colors){var l=LGraphCanvas.node_colors[o];e={value:o,content:""+o+""};a.push(e)}return new LiteGraph.ContextMenu(a,{event:i,callback:function(e){if(!n)return;var t=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):(delete e.color,delete e.bgcolor),nt||(nt=Ke()),nt.update()},s=LGraphCanvas.active_canvas;if(!s.selected_nodes||Object.keys(s.selected_nodes).length<=1)i(n);else for(var a in s.selected_nodes)i(s.selected_nodes[a]);n.setDirtyCanvas(!0,!0)},parentMenu:s,node:n}),!1}function gt(e,t,i,s,n){var a=e.property||"title",o=n[a],l=document.createElement("div");l.is_modified=!1,l.className="graphdialog",l.innerHTML="",l.close=function(){l.parentNode&&l.parentNode.removeChild(l)},l.querySelector(".name").innerText=a;var r=l.querySelector(".value");r&&(r.value=o,r.addEventListener("blur",(function(e){this.focus()})),r.addEventListener("keydown",(function(e){if(l.is_modified=!0,27==e.keyCode)l.close();else if(13==e.keyCode)h();else if(13!=e.keyCode&&"textarea"!=e.target.localName)return;e.preventDefault(),e.stopPropagation()})));var d=LGraphCanvas.active_canvas.canvas,u=d.getBoundingClientRect(),c=-20,A=-20;u&&(c-=u.left,A-=u.top),event?(l.style.left=event.clientX+c+"px",l.style.top=event.clientY+A+"px"):(l.style.left=.5*d.width+c+"px",l.style.top=.5*d.height+A+"px"),l.querySelector("button").addEventListener("click",h),d.parentNode.appendChild(l),r&&r.focus();var p=null;function h(){r&&function(t){"Number"==e.type?t=Number(t):"Boolean"==e.type&&(t=Boolean(t));n[a]=t,l.parentNode&&l.parentNode.removeChild(l);n.setDirtyCanvas(!0,!0),nt||(nt=Ke());nt.update()}(r.value)}l.addEventListener("mouseleave",(function(e){LiteGraph.dialog_close_on_mouse_leave&&!l.is_modified&&LiteGraph.dialog_close_on_mouse_leave&&(p=setTimeout(l.close,LiteGraph.dialog_close_on_mouse_leave_delay))})),l.addEventListener("mouseenter",(function(e){LiteGraph.dialog_close_on_mouse_leave&&p&&clearTimeout(p)}))}(e=>{try{fe.registerExtension(e)}catch(t){}})({name:"Comfy.EasyUse.UI",init(){var e,t;const i="Comfy.CustomColorPalettes",s="Comfy.Settings.Comfy.CustomColorPalettes";if(dt||(dt=xe(i,s)),ut||(ut=xe("Comfy.ColorPalette","Comfy.Settings.Comfy.ColorPalette")||"dark"),(!(null==(e=null==dt?void 0:dt.obsidian)?void 0:e.version)||dt.obsidian.version{(null==e?void 0:e.value)&&(null==e?void 0:e.oldValue)&&(await Xe(1),Object.assign(fe.canvas.default_connection_color_byType,Te),Object.assign(LGraphCanvas.link_type_colors,Te)),"custom_milk_white"==e.value&&document.body.classList.remove(Ie)})),setTimeout((e=>vt(xe("Comfy.UseNewMenu")||"Disabled")),1);const t=null==(e=fe.ui.settings.settingsLookup)?void 0:e["Comfy.UseNewMenu"];t&&(t.onChange=e=>vt(e)),ge.addEventListener("easyuse-toast",(e=>{const t=e.detail.content,i=e.detail.type,s=e.detail.duration;i?Ye.show({id:`toast-${i}`,icon:Ye[i+"_icon"],content:`${t}`,duration:s||3e3}):Ye.info(t,s)}))},async nodeCreated(e){if(lt.hasOwnProperty(e.comfyClass)){const t=lt[e.comfyClass],i=rt[t];if(!i)return;!e.bgcolor&&i.bgcolor&&(e.bgcolor=i.bgcolor),!e.color&&i.color&&(e.color=i.color)}}});const vt=e=>{var t;const i=(null==(t=document.getElementById("crystools-root"))?void 0:t.children)||null,s=xe("Comfy.Workflow.WorkflowTabsPosition",null);if((null==i?void 0:i.length)>0&&s)if(ct||(ct=document.getElementById("MonitorUI")),"Disabled"==e){document.getElementById("crystools-root").appendChild(ct)}else{let e=document.getElementById("crystools-root-easyuse");if(e)e.appendChild(ct);else{const e=document.getElementsByClassName("comfyui-menu-right");e.length>0&&e[0].before(ve("div",{id:"crystools-root-easyuse"},ct))}}};let yt={};const wt=(e,t)=>e.widgets.find((e=>e.name===t)),bt=(e,t,i=!1,s="")=>{var n;if(!t||((e,t,i)=>!!e.inputs&&e.inputs.some((e=>e.name===t&&e.link&&!i)))(e,t.name,i))return;yt[t.name]||(yt[t.name]={origType:t.type,origComputeSize:t.computeSize});const a=e.size;t.hidden=!i,t.type=i?yt[t.name].origType:"easyHidden"+s,t.computeSize=i?yt[t.name].origComputeSize:()=>[0,-4],null==(n=t.linkedWidgets)||n.forEach((s=>bt(e,s,":"+t.name,i)));const o=i?Math.max(e.computeSize()[1],a[1]):e.size[1];e.setSize([e.size[0],o])},_t=(e,t=0)=>{var i,s;if(e)return(null==(i=e.widgets)?void 0:i[t])?e.widgets[t].value:e.widgets_values?null==(s=e.widgets_values)?void 0:s[t]:void 0},St=e=>e.setSize([e.size[0],e.computeSize()[1]]),xt=(e,t)=>graph.getNodeById(e),Lt=e=>{var t;try{return Object.values(null==(t=null==graph?void 0:graph.list_of_graphcanvas[0])?void 0:t.selected_nodes)}catch(i){return[]}};function kt(e,t,i){return e+(s=i,(.5-.5*Math.cos(Math.PI*s))*(t-e));var s}const Et=(e,t=!0)=>{var i,s;const n=(null==(s=null==(i=e.graph)?void 0:i.list_of_graphcanvas)?void 0:s[0])||null;if(!n)return;const[a,o]=e.pos,[l,r]=e.size;(([e,t],i)=>{const s=i.ds,n=document.body.clientWidth,a=document.body.clientHeight,o=s.scale,l=.5*n/o-e,r=.5*a/o-t,d=Date.now()+250,u=s.offset[0],c=s.offset[1],A=()=>{const e=d-Date.now();if(!(Date.now(){const t=xt(e);t&&Et(t)},Ct=(e,t=(()=>graph.links??[])())=>t[e],It=e=>e.toLowerCase().replace(/_./g,(e=>e.replace("_","").toUpperCase())),Tt=e=>"easy getNode"===e.type,Ot=e=>"easy setNode"===e.type,Mt=e=>Tt(e)||Ot(e),Dt=(e=(()=>graph._nodes??[])())=>e.filter((e=>Mt(e)));let Rt={},Pt={};const Gt=(e,t,i=0)=>{e.widgets_values||(e.widgets_values=[]),e.widgets_values[i]=t,e.widgets[i].value=t},zt=e=>graph.add(e),Vt=e=>graph.remove(e),jt=(e,t=0)=>{var i,s;if("Reroute"!==e.type)return[e,t];const n=e,a=null==(s=null==(i=n.inputs)?void 0:i[0])?void 0:s.link;if(!a)return[n,t];const o=Ct(a);if(!o)return[n,t];const l=xt(o.origin_id);return l?(setTimeout((()=>{Vt(n)})),jt(l,o.origin_slot)):[n,t]},Ut=e=>{var t,i,s;if("Reroute"!==e.type)return e;const n=e,a=null==(i=null==(t=n.outputs)?void 0:t[0])?void 0:i.links;if(!a)return n;const o=a[0];if(!o)return n;const l=Ct(o);if(!l)return n;const r=xt(l.target_id);return r?(1===(null==(s=n.outputs[0].links)?void 0:s.length)&&setTimeout((()=>{Vt(n)})),Ut(r)):n},Wt=(e,t="width")=>{var i;const s=e[0],n="width"==t?0:1,a=null==(i=s.size)?void 0:i[n];a&&(e.forEach((e=>{e.size[n]=a})),LGraphCanvas.active_canvas.setDirty(!0,!0))},Ft=(e,t="horizontal")=>{if(e.length<3)return;const i="horizontal"===t?0:1;e.sort(((e,t)=>e.pos[i]-t.pos[i]));const s=Math.min(...e.map((e=>e.pos[i]))),n=(Math.max(...e.map((e=>e.pos[i]+e.size[i])))-s-e.reduce(((e,t)=>e+t.size[i]),0))/(e.length-1);let a=s;e.forEach((e=>{e.pos[i]=a,a+=e.size[i]+n})),LGraphCanvas.active_canvas.setDirty(!0,!0)},Xt="$$canvas-image-preview";const Zt="$$comfy_animation_preview";const Ht="video_upload",qt=(e,t)=>{if(!e)return!1;const i=(e=>{var t;return null==(t=e.constructor)?void 0:t.nodeData})(e);if(!(null==i?void 0:i.input))return!1;return(e=>{if(!e)return[];const{required:t,optional:i}=e,s=[];if(t)for(const n of Object.values(t))s.push(n);if(i)for(const n of Object.values(i))s.push(n);return s})(i.input).some((e=>{var i;return null==(i=null==e?void 0:e[1])?void 0:i[t]}))};const Yt=e=>null==e?void 0:e.id.toString(),Kt=e=>fe.nodeOutputs[Yt(e)],Jt=e=>fe.nodePreviewImages[Yt(e)];function Bt(e){var t;const i=Jt(e),s=Kt(e);if((null==i?void 0:i.length)&&!e.isOutputFinal)return i;if(!(null==(t=null==s?void 0:s.images)?void 0:t.length))return(null==i?void 0:i.length)?i:void 0;const n=fe.getRandParam(),a=(e=>e.animatedImages?"":fe.getPreviewFormatParam())(e);return s.images.map((e=>{const t=new URLSearchParams(e);return ge.apiURL(`/view?${t}${a}${n}`)}))}const Qt="video-preview",$t={playsInline:!0,controls:!0,loop:!0},ei=(e,t)=>{const{loadElement:i,onLoaded:s,onFailedLoading:n}=t,a=async(e,t=0)=>{const s=await Promise.race([i(e),(n=8192,new Promise((e=>setTimeout((()=>e(null)),n))))]);var n;return null===s&&t<1?a(e,t+1):s};return{showPreview:function(){var i;if(e.isLoading)return;const o=(null==(i=e.videos)?void 0:i.length)>0?e.videos.map((e=>{return t=e,ge.apiURL(`/view?filename=${encodeURIComponent(t.filename)}&type=${t.type}&subfolder=${t.subfolder}&rand=${Math.random()}`);var t})):Bt(e);(null==o?void 0:o.length)&&((null==t?void 0:t.block)&&(e.isLoading=!0),(async e=>Promise.all(e.map((e=>a(e)))))(o).then((e=>{const t=e.filter((e=>null!==e));t.length&&(null==s||s(t))})).catch((()=>{null==n||n()})).finally((()=>{e.isLoading=!1})))}}},ti=e=>{e.previewMediaType="image";return ei(e,{loadElement:e=>new Promise((t=>{const i=new Image;i.onload=()=>t(i),i.onerror=()=>t(null),i.src=e})),onLoaded:t=>{e.imageIndex=null,e.imgs=t},onFailedLoading:()=>{e.imgs=void 0}})},ii=e=>{e.previewMediaType="video";return ei(e,{loadElement:e=>new Promise((t=>{const i=document.createElement("video");Object.assign(i,$t),i.onloadeddata=()=>t(i),i.onerror=()=>t(null),i.src=e})),onLoaded:t=>{const i=t[0];var s,n;i&&(e.videoContainer||(e.imgs&&(e.imgs=void 0),e.videoContainer=(()=>{const e=document.createElement("div");return e.classList.add("comfy-img-preview"),e})(),e.videoContainer.style.pointerEvents="auto",s=e.videoContainer,(null==(n=e.widgets)?void 0:n.some((e=>e.name===Qt)))||e.addDOMWidget(Qt,"video",s,{hideOnZoom:!1,serialize:!1})),e.videoContainer.replaceChildren(i),e.imageOffset=64)},onFailedLoading:()=>{e.videoContainer=void 0}})};function si(e,t){var i;if(e.flags.collapsed)return;const{showCanvasImagePreview:s,removeCanvasImagePreview:n}=function(){const e=et();return{showCanvasImagePreview:function(t){var i;(null==(i=t.imgs)?void 0:i.length)&&t.widgets&&(t.widgets.find((e=>e.name===Xt))||e(t,{type:"IMAGE_PREVIEW",name:Xt}))},removeCanvasImagePreview:function(e){var t,i;if(!e.widgets)return;const s=e.widgets.findIndex((e=>e.name===Xt));s>-1&&(null==(i=(t=e.widgets[s]).onRemove)||i.call(t),e.widgets.splice(s,1))}}}(),{showVideoPreview:a,removeVideoPreview:o}={showVideoPreview:function(e){var t;(null==(t=e.video)?void 0:t.length)&&e.widgets&&e.widgets.findIndex((e=>e.name===Zt))},removeVideoPreview:function(e){var t,i;if(!e.widgets)return;const s=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))}},l=Kt(e),r=Jt(e),d=l&&(e.images!==l.images||e.videos!==l.videos),u=r&&e.preview!==r;if(u&&(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||u){e.animatedImages=null==l?void 0:l.animated;const t=e.animatedImages&&l.images.some((e=>{var t;return null==(t=e.filename)?void 0:t.includes("webp")})),i=e.animatedImages&&!t||!!(c=this)&&(!!c.videoContainer||!!c.widgets&&qt(c,Ht));d&&(null==l?void 0:l.videos)||i?ii(e).showPreview():ti(e).showPreview()}var c;e.id!=fe.runningNodeId&&!e.isTwiceRendered&&e.isOutputFinal&&(e.videos?ii(e.videos):ti(e).showPreview(),e.isTwiceRendered=!0),(null==(i=e.imgs)?void 0:i.length)&&(e.animatedImages||d&&(null==l?void 0:l.videos)?(n(e),a(e)):(o(e),s(e)))}const ni=["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"],ai=["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"],oi=["FACEID","FACEID PLUS - SD1.5 only","FACEID PLUS V2","FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"],li=["easy seed","easy latentNoisy","easy wildcards","easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingSdTurbo","easy preSamplingCascade","easy preSamplingDynamicCFG","easy preSamplingLayerDiffusion","easy fullkSampler","easy fullCascadeKSampler"],ri=["easy fullLoader","easy a1111Loader","easy comfyLoader","easy hyditLoader","easy pixArtLoader"],di=["easy fullkSampler","easy kSampler","easy kSamplerCustom","easy kSamplerTiled","easy kSamplerLayerDiffusion","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo","easy fullCascadeKSampler","easy cascadeKSampler"],ui=["easy imageSize","easy imageSizeBySide","easy imageSizeByLongerSide","easy imageSizeShow","easy imageRatio","easy imagePixelPerfect"],ci=["easy forLoopStart","easy forLoopEnd","easy whileLoopStart","easy whileLoopEnd"],Ai=["easy anythingIndexSwitch","easy imageIndexSwitch","easy textIndexSwitch","easy conditioningIndexSwitch"],pi=["easy anythingInversedSwitch"],hi=["easy loadImagesForLoop",...ci,...Ai,...pi],mi={"easy anythingInversedSwitch":"out","easy anythingIndexSwitch":"value","easy imageIndexSwitch":"image","easy textIndexSwitch":"text","easy conditioningIndexSwitch":"cond"};function fi(e,t){var i;const s=e.comfyClass;let n=t.value;switch(t.name){case"range_mode":bt(e,wt(e,"step"),"step"==n),bt(e,wt(e,"num_steps"),"num_steps"==n),St(e);break;case"text_combine_mode":bt(e,wt(e,"replace_text"),"replace"==n);break;case"lora_name":["lora_model_strength","lora_clip_strength"].map((t=>bt(e,wt(e,t),"None"!==n)));break;case"resolution":"自定义 x 自定义"===n&&(t.value="width x height (custom)"),["empty_latent_width","empty_latent_height","width","height"].map((t=>bt(e,wt(e,t),"width x height (custom)"===n)));break;case"ratio":["empty_latent_width","empty_latent_height"].map((t=>bt(e,wt(e,t),"custom"===n)));break;case"num_loras":var a=n+1,o=null==(i=wt(e,"mode"))?void 0:i.value;requestAnimationFrame((t=>{for(let i=0;ibt(e,wt(e,t),"simple"!==o)));for(let i=a;i<99;i++)["lora_"+i+"_name","lora_"+i+"_strength","lora_"+i+"_model_strength","lora_"+i+"_clip_strength"].map((t=>bt(e,wt(e,t),!1)));St(e)}));break;case"num_controlnet":a=n+1,o=wt(e,"mode").value;for(let t=0;tbt(e,wt(e,t),!0))),["start_percent_"+t,"end_percent_"+t].map((t=>bt(e,wt(e,t),"simple"!==o)));for(let t=a;t<21;t++)["controlnet_"+t,"controlnet_"+t+"_strength","scale_soft_weight_"+t,"start_percent_"+t,"end_percent_"+t].map((t=>bt(e,wt(e,t),!1)));St(e);break;case"mode":switch(null==e?void 0:e.comfyClass){case"easy loraStack":a=wt(e,"num_loras").value+1,o=n;for(let t=0;tbt(e,wt(e,t),"simple"!==o)));St(e);break;case"easy controlnetStack":a=wt(e,"num_controlnet").value+1,o=n;for(let t=0;tbt(e,wt(e,t),"simple"!==o)));St(e);break;case"easy icLightApply":o=n;["lighting","remove_bg"].map((t=>bt(e,wt(e,t),"Foreground"===o))),bt(e,wt(e,"source"),"Foreground"!==o),St(e)}break;case"toggle":t.type="toggle",t.options={on:"Enabled",off:"Disabled"};break;case"t5_type":["clip_name","padding"].map((t=>bt(e,wt(e,t),"sd3"==n))),["t5_name","device","dtype"].map((t=>bt(e,wt(e,t),"t5v11"==n))),St(e);break;case"preset":if("FLUX.1-dev"==n&&(t.value="REGULAR - FLUX and SD3.5 only (high strength)"),ai.includes(n)){let t=wt(e,"use_tiled");bt(e,wt(e,"lora_strength")),bt(e,wt(e,"provider"),!!["REGULAR - FLUX and SD3.5 only (high strength)"].includes(n)),bt(e,wt(e,"weight_faceidv2")),bt(e,wt(e,"weight_kolors")),bt(e,wt(e,"use_tiled"),!0),bt(e,wt(e,"sharpening"),t&&t.value)}else oi.includes(n)&&(bt(e,wt(e,"weight_faceidv2"),!!["FACEID PLUS V2","FACEID PLUS KOLORS"].includes(n)),bt(e,wt(e,"weight_kolors"),!!["FACEID PLUS KOLORS"].includes(t.value)),["FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"].includes(n)?bt(e,wt(e,"lora_strength"),!1):bt(e,wt(e,"lora_strength"),!0),bt(e,wt(e,"provider"),!0),bt(e,wt(e,"use_tiled")),bt(e,wt(e,"sharpening")));St(e);break;case"use_tiled":bt(e,wt(e,"sharpening"),!!n),St(e);break;case"num_embeds":a=n+1;for(let t=0;tbt(e,wt(e,t),!1)));break;case"brushnet_random":case"brushnet_segmentation":["dtype","scale","start_at","end_at"].map((t=>bt(e,wt(e,t),!0))),["fitting","function"].map((t=>bt(e,wt(e,t),!1)));break;case"powerpaint":["dtype","fitting","function","scale","start_at","end_at"].map((t=>bt(e,wt(e,t),!0)))}St(e);break;case"encode":bt(e,wt(e,"noise_mask"),!!["inpaint_model_conditioning","different_diffusion"].includes(n)),St(e);break;case"image_output":bt(e,wt(e,"link_id"),!!["Sender","Sender&Save"].includes(n)),bt(e,wt(e,"decode_vae_name"),!!["Hide","Hide&Save"].includes(n)),["save_prefix","output_path","embed_workflow","number_padding","overwrite_existing"].map((t=>bt(e,wt(e,t),!!["Save","Hide&Save","Sender&Save"].includes(n))));break;case"add_noise":var l=wt(e,"control_before_generate"),r=wt(e,"control_after_generate")||l;"disable"===n?(bt(e,wt(e,"seed")),r&&(r.last_value=r.value,r.value="fixed",bt(e,r))):("enable"===n&&(t.value="enable (CPU)"),bt(e,wt(e,"seed"),!0),r&&((null==r?void 0:r.last_value)&&(r.value=r.last_value),bt(e,r,!0))),St(e);break;case"guider":switch(n){case"Basic":case"IP2P+Basic":["cfg_negative"].map((t=>bt(e,wt(e,t))));break;case"CFG":case"IP2P+CFG":bt(e,wt(e,"cfg"),!0),bt(e,wt(e,"cfg_negative"));break;case"DualCFG":case"IP2P+DualCFG":["cfg","cfg_negative"].map((t=>bt(e,wt(e,t),!0)))}St(e);break;case"scheduler":"easy preSamplingCustom"==s&&(["karrasADV","exponentialADV","polyExponential"].includes(n)?(["sigma_max","sigma_min"].map((t=>bt(e,wt(e,t),!0))),["denoise","beta_d","beta_min","eps_s","coeff"].map((t=>bt(e,wt(e,t))),!1),bt(e,wt(e,"rho"),"exponentialADV"!=n)):"vp"==n?(["sigma_max","sigma_min","denoise","rho","coeff"].map((t=>bt(e,wt(e,t)))),["beta_d","beta_min","eps_s"].map((t=>bt(e,wt(e,t),!0)))):(["sigma_max","sigma_min","beta_d","beta_min","eps_s","rho"].map((t=>bt(e,wt(e,t)))),bt(e,wt(e,"coeff"),"gits"==n),bt(e,wt(e,"denoise"),!0)),St(e));break;case"conditioning_mode":["replace","concat","combine"].includes(n)?["average_strength","old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>bt(e,wt(e,t)))):"average"==n?(bt(e,wt(e,"average_strength"),!0),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>bt(e,wt(e,t),!1)))):"timestep"==n&&(["average_strength"].map((t=>bt(e,wt(e,t),!1))),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>bt(e,wt(e,t),!0))));break;case"rescale":wt(e,"rescale_after_model").value,bt(e,wt(e,"width"),"to Width/Height"===n),bt(e,wt(e,"height"),"to Width/Height"===n),bt(e,wt(e,"percent"),"by percentage"===n),bt(e,wt(e,"longer_side"),"to longer side - maintain aspect"===n),St(e);break;case"upscale_method":["factor","crop"].map((t=>bt(e,wt(e,t),"None"!==n)));break;case"target_parameter":switch(s){case"easy XYInputs: Steps":["first_step","last_step"].map((t=>bt(e,wt(e,t),"steps"==n))),["first_start_step","last_start_step"].map((t=>bt(e,wt(e,t),"start_at_step"==n))),["first_end_step","last_end_step"].map((t=>bt(e,wt(e,t),"end_at_step"==n)));break;case"easy XYInputs: Sampler/Scheduler":let t=wt(e,"input_count").value+1;for(let i=0;ibt(e,wt(e,t),"strength"==n))),["first_start_percent","last_start_percent"].map((t=>bt(e,wt(e,t),"start_percent"==n))),["first_end_percent","last_end_percent"].map((t=>bt(e,wt(e,t),"end_percent"==n))),["strength","start_percent","end_percent"].map((t=>bt(e,wt(e,t),n!=t))),St(e)}case"replace_count":a=n+1;for(let t=0;tbt(e,wt(e,t),!d)));for(let t=a;t<11;t++)["lora_name_"+t,"model_str_"+t,"clip_str_"+t].map((t=>bt(e,wt(e,t),!1)));St(e);break;case"ckpt_count":a=n+1;var u=-1!=wt(e,"input_mode").value.indexOf("ClipSkip"),c=-1!=wt(e,"input_mode").value.indexOf("VAE");for(let t=0;tbt(e,wt(e,t),!1)));St(e);break;case"input_count":a=n+1;var A=wt(e,"target_parameter").value;for(let t=0;tbt(e,wt(e,i),!!t)));["model_strength","clip_strength"].map((i=>bt(e,wt(e,i),!t)));break;case"easy XYInputs: Checkpoint":a=wt(e,"ckpt_count").value+1,u=-1!=wt(e,"input_mode").value.indexOf("ClipSkip"),c=-1!=wt(e,"input_mode").value.indexOf("VAE");for(let i=0;ie.name===t));if(-1!==e){for(let t=e;t"info"===e.name));if(-1!==t&&this.widgets[t]){this.widgets[t].value=e}}};e.prototype.onExecuted=function(e){null==r||r.apply(this,arguments);var i="";for(let t=0;t"prompt"==e.name));this.addWidget("button","get values from COMBO link","",(()=>{var t,s;const n=(null==(s=null==(t=this.outputs[1])?void 0:t.links)?void 0:s.length)>0?this.outputs[1].links[0]:null,a=i.graph._nodes.find((e=>{var t;return null==(t=e.inputs)?void 0:t.find((e=>e.link==n))}));if(n&&a){const t=a.inputs.find((e=>e.link==n)).widget.name,i=a.widgets.find((e=>e.name==t));let s=(null==i?void 0:i.options.values)||null;s&&(s=s.join("\n"),e.value=s)}else Ye.error(Ne("No COMBO link"),3e3)}),{serialize:!1})}),ri.includes(t.name)){let t=function(e){var t="";for(let i=0;ie.name===t+"_prompt")),s="comfy-multiline-input wildcard_"+t+"_"+this.id.toString();if(-1==i&&e){const i=document.createElement("textarea");i.className=s,i.placeholder="Wildcard Prompt ("+t+")";const n=this.addDOMWidget(t+"_prompt","customtext",i,{getValue:e=>i.value,setValue(e){i.value=e},serialize:!1});n.inputEl=i,n.inputEl.readOnly=!0,i.addEventListener("input",(()=>{var e;null==(e=n.callback)||e.call(n,n.value)})),n.value=e}else if(this.widgets[i])if(e){this.widgets[i].value=e}else{this.widgets.splice(i,1);const e=document.getElementsByClassName(s);e&&e[0]&&e[0].remove()}}};e.prototype.onExecuted=function(e){null==r||r.apply(this,arguments);const s=t(e.positive),n=t(e.negative);i.call(this,s,"positive"),i.call(this,n,"negative")}}if(["easy sv3dLoader"].includes(t.name)){let t=function(e,t,i){switch(e){case"azimuth":return i.readOnly=!0,i.style.opacity=.6,"0:(0.0,0.0)"+(t>1?`\n${t-1}:(360.0,0.0)`:"");case"elevation":return i.readOnly=!0,i.style.opacity=.6,"0:(-90.0,0.0)"+(t>1?`\n${t-1}:(90.0,0.0)`:"");case"custom":return i.readOnly=!1,i.style.opacity=1,"0:(0.0,0.0)\n9:(180.0,0.0)\n20:(360.0,0.0)"}};e.prototype.onNodeCreated=async function(){o&&o.apply(this,[]);const e=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((n=>{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(li.includes(n)&&(e.prototype.onNodeCreated=async function(){o&&o.apply(this,[]);const e=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){const t=this.addWidget("button","🎲 Manual Random Seed",null,(t=>{"fixed"!=s.value&&(s.value="fixed"),e.value=Math.floor(Math.random()*Oe),i.queuePrompt(0,1)}),{serialize:!1});e.linkedWidgets=[t,s]}},e.prototype.onAdded=async function(){a&&a.apply(this,[]);const e=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()*Oe))}),1)}),"easy convertAnything"==n&&(e.prototype.onNodeCreated=async function(){o&&o.apply(this,[]);const e=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"==n){let t=function(e){const t=e.widgets[0];for(let i=1;i<=4;i++)"Pixels"===t.value?(e.widgets[i].options.step=80,void 0!==e.widgets[i].options.step2&&(e.widgets[i].options.step2=8),e.widgets[i].options.max=8192):(e.widgets[i].options.step=10,void 0!==e.widgets[i].options.step2&&(e.widgets[i].options.step2=1),e.widgets[i].options.max=99)};e.prototype.onAdded=async function(e){const i=this.widgets[0];let s=i.callback;i.callback=(...e)=>{t(this),s&&s.apply(i,[...e])},setTimeout((e=>{t(this)}),1)}}if(hi.includes(n)){const t=e=>{switch(n){case"easy forLoopStart":case"easy whileLoopStart":return 0;case"easy forLoopEnd":case"easy whileLoopEnd":return 1}},i=e=>{switch(n){case"easy forLoopStart":return 2;case"easy forLoopEnd":case"easy whileLoopEnd":return 0;case"easy whileLoopStart":return 1}};e.prototype.onNodeCreated=async function(){if("easy loadImagesForLoop"==n&&(this.outputs[0].shape=5),ci.includes(n)){const e=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())),St(this)}return Ai.includes(n)&&("easy textIndexSwitch"==n&&(this.widgets=this.widgets.filter(((e,t)=>t<=2))),this.inputs=this.inputs.filter(((e,t)=>t<=1||e.widget)),St(this)),null==o?void 0:o.apply(this,arguments)},e.prototype.onConnectionsChange=function(e,s,a,o){var l,r;if(o)if(1==e){let e=this.inputs.every((e=>null!==e.link||e.widget)),i=this.inputs.filter((e=>!["condition","index","total"].includes(e.name)));if(ci.includes(n)){if(e){if(i.length>=20)return void Ye.warn(Ne("The maximum number of inputs is 20"));let e=i[i.length-1],t=parseInt(e.name.split("initial_value")[1])+1;if(this.inputs.find((e=>e.name==="initial_value"+t)))return;let s="initial_value"+t,n="value"+t;this.addInput(s,"*"),this.addOutput(n,"*")}else if(!a){const e=t();let i=this.inputs.findLastIndex((e=>e.link));if(s>=e&&(-1===i||s>=i)){let e=this.inputs[s];if(!e.name||["condition","total"].includes(e.name))return;let t=parseInt(e.name.split("initial_value")[1])+1,i=this.inputs.findIndex((e=>e.name==="initial_value"+t)),n=this.outputs.findIndex((e=>e.name==="value"+t));-1!==i&&this.removeInput(i),-1!==n&&this.removeOutput(n)}}}else if(Ai.includes(n))if(e){if(i.length>=20)return void Ye.warn(Ne("The maximum number of inputs is 20"));let e=mi[n]+i.length;this.addInput(e,"*")}else a||s==this.inputs.length-2&&this.removeInput(s+1)}else if(2==e){let e=this.outputs.filter((e=>!["flow","index"].includes(e.name))),t=e.every((e=>{var t;return(null==(t=e.links)?void 0:t.length)>0}));if(ci.includes(n)){if(t){if(e.length>=20)return void Ye.warn(Ne("The maximum number of outputs is 20"));let t=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;let s="initial_value"+i,n="value"+i;this.addInput(s,"*"),this.addOutput(n,"*")}else if(!a){const e=i();let t=o.origin_slot,s=this.outputs.findLastIndex((e=>{var t;return(null==(t=e.links)?void 0:t.length)>0}));if(t>=e&&(-1===s||t>=s)){let e=this.outputs[t];if(!e.name||["flow","index"].includes(e.name))return;let i=parseInt(e.name.split("value")[1])+1,s=this.inputs.findIndex((e=>e.name==="initial_value"+i)),n=this.outputs.findIndex((e=>e.name==="value"+i));if(-1!==s&&(null==(l=this.inputs[s])?void 0:l.link))return;-1!==s&&this.removeInput(s),-1!==n&&this.removeOutput(n)}}}else if(pi.includes(n))if(t){if(e.length>=20)return void Ye.warn(Ne("The maximum number of outputs is 20"));let t=mi[n]+e.length;this.addOutput(t,"*")}else if(!a){let t=o.origin_slot;t==this.outputs.length-2&&0==(null==(r=e[t].links)?void 0:r.length)&&this.removeOutput(t+1)}}}}if(["easy fluxLoader","easy fullLoader"].includes(n)&&(e.prototype.onConnectionsChange=async function(e,t){d&&d.apply(this,[]);const i=this.inputs.find((e=>"model_override"===e.name)),s=this.inputs.find((e=>"vae_override"===e.name));let n=wt(this,"ckpt_name"),a=wt(this,"vae_name");if((null==i?void 0:i.link)&&0==t){const e=(null==n?void 0:n.options.values)||[];setTimeout((t=>{this.widgets[0].value=(null==e?void 0:e[0])||"None",bt(this,n,!(null==i?void 0:i.link))}),1)}else bt(this,n,!(null==i?void 0:i.link));if(!(null==s?void 0:s.link)||1!=t&&2!=t)bt(this,a,!(null==s?void 0:s.link));else{let e=this.widgets.findIndex((e=>"vae_name"==e.name));setTimeout((t=>{this.widgets[e].value="Baked VAE",bt(this,a,!(null==s?void 0:s.link))}),1)}}),di.includes(n)||-1!==n.indexOf("workflow")){const i=(null==(s=null==t?void 0:t.input)?void 0:s.required)||{};if(!i.image_output&&!i["图像输出"]&&!i["视频输出"])return;e.prototype.onDrawBackground=function(e){try{si(this)}catch(t){}}}},nodeCreated(e){if(e.comfyClass.startsWith("easy ")){if(e.widgets)for(const i of e.widgets){if(!ni.includes(i.name))continue;let t=i.value;fi(e,i),Object.defineProperty(i,"value",{get:e=>t,set(s){s!==t&&(t=s,requestAnimationFrame((t=>{fi(e,i)})))}})}const t=e.comfyClass;if("easy preDetailerFix"==t){const t=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)){const t=e.widgets.find((e=>"text"==e.name));let i=1;Object.defineProperty(e.widgets[i],"value",{set:e=>{if("Select the LoRA to add to the text"!=e){let i=e;i.endsWith(".safetensors")&&(i=i.slice(0,-12)),t.value+=``}},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){const t=e.widgets.find((e=>"text"==e.name));let i=1;Object.defineProperty(e.widgets[i],"value",{set:s=>{var n,a;"Select the prefix to add to the text"!=s&&(null==(a=null==(n=e.widgets[i])?void 0:n.options)?void 0: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=>{var n,a;"👤Select the subject add to the text"!=s&&(null==(a=null==(n=e.widgets[i+1])?void 0:n.options)?void 0: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=>{var n,a;"🎬Select the action add to the text"!=s&&(null==(a=null==(n=e.widgets[i+2])?void 0:n.options)?void 0: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=>{var n,a;"👚Select the clothes add to the text"!=s&&(null==(a=null==(n=e.widgets[i+3])?void 0:n.options)?void 0: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=>{var n,a;"☀️Select the illumination environment add to the text"!=s&&(null==(a=null==(n=e.widgets[i+4])?void 0:n.options)?void 0: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=>{var n,a;"🎞️Select the background add to the text"!=s&&(null==(a=null==(n=e.widgets[i+5])?void 0:n.options)?void 0: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=>{var n,a;"🔞Select the nsfw add to the text"!=s&&(null==(a=null==(n=e.widgets[i+6])?void 0:n.options)?void 0: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(ui.includes(t)){const t=document.createElement("textarea");t.className="comfy-multiline-input",t.readOnly=!0;const i=e.addDOMWidget("info","customtext",t,{getValue:e=>t.value,setValue:e=>t.value=e,serialize:!1});i.inputEl=t,t.addEventListener("input",(()=>{var e;null==(e=i.callback)||e.call(i,i.value)}))}}}});const gi=LiteGraph.LGraphNode;fe.registerExtension({name:"easy bookmark",registerCustomNodes(){class e extends gi{constructor(){super("🔖"),v(this,"type","easy bookmark"),v(this,"title","🔖"),v(this,"slot_start_y",-20),v(this,"___collapsed_width",0),v(this,"isVirtualNode",!0),v(this,"serialize_widgets",!0),v(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(){return this.___collapsed_width}set _collapsed_width(e){const t=fe.canvas,i=t.canvas.getContext("2d");if(i){const e=i.font;i.font=t.title_text_font,this.___collapsed_width=40+i.measureText(this.title).width,i.font=e}}onAdded(){setTimeout((e=>{const t=this.widgets[0].value;t&&(this.title="🔖 "+t)}),1),window.addEventListener("keydown",this.keypressBound)}onRemoved(){window.removeEventListener("keydown",this.keypressBound)}onKeypress(e){const t=e.target;["input","textarea"].includes(t.localName)||this.widgets[0]&&e.key.toLocaleLowerCase()===this.widgets[0].value.toLocaleLowerCase()&&this.canvasToBookmark()}canvasToBookmark(){var e,t;const i=fe.canvas;(null==(e=null==i?void 0:i.ds)?void 0:e.offset)&&(i.ds.offset[0]=16-this.pos[0],i.ds.offset[1]=40-this.pos[1]),null!=(null==(t=null==i?void 0:i.ds)?void 0: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"}}),fe.registerExtension({name:"Comfy.EasyUse.ChainNode",init(){fe.canvas._mousemove_callback=e=>{xe("EasyUse.Nodes.ChainGetSet",null)&&((e=!1,t={})=>{var i,s,n,a,o;const l=Dt();if(!l||l.length<1)return;const r=Lt();if(0===r.length)return;let d=t.inputX||160,u=t.ouputX||60;if(r.filter((e=>Mt(e))).length>1)return;for(const A of r){let a=t.inputY||10,o=t.outputY||30;const l=[],c=A.id;if(A.graph){Rt[c]||(Rt[c]=[]);for(const e of A.inputs??[]){const t=e.link;if(!t)continue;const{origin_id:i,target_slot:s}=Ct(t),n=xt(i);if(!n)continue;if(!Mt(n))continue;let o=A.getConnectionPos(!0,s);Rt[c][s]||(Rt[c][s]=o),!Rt[c]||Rt[c][s][1]===o[1]&&Rt[c][s][0]===o[0]||(d=o[0]-Rt[c][s][0],a=o[1]-Rt[c][s][1],n.pos=[n.pos[0]+d,n.pos[1]+a]),Rt[c][s]=o,l.push(n)}Pt[c]||(Pt[c]=[]);for(const e of A.outputs??[])if(e.links&&A.graph)for(const t of e.links){const{target_id:e,target_slot:s,origin_slot:n}=Ct(t),a=xt(e);if(!a)continue;if(!Mt(a))continue;const r=null==(i=a.outputs)?void 0:i.links;if((null==r?void 0:r.length)>1)return;const d=A.getConnectionPos(!1,n);Pt[c][n]||(Pt[c][n]=d),!Pt[c]||Pt[c][n][0]===d[0]&&Pt[c][n][1]===d[1]||(u=d[0]-Pt[c][n][0],o=d[1]-Pt[c][n][1],a.pos=[a.pos[0]+u,a.pos[1]+o]),Pt[c][n]=d,l.push(a)}if(e&&1===r.length){const e=[A,...l];(null==(n=null==(s=A.graph)?void 0:s.list_of_graphcanvas)?void 0:n[0]).selectNodes(e)}}}const c=r[0];if(!c)return;(null==(o=null==(a=c.graph)?void 0:a.list_of_graphcanvas)?void 0:o[0]).setDirty(!0,!0)})()};const e=LGraphCanvas.prototype.showLinkMenu;LGraphCanvas.prototype.showLinkMenu=st(e,(function(t,i){return i.shiftKey?(((e,t=!1)=>{var i,s,n,a,o,l,r,d,u,c;const{type:A}=e;if("*"===A)return;let{origin_id:p,target_id:h,origin_slot:m,target_slot:f}=e,g=xt(p),v=xt(h);if(!g||!v)return!1;if("Reroute"===g.type){let e=0;[g,e]=jt(g),p=null==g?void 0:g.id,m=e,void 0!==m&&-1!==m||(m=0)}if("Reroute"===v.type&&(v=Ut(v),h=null==v?void 0:v.id,f=null==v?void 0:v.inputs.findIndex((e=>e.type===A)),void 0!==f&&-1!==f||(f=0)),void 0===p||void 0===h||!g||!v)return!1;if(t&&(Mt(g)||Mt(v)))return!1;let y=It((null==(i=v.getInputInfo(f))?void 0:i.name)??A.toLowerCase());y||(y=It((null==(n=null==(s=null==g?void 0:g.outputs)?void 0:s[m])?void 0:n.name)??(null==(o=null==(a=null==g?void 0:g.outputs)?void 0:a[m])?void 0:o.type.toString())??y+`_from_${p}_to_${h}`));let w,b=!1,_=!1;if(Mt(g))y=_t(g),_=!0;else{const e=null==(r=null==(l=g.outputs)?void 0:l[m])?void 0:r.links;if(e)for(const t of e){const e=xt((null==(d=Ct(t))?void 0:d.target_id)??-1);e&&Mt(e)&&Ot(e)&&(y=_t(e),_=!0)}if(!_){for(const e of Dt()){if(y!==_t(e)||!Ot(e))continue;const t=null==(u=e.inputs[0])?void 0:u.link;(null==(c=Ct(t))?void 0:c.origin_id)===g.id?_=!0:b=!0}b&&(y+=`_from_${p}_to_${h}`)}}if(!_){w=LiteGraph.createNode("easy setNode"),w.is_auto_link=!0;const e=g.getConnectionPos(!1,m);w.pos=[e[0]+20,e[1]],w.inputs[0].name=y,w.inputs[0].type=A,w.inputs[0].widget=v.inputs[f].widget,Gt(w,y),zt(w),w.flags.collapsed=!0;let t=[];g.widgets?t=Object.values(g.widgets).map((e=>e.value)):g.widgets_values&&(t=JSON.parse(JSON.stringify(g.widgets_values))),g.connect(m,w,0),g.widgets_values=t,"PrimitiveNode"===g.type&&setTimeout((()=>{if(g){g.connect(m,w,0);for(const[e,i]of t.entries())Gt(g,i,e);null!==w&&w.setSize(w.computeSize())}}))}const S=LiteGraph.createNode("easy getNode"),x=v.getConnectionPos(!0,f);S.pos=[x[0]-150,x[1]],S.outputs[0].name=y,S.outputs[0].type=A,S.outputs[0].widget=v.inputs[f].widget,zt(S),Gt(S,y),null===S||(S.flags.collapsed=!0,S.setSize(S.computeSize()),S.connect(0,v,f))})(t),!1):(e.apply(this,[t,i]),!1)}))}});const vi=async()=>{try{const{Running:e,Pending:t}=await ge.getQueue();if(e.length>0||t.length>0)return void Ye.error(Ne("Clean Failed")+":"+Ne("Please stop all running tasks before cleaning GPU"));200==(await ge.fetchApi("/easyuse/cleangpu",{method:"POST"})).status?Ye.success(Ne("Clean SuccessFully")):Ye.error(Ne("Clean Failed"))}catch(e){}};let yi={},wi=!1;function bi(e,t,i,s,n){var a=LGraphCanvas.active_canvas,o=a.getCanvasWindow(),l=a.graph;if(l)return function e(t,s){var r=LiteGraph.getNodeTypesCategories(a.filter||l.filter).filter((function(e){return e.startsWith(t)})),d=[];r.map((function(i){if(i){var s=new RegExp("^("+t+")"),n=i.replace(s,"").split("/")[0],a=""===t?n+"/":t+n+"/",o=n;-1!=o.indexOf("::")&&(o=o.split("::")[1]),-1===d.findIndex((function(e){return e.value===a}))&&d.push({value:a,content:o,has_submenu:!0,callback:function(t,i,s,n){e(t.value,n)}})}})),LiteGraph.getNodeTypesInCategory(t.slice(0,-1),a.filter||l.filter).map((function(e){if(!e.skip_list){var t={value:e.type,content:e.title,has_submenu:!1,callback:function(e,t,i,s){var o=s.getFirstEvent();a.graph.beforeChange();var l=LiteGraph.createNode(e.value);l&&(l.pos=a.convertEventToCanvasOffset(o),a.graph.add(l)),n&&n(l),a.graph.afterChange()}};d.push(t)}}));const u=xe("EasyUse.ContextMenu.NodesSort",null);""===t&&u&&(d=function(e){let t=[],i=[];return e.forEach((e=>{(null==e?void 0:e.value)&&Me.includes(e.value.split("/")[0])?t.push(e):i.push(e)})),[{title:Ne("ComfyUI Basic"),is_category_title:!0},...t,{title:Ne("Others A~Z"),is_category_title:!0},...i.sort(((e,t)=>e.content.localeCompare(t.content)))]}(d)),new LiteGraph.ContextMenu(d,{event:i,parentMenu:s},o)}("",s),!1}function _i(e){try{return encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))}catch(t){return e}}function Si(e,t,i){var s=this;i=i||{};var n=document.createElement("div");n.className="litemenu-entry submenu";var a=!1;function o(e){var t=this.value,n=!0;(s.current_submenu&&s.current_submenu.close(e),i.callback)&&(!0===i.callback.call(this,t,i,e,s,i.node)&&(n=!1));if(t){if(t.callback&&!i.ignore_item_callbacks&&!0!==t.disabled)!0===t.callback.call(this,t,i,e,s,i.extra)&&(n=!1);if(t.submenu){if(!t.submenu.options)throw"ContextMenu submenu needs options";new s.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}),n=!1}}n&&!s.lock&&s.close()}return null===t?n.classList.add("separator"):t.is_category_title?(n.classList.remove("litemenu-entry"),n.classList.remove("submenu"),n.classList.add("litemenu-title"),n.innerHTML=t.title):(n.innerHTML=t&&t.title?t.title:e,n.value=t,t&&(t.disabled&&(a=!0,n.classList.add("disabled")),(t.submenu||t.has_submenu)&&n.classList.add("has_submenu")),"function"==typeof t?(n.dataset.value=e,n.onclick_callback=t):n.dataset.value=t,t.className&&(n.className+=" "+t.className)),n&&(null==t?void 0:t.thumbnail)&&(n.addEventListener("mouseenter",Li(n,t,this.root),{passive:!0}),n.addEventListener("mouseleave",ki(),{passive:!0}),n.addEventListener("click",ki(),{passive:!0})),this.root.appendChild(n),a||n.addEventListener("click",o),!a&&i.autoopen&&LiteGraph.pointerListenerAdd(n,"enter",(function(e){var t=this.value;if(!t||!t.has_submenu)return;o.call(this,e)})),n}fe.registerExtension({name:"Comfy.EasyUse.ContextMenu",async setup(){LGraphCanvas.onMenuAdd=bi,xi();const e=LiteGraph.ContextMenu;LiteGraph.ContextMenu=function(t,i){if(!(null==i?void 0:i.callback)||t.some((e=>"string"!=typeof e))){if(i.parentMenu);else if(i.extra);else if(i.scale);else{const e=xe("EasyUse.ContextMenu.QuickOptions",null);if(i.hasOwnProperty("extra")&&"Disable"!==e){if("At the forefront"==e?t.unshift(null):t.push(null),s=window.location.host,["192.168.","10.","127.",/^172\.((1[6-9]|2[0-9]|3[0-1])\.)/].some((e=>"string"==typeof e?s.startsWith(e):e.test(s)))){const i={content:`${Ne("Reboot ComfyUI")}`,callback:e=>(async()=>{if(confirm(Ne("Are you sure you'd like to reboot the server?")))try{ge.fetchApi("/easyuse/reboot")}catch(e){}})()};"At the forefront"==e?t.unshift(i):t.push(i)}const i=xe("EasyUse.Hotkeys.cleanVRAMUsed",null)?"("+qe("Shift+r")+")":"",n={content:`${Ne("Cleanup Of VRAM Usage")} ${i}`,callback:e=>vi()};"At the forefront"==e?t.unshift(n):t.push(n);const a=xe("EasyUse.Hotkeys.toggleNodesMap",null)?"("+qe("Shift+m")+")":"",o={content:`${Ne("Nodes Map")} ${a}`,callback:e=>{var t,i,s;const n=(null==(t=fe.extensionManager)?void 0:t.sidebarTab)||fe.extensionManager,a=(null==(i=fe.extensionManager.sidebarTab)?void 0:i.activeSidebarTabId)||(null==(s=fe.extensionManager)?void 0:s.activeSidebarTab);n.activeSidebarTabId=a==Pe?null:Pe}};"At the forefront"==e?t.unshift(o):t.push(o)}}return e.apply(this,[...arguments])}{const s=function(e,t){const i=xe("EasyUse.ContextMenu.ModelsThumbnails",null),s=xe("EasyUse.ContextMenu.SubDirectories",null);if(!i&&!s)return null;if(wi)return null;const n=["ckpt","pt","bin","pth","safetensors","gguf"];if((null==e?void 0:e.length)>0){const t=null==(a=e[e.length-1])?void 0:a.substring(a.lastIndexOf(".")+1);if(!n.includes(t))return null}var a;const o=t.callback,l=[...e];t.callback=null;const r=(e,t)=>{["None","无","無","なし"].includes(e.content)?o("None",t):o(l.find((t=>t.endsWith(e.content)),t))};if(i&&!s)return e.map((e=>{var t,i;let s=null==(t=yi[e])?void 0:t.folder,n=null==(i=yi[e])?void 0:i.pathIndex;const a=window.location.protocol,o=window.location.host;let l=s?`${`${a}//${o}`}/api/experiment/models/preview/${s}/${n}/${_i(e)}`:"";return{folder:s,content:e,fullName:e,title:ve("div.comfyui-easyuse-contextmenu-model",{},[ve("span",{},e)]).outerHTML,thumbnail:l,callback:r}}));const d=e,u={},c=[],A=[];for(const f of d){const e=f.indexOf("/")>-1?"/":"\\",t=f.split(e);if(t.length>1){const i=t.shift();u[i]=u[i]||[],u[i].push({value:t.join(e),fullValue:f})}else"CHOOSE"===f||f.startsWith("DISABLE ")?c.push({value:f,fullValue:f}):A.push({value:f,fullValue:f})}const p=Object.values(u).length,h=[],m=(e,t="",s)=>{var n,a;let o;o=ve("div.comfyui-easyuse-contextmenu-model",{},[ve("span",{},e)]);let l=null==(n=yi[s])?void 0:n.folder,d=null==(a=yi[s])?void 0:a.pathIndex;const u=window.location.protocol,c=window.location.host;let A=l?`${`${u}//${c}`}/api/experiment/models/preview/${l}/${d}/${_i(s)}`:"";return{folder:l,content:e,fullName:s,thumbnail:i?A:null,title:o.outerHTML,callback:r}};if(p>0){const e=(t,i)=>{let s=[],n=[];const a=t.map((({value:e,fullValue:t})=>{const a={},o=e.indexOf("/")>-1?"/":"\\",l=e.split(o);if(l.length>1){const e=l.shift();a[e]=a[e]||[],a[e].push({value:l.join(o),fullValue:t})}if(Object.values(u).length>0){let i=Object.keys(a)[0];i&&a[i]?s.push({key:i,value:a[i][0]}):n.push(m(e,i,t))}return m(e,i,t)}));if(s.length>0){let t={};return s.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])}}))),...n]}return a};for(const[t,i]of Object.entries(u))h.push({content:t,has_submenu:!0,callback:()=>{},submenu:{options:e(i,t)}})}h.push(...A.map((e=>m(e.value,"",e.fullValue)))),c.length>0&&h.push(...c.map((e=>m(e.value,"",e.fullValue))));return h}(t,i);return s?e.call(this,s,i):e.apply(this,[...arguments])}var s},LiteGraph.ContextMenu.prototype=e.prototype,xe("EasyUse.ContextMenu.NodesSort")&&(LiteGraph.ContextMenu.prototype.addItem=Si),document.getElementById("graph-canvas").addEventListener("mouseenter",(e=>{setTimeout((e=>{const t=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)}))},async beforeRegisterNodeDef(e,t,i){const s=e.prototype.onNodeCreated;["CheckpointLoader|pysssss","LoraLoader|pysssss"].includes(t.name)&&(e.prototype.onNodeCreated=async function(){s&&s.apply(this,[]);let e=wt(this,"lora_name")||wt(this,"ckpt_name");if(e){let t=e.onClick;e.onClick=function(e){return wi=!0,setTimeout((e=>{wi=!1}),500),t.call(this,e)}}})}});const xi=async()=>{["checkpoints","loras","diffusion_models"].map((async e=>{const t=await ge.getModels(e);(null==t?void 0:t.length)>0&&t.map((t=>{yi[t.name]={folder:e,pathIndex:t.pathIndex}}))}))},Li=(e,t,i)=>s=>{var n;const a=t=>{setTimeout((s=>{const n=i.getBoundingClientRect();if(!n)return;const a=document.body.getBoundingClientRect();if(!a)return;const{left:o,top:l}=((e,t,i)=>{const{x:s}=e.getBoundingClientRect();let{top:n,left:a}=t;const{width:o,height:l}=i;return s<=o&&(a+=t.width),t.top<=l||(n=l),{left:a,top:n}})(e,n,a),r=document.getElementById("easyuse-model-thumbnail");r.src=t,r.style.left=`${o}px`,r.style.top=`${l}px`,r.style.display="block",r.style.opacity=1,r.onerror=e=>{r.src=Ge}}),10)};if(null==(n=null==yi?void 0:yi[t.fullName])?void 0:n.img){let e=yi[t.fullName].img;a("no_preview_image"==e?Ge:e.src)}else{let e=new Image;e.src=t.thumbnail,e.onload=i=>{yi[t.fullName].img=e,a(t.thumbnail)},e.onerror=i=>{e=null,yi[t.fullName].img="no_preview_image",a(Ge)}}},ki=()=>e=>{const t=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")};class Ei extends ye{constructor(){super(),this.element.classList.add("easyuse-model-metadata")}show(e){super.show(ve("div",Object.keys(e).map((t=>ve("div",[ve("label",{textContent:t}),ve("span",{textContent:e[t]})])))))}}class Ni extends ye{constructor(e){super(),this.name=e,this.element.classList.add("easyuse-model-info")}get customNotes(){return this.metadata["easyuse.notes"]}set customNotes(e){this.metadata["easyuse.notes"]=e}get hash(){return this.metadata["easyuse.sha256"]}async show(e,t){this.type=e;const i=ge.fetchApi("/easyuse/metadata/"+encodeURIComponent(`${e}/${t}`));this.info=ve("div",{style:{flex:"auto"}}),this.imgCurrent=0,this.imgList=ve("div.easyuse-preview-list",{style:{display:"none"}}),this.imgWrapper=ve("div.easyuse-preview",[ve("div.easyuse-preview-group",[this.imgList])]),this.main=ve("main",{style:{display:"flex"}},[this.imgWrapper,this.info]),this.content=ve("div.easyuse-model-content",[ve("div.easyuse-model-header",[ve("h2",{textContent:this.name})]),this.main]);const s=ve("div",{textContent:"ℹ️ Loading...",parent:this.content});super.show(this.content),this.metadata=await(await i).json(),this.viewMetadata.style.cursor=this.viewMetadata.style.opacity="",this.viewMetadata.removeAttribute("disabled"),s.remove(),this.addInfo()}createButtons(){const e=super.createButtons();return this.viewMetadata=ve("button",{type:"button",textContent:"View raw metadata",disabled:"disabled",style:{opacity:.5,cursor:"not-allowed"},onclick:e=>{this.metadata&&(new Ei).show(this.metadata)}}),e.unshift(this.viewMetadata),e}parseNote(){if(!this.customNotes)return[];let e=[];const t=new RegExp("(\\bhttps?:\\/\\/[^\\s]+)","g");let i,s=0;do{let n;i=t.exec(this.customNotes);let a=0;i?(n=i.index,a=i.index+i[0].length):n=this.customNotes.length;let o=this.customNotes.substring(s,n);o&&(o=o.replaceAll("\n","
"),e.push(ve("span",{innerHTML:o}))),i&&e.push(ve("a",{href:i[0],textContent:i[0],target:"_blank"})),s=a}while(i);return e}addInfoEntry(e,t){return ve("p",{parent:this.info},["string"==typeof e?ve("label",{textContent:e+": "}):e,"string"==typeof t?ve("span",{textContent:t}):t])}async getCivitaiDetails(){const e=await fetch("https://civitai.com/api/v1/model-versions/by-hash/"+this.hash);if(200===e.status)return await e.json();throw 404===e.status?new Error("Model not found"):new Error(`Error loading info (${e.status}) ${e.statusText}`)}addCivitaiInfo(){const e=this.getCivitaiDetails(),t=ve("span",{textContent:"ℹ️ Loading..."});return this.addInfoEntry(ve("label",[ve("img",{style:{width:"18px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),ve("span",{textContent:"Civitai: "})]),t),e.then((e=>{var t,i;this.imgWrapper.style.display="block";let s=this.element.querySelector(".easyuse-model-header");s&&s.replaceChildren(ve("h2",{textContent:this.name}),ve("div.easyuse-model-header-remark",[ve("h5",{textContent:Ne("Updated At:")+Ze(new Date(e.updatedAt),"yyyy/MM/dd")}),ve("h5",{textContent:Ne("Created At:")+Ze(new Date(e.updatedAt),"yyyy/MM/dd")})]));let n=null,a=this.parseNote.call(this),o=Ne("✏️ Edit"),l=ve("div.easyuse-model-detail-textarea",[ve("p",(null==a?void 0:a.length)>0?a:{textContent:Ne("No notes")})]);if(a&&0!=a.length?l.classList.remove("empty"):l.classList.add("empty"),this.info.replaceChildren(ve("div.easyuse-model-detail",[ve("div.easyuse-model-detail-head.flex-b",[ve("span",Ne("Notes")),ve("a",{textContent:o,href:"#",style:{fontSize:"12px",float:"right",color:"var(--warning-color)",textDecoration:"none"},onclick:async e=>{if(e.preventDefault(),n){if(n.value!=this.customNotes){Ye.showLoading(Ne("Saving Notes...")),this.customNotes=n.value;const e=await ge.fetchApi("/easyuse/metadata/notes/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:this.customNotes});if(Ye.hideLoading(),200!==e.status)return Ye.error(Ne("Saving Failed")),void alert(`Error saving notes (${e.status}) ${e.statusText}`);Ye.success(Ne("Saving Succeed")),a=this.parseNote.call(this),l.replaceChildren(ve("p",(null==a?void 0:a.length)>0?a:{textContent:Ne("No notes")})),n.value?l.classList.remove("empty"):l.classList.add("empty")}else l.replaceChildren(ve("p",{textContent:Ne("No notes")})),l.classList.add("empty");e.target.textContent=o,n.remove(),n=null}else e.target.textContent="💾 Save",n=ve("textarea",{placeholder:Ne("Type your notes here"),style:{width:"100%",minWidth:"200px",minHeight:"50px",height:"100px"},textContent:this.customNotes}),l.replaceChildren(n),n.focus()}})]),l]),ve("div.easyuse-model-detail",[ve("div.easyuse-model-detail-head",{textContent:Ne("Details")}),ve("div.easyuse-model-detail-body",[ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("Type")}),ve("div.easyuse-model-detail-item-value",{textContent:e.model.type})]),ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("BaseModel")}),ve("div.easyuse-model-detail-item-value",{textContent:e.baseModel})]),ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("Download")}),ve("div.easyuse-model-detail-item-value",{textContent:(null==(t=e.stats)?void 0:t.downloadCount)||0})]),ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("Trained Words")}),ve("div.easyuse-model-detail-item-value",{textContent:(null==e?void 0:e.trainedWords.join(","))||"-"})]),ve("div.easyuse-model-detail-item",[ve("div.easyuse-model-detail-item-label",{textContent:Ne("Source")}),ve("div.easyuse-model-detail-item-value",[ve("label",[ve("img",{style:{width:"14px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),ve("a",{href:"https://civitai.com/models/"+e.modelId,textContent:"View "+e.model.name,target:"_blank"})])])])])])),null==(i=e.images)?void 0:i.length){this.imgCurrent=0,this.isSaving=!1,e.images.map((e=>e.url&&this.imgList.appendChild(ve("div.easyuse-preview-slide",[ve("div.easyuse-preview-slide-content",[ve("img",{src:e.url}),ve("div.save",{textContent:"Save as preview",onclick:async()=>{if(this.isSaving)return;this.isSaving=!0,Ye.showLoading(Ne("Saving Preview..."));const t=await(await fetch(e.url)).blob(),i="temp_preview."+new URL(e.url).pathname.split(".")[1],s=new FormData;s.append("image",new File([t],i)),s.append("overwrite","true"),s.append("type","temp");if(200!==(await ge.fetchApi("/upload/image",{method:"POST",body:s})).status)return this.isSaving=!1,Ye.error(Ne("Saving Failed")),Ye.hideLoading(),void alert(`Error saving preview (${req.status}) ${req.statusText}`);await ge.fetchApi("/easyuse/save/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:JSON.stringify({filename:i,type:"temp"}),headers:{"content-type":"application/json"}}).then((e=>{Ye.success(Ne("Saving Succeed")),Ye.hideLoading()})),this.isSaving=!1,app.refreshComboInNodes()}})])]))));let t=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=ve("button.left",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'',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=ve("button.right",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'',onclick:()=>{if(!(e.images.length<=2))if(t.imgList.classList.remove("no-transition"),t.imgCurrent>=e.images.length/2-1){t.imgCurrent=0;const i=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)}else t.imgCurrent=t.imgCurrent+1,t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)"}})}return e.description&&ve("div",{parent:this.content,innerHTML:e.description,style:{marginTop:"10px"}}),e})).catch((e=>{this.imgWrapper.style.display="none",t.textContent="⚠️ "+e.message})).finally((e=>{}))}}class Ci extends Ni{async addInfo(){await this.addCivitaiInfo()}}class Ii extends Ni{getTagFrequency(){if(!this.metadata.ss_tag_frequency)return[];const e=JSON.parse(this.metadata.ss_tag_frequency),t={};for(const i in e){const s=e[i];for(const e in s)e in t?t[e]+=s[e]:t[e]=s[e]}return Object.entries(t).sort(((e,t)=>t[1]-e[1]))}getResolutions(){let e=[];if(this.metadata.ss_bucket_info){const t=JSON.parse(this.metadata.ss_bucket_info);if(null==t?void 0:t.buckets)for(const{resolution:i,count:s}of Object.values(t.buckets))e.push([s,`${i.join("x")} * ${s}`])}e=e.sort(((e,t)=>t[0]-e[0])).map((e=>e[1]));let t=this.metadata.ss_resolution;if(t){const i=t.split(","),s=i[0].replace("(",""),n=i[1].replace(")","");e.push(`${s.trim()}x${n.trim()} (Base res)`)}else(t=this.metadata["modelspec.resolution"])&&e.push(t+" (Base res");return e.length||e.push("⚠️ Unknown"),e}getTagList(e){return e.map((e=>ve("li.easyuse-model-tag",{dataset:{tag:e[0]},$:e=>{e.onclick=()=>{e.classList.toggle("easyuse-model-tag--selected")}}},[ve("p",{textContent:e[0]}),ve("span",{textContent:e[1]})])))}addTags(){let e,t=this.getTagFrequency();if(null==t?void 0:t.length){const i=t.length;let s;i>500&&(t=t.slice(0,500),e=ve("p",[ve("span",{textContent:"⚠️ Only showing first 500 tags "}),ve("a",{href:"#",textContent:`Show all ${i}`,onclick:()=>{s.replaceChildren(...this.getTagList(this.getTagFrequency())),e.remove()}})])),s=ve("ol.easyuse-model-tags-list",this.getTagList(t)),this.tags=ve("div",[s])}else this.tags=ve("p",{textContent:"⚠️ No tag frequency metadata found"});this.content.append(this.tags),e&&this.content.append(e)}async addInfo(){const e=this.addCivitaiInfo();this.addTags();const t=await e;t&&ve("div",{parent:this.content,innerHTML:t.description,style:{maxHeight:"250px",overflow:"auto"}})}createButtons(){const e=super.createButtons();function t(e,t){const i=ve("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)}}return e.unshift(ve("button",{type:"button",textContent:"Copy Selected",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag--selected")])}}),ve("button",{type:"button",textContent:"Copy All",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag")])}})),e}}const Ti={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"}},indextts_emotions:{category:"IndexTTS Emotions",nodes:["easy indexTTSEmotionVector","easy indexTTSEmotionText","easy indexTTSEmotionAudio"],input:{reference_audio:"reference_audio"},output:{emotions:"emotions"}},indextts_generate:{category:"IndexTTS Generate",nodes:["easy indexTTSGenerate","easy indexTTSGenerateSimple"],input:{indextts_model:"indextts_model",reference_audio:"reference_audio",reference_audios:"reference_audios",emotions:"emotions"},output:{audio:"audio",seed:"seed",subtitle:"subtitle"},widget:{text:"text",unload_model:"unload_model",seed:"seed"}},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","链接":"链接"}}};function Oi(e,t,i){return function(){!function(e,t,i){var s;const n=LiteGraph.createNode(t);if(n){if(fe.graph.add(n),n.pos=e.pos.slice(),n.size=e.size.slice(),(null==(s=e.widgets)?void 0:s.length)>0&&e.widgets.forEach((e=>{var t,s,a;if(null==(s=null==(t=Ti[i])?void 0:t.widget)?void 0:s[e.name]){const t=Ti[i].widget[e.name];if(t&&n.widgets){const i=(a=t,n.widgets.find((e=>"object"==typeof a?a.includes(e.name):e.name===a)));i&&(i.value=e.value,"seed_num"==e.name&&(i.linkedWidgets[0].value=e.linkedWidgets[0].value),"converted-widget"==e.type&&Vi(n,i,e))}}})),e.inputs&&e.inputs.forEach(((t,s)=>{var a,o,l;if(t&&t.link&&(null==(o=null==(a=Ti[i])?void 0:a.input)?void 0:o[t.name])){const s=null==(l=Ti[i])?void 0:l.input[t.name];if(null===s)return;const a=n.findInputSlot(s);if(-1!==a){const i=e.graph.links[t.link];if(i){const t=e.graph.getNodeById(i.origin_id);t&&t.connect(i.origin_slot,n,a)}}}})),e.outputs&&e.outputs.forEach(((t,s)=>{var a,o;if(t&&t.links&&(null==(o=null==(a=Ti[i])?void 0:a.output)?void 0:o[t.name])){const s=Ti[i].output[t.name];if(null===s)return;const a=n.findOutputSlot(s);-1!==a&&t.links.forEach((t=>{const i=e.graph.links[t];if(i){const t=e.graph.getNodeById(i.target_id);t&&n.connect(a,t,i.target_slot)}}))}})),fe.graph.remove(e),"easy fullkSampler"==n.type){const e=n.outputs[0].links;if(e&&e[0]){const t=fe.graph._nodes.find((t=>t.inputs&&t.inputs[0]&&t.inputs[0].link==e[0]));t&&fe.graph.remove(t)}}else if(Ti.preSampling.nodes.includes(n.type)){const e=n.outputs[0].links;if(!e||!e[0]){const e=LiteGraph.createNode("easy kSampler");fe.graph.add(e),e.pos=n.pos.slice(),e.pos[0]=e.pos[0]+n.size[0]+20;const t=n.findInputSlot("pipe");-1!==t&&n&&n.connect(0,e,t)}}n.setSize([n.size[0],n.computeSize()[1]])}}(e,t,i)}}const Mi=(e,t)=>{const i=e.prototype.getExtraMenuOptions;e.prototype.getExtraMenuOptions=function(){const e=i.apply(this,arguments);return t.apply(this,arguments),e}},Di=(e,t,i,s,n=!0)=>{Mi(s,(function(s,a){a.unshift({content:e,has_submenu:n,callback:(e,s,n,a,o)=>Ri(e,s,n,a,o,t,i)}),"loaders"==t&&(a.unshift({content:Ne("💎 View Lora Info..."),callback:(e,t,i,s,n)=>{let a=n.widgets.find((e=>"lora_name"==e.name)).value;a&&"None"!=a&&new Ii(a).show("loras",a)}}),a.unshift({content:Ne("💎 View Checkpoint Info..."),callback:(e,t,i,s,n)=>{let a=n.widgets[0].value;a&&"None"!=a&&new Ci(a).show("checkpoints",a)}}))}))},Ri=(e,t,i,s,n,a,o)=>{const l=[];return o.map((e=>{n.type!==e&&l.push({content:`${e}`,callback:Oi(n,e,a)})})),new LiteGraph.ContextMenu(l,{event:i,callback:null,parentMenu:s,node:n}),!1},Pi="converted-widget",Gi=Symbol();function zi(e,t,i=""){if(t.origType=t.type,t.origComputeSize=t.computeSize,t.origSerializeValue=t.serializeValue,t.computeSize=()=>[0,-4],t.type=Pi+i,t.serializeValue=()=>{if(!e.inputs)return;let i=e.inputs.find((e=>{var i;return(null==(i=e.widget)?void 0:i.name)===t.name}));return i&&i.link?t.origSerializeValue?t.origSerializeValue():t.value:void 0},t.linkedWidgets)for(const s of t.linkedWidgets)zi(e,s,":"+t.name)}function Vi(e,t,i){zi(e,t);const{type:s}=function(e){let t=e[0];t instanceof Array&&(t="COMBO");return{type:t}}(i),n=e.size;t.options&&t.options.forceInput||e.addInput(t.name,s,{widget:{name:t.name,[Gi]:()=>i}});for(const a of e.widgets)a.last_y+=LiteGraph.NODE_SLOT_HEIGHT;e.setSize([Math.max(n[0],e.size[0]),Math.max(n[1],e.size[1])])}const ji=function(e){var t,i,s,n,a,o,l,r,d,u,c,A,p,h,m,f,g,v,y,w;const b=e.constructor.type,_=(null==(t=e.properties)?void 0:t.origVals)||{},S=_.title||e.title,x=_.color||e.color,L=_.bgcolor||e.bgcolor,k=e.graph||fe.graph,E={size:[...e.size],color:x,bgcolor:L,pos:[...e.pos]},N=e=>{var t,i,s,n;return(null==(t=k.getLink)?void 0:t.call(k,e))||(null==(s=null==(i=k.links)?void 0:i.get)?void 0:s.call(i,e))||(null==(n=k.links)?void 0:n[e])},C=[],I=[],T=new Map((null==(i=e.inputs)?void 0:i.map((e=>[e.name,e.label])))||[]),O=new Map((null==(s=e.outputs)?void 0:s.map((e=>[e.name,e.label])))||[]),M=(null==(n=e.widgets)?void 0:n.map((e=>({name:e.name,type:e.origType||e.type,value:e.value}))))||[],D=[];null==(a=e.inputs)||a.forEach(((e,t)=>{var i,s;if(null==e.link)return;const n=N(e.link);if(!n)return;const a=k.getNodeById(n.origin_id);C.push({inputName:e.name,inputSlot:t,originId:n.origin_id,originName:null==(s=null==(i=null==a?void 0:a.outputs)?void 0:i[n.origin_slot])?void 0:s.name,originSlot:n.origin_slot})})),null==(o=e.outputs)||o.forEach(((e,t)=>{var i,s;for(const n of e.links||[]){const a=N(n);if(!a)continue;const o=k.getNodeById(a.target_id);I.push({outputName:e.name,outputSlot:t,targetId:a.target_id,targetName:null==(s=null==(i=null==o?void 0:o.inputs)?void 0:i[a.target_slot])?void 0:s.name,targetSlot:a.target_slot})}})),null==(l=e.widgets)||l.forEach((t=>{var i,s,n;if(t.type!==Pi)return;const a=null==(i=e.inputs)?void 0:i.find((e=>{var i;return(null==(i=e.widget)?void 0:i.name)===t.name||e.name===t.name})),o=null==(n=null==(s=null==a?void 0:a.widget)?void 0:s[Gi])?void 0:n.call(s);o&&D.push({name:t.name,config:o})}));const R=LiteGraph.createNode(b,S,E);if(!R)return;k.remove(e),k.add(R);const P=(e,t,i)=>{var s,n,a,o,l,r,d;const u=e.origType||e.type;if(u!==t||null==i)return!1;const c=null==(s=e.options)?void 0:s.values;if(null!=c){const t="function"==typeof c?c(e,R):c;return Array.isArray(t)?t.includes(i):!(!t||"object"!=typeof t)&&(Object.prototype.hasOwnProperty.call(t,i)||Number.isInteger(i)&&i>=0&&ie.name===G));e&&P(e,z,V)&&(e.value=V)}for(const{name:G,config:z}of D){const e=null==(d=R.widgets)?void 0:d.find((e=>e.name===G));e&&Vi(R,e,z)}null==(u=R.inputs)||u.forEach((e=>{T.has(e.name)&&(e.label=T.get(e.name))})),null==(c=R.outputs)||c.forEach((e=>{O.has(e.name)&&(e.label=O.get(e.name))}));for(const{inputName:G,inputSlot:z,originId:V,originName:j,originSlot:U}of C){const e=k.getNodeById(V);if(!e)continue;const t=(null==(p=null==(A=e.outputs)?void 0:A[U])?void 0:p.name)===j?U:e.findOutputSlot(j),i=(null==(m=null==(h=R.inputs)?void 0:h[z])?void 0:m.name)===G?z:R.findInputSlot(G);t>=0&&i>=0&&e.connect(t,R,i)}for(const{outputName:G,outputSlot:z,targetId:V,targetName:j,targetSlot:U}of I){const e=k.getNodeById(V);if(!e)continue;const t=(null==(g=null==(f=R.outputs)?void 0:f[z])?void 0:g.name)===G?z:R.findOutputSlot(G),i=(null==(y=null==(v=e.inputs)?void 0:v[U])?void 0:y.name)===j?U:e.findInputSlot(j);t>=0&&i>=0&&R.connect(t,e,i)}R.setSize(E.size),null==(w=R.setDirtyCanvas)||w.call(R,!0,!0)};fe.registerExtension({name:"Comfy.EasyUse.ExtraMenu",async beforeRegisterNodeDef(e,t,i){Mi(e,(function(e,i){i.unshift({content:Ne("🔃 Reload Node"),callback:(e,t,i,s,n)=>{let a=LGraphCanvas.active_canvas;if(!a.selected_nodes||Object.keys(a.selected_nodes).length<=1)ji(n);else for(let o in a.selected_nodes)ji(a.selected_nodes[o])}}),"easy ckptNames"==t.name&&i.unshift({content:Ne("💎 View Checkpoint Info..."),callback:(e,t,i,s,n)=>{n.widgets[0].value}})}));for(const s in Ti)Ti[s].nodes.includes(t.name)&&Di(`↪️ Swap ${Ti[s].category}`,s,Ti[s].nodes,e)}});const Ui=LiteGraph.LGraphNode,Wi="➡️";fe.registerExtension({name:"easy setNode",registerCustomNodes(){class e extends Ui{constructor(t){super("Set"),v(this,"defaultVisibility",!0),v(this,"serialize_widgets",!0),this.properties||(this.properties={previousName:""}),this.properties.showOutputText=e.defaultVisibility;const i=this;i.color=LGraphCanvas.node_colors.blue.color,this.addWidget("text","Constant","",((e,t,s,n,a)=>{i.validateName(i.graph),""!==this.widgets[0].value&&(this.title=Wi+this.widgets[0].value),this.properties.previousName=this.widgets[0].value,this.update()}),{}),this.addInput("*","*"),this.onConnectionsChange=function(e,t,s,n,a){if(1!=e||s||(this.inputs[t].type="*",this.inputs[t].name="*",this.title="Set"),n&&i.graph&&1==e&&s){const e=i.graph._nodes.find((e=>e.id==n.origin_id)).outputs[n.origin_slot];if(!e)return;const t=e.type,s=i.is_auto_link?this.widgets[0].value:e.name;"Set"===this.title&&(this.title=Wi+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=Wi+this.widgets[0].value,this.properties.previousName=this.widgets[0].value}),1)}this.update()},this.validateName=function(e){let t=i.widgets[0].value;if(""!=t){let s=0,n=[];do{n=e._nodes.filter((e=>e!=this&&("easy setNode"==e.type&&e.widgets[0].value===t))),n.length>0&&(t=i.widgets[0].value+s),s++}while(n.length>0);i.widgets[0].value=t,this.update()}},this.clone=function(){const t=e.prototype.clone.apply(this);return t.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){const i=t?this.properties.previousName:this.widgets[0].value;return e._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"}}),fe.registerExtension({name:"easy getNode",registerCustomNodes(){class e extends Ui{constructor(t){super("Get"),v(this,"defaultVisibility",!0),v(this,"serialize_widgets",!0),this.properties||(this.properties={}),this.properties.showOutputText=e.defaultVisibility;const i=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,n){this.validateLinks(),2!=e||i?(this.onRename(),setTimeout((e=>{this.title="⬅️"+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){const t=this.findSetter(i.graph);if(t){const i=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="⬅️"+t.widgets[0].value}else this.setType("*","*"),this.outputs[e].type="*",this.outputs[e].name="*"},this.clone=function(){const t=e.prototype.clone.apply(this);return t.size=t.computeSize(),t},this.validateLinks=function(){"*"!=this.outputs[0].type&&this.outputs[0].links&&this.outputs[0].links.forEach((e=>{const t=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){const t=this.widgets[0].value;return e._nodes.find((e=>"easy setNode"==e.type&&e.widgets[0].value===t&&""!=t))},this.isVirtualNode=!0}getInputLink(e){const t=this.findSetter(this.graph);if(t){const i=t.inputs[e];return this.graph.links[i.link]}throw new Error("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"}}),ge.addEventListener("easyuse-global-seed",(function(e){let t=fe.graph._nodes_by_id;for(let i in t){let s=t[i];if("easy globalSeed"==s.type){if(s.widgets){const t=s.widgets.find((e=>"value"==e.name));s.widgets.find((e=>"last_seed"==e.name)).value=t.value,t.value=e.detail.value}}else if(s.widgets){const t=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])}}}));const Fi=fe.graphToPrompt;fe.graphToPrompt=function(...e){const t=e[0]||fe.rootGraph||fe.graph;return Promise.resolve(Fi.apply(this,e)).then((e=>function(e,t){const i=null==e?void 0:e.workflow;if(!i||"object"!=typeof i)return e;i.seed_widgets={};const s=(null==t?void 0:t._nodes_by_id)||{};for(let n in s){let e=s[n].widgets;if(e)for(let t in e)"seed_num"!=e[t].name&&"seed"!=e[t].name&&"noise_seed"!=e[t].name||"converted-widget"==e[t].type||(i.seed_widgets[n]=parseInt(t))}return e}(e,t)))};const Xi=["easy imageSave","easy fullkSampler","easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo","easy detailerFix"];fe.registerExtension({name:"Comfy.EasyUse.SaveImageExtraOutput",async beforeRegisterNodeDef(e,t,i){if(Xi.includes(t.name)){const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){const e=t?t.apply(this,arguments):void 0,s=this.widgets.find((e=>"filename_prefix"===e.name||"save_prefix"===e.name));return s.serializeValue=()=>be(i,s.value),e}}else{const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){const e=t?t.apply(this,arguments):void 0;return this.properties&&"Node name for S&R"in this.properties||this.addProperty("Node name for S&R",this.constructor.type,"string"),e}}}});const Zi=["easy wildcards","easy positive","easy negative","easy stylesSelector","easy promptConcat","easy promptReplace"],Hi=["easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingCustom","easy preSamplingDynamicCFG","easy preSamplingSdTurbo","easy preSamplingLayerDiffusion"],qi=["easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo"],Yi=["easy controlnetLoader","easy controlnetLoaderADV"],Ki=["easy instantIDApply","easy instantIDApplyADV"],Ji=["easy ipadapterApply","easy ipadapterApplyADV","easy ipadapterApplyFaceIDKolors","easy ipadapterStyleComposition"],Bi=["easy pipeIn","easy pipeOut","easy pipeEdit","easy pipeEditPrompt"],Qi=["easy XYPlot","easy XYPlotAdvanced"],$i=["easy setNode"],es=["RescaleCFG","LoraLoaderModelOnly","LoraLoader","FreeU","FreeU_v2",...Ji,...$i],ts={"easy seed":{from:{INT:[...Hi,"easy fullkSampler"]}},"easy positive":{from:{STRING:[...Zi]}},"easy negative":{from:{STRING:[...Zi]}},"easy wildcards":{from:{STRING:["easy showAnything",...Zi]}},"easy stylesSelector":{from:{STRING:["easy showAnything",...Zi]}},"easy promptConcat":{from:{STRING:["easy showAnything",...Zi]}},"easy promptReplace":{from:{STRING:["easy showAnything",...Zi]}},"easy fullLoader":{from:{PIPE_LINE:[...Hi,"easy fullkSampler",...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy a1111Loader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy comfyLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy hunyuanDiTLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy kolorsLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy pixArtLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy fluxLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy svdLoader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy zero123Loader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy sv3dLoader":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Bi,...$i],MODEL:es},to:{STRING:[...Zi]}},"easy preSampling":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingAdvanced":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingDynamicCFG":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingCustom":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingLayerDiffusion":{from:{PIPE_LINE:["easy kSamplerLayerDiffusion",...qi,...Bi,...Yi,...Qi,...$i]}},"easy preSamplingNoiseIn":{from:{PIPE_LINE:[...qi,...Bi,...Yi,...Qi,...$i]}},"easy fullkSampler":{from:{PIPE_LINE:[...Bi.reverse(),"easy preDetailerFix","easy preMaskDetailerFix",...Hi,...$i]}},"easy kSampler":{from:{PIPE_LINE:[...Bi.reverse(),"easy preDetailerFix","easy preMaskDetailerFix","easy hiresFix",...Hi,...$i]}},"easy controlnetLoader":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i]}},"easy controlnetLoaderADV":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i]}},"easy instantIDApply":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{COMBO:["easy promptLine"]}},"easy instantIDApplyADV":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i],MODEL:es},to:{COMBO:["easy promptLine"]}},"easy ipadapterApply":{to:{COMBO:["easy promptLine"]}},"easy ipadapterApplyADV":{to:{STRING:["easy sliderControl",...Zi],COMBO:["easy promptLine"]}},"easy ipadapterStyleComposition":{to:{COMBO:["easy promptLine"]}},"easy preDetailerFix":{from:{PIPE_LINE:["easy detailerFix",...Bi,...$i]},to:{PIPE_LINE:["easy ultralyticsDetectorPipe","easy samLoaderPipe","easy kSampler","easy fullkSampler"]}},"easy preMaskDetailerFix":{from:{PIPE_LINE:["easy detailerFix",...Bi,...$i]}},"easy samLoaderPipe":{from:{PIPE_LINE:["easy preDetailerFix",...Bi,...$i]}},"easy ultralyticsDetectorPipe":{from:{PIPE_LINE:["easy preDetailerFix",...Bi,...$i]}},"easy cascadeLoader":{from:{PIPE_LINE:["easy fullCascadeKSampler","easy preSamplingCascade",...Yi,...Bi,...$i],MODEL:es.filter((e=>!Ji.includes(e)))}},"easy fullCascadeKSampler":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced",...Bi,...$i]}},"easy preSamplingCascade":{from:{PIPE_LINE:["easy cascadeKSampler",...Bi,...$i]}},"easy cascadeKSampler":{from:{PIPE_LINE:["easy preSampling","easy preSamplingAdvanced",...Bi,...$i]}},"easy pipeEdit":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...$i]},to:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i]}},"easy pipeEditPrompt":{from:{PIPE_LINE:[...Hi,...Yi,...Ki,...$i]},to:{PIPE_LINE:[...Hi,...Yi,...Ki,...Bi,...$i]}}};class is extends Error{constructor(e="Attempted to access LGraph reference that was null or undefined.",t){super(e,{cause:t}),this.name="NullGraphError"}}fe.registerExtension({name:"Comfy.EasyUse.Suggestions",async setup(e){const t=LGraphCanvas.prototype.createDefaultNodeForSlot;LGraphCanvas.prototype.createDefaultNodeForSlot=function(e){var i;const s=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,position:[],nodeType:null,posAdd:[0,0],posSizeFix:[0,0]},e||{}),n=this,a=s.nodeFrom&&null!==s.slotFrom,o=!a&&s.nodeTo&&null!==s.slotTo,l=a?s.nodeFrom:s.nodeTo;if(!l||!Object.keys(ts).includes(l.type))return t.call(this,e);if(!a&&!o)return!1;if(!s.nodeType)return!1;const r=a?s.nodeFrom:s.nodeTo;if(!r)throw new TypeError("nodeX was null when creating default node for slot.");const d=r.type;let u=a?s.slotFrom:s.slotTo,c=!1;switch(typeof u){case"string":c=a?r.findOutputSlot(u,!1):r.findInputSlot(u,!1),u=a?r.outputs[u]:r.inputs[u];break;case"object":if(null===u)return!1;c=a?r.findOutputSlot(u.name):r.findInputSlot(u.name);break;case"number":c=u,u=a?r.outputs[u]:r.inputs[u];break;default:return!1}var A=u.type==LiteGraph.EVENT?"_event_":u.type,p=a?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in;if(null==p?void 0:p[A]){let e=!1;const t=a?"from":"to";if(ts[d]&&ts[d][t]&&(null==(i=ts[d][t][A])?void 0:i.length)>0){for(var h in ts[d][t][A])if(s.nodeType==ts[d][t][A][h]||"AUTO"==s.nodeType){e=ts[d][t][A][h];break}}else if("object"==typeof p[A]||"array"==typeof p[A]){for(var h in p[A])if(s.nodeType==p[A][h]||"AUTO"==s.nodeType){e=p[A][h];break}}else s.nodeType!=p[A]&&"AUTO"!=s.nodeType||(e=p[A]);if(e){var m=!1;"object"==typeof e&&e.node&&(m=e,e=e.node);var f=LiteGraph.createNode(e);if(f){if(m){if(m.properties)for(var g in m.properties)f.addProperty(g,m.properties[g]);if(m.inputs)for(var g in f.inputs=[],m.inputs)f.addOutput(m.inputs[g][0],m.inputs[g][1]);if(m.outputs)for(var g in f.outputs=[],m.outputs)f.addOutput(m.outputs[g][0],m.outputs[g][1]);m.title&&(f.title=m.title),m.json&&f.configure(m.json)}n.graph.add(f),f.pos=[s.position[0]+s.posAdd[0]+(s.posSizeFix[0]?s.posSizeFix[0]*f.size[0]:0),s.position[1]+s.posAdd[1]+(s.posSizeFix[1]?s.posSizeFix[1]*f.size[1]:0)];const e={node:f,opts:s};if(!this.canvas.dispatchEvent(new CustomEvent("connect-new-default-node",{detail:e,cancelable:!0})))return!0;if(a){if(!s.nodeFrom)throw new TypeError("createDefaultNodeForSlot - nodeFrom was null");s.nodeFrom.connectByType(c,f,A)}else{if(!s.nodeTo)throw new TypeError("createDefaultNodeForSlot - nodeTo was null");s.nodeTo.connectByTypeOutput(c,f,A)}return!0}}}return!1};let i=LGraphCanvas.prototype.showConnectionMenu;LGraphCanvas.prototype.showConnectionMenu=function(e){var t;const s=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,e:void 0,allow_searchbox:this.allow_searchbox,showSearchBox:this.showSearchBox},e||{}),n=this,{graph:a}=this,{afterRerouteId:o}=s,l=s.nodeFrom&&s.slotFrom,r=!l&&s.nodeTo&&s.slotTo,d=l?s.nodeFrom:s.nodeTo;if(!d||!Object.keys(ts).includes(d.type))return i.call(this,e);if(!l&&!r)return!1;const u=l?s.nodeFrom:s.nodeTo;if(!u)throw new TypeError("nodeX was null when creating default node for slot.");let c=l?s.slotFrom:s.slotTo,A=!1;switch(typeof c){case"string":A=l?u.findOutputSlot(c,!1):u.findInputSlot(c,!1),c=l?u.outputs[c]:u.inputs[c];break;case"object":if(null===c)return;A=l?u.findOutputSlot(c.name):u.findInputSlot(c.name);break;case"number":A=c,c=l?u.outputs[c]:u.inputs[c];break;default:return!1}const p=["Add Node","Add Reroute",null];s.allow_searchbox&&p.push("Search",null);var h=c.type==LiteGraph.EVENT?"_event_":c.type,m=l?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in,f=u.type;if(m&&m[h]){const e=l?"from":"to";if(ts[f]&&ts[f][e]&&(null==(t=ts[f][e][h])?void 0:t.length)>0)for(var g in ts[f][e][h])p.push(ts[f][e][h][g]);else if("object"==typeof m[h]||"array"==typeof m[h])for(var g in m[h])p.push(m[h][g]);else p.push(m[h])}var v=new LiteGraph.ContextMenu(p,{event:s.e,extra:c,title:(c&&""!=c.name?c.name+(h?" | ":""):"")+(c&&h?h:""),callback:function(e,t,i){var r,d;switch(e){case"Add Node":LGraphCanvas.onMenuAdd(null,null,i,v,(function(e){var t,i;e&&(l?null==(t=s.nodeFrom)||t.connectByType(A,e,h,{afterRerouteId:o}):null==(i=s.nodeTo)||i.connectByTypeOutput(A,e,h,{afterRerouteId:o}))}));break;case"Add Reroute":const u=l?s.nodeFrom:s.nodeTo,p=t.extra;if(!a)throw new is;if(!u)throw new TypeError("Cannot add reroute: node was null");if(!p)throw new TypeError("Cannot add reroute: slot was null");if(!s.e)throw new TypeError("Cannot add reroute: CanvasPointerEvent was null");if(!u.connectFloatingReroute([s.e.canvasX,s.e.canvasY],p,o))throw new Error("Failed to create reroute");n.dirty_canvas=!0,n.dirty_bgcanvas=!0;break;case"Search":l?s.showSearchBox(i,{node_from:s.nodeFrom,slot_from:c,type_filter_in:h}):s.showSearchBox(i,{node_to:s.nodeTo,slot_from:c,type_filter_out:h});break;default:const m={position:[(null==(r=s.e)?void 0:r.canvasX)??0,(null==(d=s.e)?void 0:d.canvasY)??0],nodeType:e,afterRerouteId:o};n.createDefaultNodeForSlot(Object.assign(s,m))}}});return v}}}),fe.registerExtension({name:"Comfy.EasyUse.TimeTaken",setup(){let e=new Map,t=0;ge.addEventListener("execution_start",(e=>{graph&&graph._nodes.forEach((e=>{e.executionDuration&&delete e.executionDuration}))})),ge.addEventListener("executing",(i=>{if(!xe("EasyUse.Nodes.Runtime",null))return;const s=(null==i?void 0:i.node)||(null==i?void 0:i.detail)||null,n=e.get(t);if(e.delete(t),t&&n){const e=Date.now()-n,i=xt(t);i&&(i.executionDuration||(i.executionDuration=0),i.executionDuration=i.executionDuration+e/1e3)}t=s,e.set(s,Date.now())}))},beforeRegisterNodeDef(e,t){const i=e.prototype.onDrawForeground;e.prototype.onDrawForeground=function(...e){const[t]=e;return function(e,t){if(!t)return;t=parseFloat(t).toFixed(3)+Ne("s"),e.save(),e.fillStyle=LiteGraph.NODE_DEFAULT_BGCOLOR,function(e,t,i,s,n,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+n-a),e.arcTo(t+s,i+n,t+s-a,i+n,a),e.lineTo(t+a,i+n),e.arcTo(t,i+n,t,i+n-a,a),e.lineTo(t,i+a),e.arcTo(t,i,t+a,i,a),e.closePath()}(e,0,-LiteGraph.NODE_TITLE_HEIGHT-20,e.measureText(t).width+10,LiteGraph.NODE_TITLE_HEIGHT-10,4),e.fill(),function(e,t,i,s,n="#000",a=12,o="Inter"){e.font=`${a}px ${o}`,e.fillStyle=n,e.fillText(t,i,s)}(e,t,8,-LiteGraph.NODE_TITLE_HEIGHT-6,LiteGraph.NODE_TITLE_COLOR),e.restore()}(t,this.executionDuration),null==i?void 0:i.apply(this,e)}}});let ss=null;fe.registerExtension({name:"Comfy.EasyUse.HotKeys",setup(){if(void 0!==x){x("up,down,left,right",(function(e,t){var i,s,n,a,o,l,r,d,u,c,A,p,h,m,f;if(!xe("EasyUse.Hotkeys.JumpNearestNodes",null))return;e.preventDefault();const g=Lt();if(0===g.length)return;const v=g[0];switch(t.key){case"up":case"left":let e=null;if(Tt(v)){const e=null==(i=v.widgets_values)?void 0:i[0],t=null==(s=v.graph)?void 0:s._nodes,n=null==t?void 0:t.find((t=>{var i;if(Ot(t)){if((null==(i=t.widgets_values)?void 0:i[0])===e)return t}return null}));n&&Et(n)}else if((null==(n=v.inputs)?void 0:n.length)>0){for(let t=0;t{var i;if(Tt(t)){if((null==(i=t.widgets_values)?void 0:i[0])===e)return t}return null}));i&&Et(i)}else if((null==(c=v.outputs)?void 0:c.length)>0){for(let e=0;e0&&v.outputs[e].links[0]){t=v.outputs[e].links[0];break}if(t){const e=null==(p=v.graph)?void 0:p.links;if(e[t]){const i=null==(h=e[t])?void 0:h.target_id,s=null==(f=null==(m=v.graph)?void 0:m._nodes_by_id)?void 0:f[i];s&&Et(s)}}}}})),x("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){if(!xe("EasyUse.Hotkeys.AlignSelectedNodes",null))return;e.preventDefault();const i=Lt();if(i.length<=1)return;const s=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":Ft(s,"horizontal");break;case"shift+alt+ctrl+right":case"shift+alt+⌘+right":Ft(s,"vertical")}ss||(ss=Ke()),ss&&ss.update()})),x("shift+⌘+left,shift+⌘+right,shift+ctrl+left,shift+ctrl+right",(function(e,t){if(!xe("EasyUse.Hotkeys.NormalizeSelectedNodes",null))return;e.preventDefault();const i=Lt();if(i.length<=1)return;const s=i;switch(t.key){case"shift+ctrl+left":case"shift+⌘+left":Wt(s,"width");break;case"shift+ctrl+right":case"shift+⌘+right":Wt(s,"height")}ss||(ss=Ke()),ss&&ss.update()})),x("shift+g",(function(e,t){xe("EasyUse.Hotkeys.AddGroup",null)&&(e.preventDefault(),as(),ss||(ss=Ke()),ss&&ss.update())})),x("shift+r",(function(e,t){xe("EasyUse.Hotkeys.cleanVRAMused",null)&&(e.preventDefault(),vi())})),x("shift+m",(function(e,t){var i,s,n;if(!xe("EasyUse.Hotkeys.toggleNodesMap",null))return;e.preventDefault();let a=(null==(i=fe.extensionManager)?void 0:i.sidebarTab)||fe.extensionManager,o=(null==(s=fe.extensionManager.sidebarTab)?void 0:s.activeSidebarTabId)||(null==(n=fe.extensionManager)?void 0:n.activeSidebarTab);a.activeSidebarTabId=o==Pe?null:Pe}));const e=[];Array.from(Array(10).keys()).forEach((t=>e.push(`alt+${t}`))),x(e.join(","),(async function(e,t){if(!xe("EasyUse.Hotkeys.NodesTemplate",null))return;e.preventDefault();const i=t.key;let s=parseInt(i.split("+")[1]);const n=await ge.getUserData("comfy.templates.json");let a=null;if(200==n.status)try{a=await n.json()}catch(l){Ye.error(Ne("Get Node Templates File Failed"))}else localStorage["Comfy.NodeTemplates"]?a=JSON.parse(localStorage["Comfy.NodeTemplates"]):Ye.warn(Ne("No Node Templates Found"));if(!a)return void Ye.warn(Ne("No Node Templates Found"));s=0===s?9:s-1;const o=a[s];if(o)try{const e=(null==o?void 0:o.name)||"Group",t=(null==o?void 0:o.data)?JSON.parse(o.data):[];ns((async()=>{await _e.registerFromWorkflow(t.groupNodes,{}),localStorage.litegrapheditor_clipboard=o.data,fe.canvas.pasteFromClipboard(),t.groupNodes||as(e)}))}catch(l){Ye.error(l)}else Ye.warn(Ne("Node template with {key} not set").replace("{key}",i))}));const t=async function(e){if(("b"===e.key||"m"==e.key)&&(e.metaKey||e.ctrlKey)){if(0===Lt().length)return;ss||(ss=Ke()),ss&&ss.update()}};window.addEventListener("keydown",t,!0)}}});const ns=async e=>{const t=localStorage.litegrapheditor_clipboard;await e(),localStorage.litegrapheditor_clipboard=t},as=e=>{const t=Lt();if(0===t.length)return;const i=t;let s=new LiteGraph.LGraphGroup;s.title=e||"Group",((e,t=[],i=20)=>{var s,n,a,o,l,r,d,u,c,A;for(var p of(n=a=o=l=-1,r=d=u=c=-1,[e._nodes,t]))for(var h in p)r=(A=p[h]).pos[0],d=A.pos[1],u=A.pos[0]+A.size[0],c=A.pos[1]+A.size[1],"Reroute"!=A.type&&(d-=LiteGraph.NODE_TITLE_HEIGHT),(null==(s=A.flags)?void 0:s.collapsed)&&(c=d+LiteGraph.NODE_TITLE_HEIGHT,(null==A?void 0:A._collapsed_width)&&(u=r+Math.round(A._collapsed_width))),(-1==n||ro)&&(o=u),(-1==l||c>l)&&(l=c);a-=Math.round(1.4*e.font_size),e.pos=[n-i,a-i],e.size=[o-n+2*i,l-a+2*i]})(s,i),fe.canvas.graph.add(s)},os="easy imageChooser",ls=e=>(null==e?void 0:e.comfyClass)===os;fe.registerExtension({name:"Comfy.EasyUse.imageChooser",setup(){const e=ge.interrupt;ge.interrupt=function(){var t;(null==(t=fe.graph)?void 0:t._nodes_by_id)&&(()=>{var e;Object.values(null==(e=fe.graph)?void 0:e._nodes_by_id).forEach((e=>{ls(e)&&e.cancelSelection("interrupt")}))})(),e.apply(this,arguments)},ge.addEventListener("easyuse-image-choose",(e=>{var t;const i=e.detail,s=fe.graph._nodes_by_id[i.id];if(!s||!ls(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;const n=(null==(t=i.urls)?void 0:t.map(((e,t)=>({index:t,filename:e.filename,subfolder:e.subfolder,type:e.type}))))||[];s.imageData=n,s.imgs=[],n.forEach((e=>{const t=new Image;t.onload=()=>{fe.graph.setDirtyCanvas(!0)},t.src=`/view?filename=${encodeURIComponent(e.filename)}${(e=>`&type=${e.type}&subfolder=${e.subfolder}&rand=${e.random}`)(e)}`,s.imgs.push(t)})),s.update(),"Always Pause"===s.currentMode&&s.setExecutingState(!0)})),ge.addEventListener("easyuse-image-keep-selection",(e=>{const t=e.detail,i=fe.graph._nodes_by_id[t.id];i&&ls(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==os){e.prototype.confirmSelection=function(){ge.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){ge.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(){var e;if(!this.confirm_button_widget||!this.cancel_button_widget)return;const t=this.selected_images.size,i=(null==(e=this.imgs)?void 0:e.length)||0;if(this.isCanceling)this.confirm_button_widget.name=Ne("Canceling"),this.cancel_button_widget.name="",this.confirm_button_widget.disabled=!0,this.cancel_button_widget.disabled=!0;else if(this.isWaitingSelection)t>0?(this.confirm_button_widget.name=t>1?`${Ne("Progress selected")} (${t}/${i})`:`${Ne("Progress selected image")}`,this.confirm_button_widget.disabled=!1):(this.confirm_button_widget.name=Ne("Please select images to continue"),this.confirm_button_widget.disabled=!0),this.cancel_button_widget.name=Ne("Cancel current run"),this.cancel_button_widget.disabled=!1;else{const e={"Always Pause":Ne("Waiting for selection..."),"Keep Last Selection":Ne("Using last selection")};this.confirm_button_widget.name=(t>0&&"Always Pause"==this.currentMode?Ne("Please run first"):null==e?void 0:e[this.currentMode])||Ne("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(){const e=LiteGraph.LGraphNode.prototype.serialize.call(this);return e.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,fe.graph&&fe.graph.setDirtyCanvas(!0,!1)};const t=e.prototype.update;e.prototype.update=function(){null==t||t.call(this,arguments),this.updateWidgets()};const i=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){null==i||i.call(this,arguments),this.selected_images=new Set,this.anti_selected=new Set,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=>{const t=wt(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(){return this._clicked},set:function(e){this._clicked=e&&""!=this.name}}),Object.defineProperty(this.cancel_button_widget,"clicked",{get:function(){return this._clicked},set:function(e){this._clicked=e&&""!=this.name}}),Object.defineProperty(this,"imageIndex",{get:function(){return null},set:function(e){this.overIndex=e}}),Object.defineProperty(this,"imagey",{get:function(){var e,t;return(null==(t=null==(e=this.widgets)?void 0:e[this.widgets.length-1])?void 0:t.last_y)+LiteGraph.NODE_WIDGET_HEIGHT},set:function(e){this.imagey=e}});const e=this.onMouseDown;this.onMouseDown=function(t,i,s){if(t.isPrimary){const e=rs(this,i);e>=0&&this.toggleImageSelection(e)}return e&&e.apply(this,arguments)},this.update()},e.prototype.onDrawBackground,e.prototype.onDrawBackground=function(e){!function(e,t,i=0){var s,n;if(!e.imgs||!e.imgs.length)return;const a=fe.canvas,o=a.graph_mouse,l=15,r=e.size[0];let d=e.size[1]-i-l;d<200&&(d=200,requestAnimationFrame((t=>{e.size[1]=i+l+200})));if(null==e.imageIndex){let n,l,u,c;if(us(e.imgs))({cellWidth:n,cellHeight:l,cols:c,shiftX:u}=cs(e.imgs,r,d));else{const t=e.imgs.reduce(((e,t)=>Math.max(e,t.naturalWidth,t.naturalHeight)),0),i=[];i.length=null==(s=e.imgs)?void 0:s.length,i[0]={naturalWidth:t,naturalHeight:t},({cellWidth:n,cellHeight:l,cols:c,shiftX:u}=cs(i,r,d))}let A=!1,p=e.imgs.length;e.imageRects=[];for(let s=0;s{ds(e,i,t)}));t.strokeStyle="#F88",null==(n=null==e?void 0:e.anti_selected)||n.forEach((i=>{ds(e,i,t)}))}(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()}}}});const rs=(e,t)=>{var i,s;if((null==(i=e.imgs)?void 0:i.length)>1)for(var n=0;n0&&i0&&se.imagey)return 0;return-1};function ds(e,t,i){var s;if(e.imageRects)s=e.imageRects[t];else{const t=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)}const us=e=>{if(!e.length||1===e.length)return!0;const t=e[0].naturalWidth/e[0].naturalHeight;for(let i=1;is&&(s=y,l=g,r=v,d=A,u=e,c=A*((p-g)/2))}return{cellWidth:l,cellHeight:r,cols:d,rows:u,shiftX:c}}Number.prototype.div=function(e){return function(e,t){let i,s,n=0,a=0,o="string"==typeof e?e:e.toString(),l="string"==typeof t?t:t.toString();try{n=o.toString().split(".")[1].length}catch(r){}try{a=l.toString().split(".")[1].length}catch(r){}return i=Number(o.toString().replace(".","")),s=Number(l.toString().replace(".","")),i/s*Math.pow(10,a-n)}(this,e)};let As=[],ps=0;const hs={sd3:6.5,"sd3-turbo":4};class ms extends ye{constructor(){super(),this.lists=[],this.dialog_div=null,this.user_div=null}addItem(e,t){return ve("div.easyuse-account-dialog-item",[ve("input",{type:"text",placeholder:"Enter name",oninput:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);As[t].name=e.target.value},value:As[e].name}),ve("input.key",{type:"text",oninput:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);As[t].key=e.target.value},placeholder:"Enter APIKEY",value:As[e].key}),ve("button.choose",{textContent:Ne("Choose"),onclick:async e=>{var i,s,n;const a=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);let o=As[a].name,l=As[a].key;if(!o)return void Ye.error(Ne("Please enter the account name"));if(!l)return void Ye.error(Ne("Please enter the APIKEY"));let r=!0;for(let t=0;t{(new ms).show(t)}},[ve("div.user",[ve("div.avatar",a?[ve("img",{src:a})]:"😀"),ve("div.info",[ve("h5.name",o),ve("h6.remark","Credits: "+l)])]),ve("div.edit",{textContent:Ne("Edit")})])),Ye.success(Ne("Save Succeed"))}else Ye.success(Ne("Save Succeed"));this.close()}else Ye.error(Ne("Save Failed"))}}),ve("button.delete",{textContent:Ne("Delete"),onclick:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);As.length<=1?Ye.error(Ne("At least one account is required")):(As.splice(t,1),this.dialog_div.removeChild(e.target.parentNode))}})])}show(e){As.forEach(((t,i)=>{this.lists.push(this.addItem(i,e))})),this.dialog_div=ve("div.easyuse-account-dialog",this.lists),super.show(ve("div.easyuse-account-dialog-main",[ve("div",[ve("a",{href:"https://platform.stability.ai/account/keys",target:"_blank",textContent:Ne("Getting Your APIKEY")})]),this.dialog_div]))}createButtons(){const e=super.createButtons();return e.unshift(ve("button",{type:"button",textContent:Ne("Save Account Info"),onclick:e=>{let t=!0;for(let i=0;i{200==e.status?Ye.success(Ne("Save Succeed")):Ye.error(Ne("Save Failed"))}))}else Ye.error(Ne("APIKEY is not Empty"))}})),e.unshift(ve("button",{type:"button",textContent:Ne("Add Account"),onclick:e=>{const t="Account "+As.length.toString();As.push({name:t,key:""});const i=this.addItem(As.length-1);this.lists.push(i),this.dialog_div.appendChild(i)}})),e}}fe.registerExtension({name:"Comfy.EasyUse.API.SD3",async beforeRegisterNodeDef(e,t,i){if("easy stableDiffusion3API"==t.name){const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=async function(){var e,i,s;t&&(null==t||t.apply(this,arguments));const n=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),a=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));let o=this.widgets.find((e=>"model"==e.name));o.callback=e=>{l.value="-"+hs[e]};const l=this.addWidget("text","cost_credit","0",(e=>{}),{serialize:!1});l.disabled=!0,a&&setTimeout((e=>{"control before generate"==a.name&&0===n.value&&(n.value=Math.floor(4294967294*Math.random())),l.value="-"+hs[o.value]}),100);let r=ve("div.easyuse-account-user",[Ne("Loading UserInfo...")]);this.addDOMWidget("account","btn",ve("div.easyuse-account",r)),ge.addEventListener("stable-diffusion-api-generate-succeed",(async({detail:e})=>{var t;let i=r.querySelectorAll(".remark");if(i&&i[0]){const t=(null==e?void 0:e.model)?hs[e.model]:0;if(t){let e=function(e,t){let i,s,n,a,o,l;o="string"==typeof e?e:e.toString(),l="string"==typeof t?t:t.toString();try{i=o.split(".")[1].length}catch(r){i=0}try{s=l.split(".")[1].length}catch(r){s=0}return n=Math.pow(10,Math.max(i,s)),a=i>=s?i:s,((e*n-t*n)/n).toFixed(a)}(parseFloat(i[0].innerText.replace(/Credits: /g,"")),t);e>0&&(i[0].innerText="Credits: "+e.toString())}}await Xe(1e4);const s=await ge.fetchApi("/easyuse/stability/balance");if(200==s.status){const e=await s.json();if(null==e?void 0:e.balance){const s=(null==(t=e.balance)?void 0:t.credits)||0;i&&i[0]&&(i[0].innerText="Credits: "+s)}}}));const d=await ge.fetchApi("/easyuse/stability/api_keys");if(200==d.status){let t=await d.json();if(As=t.keys,ps=t.current,As.length>0&&void 0!==ps){const t=As[ps].key,n=As[ps].name;if(t){const t=await ge.fetchApi("/easyuse/stability/user_info");if(200==t.status){const n=await t.json();if((null==n?void 0:n.account)&&(null==n?void 0:n.balance)){const t=(null==(e=n.account)?void 0:e.profile_picture)||null,a=(null==(i=n.account)?void 0:i.email)||null,o=(null==(s=n.balance)?void 0:s.credits)||0;r.replaceChildren(ve("div.easyuse-account-user-info",{onclick:e=>{(new ms).show(r)}},[ve("div.user",[ve("div.avatar",t?[ve("img",{src:t})]:"😀"),ve("div.info",[ve("h5.name",a),ve("h6.remark","Credits: "+o)])]),ve("div.edit",{textContent:Ne("Edit")})]))}}}else r.replaceChildren(ve("div.easyuse-account-user-info",{onclick:e=>{(new ms).show(r)}},[ve("div.user",[ve("div.avatar","😀"),ve("div.info",[ve("h5.name",n),ve("h6.remark",Ne("Click to set the APIKEY first"))])]),ve("div.edit",{textContent:Ne("Edit")})]))}}}}}});let fs=null;function gs(){fs&&(fs.removeEventListeners(),fs.dropdown.remove(),fs=null)}function vs(e,t,i,s=!1){gs(),new ys(e,t,i,s)}class ys{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)}));const e=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),fs=this}buildNestedDropdown(e,t){let i=0;Object.keys(e).forEach((s=>{const n=e[s];if("object"==typeof n&&null!==n){const e=document.createElement("ul");e.setAttribute("role","listbox"),e.classList.add("easy-nested-dropdown");const a=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(n,e),i+=1}else{const e=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){const s=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){const t=Array.from(this.focusedDropdown.children),i=t[this.selectedIndex];if(fs)if(38===e.keyCode)e.preventDefault(),this.selectedIndex=Math.max(0,this.selectedIndex-1),this.updateSelection();else if(40===e.keyCode)e.preventDefault(),this.selectedIndex=Math.min(t.length-1,this.selectedIndex+1),this.updateSelection();else if(39===e.keyCode){if(e.preventDefault(),i&&i.classList.contains("folder")){const e=i.querySelector(".easy-nested-dropdown");e&&(this.focusedDropdown=e,this.selectedIndex=0,this.updateSelection())}}else if(37===e.keyCode&&this.focusedDropdown!==this.dropdown){const e=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())}else if((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());const s=i.querySelector(".easy-nested-dropdown");s&&(this.focusedDropdown=s,this.selectedIndex=0,this.updateSelection())}else 27===e.keyCode&&(this.dropdown.remove(),this.removeEventListeners())}onWheel(e){const t=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")}))}}function ws(e){const t=e.min||0,i=e.max||0,s=e.step||1;if(0===s)return[];const n=[];let a=t;for(;a<=i;){if(Number.isInteger(s))n.push(Math.round(a)+"; ");else{let e=a.toFixed(3);-0==e&&(e="0.000"),/\.\d{3}$/.test(e)||(e+="0"),n.push(e+"; ")}a+=s}return i>=0&&t>=0?n:n.reverse()}let bs={},_s={};function Ss(e,t){String(e.id);const i=t.name,s=t.value.replace(/^(loader|preSampling):\s/,"");_s[i]?_s[i]!=bs[s]&&(_s[i]=bs[s]):_s={..._s,[i]:bs[s]}}fe.registerExtension({name:"Comfy.EasyUse.XYPlot",async beforeRegisterNodeDef(e,t,i){if("easy XYPlot"===t.name){bs=t.input.hidden.plot_dict[0];for(const e in bs){const t=bs[e];if(Array.isArray(t)){let i=[];for(const e of t)i.push(e+"; ");bs[e]=i}else bs[e]="object"==typeof t?"seed"==e?t+"; ":ws(t):t+"; "}bs.None=[],bs["---------------------"]=[]}},nodeCreated(e){"easy XYPlot"===e.comfyClass&&(function(e){if(e.widgets)for(const t of e.widgets)if("x_axis"===t.name||"y_axis"===t.name){let i=t.value;Object.defineProperty(t,"value",{get:()=>i,set(s){s!==i&&(i=s,Ss(e,t))}})}}(e),function(e){if(e.widgets){const t=e.widgets.filter((e=>"customtext"===e.type&&!1!==e.dynamicPrompts||e.dynamicPrompts));for(const e of t){let t=function(e,t,s,n){return e&&(t[s]=e),t.map((e=>i(e,n))).filter((e=>""!==e)).join("")},i=function(e,t){if(e=s(e),n(e,t))return e+"; ";let i=a(e,t);return 1===i.length||2===i.length?i[0]:n(o(e),t)?o(e)+"; ":""},s=function(e){return e.replace(/(\n|;| )/g,"")},n=function(e,t){return t.includes(e+"; ")},a=function(e,t){return t.filter((t=>t.toLowerCase().includes(e.toLowerCase())))},o=function(e){return Number(e)?Number(e).toFixed(3):["0","0.","0.0","0.00","00"].includes(e)?"0.000":e};const l=function(){const i=e.name[0]+"_axis";let s=(null==_s?void 0:_s[i])||[];if(0===s.length)return;const n=e.inputEl.value,a=e.inputEl.selectionStart;let o=n.split("; ");const l=n.substring(0,a).split("; ").length-1,r=o[l].replace(/\n/g,"").toLowerCase(),d=s.filter((e=>e.toLowerCase().includes(r))).map((e=>e.replace(/; /g,"")));if(d.length>0)vs(e.inputEl,d,(i=>{const n=t(i,o,l,s);e.inputEl.value=n}));else{gs();const i=t(null,o,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)}}}(e))}}),S("domWidget",(()=>{const e=P(new Map);return{widgetStates:e,registerWidget:t=>{e.value.set(t.id,{widget:G(t),visible:!0,readonly:!1,zIndex:0,pos:[0,0],size:[0,0]})},unregisterWidget:t=>{e.value.delete(t)}}}));const xs={class:"w-full flex justify-between items-center"},Ls={class:"flex justify-start items-center flex-1 gap-2"},ks={class:"flex justify-end items-center tool ml-2 position-relative"},Es={__name:"promptAwait",props:["widget"],setup(e){const t=P({select:"now",unlock:!0,last_seed:0,seed:0}),i=P(!1),s=P(!1);let n=null;const a=()=>{if(s.value)return;const t=window.SpeechRecognition||window.webkitSpeechRecognition;t&&(s.value=!0,n||(n=new t,n.interimResults=!1),n.start(),n.addEventListener("result",(t=>{var i;const s=t.results[0][0].transcript;let n=null==(i=e.widget.value)?void 0:i.node,a=wt(n,"prompt");a&&(a.value+=s)})),n.addEventListener("end",(()=>{s.value=!1,n=null})),n.addEventListener("error",(e=>{})))},o=()=>{s.value&&n&&n.stop()};z((t=>e.widget.value),(e=>{t.value="object"==typeof e?e:JSON.parse(e)}),{immediate:!0}),V((s=>{ge.addEventListener("easyuse_prompt_await",(t=>{var s,n,a,o,l,d;const u=t.detail.id,c=-1!==(null==(s=e.widget.value)?void 0:s.node.id).toString().indexOf(":")?(null==(n=e.widget.value)?void 0:n.node.id).toString().split(":")[0]:null==(a=e.widget.value)?void 0:a.node.id;parseInt(u)===parseInt(c)&&(i.value=!0,r("last_seed",(null==(o=e.widget.value.value)?void 0:o.seed)||0),(null==(l=e.widget.value.value)?void 0:l.unlock)?r("seed",Math.floor(Math.random()*Oe)):r("seed",(null==(d=e.widget.value.value)?void 0:d.last_seed)||0))}));const n=ge.interrupt;ge.interrupt=function(){!i.value&&fe.runningNodeId||(l(JSON.stringify({result:-1,prompt:"",select:"now"}),!0),i.value=!1),n.apply(this,arguments)},e.widget.serializeValue=async({node:e},i)=>{try{let s=JSON.stringify(t.value);return(null==e?void 0:e.widgets_values)&&(e.widgets_values[i]=s,e.widgets[i].value=s),s}catch(s){return[]}}}));const l=(s,n)=>{var a,o,l,d,u,c,A,p,h;if(!i.value&&!n)return;const m=new FormData,f=null==(a=e.widget.value)?void 0:a.node,g=-1!==(null==(o=e.widget.value)?void 0:o.node.id).toString().indexOf(":")?(null==(l=e.widget.value)?void 0:l.node.id).toString().split(":")[0]:null==(d=e.widget.value)?void 0:d.node.id,v=(null==(u=wt(f,"prompt"))?void 0:u.value)||"";let y=null==(c=t.value)?void 0:c.select,w=(null==(A=t.value)?void 0:A.last_seed)||0,b=(null==(p=t.value)?void 0:p.seed)||0,_=(null==(h=t.value)?void 0:h.unlock)||!1;m.append("message",JSON.stringify({result:s,prompt:v,select:y,last_seed:w,seed:b,unlock:_})),m.append("id",g),i.value=!1,ge.fetchApi("/easyuse/message_callback",{method:"POST",body:m}).then((e=>{r("select","now")}))},r=(e,i)=>{t.value.value||(t.value={}),t.value[e]=i};return(e,n)=>(j(),U("div",xs,[W("div",Ls,[F(X(L),{disabled:!Boolean(i.value),label:X(Ne)("Continue"),size:"small",style:{height:"20px","font-size":"12px","white-space":"nowrap",padding:"0 8px"},onClick:n[0]||(n[0]=e=>l(1))},null,8,["disabled","label"]),F(X(L),{disabled:!Boolean(i.value),label:X(Ne)("Stop"),severity:"danger",size:"small",style:{height:"20px","font-size":"12px","white-space":"nowrap",padding:"0 8px"},onClick:n[1]||(n[1]=e=>l(-1))},null,8,["disabled","label"]),F(X(k),{class:"easyuse-prompt-await-select",modelValue:t.value.select,"onUpdate:modelValue":n[2]||(n[2]=e=>t.value.select=e),options:[{name:X(Ne)("now"),value:"now"},{name:X(Ne)("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"])]),W("div",ks,[Z(F(X(L),{style:{"--p-button-sm-font-size":"11px"},size:"small",icon:t.value.unlock?"pi pi-unlock":"pi pi-lock",severity:t.value.unlock?"contrast":"warn",variant:"text",onClick:n[3]||(n[3]=e=>t.value.unlock=!t.value.value.unlock),rounded:""},null,8,["icon","severity"]),[[X(E),{value:t.value.unlock?"随机种子":"锁定种子值",class:"jm-tooltip"},"top"]]),s.value?Z((j(),H(X(L),{key:0,size:"small",icon:"pi pi-pause-circle",severity:"info",variant:"outlined",onClick:o,rounded:""},null,512)),[[X(E),{value:X(Ne)("Stop Recording"),class:"jm-tooltip"},"top"]]):Z((j(),H(X(L),{key:1,size:"small",icon:"pi pi-microphone",severity:"contrast",variant:"text",onClick:a,rounded:""},null,512)),[[X(E),{value:X(Ne)("Voice input"),class:"jm-tooltip"},"top"]])])]))}},Ns={class:"easyuse-multiselect"},Cs={__name:"multiSelectWidget",props:["widget"],setup(e){var t,i,s,n;const a=Object.keys(De).reduce(((e,t)=>(Array.isArray(De[t])?e[t]=De[t].map(((e,t)=>({label:e,value:t}))):"object"==typeof De[t]?e[t]=Object.entries(De[t]).map((([e,t])=>({label:e,value:t}))):e[t]=[],e)),{}),o=P([]),l=e.widget.inputSpec,r=(null==(t=null==l?void 0:l.multi_select)?void 0:t.max_selected_labels)??3,d=(null==l?void 0:l.optionLabel)??"label",u=(null==l?void 0:l.optionValue)??"value",c=(null==(i=null==l?void 0:l.multi_select)?void 0:i.placeholder)?Ne(null==(s=l.multi_select)?void 0:s.placeholder):Ne("select items"),A=(null==(n=null==l?void 0:l.multi_select)?void 0:n.chip)?"chip":"comma",p=P((null==l?void 0:l.options)??[]),h=e=>{e&&a[e]?p.value=a[e].map(((e,t)=>({label:Ne(e.label),value:e.value}))):p.value=[]};return z((t=>e.widget.value),(e=>{o.value=e.split(",").map((e=>e&&parseInt(e.trim())))})),V((t=>{setTimeout((t=>{const i=wt(e.widget.node,"method");h(i.value),i.callback=e=>{o.value=[],h(e)}}),1),e.widget.serializeValue=async({node:e},t)=>{try{let i=o.value||[];return i=i.join(","),(null==e?void 0:e.widgets_values)&&(e.widgets_values[t]=i,e.widgets[t].value=i),i}catch(i){return[]}}})),(e,t)=>(j(),U("div",Ns,[F(X(N),{modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=e=>o.value=e),options:p.value,optionLabel:X(d),optionValue:X(u),appendTo:"self",filter:"",placeholder:X(c),"max-selected-labels":X(r),display:X(A),class:"w-full easyuse-multiselect-container"},null,8,["modelValue","options","optionLabel","optionValue","placeholder","max-selected-labels","display"])]))}},Is={class:"flex flex-col easyuse-multiangle-widget"},Ts={class:"easyuse-multiangle-tabs flex items-center gap-1 px-1 relative z-10 overflow-x-auto no-scrollbar w-full min-w-0"},Os=["onClick"],Ms={class:"tab-number"},Ds=["onClick"],Rs=["title"],Ps={class:"easyuse-multiangle-content flex flex-col gap-2"},Gs=["title"],zs={class:"settings-item flex items-center"},Vs={for:"add-angle-prompt",class:"whitespace-nowrap"},js={class:"settings-item flex items-center"},Us={for:"hollow-mode",class:"whitespace-nowrap"},Ws={class:"settings-item flex items-center"},Fs={for:"rotate-3d-mode",class:"whitespace-nowrap"},Xs=["title"],Zs=["onDblclick"],Hs={key:0},qs={key:0,style:{filter:"grayscale(10)"}},Ys={key:0,class:"absolute inset-0 flex flex-col items-center justify-center",style:{"pointer-events":"none"}},Ks={key:1,class:"easyuse-cube-face-label"},Js={class:"flex flex-col gap-2 px-2 w-full easyuse-mulitangle-slider"},Bs={class:"flex flex-col gap-2 w-full"},Qs={class:"flex justify-between items-center"},$s={class:"font-semibold opacity-80"},en={class:"font-mono text-primary font-bold"},tn={class:"flex flex-col gap-2 w-full"},sn={class:"flex justify-between items-center"},nn={class:"font-semibold opacity-80"},an={class:"font-mono text-primary font-bold"},on={class:"flex flex-col gap-2 w-full"},ln={class:"flex justify-between items-center"},rn={class:"font-semibold opacity-80"},dn={class:"font-mono text-primary font-bold"},un={__name:"multiAngleWidget",props:["widget"],emits:["update:value","change"],setup(e,{emit:t}){const i=P([{rotate:0,vertical:0,zoom:5,add_angle_prompt:!1}]),s=P(0),n=i.value[s.value]||{rotate:0,vertical:0,zoom:5,add_angle_prompt:!1},a=P(n.rotate??0),o=P(n.vertical??0),l=P(n.zoom??5),r=P(n.add_angle_prompt??!1),d=P(xe("EasyUse.MultiAngle.HollowMode")||!1),u=P(xe("EasyUse.MultiAngle.3DRotate")||!1),c=P(!1),A=()=>{c.value=!c.value},p=()=>{c.value&&(c.value=!1)};V((()=>{window.addEventListener("click",p)})),q((()=>{window.removeEventListener("click",p),L()})),z((t=>e.widget.value),(e=>{Array.isArray(e)?i.value=e:i.value=JSON.parse(e)}),{immediate:!0}),z((()=>{var e;return null==(e=i.value)?void 0:e[s.value]}),(e=>{if(e){let t=xe("EasyUse.MultiAngle.AddAnglePrompt")??!1;void 0!==e.rotate&&(a.value=e.rotate),void 0!==e.vertical&&(o.value=e.vertical),void 0!==e.zoom&&(l.value=e.zoom),null!=r&&(r.value=t)}}),{deep:!0}),z(d,(e=>{ke("EasyUse.MultiAngle.HollowMode",e)})),z(u,(e=>{ke("EasyUse.MultiAngle.InvertRotate",e)})),z(r,(e=>{ke("EasyUse.MultiAngle.AddAnglePrompt",e),i.value.forEach((t=>{t.add_angle_prompt=e}))}));const h=e=>{s.value=e;const t=i.value[e];t&&(a.value=t.rotate??0,o.value=t.vertical??0,l.value=t.zoom??5,r.value=t.add_angle_prompt??!0)},m=()=>{i.value[s.value];const e={rotate:a.value,vertical:o.value,zoom:l.value,add_angle_prompt:r.value};i.value.push(JSON.parse(JSON.stringify(e))),s.value=i.value.length-1,h(s.value)},f=(e=!1)=>{e&&(c.value=!1);const t={rotate:a.value,vertical:o.value,zoom:l.value,add_angle_prompt:r.value};Array.isArray(i.value)||(i.value=[]),i.value[s.value]=JSON.parse(JSON.stringify(t))},g=()=>{a.value=0,o.value=0,l.value=5,f()},v=Y((()=>[{name:"front",text:"",style:{transform:"translateZ(40px)"}},{name:"back",text:Ne("B"),style:{transform:"rotateY(180deg) translateZ(40px)"}},{name:"up",text:Ne("U"),style:{transform:"rotateX(90deg) translateZ(40px)"}},{name:"down",text:Ne("D"),style:{transform:"rotateX(-90deg) translateZ(40px)"}},{name:"left",text:Ne("L"),style:{transform:"rotateY(-90deg) translateZ(40px)"}},{name:"right",text:Ne("R"),style:{transform:"rotateY(90deg) translateZ(40px)"}},{name:"center",style:{transform:"translateZ(0.1px)",border:"none",background:"transparent",backfaceVisibility:"hidden"}},{name:"center-back",style:{transform:"rotateY(180deg) translateZ(0.1px)",border:"none",backfaceVisibility:"hidden",background:"transparent"}}])),y=P(!1),w={x:0,y:0},b={rotate:0,vertical:0},_=e=>{const t=e.deltaY;let i=l.value-.05*t;i=Math.max(0,Math.min(10,i)),l.value=Math.round(10*i)/10,f()},S=e=>{y.value=!0,w.x=e.clientX??e.touches[0].clientX,w.y=e.clientY??e.touches[0].clientY,b.rotate=a.value,b.vertical=o.value,window.addEventListener("mousemove",x),window.addEventListener("mouseup",L),window.addEventListener("touchmove",x),window.addEventListener("touchend",L)},x=e=>{if(!y.value)return;const t=e.clientX??e.touches[0].clientX,i=e.clientY??e.touches[0].clientY;let s=t-w.x,n=i-w.y;u.value&&(s=-s,n=-n);let l=b.rotate+.5*s,r=b.vertical+.5*n;l=(l%360+360)%360,r=Math.max(-90,Math.min(90,r)),a.value=Math.round(l),o.value=Math.round(r),f()},L=()=>{y.value=!1,window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",L),window.removeEventListener("touchmove",x),window.removeEventListener("touchend",L)},k=Y((()=>({transform:`scale(${1+.1*l.value}) rotateX(${-o.value}deg) rotateY(${-a.value}deg)`})));return V((t=>{d.value=xe("EasyUse.MultiAngle.HollowMode"),u.value=xe("EasyUse.MultiAngle.InvertRotate"),r.value=xe("EasyUse.MultiAngle.AddAnglePrompt")||!1,e.widget.serializeValue=async({node:e},t)=>{try{let s=JSON.stringify(i.value);return(null==e?void 0:e.widgets_values)&&(e.widgets_values[t]=s,e.widgets[t].value=s),s}catch(s){return[]}}})),(e,t)=>(j(),U("div",Is,[W("div",Ts,[(j(!0),U(K,null,J(i.value,((e,t)=>(j(),U("div",{key:t,class:B(["tab-item whitespace-nowrap flex-shrink-0",{active:s.value===t}]),onClick:e=>h(t)},[W("span",Ms,ee(t+1),1),i.value.length>1&&0!==t?(j(),U("i",{key:0,class:"pi pi-times tab-close",onClick:Q((e=>(e=>{i.value.length<=1||(i.value.splice(e,1),s.value>=i.value.length&&(s.value=i.value.length-1),h(s.value))})(t)),["stop"])},null,8,Ds)):te("",!0)],10,Os)))),128)),W("button",{class:"tab-add-btn flex-shrink-0",onClick:m,title:X(Ne)("Add New Tab")},t[10]||(t[10]=[W("i",{class:"pi pi-plus"},null,-1)]),8,Rs)]),W("div",Ps,[W("div",{class:B(["easyuse-multiangle-cube w-full flex items-center justify-center bg-black overflow-hidden select-none",{"is-hollow":d.value}]),onMousedown:S,onTouchstart:S,onWheel:Q(_,["prevent"])},[W("div",{class:"settings-icon",onMousedown:t[5]||(t[5]=Q((()=>{}),["stop"])),onClick:Q(A,["stop"]),title:X(Ne)("Settings")},[t[11]||(t[11]=W("i",{class:"pi pi-cog"},null,-1)),c.value?(j(),U("div",{key:0,class:"settings-dropdown",onClick:t[4]||(t[4]=Q((()=>{}),["stop"]))},[W("div",zs,[Z(W("input",{type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=e=>r.value=e),onChange:t[1]||(t[1]=e=>f(!1)),id:"add-angle-prompt"},null,544),[[$,r.value]]),W("label",Vs,ee(X(Ne)("Angle Prompt")),1)]),W("div",js,[Z(W("input",{type:"checkbox","onUpdate:modelValue":t[2]||(t[2]=e=>d.value=e),id:"hollow-mode"},null,512),[[$,d.value]]),W("label",Us,ee(X(Ne)("Hollow")),1)]),W("div",Ws,[Z(W("input",{type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=e=>u.value=e),id:"rotate-3d-mode"},null,512),[[$,u.value]]),W("label",Fs,ee(X(Ne)("Invert Rotate Mode")),1)])])):te("",!0)],40,Gs),W("div",{class:"reset-icon",onMousedown:t[6]||(t[6]=Q((()=>{}),["stop"])),onClick:Q(g,["stop"]),title:X(Ne)("Reset")},t[12]||(t[12]=[W("i",{class:"pi pi-refresh"},null,-1)]),40,Xs),W("div",{class:"relative transition-transform duration-75 ease-out",style:ie([{"transform-style":"preserve-3d",width:"80px",height:"80px"},k.value])},[(j(!0),U(K,null,J(v.value,(e=>(j(),U("div",{key:e.name,class:"absolute flex items-center justify-center font-bold text-xs easyuse-multiangle-cube-face",style:ie([{width:"80px",height:"80px","backface-visibility":"visible"},e.style]),onDblclick:Q((t=>(e=>{switch(e){case"front":a.value=0;break;case"back":a.value=180;break;case"left":a.value=270;break;case"right":a.value=90;break;case"up":o.value=90;break;case"down":o.value=-90}f()})(e.name)),["stop"])},["center"===e.name?(j(),U(K,{key:0},[d.value?(j(),U("div",Hs,t[13]||(t[13]=[W("div",{style:{"font-size":"20px","text-align":"center"}},"🤓",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👕",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👖",-1)]))):te("",!0)],64)):"center-back"===e.name?(j(),U(K,{key:1},[d.value?(j(),U("div",qs,t[14]||(t[14]=[W("div",{style:{"font-size":"20px","text-align":"center"}},"🌕",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👕",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👖",-1)]))):te("",!0)],64)):(j(),U(K,{key:2},["front"!==e.name||d.value?te("",!0):(j(),U("div",Ys,t[15]||(t[15]=[W("div",{style:{"font-size":"20px","text-align":"center"}},"🤓",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👕",-1),W("div",{style:{"font-size":"12px","text-align":"center","margin-top":"-6px"}},"👖",-1)]))),e.text?(j(),U("div",Ks,ee(e.text),1)):te("",!0)],64))],44,Zs)))),128))],4)],34),W("div",Js,[W("div",Bs,[W("div",Qs,[W("span",$s,ee(X(Ne)("Rotate")),1),W("span",en,ee(a.value)+"°",1)]),F(X(C),{modelValue:a.value,"onUpdate:modelValue":[t[7]||(t[7]=e=>a.value=e),f],min:0,max:360,class:"w-full"},null,8,["modelValue"])]),W("div",tn,[W("div",sn,[W("span",nn,ee(X(Ne)("Vertical")),1),W("span",an,ee(o.value)+"°",1)]),F(X(C),{modelValue:o.value,"onUpdate:modelValue":[t[8]||(t[8]=e=>o.value=e),f],min:-90,max:90,class:"w-full"},null,8,["modelValue"])]),W("div",on,[W("div",ln,[W("span",rn,ee(X(Ne)("Zoom")),1),W("span",dn,ee(l.value),1)]),F(X(C),{modelValue:l.value,"onUpdate:modelValue":[t[9]||(t[9]=e=>l.value=e),f],min:0,max:10,step:.1,class:"w-full"},null,8,["modelValue"])])])])]))}},cn=(e,t)=>{const i=e.__vccOpts||e;for(const[s,n]of t)i[s]=n;return i},An={class:"tew-toolbar"},pn={class:"tew-mode-tabs"},hn={key:0,class:"tew-actions"},mn={key:1,class:"tew-actions"},fn={key:0,class:"tew-table-wrapper"},gn={class:"tew-table"},vn={class:"tew-cell-inner"},yn=["value","onInput","onKeydown"],wn=["onClick"],bn={class:"tew-row-handle"},_n=["onClick"],Sn=["value","onInput","onKeydown"],xn={key:1,class:"tew-md-wrapper"},Ln=cn({__name:"tableEditorWidget",props:["widget","node"],setup(e){const t=P("table"),i=se({headers:["列1","列2","列3"],rows:[["","",""],["","",""]]}),s=P("");function n(e){const t=e.headers.map(((t,i)=>{let s=String(t).length;for(const n of e.rows)s=Math.max(s,String(n[i]??"").replace(/\n/g,"
").length);return Math.max(s,3)})),i=(e,t)=>String(e).padEnd(t," ");return["| "+e.headers.map(((e,s)=>i(e,t[s]))).join(" | ")+" |","| "+t.map((e=>"-".repeat(e))).join(" | ")+" |",...e.rows.map((s=>"| "+e.headers.map(((e,n)=>i(String(s[n]??"").replace(/\n/g,"
"),t[n]))).join(" | ")+" |"))].join("\n")}function a(e){const t=e.split("\n").map((e=>e.trim())).filter(Boolean);if(t.length<2)return null;const i=e=>e.replace(/^\||\|$/g,"").split("|").map((e=>e.trim().replace(//gi,"\n")));let s=-1;for(let r=0;r{for(;e.lengthv()))}}function l(e){let t=0;for(const i of String(e||"").replace(/\*\*/g,""))t+=/[\u4e00-\u9fff\u3000-\u303f\uff00-\uffef]/.test(i)?14:8;return t}const r=Y((()=>{const e=Math.max(i.headers.length,...i.rows.map((e=>e.length)));return Array.from({length:e},((e,t)=>{let s=120;for(const n of i.rows){const e=String(n[t]??"");for(const t of e.split("\n"))s=Math.max(s,l(t)+28)}return Math.min(s,200)+"px"}))}));function d(e){if(!e)return;const t=Array.from(e.querySelectorAll(".tew-cell-textarea"));if(0===t.length)return;t.forEach((e=>{e.style.height="auto"}));const i=Math.max(...t.map((e=>e.scrollHeight)));t.forEach((e=>{e.style.height=i+"px"}))}function u(){i.rows.push(Array(i.headers.length).fill("")),y()}function c(){i.headers.push(`列${i.headers.length+1}`),i.rows.forEach((e=>e.push(""))),y()}function A(e,t,s,n=!1){oe((()=>{const t=e.target.closest("table");if(!t)return;const s=Array.from(t.querySelectorAll(".tew-cell-input")),a=s.indexOf(e.target);if(-1===a)return;const o=s[a+(n?i.headers.length:1)];o&&o.focus()}))}let p=null;function h(){clearTimeout(p),p=setTimeout((()=>{y()}),300)}function m(){const e=a(s.value);e&&(i.headers=e.headers,i.rows=e.rows,s.value=n(i)),y()}function f(){return JSON.stringify({mode:t.value,headers:i.headers,rows:i.rows,markdown:"markdown"===t.value?s.value:n(i)})}function g(e){try{const a="string"==typeof e?JSON.parse(e):e;if(a&&a.headers)return i.headers=a.headers,i.rows=a.rows||[],t.value=a.mode||"table",s.value=a.markdown||n(i),void oe((()=>v()))}catch(o){}if("string"==typeof e&&e.includes("|")){const t=a(e);t&&(i.headers=t.headers,i.rows=t.rows,s.value=e,oe((()=>v())))}}function v(){const e=document.querySelector(".tew-table");if(!e)return;Array.from(e.querySelectorAll("tbody tr")).forEach((e=>d(e)))}function y(){e.widget&&(e.widget.value=f())}return V((()=>{var a;(null==(a=e.widget)?void 0:a.value)&&g(e.widget.value),e.widget.serializeValue=async({node:e},a)=>{const o="markdown"===t.value?s.value:n(i);return(null==e?void 0:e.widgets_values)&&(e.widgets_values[a]=o,e.widgets[a].value=f()),o},z((()=>e.widget.value),(e=>{e!==f()&&g(e)}))})),(e,n)=>(j(),U("div",{class:"table-editor-widget",onMousedown:n[3]||(n[3]=Q((()=>{}),["stop"])),onWheel:n[4]||(n[4]=Q((()=>{}),["stop"]))},[W("div",An,[W("div",pn,[W("button",{class:B(["tew-tab","table"===t.value?"active":""]),onClick:n[0]||(n[0]=e=>o("table"))},n[5]||(n[5]=[W("i",{class:"pi pi-table"},null,-1),ne(" 表格 ")]),2),W("button",{class:B(["tew-tab","markdown"===t.value?"active":""]),onClick:n[1]||(n[1]=e=>o("markdown"))},n[6]||(n[6]=[W("i",{class:"pi pi-code"},null,-1),ne(" Markdown ")]),2)]),"table"===t.value?(j(),U("div",hn,[W("button",{class:"tew-btn",onClick:u,title:"添加行"},n[7]||(n[7]=[W("i",{class:"pi pi-plus"},null,-1),ne(" 行 ")])),W("button",{class:"tew-btn",onClick:c,title:"添加列"},n[8]||(n[8]=[W("i",{class:"pi pi-plus"},null,-1),ne(" 列 ")]))])):(j(),U("div",mn,[W("button",{class:"tew-btn",onClick:m,title:"格式化"},n[9]||(n[9]=[W("i",{class:"pi pi-align-left"},null,-1),ne(" 格式化 ")]))]))]),"table"===t.value?(j(),U("div",fn,[W("table",gn,[W("thead",null,[W("tr",null,[n[10]||(n[10]=W("th",{class:"tew-row-handle"},null,-1)),(j(!0),U(K,null,J(i.headers,((e,t)=>(j(),U("th",{key:"h"+t,class:"tew-header-cell",style:ie({width:r.value[t]})},[W("div",vn,[W("input",{class:"tew-cell-input tew-header-input",value:e,onInput:e=>function(e,t){i.headers[e]=t,y()}(t,e.target.value),onKeydown:le(Q((e=>A(e)),["prevent"]),["tab"]),placeholder:"列标题"},null,40,yn),W("button",{class:"tew-col-del",onClick:e=>function(e){i.headers.length<=1||(i.headers.splice(e,1),i.rows.forEach((t=>t.splice(e,1))),y())}(t),title:"删除列"},"×",8,wn)])],4)))),128))])]),W("tbody",null,[(j(!0),U(K,null,J(i.rows,((e,t)=>(j(),U("tr",{key:"r"+t},[W("td",bn,[W("button",{class:"tew-row-del",onClick:e=>function(e){i.rows.length<=1||(i.rows.splice(e,1),y())}(t),title:"删除行"},"×",8,_n)]),(j(!0),U(K,null,J(e,((e,s)=>(j(),U("td",{key:"c"+s,class:"tew-body-cell",style:ie({width:r.value[s]})},[W("textarea",{class:"tew-cell-input tew-cell-textarea",value:e,onInput:e=>{var n;!function(e,t,s){i.rows[e][t]=s,y()}(t,s,e.target.value),(n=e.target)&&(n.style.height="auto",n.style.height=n.scrollHeight+"px",d(n.closest("tr")))},onKeydown:le(Q((e=>A(e)),["prevent"]),["tab"]),rows:"1"},null,40,Sn)],4)))),128))])))),128))])])])):(j(),U("div",xn,[Z(W("textarea",{class:"tew-md-textarea","onUpdate:modelValue":n[2]||(n[2]=e=>s.value=e),onInput:h,placeholder:"| 列1 | 列2 | 列3 |\n| --- | --- | --- |\n| 值1 | 值2 | 值3 |",spellcheck:"false"},null,544),[[ae,s.value]])]))],32))}},[["__scopeId","data-v-7e0ef36e"]]),kn={class:"relative rounded-t-lg overflow-hidden select-none"},En={key:1,class:"w-full h-full flex items-center justify-center"},Nn=cn({__name:"baseThumbnail",props:{hoverZoom:{type:"number",default:4},isHovered:{type:Boolean,default:!1}},setup(e){const t=P(!1),i=P(null);return V((()=>{var e;Array.from((null==(e=i.value)?void 0:e.getElementsByTagName("img"))??[]).forEach((e=>{ce(e,"error",(()=>{t.value=!0}))}))})),(s,n)=>(j(),U("div",kn,[t.value?(j(),U("div",En,n[0]||(n[0]=[W("i",{class:"pi pi-file text-4xl"},null,-1)]))):(j(),U("div",{key:0,ref_key:"contentRef",ref:i,class:"w-full h-full transform-gpu transition-transform duration-1000 ease-out",style:ie(e.isHovered?{transform:`scale(${1+e.hoverZoom/100})`}:void 0)},[re(s.$slots,"default",{},void 0,!0)],4))]))}},[["__scopeId","data-v-604a4248"]]),Cn=["src","alt"],In=cn({__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}){const i=e,s=t,n=P(null),a=P(i.immediate),o=P(!1),l=P(!1),r=Y((()=>i.src));z((()=>i.src),(()=>{o.value=!1,l.value=!1,i.immediate||(a.value=!1)}),{immediate:!0});const{stop:d}=Ae(n,(([e])=>{(null==e?void 0:e.isIntersecting)&&!a.value&&(a.value=!0,s("visible"),d())}),{rootMargin:i.rootMargin,threshold:i.threshold}),u=e=>{o.value=!0,l.value=!1,s("load",e)},c=e=>{l.value=!0,o.value=!1,s("error",e)};return(t,i)=>(j(),U("div",{ref_key:"containerRef",ref:n,class:"lazy-image-container"},[l.value?(j(),U("div",{key:0,class:B(["lazy-image-error","w-full h-full flex items-center justify-center bg-surface-100 dark:bg-surface-800",e.errorClass])},[re(t.$slots,"error",{},(()=>[i[0]||(i[0]=W("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]),!0)],2)):a.value&&r.value?(j(),U("img",{key:1,src:r.value,alt:e.alt,class:B(e.imageClass),style:ie(e.imageStyle),draggable:"false",onLoad:u,onError:c},null,46,Cn)):a.value?te("",!0):(j(),U("div",{key:2,class:B(["lazy-image-placeholder","w-full h-full flex items-center justify-center bg-surface-100 dark:bg-surface-800",e.placeholderClass])},[re(t.$slots,"placeholder",{},(()=>[i[1]||(i[1]=W("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]),!0)],2))],512))}},[["__scopeId","data-v-4bfc03bf"]]),Tn={class:"overflow-hidden w-full h-full flex items-center justify-center"},On={__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}){const i=e,{src:s,isVideo:n}=i;return n??(null==s||s.toLowerCase().endsWith(".webp")),(t,i)=>(j(),H(Nn,{"hover-zoom":e.hoverZoom,"is-hovered":e.isHovered},{default:de((()=>[W("div",Tn,[F(In,{src:X(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})`}:void 0,"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:de((()=>[re(t.$slots,"placeholder",{},(()=>[i[3]||(i[3]=W("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:de((()=>[re(t.$slots,"error",{},(()=>[i[4]||(i[4]=W("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"]))}},Mn={class:"overflow-hidden w-full h-full flex items-center justify-center relative"},Dn={__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}){var i,s;const n=e;n.isVideo||(null==(i=n.baseImageSrc)?void 0:i.toLowerCase().endsWith(".webp"))||null==(s=n.overlayImageSrc)||s.toLowerCase().endsWith(".webp");const a=P(50),o=P(null),{elementX:l,elementWidth:r,isOutside:d}=pe(o);return z([()=>n.isHovered,l,r,d],(([e,t,i,s])=>{e&&(s||(a.value=t/i*100))})),(t,i)=>(j(),H(Nn,{"is-hovered":e.isHovered},{default:de((()=>[W("div",Mn,[F(In,{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:de((()=>[re(t.$slots,"placeholder",{},(()=>[i[3]||(i[3]=W("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:de((()=>[re(t.$slots,"error",{},(()=>[i[4]||(i[4]=W("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]))])),_:3},8,["src","root-margin","threshold","immediate"]),W("div",{ref_key:"containerRef",ref:o,class:"absolute inset-0"},[F(In,{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:de((()=>[re(t.$slots,"placeholder",{},(()=>[i[5]||(i[5]=W("i",{class:"pi pi-image text-2xl text-surface-400"},null,-1))]))])),error:de((()=>[re(t.$slots,"error",{},(()=>[i[6]||(i[6]=W("i",{class:"pi pi-exclamation-triangle text-2xl text-surface-400"},null,-1))]))])),_:3},8,["src","image-style","root-margin","threshold","immediate"]),W("div",{class:"absolute inset-y-0 bg-white/30 backdrop-blur-sm z-10 pointer-events-none",style:ie({left:`${a.value}%`,width:"1px"})},null,4)],512)])])),_:3},8,["is-hovered"]))}},Rn={class:"selector-card-wrapper"},Pn={class:"card-image-container"},Gn={key:2,class:"selection-badge"},zn={class:"card-content"},Vn={class:"card-title"},jn=cn({__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}){const i=e,s=t,n=P(null),a=he(n),o=()=>{i.selectable&&s("select",i.item)},l=()=>{s("item-hover",i.item)},r=()=>{s("item-leave",i.item)};return(t,i)=>(j(),U("div",Rn,[W("div",{ref_key:"cardRef",ref:n,class:B(["card-item",{selected:e.isSelected,clickable:e.selectable}]),onClick:o,onMouseenter:l,onMouseleave:r},[W("div",Pn,["compareSlider"===e.item.thumbnailVariant?(j(),H(Dn,{key:0,"base-image-src":e.item.thumbnail[0],"overlay-image-src":e.item.thumbnail[1],alt:t.title,"is-hovered":X(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"])):(j(),H(On,{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?(j(),U("div",Gn,i[0]||(i[0]=[W("i",{class:"pi pi-check text-white"},null,-1)]))):te("",!0)]),W("div",zn,[W("div",Vn,ee("zh"==e.locale?e.item.name_cn:e.item.name),1)])],34)]))}},[["__scopeId","data-v-88af28b0"]]),Un={class:"list-item"},Wn=["name","checked"],Fn={class:"list-item-content"},Xn={class:"list-title"},Zn=cn({__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}){const i=e,s=t,n=()=>{i.selectable&&s("select",i.item)},a=()=>{s("item-hover",i.item)},o=()=>{s("item-leave",i.item)};return(t,i)=>(j(),U("div",Un,[W("span",{class:B(["list-item__tag",{selected:e.isSelected}]),onClick:n,onMouseenter:a,onMouseleave:o},[e.selectable?(j(),U("input",{key:0,type:"checkbox",name:e.item.name,checked:e.isSelected,onClick:i[0]||(i[0]=Q((()=>{}),["stop"]))},null,8,Wn)):te("",!0),W("span",Fn,[W("div",Xn,ee("zh"==e.locale?e.item.name_cn:e.item.name),1)])],34)]))}},[["__scopeId","data-v-c93b1734"]]),Hn=S("graphStore",{state:e=>({selectors:[],selectors_styles:{},seg_selectors:[],slider_controls:[]}),actions:{setSelectors(e){this.selectors=R(e)},setStyles(e,t){this.selectors_styles[e]||(this.selectors_styles[e]=t)},setSegSelectors(e){this.seg_selectors=R(e)},setSliderControls(e){this.slider_controls=R(e)}}}),qn={class:"easyuse-styles-selector"},Yn={class:"easyuse-styles-selector-header flex justify-between gap-2"},Kn={class:"flex align-center gap-1"},Jn={class:"flex-1"},Bn={key:0,class:"grid-container gap-2"},Qn={key:1,class:"list-container"},$n={key:0,class:"easyuse-styles-selector-previewer"},ea={class:"easyuse-styles-selector-previewer__text"},ta=["src"],ia={class:"title"},sa={class:"easyuse-styles-selector-previewer__prompt"},na={key:0},aa={class:"comfyui-easyuse-success"},oa={key:1},la={class:"comfyui-easyuse-error"},ra={__name:"stylesSelector",props:["widget"],setup(e){const t=Hn(),{selectors_styles:i}=I(t),s=P(""),n=P([]),a=Y((e=>xe("Comfy.Locale")||"en")),o=P(xe("EasyUse.StylesSelector.DisplayType")||"Grid");"Gird"==o.value&&(o.value="Grid",ke("EasyUse.StylesSelector.DisplayType","Grid"));const l=P([]),r=P("");z((e=>o.value),(e=>{ke("EasyUse.StylesSelector.DisplayType",e)})),z((t=>e.widget.value),(e=>{n.value=e.split(",").map((e=>e.trim()))}));const d=Y((()=>{if(!r.value.trim())return l.value;const e=n.value||[],t=r.value.toLowerCase(),i=[],s=[];return l.value.forEach((n=>{if(e.includes(n.name))i.push(n);else{const e="zh"===a.value&&n.name_cn?n.name_cn:n.name,i=n.prompt||"",o=n.negative_prompt||"";(e.toLowerCase().includes(t)||i.toLowerCase().includes(t)||o.toLowerCase().includes(t))&&s.push(n)}})),[...i,...s]})),u=se({name:"",positive:"",negative:"",src:""}),c=async e=>{if(i.value[e])return!0;const s=await ge.fetchApi(`/easyuse/prompt/styles?name=${e}`);if(200===s.status){let i=(await s.json()).map(((e,t)=>(e.index=t,e)));return await t.setStyles(e,i),!0}return Ye.error(Ne("Get styles list Failed")),!1},A=e=>{var t,i;u.name="zh"==a.value&&e.name_cn?e.name_cn:e.name,u.src=e.thumbnailVariant&&"default"!=e.thumbnailVariant?(null==(t=e.thumbnail)?void 0:t[1])||(null==(i=e.thumbnail)?void 0:i[0]):e.thumbnail,u.positive=e.prompt,u.negative=e.negative_prompt},p=()=>{u.name="",u.src="",u.positive="",u.negative=""},h=e=>{const t=n.value||[],a=R(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)))]},m=e=>(n.value||[]).includes(e.name),f=e=>{let t=[...n.value||[]];const i=e.name,s=t.findIndex((e=>e===i));s>-1?t.splice(s,1):t.push(i),n.value=t},g=()=>{n.value=[]};return V((t=>{setTimeout((t=>{const i=wt(e.widget.node,"styles");let n=i.value;s.value=n,c(n).then((e=>e&&h())),i.callback=e=>{s.value=e,g(),c(e).then((e=>e&&h()))}}),1),e.widget.serializeValue=async({node:e},t)=>{try{let i=n.value||[];return i=i.join(","),(null==e?void 0:e.widgets_values)&&(e.widgets_values[t]=i,e.widgets[t].value=i),i}catch(i){return[]}}})),(t,i)=>(j(),U("div",qn,[W("div",Yn,[W("div",Kn,[Z(F(X(L),{icon:"pi pi-trash",severity:"secondary",outlined:"",size:"small",onClick:g},null,512),[[X(E),X(Ne)("Reset")]])]),W("div",Jn,[F(X(M),null,{default:de((()=>[F(X(T),{class:"pi pi-search"}),F(X(O),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=e=>r.value=e),placeholder:X(Ne)("Search styles..."),class:"w-full"},null,8,["modelValue","placeholder"])])),_:1})]),F(X(D),{modelValue:o.value,"onUpdate:modelValue":i[1]||(i[1]=e=>o.value=e),options:["Grid","List"],"allow-empty":!1},{option:de((({option:e})=>[W("i",{class:B(["List"===e?"pi pi-bars":"pi pi-table"])},null,2)])),_:1},8,["modelValue"])]),W("div",{class:"easyuse-styles-selector-content",onMouseleave:i[2]||(i[2]=t=>h(e.widget.node.name))},["Grid"===o.value?(j(),U("div",Bn,[(j(!0),U(K,null,J(d.value,((e,t)=>(j(),H(jn,{key:`${e.name}-${t}`,item:e,"unique-key":"name",locale:a.value,selectable:!0,"is-selected":m(e),"show-description":!0,"preview-enabled":!0,onSelect:f,onItemHover:A,onItemLeave:p},null,8,["item","locale","is-selected"])))),128))])):(j(),U("div",Qn,[(j(!0),U(K,null,J(d.value,((e,t)=>(j(),H(Zn,{key:`${e.name}-${t}`,item:e,"unique-key":"name",locale:a.value,selectable:!0,"is-selected":m(e),"show-description":!0,onSelect:f,onItemHover:A,onItemLeave:p},null,8,["item","locale","is-selected"])))),128))]))],32),(null==u?void 0:u.positive)||(null==u?void 0:u.negative)?(j(),U("div",$n,[W("div",ea,[W("img",{src:u.src,alt:"",style:{width:"100%",height:"auto","object-fit":"contain","border-radius":"6px"}},null,8,ta),W("span",ia,ee(u.name),1),W("div",sa,[u.positive?(j(),U("h6",na,[W("span",aa,ee(X(Ne)("Positive"))+":",1),W("span",null,ee(u.positive),1)])):te("",!0),u.negative?(j(),U("h6",oa,[W("span",la,ee(X(Ne)("Negative"))+":",1),W("span",null,ee(u.negative),1)])):te("",!0)])])])):te("",!0)]))}},da=new Map,ua={width:"100%",height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},ca=(e,t)=>{const i=document.createElement("div"),s=e.node,n=e.options||{getMinHeight:()=>100,hideOnZoom:!0,serialize:!0},a=e.styles||null;i.id=`easyuse-vue-widget-${s.id}`,Object.assign(i.style,ua,a||{});const o=s.addDOMWidget(e.name||"ustom_vue_component_basic","vue-basic",i,n);e.inputSpec&&(o.inputSpec=e.inputSpec);const l=ue(t,{widget:o,node:s});return l.use(me),l.mount(i),da.set(s.id,l),o.onRemove=()=>{const e=da.get(s.id);e&&(e.unmount(),da.delete(s.id))},{widget:o}};fe.registerExtension({name:"Comfy.EasyUse.CustomWidget",getCustomWidgets:e=>({EASY_PROMPT_AWAIT_BAR:e=>{const t=P(JSON.stringify({select:"now",unlock:!0,last_seed:0,seed:0})),i=!!["obsidian","obsidian_dark","milk_white"].includes(xe("Comfy.ColorPalette"))?48:54;return ca({name:"toolbar",node:e,options:{getMinHeight:()=>i,getMaxHeight:()=>i,getValue:()=>t.value,setValue:e=>{try{t.value="object"==typeof e?JSON.stringify(e):e}catch(i){}}}},Es)},EASY_PROMPT_STYLES:e=>{const t=P("");return ca({name:"select_styles",node:e,options:{getMinHeight:()=>180,getMaxHeight:()=>e.size[1]-75,getValue:()=>t.value,setValue:e=>{t.value=Array.isArray(e)?e.join(","):e}},styles:{overflow:"visible"}},ra)},EASY_COMBO:(e,t,i)=>{const s=P(""),n=!!["obsidian","obsidian_dark","milk_white"].includes(xe("Comfy.ColorPalette"))?22:26;return ca({name:"mask_components",node:e,options:{margin:0,getMinHeight:()=>n,getMaxHeight:()=>n,getValue:()=>s.value,setValue:e=>{s.value=Array.isArray(e)?e.join(","):e}},inputSpec:null==i?void 0:i[1],styles:{overflow:"visible"}},Cs)},EASY_MULTI_ANGLE:e=>{const t=P(JSON.stringify([{rotate:0,vertical:0,zoom:5,add_angle_prompt:!0}]));return ca({name:"multi_angle",node:e,options:{getMinHeight:()=>350,getMaxHeight:()=>e.size[1]-80,getValue:()=>t.value,setValue:e=>{try{t.value=Array.isArray(e)?JSON.stringify(e):e}catch(i){}}},styles:{overflow:"visible"}},un)},EASY_TABLE_EDITOR:(e,t,i,s)=>{const n=P(JSON.stringify({mode:"table",headers:["列1","列2","列3"],rows:[["","",""],["","",""]],markdown:"| 列1 | 列2 | 列3 |\n| --- | --- | --- |\n| | | |\n| | | |"}));return ca({name:"table_data",node:e,options:{getMinHeight:()=>200,getMaxHeight:()=>e.size[1],getValue:()=>n.value,setValue:e=>{n.value="object"==typeof e?JSON.stringify(e):e}},styles:{overflow:"hidden"}},Ln)}})});export{Ne as $,Re as N,fe as a,Ke as b,xe as c,vi as d,Pe as e,ge as f,wt as g,Le as h,Nt as j,Xe as s,Ye as t,Hn as u}; diff --git a/web_version/v2/easyuse.js b/web_version/v2/easyuse.js index e1ff97b..009d09c 100644 --- a/web_version/v2/easyuse.js +++ b/web_version/v2/easyuse.js @@ -1,2 +1,2 @@ !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";.easyuse-prompt-await-select .p-select-label{font-size:12px!important}.easyuse-prompt-await-select .p-select-dropdown{width:1.5rem!important}.easyuse-prompt-await-select .p-select-dropdown svg{width:12px!important;height:12px!important}.easyuse-multiselect{font-size:12px;padding:0 15px;--p-chip-remove-icon-size: .75rem;--p-chip-remove-icon-focus-ring-width: var(--p-focus-ring-width);--p-chip-remove-icon-focus-ring-style: var(--p-focus-ring-style);--p-chip-remove-icon-focus-ring-color: var(--p-focus-ring-color);--p-chip-remove-icon-focus-ring-offset: var(--p-focus-ring-offset);--p-chip-remove-icon-focus-ring-shadow: var(--p-form-field-focus-ring-shadow);--p-chip-icon-size: .75rem;--p-chip-image-width: 2rem;--p-chip-image-height: 2rem;--p-chip-border-radius: 16px;--p-chip-padding-x: .25rem;--p-chip-padding-y: .5rem;--p-chip-gap: .25rem;--p-chip-transition-duration: var(--p-transition-duration);--p-chip-remove-icon-color: var(--input-text);--p-chip-icon-color: var(--input-text);--p-chip-background: var(--content-bg);--p-chip-color: var(--input-text);--p-checkbox-icon-size: .875rem;--p-checkbox-icon-color: var(--p-form-field-color);--p-checkbox-icon-checked-color: var(--p-primary-contrast-color);--p-checkbox-icon-checked-hover-color: var(--p-primary-contrast-color);--p-checkbox-icon-disabled-color: var(--p-form-field-disabled-color);--p-checkbox-icon-lg-size: 1rem;--p-checkbox-icon-sm-size: .75rem;--p-checkbox-border-radius: var(--p-border-radius-sm);--p-checkbox-width: 1rem;--p-checkbox-height: 1rem;--p-checkbox-background: var(--p-form-field-background);--p-checkbox-checked-background: var(--p-primary-color);--p-checkbox-checked-hover-background: var(--p-primary-hover-color);--p-checkbox-disabled-background: var(--p-form-field-disabled-background);--p-checkbox-filled-background: var(--p-form-field-filled-background);--p-checkbox-border-color: var(--p-form-field-border-color);--p-checkbox-hover-border-color: var(--p-form-field-hover-border-color);--p-checkbox-focus-border-color: var(--p-form-field-border-color);--p-checkbox-checked-border-color: var(--p-primary-color);--p-checkbox-checked-hover-border-color: var(--p-primary-hover-color);--p-checkbox-checked-focus-border-color: var(--p-primary-color);--p-checkbox-checked-disabled-border-color: var(--p-form-field-border-color);--p-checkbox-invalid-border-color: var(--p-form-field-invalid-border-color);--p-checkbox-shadow: var(--p-form-field-shadow);--p-checkbox-transition-duration: var(--p-form-field-transition-duration);--p-checkbox-lg-width: 1.5rem;--p-checkbox-lg-height: 1.5rem;--p-checkbox-sm-width: 1rem;--p-checkbox-sm-height: 1rem;--p-checkbox-focus-ring-width: var(--p-focus-ring-width);--p-checkbox-focus-ring-style: var(--p-focus-ring-style);--p-checkbox-focus-ring-color: var(--p-focus-ring-color);--p-checkbox-focus-ring-offset: var(--p-focus-ring-offset);--p-checkbox-focus-ring-shadow: var(--p-focus-ring-shadow);--p-multiselect-empty-message-padding: var(--p-list-option-padding);--p-multiselect-clear-icon-color: var(--p-form-field-icon-color);--p-multiselect-chip-border-radius: var(--p-border-radius-sm);--p-multiselect-option-group-background: var(--p-list-option-group-background);--p-multiselect-option-group-color: var(--p-list-option-group-color);--p-multiselect-option-group-font-weight: var(--p-list-option-group-font-weight);--p-multiselect-option-group-padding: var(--p-list-option-group-padding);--p-multiselect-option-focus-background: var(--p-list-option-focus-background);--p-multiselect-option-selected-background: var(--p-list-option-selected-background);--p-multiselect-option-selected-focus-background: var(--p-list-option-selected-focus-background);--p-multiselect-option-color: var(--p-list-option-color);--p-multiselect-option-focus-color: var(--p-list-option-focus-color);--p-multiselect-option-selected-color: var(--p-list-option-selected-color);--p-multiselect-option-selected-focus-color: var(--p-list-option-selected-focus-color);--p-multiselect-option-padding: .25rem;--p-multiselect-option-border-radius: var(--p-list-option-border-radius);--p-multiselect-option-gap: .5rem;--p-multiselect-list-padding: var(--p-list-padding);--p-multiselect-list-gap: var(--p-list-gap);--p-multiselect-list-header-padding: .25rem;--p-multiselect-overlay-background: var(--p-overlay-select-background);--p-multiselect-overlay-border-color: var(--p-overlay-select-border-color);--p-multiselect-overlay-border-radius: var(--p-overlay-select-border-radius);--p-multiselect-overlay-color: var(--p-overlay-select-color);--p-multiselect-overlay-shadow: var(--p-overlay-select-shadow);--p-multiselect-dropdown-width: 1.25rem;--p-multiselect-dropdown-color: var(--input-text);--p-multiselect-background: var(--comfy-input-bg);--p-multiselect-disabled-background: var(--p-form-field-disabled-background);--p-multiselect-filled-background: var(--p-form-field-filled-background);--p-multiselect-filled-hover-background: var(--p-form-field-filled-hover-background);--p-multiselect-filled-focus-background: var(--p-form-field-filled-focus-background);--p-multiselect-border-color: var(--border-color);--p-multiselect-hover-border-color: var(--border-color);--p-multiselect-focus-border-color: var(--border-color);--p-multiselect-invalid-border-color: var(--p-form-field-invalid-border-color);--p-multiselect-color: var(--p-form-field-color);--p-multiselect-disabled-color: var(--p-form-field-disabled-color);--p-multiselect-placeholder-color:var(--descrip-text);--p-multiselect-invalid-placeholder-color: var(--p-form-field-invalid-placeholder-color);--p-multiselect-shadow: var(--p-form-field-shadow);--p-multiselect-padding-x: 8px;--p-multiselect-padding-y: 2px;--p-multiselect-border-radius: 10px;--p-multiselect-transition-duration: var(--p-form-field-transition-duration);--p-multiselect-lg-font-size: var(--p-form-field-lg-font-size);--p-multiselect-lg-padding-x: var(--p-form-field-lg-padding-x);--p-multiselect-lg-padding-y: var(--p-form-field-lg-padding-y);--p-multiselect-sm-font-size: var(--p-form-field-sm-font-size);--p-multiselect-sm-padding-x: var(--p-form-field-sm-padding-x);--p-multiselect-sm-padding-y: var(--p-form-field-sm-padding-y);--p-multiselect-focus-ring-width: var(--p-form-field-focus-ring-width);--p-multiselect-focus-ring-style: var(--p-form-field-focus-ring-style);--p-multiselect-focus-ring-color: var(--p-form-field-focus-ring-color);--p-multiselect-focus-ring-offset: var(--p-form-field-focus-ring-offset);--p-multiselect-focus-ring-shadow: var(--p-form-field-focus-ring-shadow);--p-icon-size: .7rem;--p-inputtext-padding-y: .15rem;--p-inputtext-padding-x: .25rem}.easyuse-multiselect .p-multiselect-list{flex-wrap:wrap;flex-direction:row}.comfyui-easyuse .easyuse-multiselect{font-size:11px;--p-multiselect-padding-y: 2px;padding:0 10px;--p-multiselect-border-radius: var(--p-form-field-border-radius);--p-multiselect-placeholder-color: #d4d4d8;--p-multiselect-dropdown-color: var(--input-text);--p-multiselect-border-color: var(--p-form-field-border-color);--p-multiselect-hover-border-color: var(--p-form-field-hover-border-color);--p-multiselect-focus-border-color: var(--p-form-field-focus-border-color)}.easyuse-multiangle-widget{font-size:12px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.easyuse-multiangle-tabs{overflow-y:auto;margin-bottom:-1px}.tab-item{display:flex;align-items:center;gap:4px;padding:6px 10px;border-radius:6px 6px 0 0;background:transparent;border:1px solid transparent;cursor:pointer;transition:all .2s;font-size:11px;color:var(--p-text-muted-color);margin-bottom:-1px}.tab-item:hover{color:var(--p-primary-color)}.tab-item.active{background:#000;color:var(--p-primary-color);border:1px solid var(--p-content-border-color);border-bottom-color:#000;z-index:2;font-weight:600}.tab-number{font-weight:inherit;font-size:11px}.easyuse-multiangle-content{border:1px solid var(--p-content-border-color);background:var(--p-content-background);border-radius:0 6px 6px;overflow:hidden}.tab-close{font-size:10px;opacity:.7;transition:opacity .2s}.tab-close:hover{opacity:1}.tab-add-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:transparent;border:none;cursor:pointer;transition:all .2s;color:var(--p-text-secondary-color)}.tab-add-btn:hover{border-color:var(--p-primary-color);color:var(--p-primary-color);background:transparent}.tab-add-btn i{font-size:10px}.easyuse-multiangle-widget{font-size:12px;--p-slider-handle-width: 16px;--p-slider-handle-height: 16px;--p-slider-handle-border-radius: 50%;--p-slider-handle-background: var(--p-content-border-color);--p-slider-handle-hover-background: var(--p-content-border-color);--p-slider-handle-focus-ring-width: var(--p-focus-ring-width);--p-slider-handle-focus-ring-style: var(--p-focus-ring-style);--p-slider-handle-focus-ring-color: var(--p-focus-ring-color);--p-slider-handle-focus-ring-offset: var(--p-focus-ring-offset);--p-slider-handle-focus-ring-shadow: var(--p-focus-ring-shadow);--p-slider-handle-content-border-radius: 50%;--p-slider-handle-content-hover-background: var(--p-content-background);--p-slider-handle-content-width: 8px;--p-slider-handle-content-height: 8px;--p-slider-handle-content-shadow: 0px .5px 0px 0px rgba(0, 0, 0, .08), 0px 1px 1px 0px rgba(0, 0, 0, .14);--p-slider-range-background: var(--p-primary-color);--p-slider-track-background: var(--p-content-border-color);--p-slider-track-border-radius: var(--p-content-border-radius);--p-slider-track-size: 3px;--p-slider-transition-duration: var(--p-transition-duration);--p-slider-handle-content-background: var(--p-surface-0)}.easyuse-multiangle-cube-face{border:4px solid var(--p-content-border-color);color:var(--p-text-muted-color);background:rgba(from var(--p-content-color) r g b / .1)}.easyuse-multiangle-cube-face:hover{border-color:var(--p-primary-color);box-shadow:0 0 10px var(--p-primary-color)}.easyuse-multiangle-cube{position:relative;overflow:hidden;cursor:grab;perspective:800px;height:200px;border-radius:0 4px 8px 8px}.easyuse-multiangle-cube:active{cursor:grabbing}.easyuse-multiangle-cube .settings-icon{position:absolute;top:6px;left:6px;color:#ddd;cursor:pointer;z-index:20}.easyuse-multiangle-cube .settings-icon i{font-size:12px}.easyuse-multiangle-cube .settings-icon:hover{color:var(--p-primary-color)}.easyuse-multiangle-cube .settings-dropdown{position:absolute;top:100%;left:0;background:var(--p-content-background);border:1px solid var(--p-content-border-color);border-radius:4px;padding:4px;display:flex;flex-direction:column;gap:4px;min-width:100px;box-shadow:0 2px 10px #0003}.settings-item{display:flex;align-items:center;gap:6px;font-size:10px;color:var(--p-text-color)}.settings-item label{cursor:pointer}.easyuse-multiangle-cube:not(.is-hollow) .easyuse-multiangle-cube-face{background:var(--p-content-background)}.easyuse-cube-face-label{width:24px;height:24px;border-radius:50%;background:#000000e6;display:flex;align-items:center;justify-content:center;font-size:10px;color:#ffffffe6;pointer-events:none;line-height:1}.easyuse-multiangle-cube .reset-icon{position:absolute;top:6px;right:6px;color:#ddd;cursor:pointer}.easyuse-multiangle-cube .reset-icon i{font-size:12px!important}.easyuse-multiangle-cube .reset-icon:hover{color:var(--p-primary-color)}.easyuse-mulitangle-slider{font-size:10px;padding-bottom:14px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.table-editor-widget[data-v-7e0ef36e]{display:flex;flex-direction:column;width:100%;height:100%;font-size:12px;color:var(--fg-color, #e0e0e0);background:var(--comfy-menu-bg, #1e1e1e);border-radius:6px;overflow:hidden}.tew-toolbar[data-v-7e0ef36e]{display:flex;align-items:center;justify-content:space-between;padding:6px 8px;flex-shrink:0;gap:8px}.tew-mode-tabs[data-v-7e0ef36e]{display:flex;gap:4px;background:var(--comfy-menu-bg, #1a1a1a);padding:2px;border-radius:6px;border:1px solid var(--border-color, #333)}.tew-tab[data-v-7e0ef36e]{display:flex;align-items:center;gap:6px;padding:4px 10px;border:none;border-radius:4px;background:transparent;color:var(--descrip-text, #999);cursor:pointer;font-size:11px;font-weight:500;transition:all .2s ease}.tew-tab[data-v-7e0ef36e]:hover{color:var(--fg-color, #fff)}.tew-tab.active[data-v-7e0ef36e]{background:var(--comfy-input-bg, #333);color:var(--p-primary-color, #4a9eff);box-shadow:0 1px 2px #0003}.tew-actions[data-v-7e0ef36e]{display:flex;gap:6px}.tew-btn[data-v-7e0ef36e]{display:flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid var(--border-color, #444);border-radius:4px;background:var(--comfy-menu-bg, #2a2a2a);color:var(--fg-color, #ccc);cursor:pointer;font-size:11px;transition:all .2s ease}.tew-btn[data-v-7e0ef36e]:hover{background:var(--comfy-input-bg, #3a3a3a);border-color:var(--p-primary-color, #4a9eff);color:var(--p-primary-color, #4a9eff)}.tew-table-wrapper[data-v-7e0ef36e]{flex:1;overflow:auto;padding:8px;background:var(--comfy-menu-bg, #1e1e1e)}.tew-table[data-v-7e0ef36e]{border-collapse:separate;border-spacing:0;table-layout:fixed;width:auto;border:1px solid var(--border-color, #333);border-radius:4px;overflow:hidden}.tew-row-handle[data-v-7e0ef36e]{width:24px;padding:0;text-align:center;background:var(--comfy-input-bg, #252525);border-bottom:1px solid var(--border-color, #333);border-right:1px solid var(--border-color, #333)}.tew-header-cell[data-v-7e0ef36e]{padding:4px 6px;border-bottom:1px solid var(--border-color, #333);border-right:1px solid var(--border-color, #333);background:var(--comfy-input-bg, #252525)}.tew-header-cell[data-v-7e0ef36e]:last-child{border-right:none}.tew-cell-inner[data-v-7e0ef36e]{display:flex;align-items:center;gap:4px}.tew-body-cell[data-v-7e0ef36e]{padding:0;border-bottom:1px solid var(--border-color, #333);border-right:1px solid var(--border-color, #333);background:var(--comfy-menu-bg, #1e1e1e);transition:background .2s}.tew-body-cell[data-v-7e0ef36e]:last-child{vertical-align:top;border-right:none}.tew-table tbody tr:last-child .tew-body-cell[data-v-7e0ef36e],.tew-table tbody tr:last-child .tew-row-handle[data-v-7e0ef36e]{border-bottom:none}.tew-table tbody tr:hover .tew-body-cell[data-v-7e0ef36e]{background:var(--comfy-input-bg, #2a2a2a)}.tew-cell-input[data-v-7e0ef36e]{width:100%;background:transparent;border:1px solid transparent;outline:none;color:var(--fg-color, #e0e0e0);font-size:12px;padding:6px 8px;box-sizing:border-box;transition:all .2s}.tew-cell-input[data-v-7e0ef36e]:focus{background:var(--comfy-input-bg, #252535);border-color:var(--p-primary-color, #4a9eff)}.tew-cell-textarea[data-v-7e0ef36e]{resize:none;min-height:28px;font-family:inherit;line-height:1.4;vertical-align:top;overflow:hidden;box-sizing:border-box;white-space:pre-wrap;word-break:break-word;overflow-wrap:break-word}.tew-header-input[data-v-7e0ef36e]{font-weight:600;color:var(--p-primary-color, #6ab0ff);flex:1;padding:4px 6px}.tew-col-del[data-v-7e0ef36e],.tew-row-del[data-v-7e0ef36e]{display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:3px;background:transparent;border:none;cursor:pointer;color:var(--error-text, #ff6b6b);font-size:14px;line-height:1;opacity:0;transition:all .2s;flex-shrink:0}.tew-header-cell:hover .tew-col-del[data-v-7e0ef36e],.tew-table tbody tr:hover .tew-row-del[data-v-7e0ef36e]{opacity:.6}.tew-col-del[data-v-7e0ef36e]:hover,.tew-row-del[data-v-7e0ef36e]:hover{opacity:1!important;background:#ff6b6b26}.tew-md-wrapper[data-v-7e0ef36e]{flex:1;display:flex;flex-direction:column;padding:8px;overflow:hidden;background:var(--comfy-menu-bg, #1e1e1e)}.tew-md-textarea[data-v-7e0ef36e]{flex:1;width:100%;background:var(--comfy-input-bg, #151515);border:1px solid var(--border-color, #333);border-radius:4px;color:var(--fg-color, #d4d4d4);font-family:JetBrains Mono,Consolas,Monaco,Courier New,monospace;font-size:12px;line-height:1.6;background:var(--comfy-input-bg, #252525);border-top:1px solid var(--border-color, #3a3a3a);flex-shrink:0}.tew-output-label[data-v-7e0ef36e]{color:var(--p-primary-color, #4a9eff);font-weight:500;opacity:.8}img[data-v-604a4248]{transition:transform 1s cubic-bezier(.2,0,.4,1)}.lazy-image-container[data-v-4bfc03bf]{position:relative;width:100%;height:100%}.lazy-image-placeholder[data-v-4bfc03bf],.lazy-image-error[data-v-4bfc03bf]{transition:background-color .2s ease}img[data-v-4bfc03bf]{transition:opacity .3s ease}.selector-card-wrapper[data-v-88af28b0]{width:100%}.card-item[data-v-88af28b0]{border:1px solid var(--border-color);border-radius:var(--border-radius);background:var(--comfy-menu-bg);border-radius:8px;overflow:hidden;transition:all .2s ease;box-shadow:0 1px 3px #0000001a}.dark .card-item[data-v-88af28b0]{background-color:var(--surface-900);border-color:var(--surface-700)}.card-item[data-v-88af28b0]:hover{box-shadow:0 4px 12px #00000026;border:1px solid var(--input-text)}.card-item.clickable[data-v-88af28b0]{cursor:pointer}.card-item.selected[data-v-88af28b0]{border:1px solid var(--success-color, #4CAF50)}.card-image-container[data-v-88af28b0]{position:relative}.card-image[data-v-88af28b0]{width:100%;height:80px;object-fit:cover;transition:transform .2s ease;background:var(--bg-color)}.card-item:hover .card-image[data-v-88af28b0]{transform:scale(1.05)}.selection-badge[data-v-88af28b0]{position:absolute;top:4px;right:4px;width:10px;height:10px;background-color:var(--success-color, #4CAF50);border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px #0000004d;z-index:10;animation:scaleIn-88af28b0 .2s ease-out}.selection-badge i[data-v-88af28b0]{font-size:6px;font-weight:700;color:#fff}@keyframes scaleIn-88af28b0{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}.card-actions[data-v-88af28b0]{position:absolute;top:8px;left:8px;display:flex;gap:4px;opacity:0;transition:opacity .2s ease}.card-item:hover .card-actions[data-v-88af28b0]{opacity:1}.card-content[data-v-88af28b0]{padding:2px 4px}.card-title[data-v-88af28b0]{color:var(--input-text);font-size:8px;font-weight:400;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.25;transition:color .2s ease}.dark .card-title[data-v-88af28b0]{color:var(--surface-0)}.card-item.selected .card-title[data-v-88af28b0]{color:var(--primary-600);font-weight:500}.dark .card-item.selected .card-title[data-v-88af28b0]{color:var(--primary-300)}.list-item[data-v-c93b1734]{display:inline-block;position:relative}.list-item__tag[data-v-c93b1734]{display:inline-block;vertical-align:middle;margin-top:8px;margin-right:8px;padding:4px;color:var(--input-text);background-color:var(--bg-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-size:11px;cursor:pointer;overflow:hidden;position:relative;transition:all .2s ease}.list-item__tag[data-v-c93b1734]:hover{filter:brightness(1.2)}.list-item__tag input[type=checkbox][data-v-c93b1734]{--ring-color: transparent;position:relative;box-shadow:none;background:linear-gradient(135deg,var(--comfy-menu-bg) 0%,var(--comfy-input-bg) 60%);display:inline-block;flex-shrink:0;vertical-align:middle;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--border-color);background-origin:border-box;padding:0;width:1rem;height:1rem;border-radius:4px;color:var(--theme-color);-webkit-user-select:none;user-select:none;margin-right:4px}.list-item__tag input[type=checkbox][data-v-c93b1734]:checked{border:1px solid var(--theme-color);background-color:var(--theme-color);background-image:url("data:image/svg+xml,%3csvg viewBox=\'0 0 16 16\' fill=\'white\' xmlns=\'http://www.w3.org/2000/svg\'%3e%3cpath d=\'M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z\'/%3e%3c/svg%3e")}.list-item-content[data-v-c93b1734]{margin:0 4px;vertical-align:middle;display:inline-block}.list-title[data-v-c93b1734]{color:inherit;font-size:10px;font-weight:500;margin:0;line-height:1.4;word-break:break-word;display:block}.list-description[data-v-c93b1734]{color:var(--input-text);font-size:10px;line-height:1.4;margin:2px 0 0;opacity:.8;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}@media (max-width: 768px){.list-item__tag[data-v-c93b1734]{padding:6px;margin-right:6px;margin-top:6px}}@media (max-width: 480px){.list-item__tag[data-v-c93b1734]{padding:4px;margin-right:4px;margin-top:4px}.list-title[data-v-c93b1734]{font-size:11px}.list-description[data-v-c93b1734]{font-size:9px}}.easyuse-styles-selector{position:relative;height:calc(100% - 10px);--p-inputtext-padding-y: 4px;--p-form-field-padding-x: 6px;--p-button-sm-padding-y: 0px;--p-icon-size: 12px;--p-button-icon-only-width: 24px;--p-button-sm-font-size: 12px;--p-togglebutton-content-left: 2px;--p-togglebutton-content-top: 2px}.easyuse-styles-selector .p-inputtext{font-size:11px}.easyuse-styles-selector .p-togglebutton{padding:0 6px}.easyuse-styles-selector-content{list-style:none;padding:0;margin:0;min-height:150px;height:calc(100% - 12px);overflow-y:auto;overflow-x:hidden}.easyuse-styles-selector-content .grid-container{display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));padding:4px 0;gap:8px}.easyuse-styles-selector-content .list-container{list-style:none;padding:6px 0;margin:0;display:flex;flex-wrap:wrap}.easyuse-styles-selector-previewer{position:absolute;top:0;left:-150px;width:130px;padding:8px;z-index:2;border-radius:var(--border-radius);background:var(--comfy-menu-bg);overflow:hidden;box-shadow:0 4px 12px #00000026}.easyuse-styles-selector-previewer__text{color:var(--input-text);word-wrap:break-word}.easyuse-styles-selector-previewer__text .title{line-height:1;font-size:10px}.easyuse-styles-selector-previewer__text h6{line-height:1;font-size:8px;margin:8px 0;white-space:wrap}.easyuse-styles-selector-previewer__text h6 .comfyui-easyuse-success{color:#22c55e;font-weight:600}.easyuse-styles-selector-previewer__text h6 .comfyui-easyuse-error{color:#ef4444;font-weight:600}.easyuse-styles-selector-previewer__text h6 span:last-child{color:var(--input-text);font-weight:400;margin-left:4px}\n@charset "UTF-8";.easyuse-model-info{color:#fff;max-width:90vw;font-family:var(--font-family)}.easyuse-model-content{display:flex;flex-direction:column;overflow:hidden}.easyuse-model-header{margin:0 0 15px}.easyuse-model-header-remark{display:flex;align-items:center;margin-top:5px}.easyuse-model-info h2{text-align:left;margin:0}.easyuse-model-info h5{text-align:left;margin:0 15px 0 0;font-weight:400;color:var(--descrip-text)}.easyuse-model-info p{margin:5px 0}.easyuse-model-info a{color:var(--theme-color-light)}.easyuse-model-info a:hover{text-decoration:underline}.easyuse-model-tags-list{display:flex;flex-wrap:wrap;list-style:none;gap:10px;max-height:200px;overflow:auto;margin:10px 0;padding:0}.easyuse-model-tag{background-color:var(--comfy-input-bg);border:2px solid var(--border-color);color:var(--input-text);display:flex;align-items:center;gap:5px;border-radius:5px;padding:2px 5px;cursor:pointer}.easyuse-model-tag--selected span:before{content:"✅";position:absolute;background-color:var(--theme-color-light);left:0;top:0;right:0;bottom:0;text-align:center}.easyuse-model-tag:hover{border:2px solid var(--theme-color-light)}.easyuse-model-tag p{margin:0}.easyuse-model-tag span{text-align:center;border-radius:5px;background-color:var(--theme-color-light);padding:2px;position:relative;min-width:20px;overflow:hidden;color:#fff}.easyuse-model-metadata .comfy-modal-content{max-width:100%}.easyuse-model-metadata label{margin-right:1ch;color:#ccc}.easyuse-model-metadata span{color:var(--theme-color-light)}.easyuse-preview{max-width:660px;margin-right:15px;position:relative}.easyuse-preview-group{position:relative;overflow:hidden;border-radius:.5rem;width:660px}.easyuse-preview-list{display:flex;flex-wrap:nowrap;width:100%;transition:all .5s ease-in-out}.easyuse-preview-list.no-transition{transition:none}.easyuse-preview-slide{display:flex;flex-basis:calc(50% - 5px);flex-grow:0;flex-shrink:0;position:relative;justify-content:center;align-items:center;padding-right:5px;padding-left:0}.easyuse-preview-slide:nth-child(2n){padding-left:5px;padding-right:0}.easyuse-preview-slide-content{position:relative;min-height:150px;width:100%}.easyuse-preview-slide-content .save{position:absolute;right:6px;z-index:12;bottom:6px;display:flex;align-items:center;height:26px;padding:0 9px;color:var(--input-text);font-size:12px;line-height:26px;background:#00000080;border-radius:13px;cursor:pointer;min-width:80px;text-align:center}.easyuse-preview-slide-content .save:hover{filter:brightness(120%);will-change:auto}.easyuse-preview-slide-content img{border-radius:14px;object-position:center center;max-width:100%;max-height:700px;border-style:none;vertical-align:middle}.easyuse-preview button{position:absolute;z-index:10;top:50%;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:15px;border:1px solid rgba(66,63,78,.15);background-color:#423f4e80;color:#fffc;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transform:translateY(-50%)}.easyuse-preview button.left{left:10px}.easyuse-preview button.right{right:10px}.easyuse-model-detail{margin-top:16px;overflow:hidden;border:1px solid var(--border-color);border-radius:8px;width:300px}.easyuse-model-detail-head{height:40px;padding:0 10px;font-weight:500;font-size:14px;font-style:normal;line-height:40px}.easyuse-model-detail-body{box-sizing:border-box;font-size:12px}.easyuse-model-detail-item{display:flex;justify-content:flex-start;border-top:1px solid var(--border-color)}.easyuse-model-detail-item-label{flex-shrink:0;width:88px;padding-top:5px;padding-bottom:5px;padding-left:10px;border-right:1px solid var(--border-color);color:var(--input-text);font-weight:400}.easyuse-model-detail-item-value{display:flex;flex-wrap:wrap;padding:5px 10px;color:var(--input-text)}.easyuse-model-detail-textarea{border-top:1px solid var(--border-color);padding:10px;height:100px;overflow-y:auto;font-size:12px}.easyuse-model-detail-textarea textarea{width:100%;height:100%;border:0;background-color:transparent;color:var(--input-text)}.easyuse-model-detail-textarea textarea::placeholder{color:var(--descrip-text)}.easyuse-model-detail-textarea.empty{display:flex;justify-content:center;align-items:center;color:var(--descrip-text)}.easyuse-model-notes{background-color:#00000040;padding:5px;margin-top:5px}.easyuse-model-notes:empty{display:none}.easyuse-account-user{font-size:10px;color:var(--descrip-text);text-align:center}.easyuse-account-user-info{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;cursor:pointer}.easyuse-account-user-info .user{display:flex;align-items:center}.easyuse-account-user-info .edit{padding:5px 10px;background:var(--comfy-menu-bg);border-radius:4px}.easyuse-account-user-info:hover{filter:brightness(110%)}.easyuse-account-user-info h5{margin:0;font-size:10px;text-align:left}.easyuse-account-user-info h6{margin:0;font-size:8px;text-align:left;font-weight:300}.easyuse-account-user-info .remark{margin-top:4px}.easyuse-account-user-info .avatar{width:36px;height:36px;background:var(--comfy-input-bg);border-radius:50%;margin-right:5px;display:flex;justify-content:center;align-items:center;font-size:16px;overflow:hidden}.easyuse-account-user-info .avatar img{width:100%;height:100%}.easyuse-account-dialog{width:600px}.easyuse-account-dialog-main a,.easyuse-account-dialog-main a:visited{font-weight:400;color:var(--theme-color-light)}.easyuse-account-dialog-item{display:flex;justify-content:flex-start;align-items:center;padding:10px 0;border-bottom:1px solid var(--border-color)}.easyuse-account-dialog-item input{padding:5px;margin-right:5px}.easyuse-account-dialog-item input.key{flex:1}.easyuse-account-dialog-item button{cursor:pointer;margin-left:5px!important;padding:5px!important;font-size:16px!important}.easyuse-account-dialog-item button:hover{filter:brightness(120%)}.easyuse-account-dialog-item button.choose{background:var(--theme-color)}.easyuse-account-dialog-item button.delete{background:var(--error-color)}.easy-dropdown,.easy-nested-dropdown{position:relative;box-sizing:border-box;background-color:#171717;box-shadow:0 4px 4px #ffffff40;padding:0;margin:0;list-style:none;z-index:1000;overflow:visible;max-height:fit-content;max-width:fit-content}.easy-dropdown{position:absolute;border-radius:0}.easy-dropdown li.item,.easy-nested-dropdown li.item{font-weight:400;min-width:max-content}.easy-dropdown li.folder,.easy-nested-dropdown li.folder{cursor:default;position:relative;border-right:3px solid cyan}.easy-dropdown li.folder:after,.easy-nested-dropdown li.folder:after{content:">";position:absolute;right:2px;font-weight:400}.easy-dropdown li,.easy-nested-dropdown li{padding:4px 10px;cursor:pointer;font-family:system-ui;font-size:.7rem;position:relative}.easy-nested-dropdown{position:absolute;top:0;left:100%;margin:0;border:none;display:none}.easy-dropdown li.selected>.easy-nested-dropdown,.easy-nested-dropdown li.selected>.easy-nested-dropdown{display:block;border:none}.easy-dropdown li.selected,.easy-nested-dropdown li.selected{background-color:#e5e5e5;border:none}#crystools-root-easyuse{flex-direction:row;justify-content:center;flex-shrink:1;width:min-content;min-width:max-content;height:100%;margin:0 auto}#crystools-root-easyuse .crystools-monitor-container{width:100%;cursor:crosshair;display:flex;flex-wrap:wrap;flex-direction:row;justify-content:flex-end;gap:5px;height:100%}#crystools-root-easyuse .crystools-monitor-container .crystools-monitor{background-color:var(--comfy-input-bg);position:relative;align-items:center;flex-direction:row;width:40px;height:100%}#crystools-root-easyuse .crystools-monitor-container .crystools-monitor .crystools-text{font-size:10px;text-align:right;margin-left:3px;position:absolute;font-weight:100;bottom:2px;z-index:10}#crystools-root-easyuse .crystools-monitor-container .crystools-content{position:relative;height:100%}#crystools-root-easyuse .crystools-monitor-container .crystools-slider{position:absolute;height:100%;width:0;box-shadow:inset 2px 2px 10px #0003}#crystools-root-easyuse .crystools-monitor-container .crystools-label{position:relative;width:100%;color:var(--input-text);font-weight:500;font-size:11px;left:2px;top:4px;text-align:right}:root{--theme-color:var(--p-primary-color, #60a5fa);--theme-color-light: var(--p-primary-hover-color, #93c5fd);--success-color: #52c41a;--error-color: #ff4d4f;--warning-color: #faad14;--font-family: Inter, -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;--p-inputtext-background: var(--p-form-field-background);--p-inputtext-disabled-background: var(--p-form-field-disabled-background);--p-inputtext-filled-background: var(--p-form-field-filled-background);--p-inputtext-filled-focus-background: var(--p-form-field-filled-focus-background);--p-inputtext-border-color: var(--p-form-field-border-color);--p-inputtext-hover-border-color: var(--p-form-field-hover-border-color);--p-inputtext-focus-border-color: var(--p-form-field-focus-border-color);--p-inputtext-invalid-border-color: var(--p-form-field-invalid-border-color);--p-inputtext-color: var(--p-form-field-color);--p-inputtext-disabled-color: var(--p-form-field-disabled-color);--p-inputtext-placeholder-color: var(--p-form-field-placeholder-color);--p-inputtext-shadow: var(--p-form-field-shadow);--p-inputtext-padding-x: var(--p-form-field-padding-x);--p-inputtext-padding-y: var(--p-form-field-padding-y);--p-inputtext-border-radius: var(--p-form-field-border-radius);--p-inputtext-focus-ring-width: var(--p-form-field-focus-ring-width);--p-inputtext-focus-ring-style: var(--p-form-field-focus-ring-style);--p-inputtext-focus-ring-color: var(--p-form-field-focus-ring-color);--p-inputtext-focus-ring-offset: var(--p-form-field-focus-ring-offset);--p-inputtext-focus-ring-shadow: var(--p-form-field-focus-ring-shadow);--p-inputtext-transition-duration: var(--p-form-field-transition-duration);--p-inputtext-sm-font-size: .875rem;--p-inputtext-sm-padding-x: .625rem;--p-inputtext-sm-padding-y: .375rem;--p-inputtext-lg-font-size: 1.125rem;--p-inputtext-lg-padding-x: .875rem;--p-inputtext-lg-padding-y: .625rem;--p-tooltip-max-width: 12.5rem;--p-tooltip-gutter: .25rem;--p-tooltip-shadow: var(--p-overlay-popover-shadow);--p-tooltip-padding: .5rem .75rem;--p-tooltip-border-radius: var(--p-overlay-popover-border-radius);--p-tooltip-background: var(--p-surface-700);--p-tooltip-color: var(--p-surface-0)}.comfyui-easyuse-theme,.comfyui-easyuse-primary{color:var(--theme-color-light)}.comfyui-easyuse-theme.point:hover,.comfyui-easyuse-primary.point:hover{opacity:.8}.comfyui-easyuse-success{color:var(--success-color)}.comfyui-easyuse-success.point:hover{opacity:.8}.comfyui-easyuse-error{color:var(--error-color)}.comfyui-easyuse-error.point:hover{opacity:.8}.comfyui-easyuse-warning,.comfyui-easyuse--warn{color:var(--warning-color)}.comfyui-easyuse-warning.point:hover,.comfyui-easyuse--warn.point:hover{opacity:.8}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.grid{display:grid}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-12{gap:3rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-20{gap:5rem}.gap-3{gap:.75rem}.gap-3\\.5{gap:.875rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.gap-\\[0\\.28rem\\]{gap:.28rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-6{row-gap:1.5rem}@media (min-width: 576px){.sm\\:col-span-4{grid-column:span 4/span 4}.sm\\:col-span-6{grid-column:span 6/span 6}.sm\\:ml-8{margin-left:2rem}.sm\\:mt-0{margin-top:0}.sm\\:flex{display:flex}.sm\\:h-60{height:15rem}.sm\\:\\!w-64{width:16rem!important}.sm\\:w-40{width:10rem}.sm\\:w-44{width:11rem}.sm\\:w-56{width:14rem}.sm\\:w-60{width:15rem}.sm\\:w-64{width:16rem}.sm\\:w-80{width:20rem}.sm\\:w-96{width:24rem}.sm\\:w-\\[30rem\\]{width:30rem}.sm\\:w-auto{width:auto}.sm\\:min-w-\\[30rem\\]{min-width:30rem}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:flex-nowrap{flex-wrap:nowrap}.sm\\:items-start{align-items:flex-start}.sm\\:items-end{align-items:flex-end}.sm\\:items-center{align-items:center}.sm\\:justify-center{justify-content:center}.sm\\:justify-between{justify-content:space-between}.sm\\:gap-2{gap:.5rem}.sm\\:p-20{padding:5rem}.sm\\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\\:py-10{padding-bottom:2.5rem;padding-top:2.5rem}.sm\\:py-5{padding-bottom:1.25rem;padding-top:1.25rem}.sm\\:pt-32{padding-top:8rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:-bottom-12{bottom:-3rem}.md\\:-bottom-28{bottom:-7rem}.md\\:-bottom-8{bottom:-2rem}.md\\:-bottom-\\[26rem\\]{bottom:-26rem}.md\\:-left-12{left:-3rem}.md\\:-left-28{left:-7rem}.md\\:-left-32{left:-8rem}.md\\:-left-4{left:-1rem}.md\\:-left-48{left:-12rem}.md\\:-left-\\[22rem\\]{left:-22rem}.md\\:bottom-0{bottom:0}.md\\:left-10{left:2.5rem}.md\\:left-\\[32rem\\]{left:32rem}.md\\:left-\\[42rem\\]{left:42rem}.md\\:top-1\\/2{top:50%}.md\\:top-32{top:8rem}.md\\:top-8{top:2rem}.md\\:col-span-2{grid-column:span 2/span 2}.md\\:col-span-4{grid-column:span 4/span 4}.md\\:col-span-6{grid-column:span 6/span 6}.md\\:ml-auto{margin-left:auto}.md\\:block{display:block}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:h-\\[20rem\\]{height:20rem}.md\\:h-\\[32rem\\]{height:32rem}.md\\:\\!w-80{width:20rem!important}.md\\:w-2\\/12{width:16.666667%}.md\\:w-40{width:10rem}.md\\:w-5\\/12{width:41.666667%}.md\\:w-56{width:14rem}.md\\:w-6\\/12{width:50%}.md\\:w-60{width:15rem}.md\\:w-8\\/12{width:66.666667%}.md\\:w-80{width:20rem}.md\\:w-\\[100rem\\]{width:100rem}.md\\:w-\\[26rem\\]{width:26rem}.md\\:w-\\[30rem\\]{width:30rem}.md\\:w-\\[50rem\\]{width:50rem}.md\\:w-\\[52rem\\]{width:52rem}.md\\:w-\\[60rem\\]{width:60rem}.md\\:w-\\[95rem\\]{width:95rem}.md\\:w-screen{width:100vw}.md\\:flex-initial{flex:0 1 auto}.md\\:-translate-y-1\\/2{--tw-translate-y: -50% }.md\\:-translate-y-1\\/2,.md\\:translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-0{--tw-translate-x: 0px }.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:flex-col{flex-direction:column}.md\\:items-end{align-items:flex-end}.md\\:items-center{align-items:center}.md\\:justify-start{justify-content:flex-start}.md\\:justify-center{justify-content:center}.md\\:gap-20{gap:5rem}.md\\:gap-4{gap:1rem}.md\\:p-5{padding:1.25rem}.md\\:p-8{padding:2rem}}@media (min-width: 992px){.lg\\:left-20{left:5rem}.lg\\:left-\\[36rem\\]{left:36rem}.lg\\:left-\\[50rem\\]{left:50rem}.lg\\:col-span-1{grid-column:span 1/span 1}.lg\\:col-span-2{grid-column:span 2/span 2}.lg\\:col-span-4{grid-column:span 4/span 4}.lg\\:col-span-6{grid-column:span 6/span 6}.lg\\:mb-0{margin-bottom:0}.lg\\:mt-0{margin-top:0}.lg\\:mt-20{margin-top:5rem}.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:h-10{height:2.5rem}.lg\\:h-32{height:8rem}.lg\\:h-\\[28rem\\]{height:28rem}.lg\\:\\!w-\\[30rem\\]{width:30rem!important}.lg\\:w-3\\/12{width:25%}.lg\\:w-32{width:8rem}.lg\\:w-\\[28rem\\]{width:28rem}.lg\\:w-\\[64rem\\]{width:64rem}.lg\\:w-fit{width:-moz-fit-content;width:fit-content}.lg\\:max-w-6xl{max-width:72rem}.lg\\:flex-row{flex-direction:row}.lg\\:gap-0{gap:0}.lg\\:rounded-2xl{border-radius:1rem}.lg\\:rounded-3xl{border-radius:1.5rem}.lg\\:rounded-xl{border-radius:.75rem}.lg\\:p-7{padding:1.75rem}.lg\\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\\:px-20{padding-left:5rem;padding-right:5rem}.lg\\:px-56{padding-left:14rem;padding-right:14rem}.lg\\:px-8{padding-left:2rem;padding-right:2rem}.lg\\:px-9{padding-left:2.25rem;padding-right:2.25rem}.lg\\:py-20{padding-bottom:5rem;padding-top:5rem}.lg\\:py-7{padding-bottom:1.75rem;padding-top:1.75rem}.lg\\:pt-0{padding-top:0}.lg\\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\\:text-5xl{font-size:3rem;line-height:1}.lg\\:text-base{font-size:1rem;line-height:1.5rem}.lg\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1200px){.xl\\:-left-12{left:-3rem}.xl\\:-left-28{left:-7rem}.xl\\:bottom-0{bottom:0}.xl\\:left-36{left:9rem}.xl\\:left-\\[42rem\\]{left:42rem}.xl\\:left-\\[60rem\\]{left:60rem}.xl\\:col-span-3{grid-column:span 3/span 3}.xl\\:col-span-4{grid-column:span 4/span 4}.xl\\:col-span-6{grid-column:span 6/span 6}.xl\\:block{display:block}.xl\\:flex{display:flex}.xl\\:hidden{display:none}.xl\\:h-\\[36\\.25rem\\]{height:36.25rem}.xl\\:\\!w-40{width:10rem!important}.xl\\:w-3\\/12{width:25%}.xl\\:w-6\\/12{width:50%}.xl\\:w-96{width:24rem}.xl\\:w-\\[29rem\\]{width:29rem}.xl\\:max-w-36{max-width:9rem}.xl\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\\:flex-row{flex-direction:row}.xl\\:items-start{align-items:flex-start}.xl\\:items-center{align-items:center}.xl\\:gap-1{gap:.25rem}.xl\\:gap-6{gap:1.5rem}.xl\\:text-left{text-align:left}}.p-blockui-mask.p-overlay-mask-leave{display:none!important}.comfyui-easyuse-toast{position:fixed;z-index:99999;top:0;left:0;height:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:start}.comfyui-easyuse-toast-container{position:relative;height:fit-content;padding:4px;margin-top:-100px;opacity:0;z-index:3;-webkit-transition:all .3s ease-in-out;-khtml-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.comfyui-easyuse-toast-container:last-child{z-index:1}.comfyui-easyuse-toast-container.show{opacity:1;margin-top:0!important;transform:translateY(0)}.comfyui-easyuse-toast-container:not(.show){z-index:1}.comfyui-easyuse-toast-container>div{position:relative;background:var(--comfy-menu-bg);color:var(--input-text);height:fit-content;box-shadow:0 0 10px #000000e0;padding:9px 12px;border-radius:var(--border-radius);font-size:14px;pointer-events:all;margin-top:40px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-toast-container>div>span{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-toast-container>div>span i{font-size:16px;margin-right:8px}.comfyui-easyuse-toast-container>div>span i.loading{animation:loading-rotate 1s linear infinite}.comfyui-easyuse-toast-container a{cursor:pointer;text-decoration:underline;color:var(--theme-color-light);margin-left:4px;display:inline-block;line-height:1}.comfyui-easyuse-toast-container a:hover{color:var(--theme-color-light);text-decoration:none}@keyframes loading-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.comfyui-easyuse-chooser-dialog{max-width:600px}.comfyui-easyuse-chooser-dialog-title{font-size:18px;font-weight:700;text-align:center;color:var(--input-text);margin:0}.comfyui-easyuse-chooser-dialog-images{margin-top:10px;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box}.comfyui-easyuse-chooser-dialog-images img{width:50%;height:auto;cursor:pointer;box-sizing:border-box;filter:brightness(80%)}.comfyui-easyuse-chooser-dialog-images img:hover{filter:brightness(100%)}.comfyui-easyuse-chooser-dialog-images img.selected{border:4px solid var(--success-color)}.comfyui-easyuse-chooser-dialog-hidden{display:none;height:0}.comfyui-easyuse-contextmenu{--height: 26px;--padding: 8px;font-family:var(--font-family);position:fixed;top:0;left:0;width:100%;max-width:200px;min-width:100px;min-height:100px;padding:var(--padding) 0;box-shadow:0 0 10px #00000040;background-color:var(--tr-odd-bg-color);border-radius:var(--border-radius);z-index:10;will-change:transform}.comfyui-easyuse-contextmenu-item-divider{height:1px;width:100%;background-color:var(--border-color);margin:var(--padding) 0}.comfyui-easyuse-contextmenu-item-content{height:var(--height);padding:0 12px;cursor:pointer;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-contextmenu-item-content span{font-size:11px;color:var(--input-text);display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}.comfyui-easyuse-contextmenu-item-content i{color:var(--input-text);margin-left:4px;display:block;width:0;height:0;border-width:4px 4px 0;border-style:solid;border-color:var(--descrip-text) transparent transparent;-webkit-transform:scaleY(.8) rotate(-90deg);-khtml-transform:scaleY(.8) rotate(-90deg);-moz-transform:scaleY(.8) rotate(-90deg);-ms-transform:scaleY(.8) rotate(-90deg);-o-transform:scaleY(.8) rotate(-90deg);transform:scaleY(.8) rotate(-90deg)}.comfyui-easyuse-contextmenu-item-content:hover{background:var(--theme-color)}.comfyui-easyuse-contextmenu-item.disabled .comfyui-easyuse-contextmenu-item-content span{color:var(--border-color);cursor:default}.comfyui-easyuse-contextmenu-item.disabled .comfyui-easyuse-contextmenu-item-content:hover{background:transparent}.comfyui-easyuse-contextmenu-submenu{font-family:var(--font-family);position:absolute;top:0;left:200px;max-width:200px;width:200px;min-width:100px;min-height:--height;padding:var(--padding) 0;box-shadow:0 0 10px #00000040;background-color:var(--tr-odd-bg-color);border-radius:var(--border-radius);z-index:10;will-change:transform}.comfyui-easyuse-contextmenu-model{position:relative}#easyuse-model-thumbnail{display:none;position:fixed;z-index:9999;width:200px;height:auto;opacity:0;-webkit-transition:all .5s cubic-bezier(.55,0,.1,1);-khtml-transition:all .5s cubic-bezier(.55,0,.1,1);-moz-transition:all .5s cubic-bezier(.55,0,.1,1);-ms-transition:all .5s cubic-bezier(.55,0,.1,1);-o-transition:all .5s cubic-bezier(.55,0,.1,1);transition:all .5s cubic-bezier(.55,0,.1,1)}.comfyui-easyuse-slider{width:100%;height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-slider-item{height:inherit;min-width:25px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-direction:column;-khtml-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column}.comfyui-easyuse-slider-item-input{height:15px;font-size:10px;color:var(--input-text)}.comfyui-easyuse-slider-item-label{height:15px;border:none;color:var(--descrip-text);font-size:8px}.comfyui-easyuse-slider-item-scroll{width:5px;height:calc(100% - 30px);background:var(--comfy-input-bg);border-radius:10px;position:relative}.comfyui-easyuse-slider-item-bar{width:10px;height:10px;background:linear-gradient(to bottom,var(--input-text),var(--descrip-text));border-radius:100%;box-shadow:0 2px 10px var(--bg-color);position:absolute;top:0;left:-2.5px;cursor:pointer;z-index:1}.comfyui-easyuse-slider-item-area{width:100%;border-radius:20px;position:absolute;bottom:0;background:var(--input-text);z-index:0}.comfyui-easyuse-slider-item.positive .comfyui-easyuse-slider-item-label{color:var(--success-color)}.comfyui-easyuse-slider-item.positive .comfyui-easyuse-slider-item-area{background:var(--success-color)}.comfyui-easyuse-slider-item.negative .comfyui-easyuse-slider-item-label{color:var(--error-color)}.comfyui-easyuse-slider-item.negative .comfyui-easyuse-slider-item-area{background:var(--error-color)}.comfyui-easyuse-map{height:100%;background:var(--comfy-menu-bg)}.comfyui-easyuse-map .p-splitter-gutter-handle{height:1px!important}.comfyui-easyuse-map-nodes{height:100%;position:relative}.comfyui-easyuse-map-nodes__header{position:absolute;z-index:2;top:0;left:0;width:100%;padding:.25rem 0 .25rem .5rem;height:2.8rem;background:var(--comfy-menu-bg);border-bottom:1px solid var(--border-color);display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px)}.comfyui-easyuse-map-nodes__header .title{font-size:13px;color:var(--input-text);font-weight:400;line-height:1.5;-webkit-user-select:none;user-select:none}.comfyui-easyuse-map-nodes__header .toolbar{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-map-nodes__header .toolbar .icon{font-size:.85rem;margin-left:.25rem;cursor:pointer}.comfyui-easyuse-map-nodes__content{position:relative;padding:2.8rem 0 0;height:100%;overflow:auto}.comfyui-easyuse-map-nodes__content-searchbox{padding:1rem}.comfyui-easyuse-map-nodes__content dl .label{padding-left:1rem}.comfyui-easyuse-map-nodes__content ul,.comfyui-easyuse-map-nodes__content ol,.comfyui-easyuse-map-nodes__content dl{list-style-type:none;padding:0;margin:0}.comfyui-easyuse-map-nodes__content ul .toolbar span,.comfyui-easyuse-map-nodes__content ol .toolbar span,.comfyui-easyuse-map-nodes__content dl .toolbar span{font-size:13px}.comfyui-easyuse-map-nodes__content ul .toolbar span.pi-eye,.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye{color:var(--input-text)}.comfyui-easyuse-map-nodes__content ul .toolbar span.pi-eye-slash,.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye-slash,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye-slash{color:var(--descrip-text)}.comfyui-easyuse-map-nodes__content ul .toolbar span.pi-eye-slash.never,.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye-slash.never,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye-slash.never{opacity:.5}.comfyui-easyuse-map-nodes__content ol{padding:0;padding-block-start:2px;padding-inline-start:1rem}.comfyui-easyuse-map-nodes__content .no_result{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;text-align:center}.comfyui-easyuse-map-nodes .p-contextmenu{display:block!important;position:fixed!important;z-index:1000!important}.comfyui-easyuse-map-nodes-group{position:relative;overflow:hidden;width:100%;height:2rem;cursor:default;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;pointer-events:auto}.comfyui-easyuse-map-nodes-group .left,.comfyui-easyuse-map-nodes-group .right{height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-map-nodes-group .left{padding-left:.5rem;margin-right:.25rem;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}.comfyui-easyuse-map-nodes-group .icon{font-size:.85rem;margin-right:.25rem}.comfyui-easyuse-map-nodes-group .label{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;height:100%;width:100%;min-width:80px}.comfyui-easyuse-map-nodes-group .label span{font-size:14px;color:var(--input-text);font-weight:400;line-height:1.5;display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.comfyui-easyuse-map-nodes-group:hover{background:var(--content-hover-bg)!important}.comfyui-easyuse-map-nodes-group.active{background:var(--theme-color)!important}.comfyui-easyuse-map-nodes-group.active .label{color:#fff;cursor:default}.comfyui-easyuse-map-nodes-group.never .label{color:var(--descrip-text);opacity:.4}.comfyui-easyuse-map-nodes-group.bypass .label{color:var(--descrip-text)}.comfyui-easyuse-map-nodes-node{height:2rem;cursor:default;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;position:relative;overflow:hidden;pointer-events:auto}.comfyui-easyuse-map-nodes-node .node_id{background:#0b2000;padding:.25rem;margin:0 0 0 .25rem;border-radius:.25rem;text-align:center;color:#fff;font-size:12px}.comfyui-easyuse-map-nodes-node .left{height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-map-nodes-node .label{text-indent:.5rem;font-size:14px;color:var(--input-text);font-weight:400;line-height:1.5;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;margin-right:.25rem;height:2rem;line-height:2rem;width:100%;display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical}.comfyui-easyuse-map-nodes-node .label.error{color:var(--error-color)}.comfyui-easyuse-map-nodes-node:hover{background:var(--content-hover-bg)!important}.comfyui-easyuse-map-nodes-node.never .label{color:var(--descrip-text);opacity:.5}.comfyui-easyuse-map-nodes-node.bypass .label{color:#f0f;opacity:.5}.comfyui-easyuse-toolbar{border-radius:0 12px 12px 0;min-width:50px;height:24px;position:fixed;bottom:85px;left:0;display:flex;align-items:center;z-index:1000;background-color:var(--comfy-menu-bg);border:1px solid var(--bg-color);-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px)}.comfyui-easyuse-toolbar-icon{height:100%;padding:0 4px;display:flex;justify-content:center;align-items:center;font-size:12px;color:var(--input-text);transition:all .3s ease-in-out;cursor:pointer}.comfyui-easyuse-toolbar-icon svg{width:14px;height:14px}.comfyui-easyuse-toolbar-icon:hover.group{color:var(--warning-color)}.comfyui-easyuse-toolbar-icon:hover.rocket{color:var(--theme-color)}.comfyui-easyuse-toolbar-nodes-map{position:absolute;top:50px;left:10px;width:200px;border-radius:12px;min-height:100px;max-height:600px;color:var(--descrip-text);background-color:var(--comfy-menu-bg);border:1px solid var(--bg-color);-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px);z-index:399;padding-top:0;overflow:hidden}.comfyui-easyuse-toolbar-nodes-map .no-result-placeholder-content{-webkit-transform:scale(.8);-khtml-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}.comfyui-easyuse-toolbar-nodes-map .comfyui-easyuse-map-nodes{min-height:100px;max-height:600px}.comfyui-easyuse-toolbar-nodes-map .comfyui-easyuse-map-nodes__header:before{content:"…";position:absolute;left:.25rem;top:2.75rem;transform:translateY(-2rem) rotate(90deg);width:.5rem;height:.5rem;display:inline-block;overflow:hidden;line-height:5px;padding:3px 4px;cursor:move;vertical-align:middle;font-size:12px;font-family:sans-serif;letter-spacing:2px;color:var(--drag-text);z-index:3;text-shadow:1px 0 1px black}.comfyui-easyuse-toolbar-nodes-map .comfyui-easyuse-map-nodes__header .title{cursor:move;padding-left:.25rem}.comfyui-easyuse-toolbar-nodes-map .comfyui-easyuse-map-nodes__content{max-height:calc(600px - 2.7rem)}.no-result-placeholder{display:flex;justify-content:center;align-items:center;height:100%}.no-result-placeholder-content{text-align:center;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-khtml-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between}.no-result-placeholder .p-card{background-color:transparent!important;box-shadow:none;text-align:center}.no-result-placeholder h3{color:var(--input-text);margin-bottom:.5rem}.no-result-placeholder p{color:var(--descrip-text);margin-bottom:1rem;margin-top:0}#comfyui-easyuse-components{position:absolute;top:0;left:0;z-index:3}.comfyui-easyuse{--primary-bg:var(--theme-color)!important;--primary-hover-bg: var(--theme-color-light)!important;--p-datatable-header-cell-padding: .15rem 1rem;--p-datatable-body-cell-padding: .15rem 1rem;--border-color-solid: var(--border-color);--border-radius: 8px}.comfyui-easyuse.dark-theme{--fg-color: #fff;--bg-color: #090909;--content-bg:#18181b;--content-fg:#fff;--content-hover-bg: #27272a;--comfy-menu-bg: rgba(24,24,27,.9);--comfy-input-bg: #242427;--input-text: #ffffff;--descrip-text: #71717a;--drag-text: #ccc;--error-text: #ff4444;--border-color: #3f3f46;--border-color-solid: #2a2a2e;--tr-even-bg-color: rgba(28,28,28,.9);--tr-odd-bg-color: rgba(19,19,19,.9)}.comfyui-easyuse ::-webkit-scrollbar{width:0em}.comfyui-easyuse ::-webkit-scrollbar-track{background-color:transparent}.comfyui-easyuse ::-webkit-scrollbar-thumb{background-color:transparent;border-radius:2px}.comfyui-easyuse ::-webkit-scrollbar-thumb:hover{background-color:transparent}.comfyui-easyuse body{font-family:var(--font-family)!important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.comfyui-easyuse textarea{font-family:var(--font-family)!important}.comfyui-easyuse hr{border:1px solid var(--border-color)}.comfyui-easyuse .comfy-multiline-input{background-color:transparent;border:1px solid var(--border-color-solid);border-radius:var(--border-radius);padding:8px;font-size:12px}.comfyui-easyuse #comfy-settings-dialog{border:1px solid var(--border-color);background:transparent;-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%);box-shadow:none}.comfyui-easyuse .comfy-modal{border:1px solid var(--border-color);box-shadow:none;-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .cm-title{background-color:transparent!important}.comfyui-easyuse .cm-notice-board{border-radius:10px!important;border:1px solid var(--border-color)!important}.comfyui-easyuse .cm-menu-container{margin-bottom:50px!important}.comfyui-easyuse .cn-manager-custom_milk_white .tg-column-name,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-column-name{color:var(--input-text)}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-message,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-message{text-align:center;color:var(--descrip-text)!important}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .tg-cell,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .tg-cell{color:var(--input-text)}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .cn-node-name a,.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .cmm-node-name a,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .cn-node-name a,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .cmm-node-name a{color:var(--theme-color)!important}.comfyui-easyuse .comfy-menu{border-radius:16px;box-shadow:0 0 1px var(--descrip-text);-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .comfy-menu button.comfy-settings-btn{font-size:12px}.comfyui-easyuse .comfy-menu-btns{margin-bottom:4px}.comfyui-easyuse .comfy-menu button,.comfyui-easyuse .comfy-modal button{font-size:14px;padding:4px 0;margin-bottom:4px}.comfyui-easyuse .comfy-menu-btns button,.comfyui-easyuse .comfy-list-actions button{font-size:10px}.comfyui-easyuse .comfy-menu>button,.comfyui-easyuse .comfy-menu-btns button,.comfyui-easyuse .comfy-menu .comfy-list button,.comfyui-easyuse .comfy-modal button{border-width:1px}.comfyui-easyuse #comfy-dev-save-api-button{justify-content:center}.comfyui-easyuse #queue-button{position:relative;overflow:hidden;min-height:30px;z-index:1}.comfyui-easyuse #queue-button:after{clear:both;content:attr(data-attr);background:green;color:#fff;width:var(--process-bar-width);height:100%;position:absolute;top:0;left:0;z-index:0;text-align:center;display:flex;justify-content:center;align-items:center}.comfyui-easyuse #shareButton{background:linear-gradient(to left,var(--theme-color),var(--theme-color-light))!important;color:#fff!important}.comfyui-easyuse .litegraph.litecontextmenu{--height: 24px;--padding: 6px;font-family:var(--font-family);padding:var(--padding) 0;border-radius:var(--border-radius);-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .litegraph.litecontextmenu .litemenu-title{padding:var(--padding)}.comfyui-easyuse .litegraph.litecontextmenu>div:first-child.litemenu-title{margin-top:-6px}.comfyui-easyuse .litegraph.litecontextmenu .submenu{height:var(--height);line-height:var(--height);padding:0 18px 0 12px;margin:0;background:transparent!important}.comfyui-easyuse .litegraph.litecontextmenu .submenu.has_submenu{border-right:none;position:relative}.comfyui-easyuse .litegraph.litecontextmenu .submenu.has_submenu:after{content:"";display:block;width:0;height:0;border-width:4px 4px 0;border-style:solid;border-color:var(--input-text) transparent transparent;transform:translateY(-50%) rotate(-90deg);top:50%;position:absolute}.comfyui-easyuse .litegraph.litecontextmenu .submenu.separator{height:1px;width:100%;background-color:var(--border-color)!important;margin:var(--padding) 0;border:none}.comfyui-easyuse .litegraph.litecontextmenu .submenu:last-child.separator{display:none}.comfyui-easyuse .litegraph.litecontextmenu .submenu:hover:not(.separator){background:var(--theme-color)!important}.comfyui-easyuse .litegraph.lite-search-item{background-color:var(--comfy-input-bg)!important;filter:brightness(100%)}.comfyui-easyuse .litegraph.lite-search-item:hover{filter:brightness(120%);color:var(--input-text)}.comfyui-easyuse .graphdialog{-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .graphdialog button{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse .comfyui-menu{background:var(--comfy-menu-bg);border-bottom:1px solid var(--bg-color)}.comfyui-easyuse .side-tool-bar-container:not(.bg-transparent){background:var(--comfy-menu-bg);border-right:1px solid var(--bg-color)}.comfyui-easyuse .comfy-modal-content{width:100%}.comfyui-easyuse-poseEditor{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;text-align:center;font-size:18px;line-height:1.5}.comfyui-easyuse .dom-widget{padding:0 4px}.comfyui-easyuse .pi.pi-circle-fill[data-testid=noColor]{color:#000!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=red]{color:#af3535!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=brown]{color:#38291f!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=green]{color:#346434!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=blue]{color:#1f1f48!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=pale_blue]{color:#006691!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=cyan]{color:#008181!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=purple]{color:#422342!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=yellow]{color:#c09430!important}.comfyui-easyuse .pi.pi-circle-fill[data-testid=black]{color:#000c!important}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}(); -var e;import{u as o,a as s,s as n,g as t,b as a,c as l,j as i,N as d,$ as u,t as r,d as p,e as c,f as m,h as v}from"./assets/extensions-DcWKQGos.js";import{w as h,r as g,o as f,a as y,c as _,F as w,i as b,n as x,b as M,t as k,l as C,k as S,f as N,u as D,d as $,A as E,h as A,y as V,j as H,z as G,Q as z,e as T,_ as U,$ as L,B as j}from"./assets/vue-DfGw76ex.js";import{e as O,s as R,k as Y,g as B,T as P,f as I,i as W,l as F,m as q}from"./assets/vendor-DrOEdrAG.js";import{c as K}from"./assets/lodash-DkvwM0Z9.js";import{P as X}from"./assets/primevue-keNb8gkp.js";import"./assets/vueuse-Bf7Wy5dB.js";import"./assets/primeuix-CNMLIuxO.js";const J=["data-id"],Q=["onMousedown","onDblclick"],Z="comfyui-easyuse-slider",ee="ipadapter layer weights",oe={__name:"sliderControl",props:{id:{type:String|Number,default:""},mode:{type:String,default:""},type:{type:String,default:""},values:{type:Array,default:[]},show:{type:Boolean,default:!1}},emits:["changeValues","showSlider"],setup(e,{emit:o}){const s=e,n=o,t=(e,o,s)=>(e-o)/(s-o)*100,a=(e,o,n=void 0)=>{if(s.mode===ee){let s={3:2.5,6:1}[o]||0;return{default:12==e?s:0,min:-1,max:3,step:.05,value:void 0!==n?n:12==e?s:0,top:void 0!==n?100-t(n,-1,3)+"%":null,height:void 0!==n?t(n,-1,3)+"%":null}}};h((e=>s.mode),(async(e,o)=>{var t;if(e!==o&&e===ee)if(!o&&(null==(t=s.values)?void 0:t.length)>0){const e=s.values.map((e=>{const o=e.split(":");return a(s.values.length,o[0],parseFloat(o[1]))}));await n("changeValues",e)}else{let e="sd1"==s.type?16:12,o=Array.from({length:e},((o,s)=>a(e,s)));await n("changeValues",o)}n("showSlider")}),{immediate:!0}),h((e=>s.type),((e,o)=>{if(e!=o&&s.mode==ee){let e="sd1"==s.type?16:12,o=Array.from({length:e},((o,s)=>a(e,s)));n("changeValues",o)}}));const l=g(null),i=g(null);return f((()=>{document.onmouseup=e=>document.onmousemove=null})),(o,a)=>{var d;return y(),_("div",{class:x(Z),"data-id":e.id},[(null==(d=e.values)?void 0:d.length)>0&&e.show?(y(!0),_(w,{key:0},b(e.values,((o,a)=>(y(),_("div",{class:x([Z+"-item",{positive:3==a&&"sdxl"==e.type&&e.mode==ee},{negative:6==a&&"sdxl"==e.type&&e.mode==ee}]),key:a},[M("div",{class:x(Z+"-item-input")},k(o.value),3),M("div",{class:x(Z+"-item-scroll"),ref_for:!0,ref_key:"scroll",ref:l},[M("div",{class:x(Z+"-item-bar"),ref_for:!0,ref_key:"bar",ref:i,style:C({top:o.top||100-t(o.default,o.min,o.max)+"%"}),onMousedown:e=>((e,o,t)=>{let a=e||window.event,d=l.value[t],u=i.value[t],r=K(s.values),p=a.clientY-u.offsetTop;document.onmousemove=e=>{let s=(e||window.event).clientY-p;s<0?s=0:s>d.offsetHeight-u.offsetHeight&&(s=d.offsetHeight-u.offsetHeight);let a=(o.max-o.min)/o.step,l=(d.offsetHeight-u.offsetHeight)/a;s=Math.round(s/l)*l;const i=Math.floor(s/(d.offsetHeight-u.offsetHeight)*100)+"%",c=Math.floor((d.offsetHeight-u.offsetHeight-s)/(d.offsetHeight-u.offsetHeight)*100)+"%",m=parseFloat(parseFloat(o.max-(o.max-o.min)*(s/(d.offsetHeight-u.offsetHeight))).toFixed(2));r[t]={...r[t],top:i,height:c,value:m},n("changeValues",r),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}})(e,o,a),onDblclick:e=>((e,o,t)=>{let a=K(s.values);a[t]={...a[t],top:null,height:null,value:o.default},n("changeValues",a)})(0,o,a)},null,46,Q),M("div",{class:x(Z+"-item-area"),style:C({height:o.height||t(o.default,o.min,o.max)+"%"})},null,6)],2),M("div",{class:x(Z+"-item-label")},[M("span",null,k(o.label),1)],2)],2)))),128)):S("",!0)],8,J)}}},se={__name:"index",setup(e){const a=o(),{slider_controls:l}=O(a),i=g({}),d=async e=>{var o,s,d,u,r;await n(1);const p=t(e,"mode"),c=t(e,"model_type"),m=(null==(o=e.properties.values)?void 0:o.length)>0?e.properties.values:[];(null==(s=e.flags)?void 0:s.collapsed)&&e.collapse();let v=K(l.value);v.push({id:e.id,type:c.value,mode:p.value,value:m,show:!1});const h=v.length-1;await a.setSliderControls(v);let g=null==(r=null==(u=null==(d=i.value[e.id])?void 0:d._)?void 0:u.vnode)?void 0:r.el;if(!g)return;e.addDOMWidget("values","btn",g,{setValue(){},getValue(){var o;const s=(null==(o=l.value)?void 0:o[h].value)||[];return e.properties.values=s.map(((e,o)=>`${o}:${e.value}`)),e.properties.values.join(",")}}),e.properties.values||e.setProperty("values",[]),e.setSize("sdxl"==c.value?[375,320]:[455,320]),c.callback=o=>{v=K(l.value),v[h].type!=o&&(e.setSize("sdxl"==o?[375,320]:[455,320]),v[h].value=[],v[h].type=o,a.setSliderControls(v))};const f=e.onRemoved;e.onRemoved=function(){if(f&&(null==f||f.apply(this,arguments)),void 0!==l.value.findIndex((o=>o.id==e.id))){let e=K(l.value);e.splice(h,1),a.setSliderControls(e)}return f}};return f((e=>{s.registerExtension({name:"Comfy.EasyUse.Components",async beforeRegisterNodeDef(e,o){const s=e.prototype.onNodeCreated;"easy sliderControl"==o.name&&(e.prototype.onNodeCreated=async function(){return s&&(null==s||s.apply(this,arguments)),await d(this),s}),"easy poseEditor"==o.name&&(e.prototype.onNodeCreated=async function(){s&&(null==s||s.apply(this,arguments));const e=document.createElement("div");return e.className="comfyui-easyuse-poseEditor",e.innerHTML='
This node is about to be removed, you can use ComfyUI_Custom_Nodes_AlekPet to replace it.
',this.addDOMWidget("editor","btn",e),s})}})})),(e,o)=>(y(!0),_(w,null,b(D(l),((e,o)=>(y(),N(oe,{ref_for:!0,ref:o=>{o&&(i.value[e.id]=o)},type:e.type,key:o,id:e.id,show:e.show,mode:e.mode,values:e.value,onChangeValues:e=>((e,o)=>{let s=K(l.value);s[o].value=e,a.setSliderControls(s)})(e,o),onShowSlider:e=>(e=>{let o=K(l.value);o[e].show=!0,a.setSliderControls(o)})(o)},null,8,["type","id","show","mode","values","onChangeValues","onShowSlider"])))),128))}},ne={class:"no-result-placeholder"},te={class:"no-result-placeholder-content"},ae={key:0},le={__name:"noResultsPlaceholder",props:{icon:{type:String,default:"",required:!1},iconSize:{type:String,default:"3rem",required:!1},title:{type:String,required:!0},message:{type:String,required:!1},buttonLabel:{type:String,default:"",required:!1}},emits:["action"],setup:e=>(o,s)=>(y(),_("div",ne,[$(D(Y),null,{content:E((()=>[M("div",te,[M("i",{class:x(e.icon),style:C({"font-size":e.iconSize,"margin-bottom":".5rem"})},null,6),M("h3",null,k(e.title),1),e.message?(y(),_("p",ae,k(e.message),1)):S("",!0),e.buttonLabel?(y(),N(D(R),{key:1,label:e.buttonLabel,onClick:s[0]||(s[0]=e=>o.$emit("action")),class:"p-button-text"},null,8,["label"])):S("",!0)])])),_:1})]))},ie={class:"left flex-1"},de={key:0,class:"node_id"},ue={key:1,class:"edit"},re={class:"right toolbar"},pe={__name:"node",props:{node:{type:Object,default:{}}},emits:["mousedown","mouseup","changeMode"],setup(e){const o=a(),n=A((e=>l("EasyUse.NodesMap.DisplayNodeID"))),t=e,u=g(!1),r=g(null),p=g("");h((e=>t.node.is_edit),(e=>{e&&(p.value=t.node.title)}));const c=async()=>{let e=s.canvas.graph._nodes.find((e=>e.id==t.node.id));e?(e.is_edit=!1,e.title=p.value,await o.setNodes(s.canvas.graph._nodes),u.value=!1):u.value=!1};return(o,s)=>{var t;return y(),_("div",{draggable:!1,class:x(["comfyui-easyuse-map-nodes-node",{never:void 0!==e.node.mode&&e.node.mode==D(d).NEVER},{bypass:void 0!==e.node.mode&&e.node.mode==D(d).BYPASS}])},[M("div",ie,[n.value?(y(),_("span",de,k(e.node.id),1)):S("",!0),(null==(t=e.node)?void 0:t.is_edit)?(y(),_("div",ue,[$(D(B),{ref_key:"modifyRef",ref:r,modelValue:p.value,"onUpdate:modelValue":s[0]||(s[0]=e=>p.value=e),variant:"outline",size:"small",type:"text",onBlur:c,onKeydown:[V(c,["enter"]),V(c,["esc"])],style:{width:"100%"}},null,8,["modelValue"])])):void 0!==e.node.title?(y(),_("span",{key:2,class:"label",onDblclick:s[1]||(s[1]=H((o=>D(i)(e.node.id)),["stop"]))},k(e.node.title),33)):(y(),_("span",{key:3,class:"label error",onDblclick:s[2]||(s[2]=H((o=>D(i)(e.node.id)),["stop"]))},k(e.node.type),33))]),M("div",re,[$(D(R),{size:"small",icon:e.node.mode==D(d).ALWAYS?"pi pi-eye":"pi pi-eye-slash",text:"",rounded:"",severity:"secondary",onClick:s[3]||(s[3]=H((e=>o.$emit("changeMode")),["stop"])),onMousedown:s[4]||(s[4]=H((e=>o.$emit("mousedown")),["stop"])),onMouseup:s[5]||(s[5]=H((e=>o.$emit("mouseup")),["stop"]))},null,8,["icon"])])],2)}}},ce={class:"left flex-1"},me={key:1,class:"edit"},ve={key:2,class:"label"},he={class:"right toolbar"},ge={key:0,class:"child"},fe={__name:"group",props:{item:{type:Object,default:{}}},emits:["mousedown","mouseup","changeMode"],setup(e){const o=e,n=a(),t=g(!1),l=g(null),i=g("");h((e=>o.item.info.is_edit),(e=>{e&&(i.value=o.item.info.title)}));const u=e=>{var t,a;let l=o.item;if(!(null==(t=l.info)?void 0:t.is_edit)&&(null==(a=l.children)?void 0:a.length)>0){let e=s.canvas.graph._groups.find((e=>e.pos[0]==l.info.pos[0]&&e.pos[1]==l.info.pos[1]));e&&(e.show_nodes=!e.show_nodes,n.setGroups(s.canvas.graph._groups))}},r=async()=>{let e=o.item,a=s.canvas.graph._groups.find((o=>o.pos[0]==e.info.pos[0]&&o.pos[1]==e.info.pos[1]));a?(a.is_edit=!1,a.title=i.value,await n.setGroups(s.canvas.graph._groups),t.value=!1):t.value=!1};return(o,s)=>{var n,t,a;return y(),_(w,null,[M("div",{class:x("comfyui-easyuse-map-nodes-group"),onClick:u},[M("div",ce,[e.item.children?(y(),_("i",{key:0,class:x(["icon",e.item.info.show_nodes?"pi pi-folder-open":"pi pi-folder"]),style:C({color:e.item.info.color})},null,6)):S("",!0),(null==(n=e.item.info)?void 0:n.is_edit)?(y(),_("div",me,[$(D(B),{ref_key:"modifyRef",ref:l,modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=e=>i.value=e),variant:"outline",size:"small",type:"text",onBlur:r,onKeydown:[V(r,["enter"]),V(r,["esc"])],style:{width:"100%"}},null,8,["modelValue"])])):(y(),_("div",ve,[M("span",null,k(e.item.info.title),1)]))]),M("div",he,[(null==(t=e.item.children)?void 0:t.length)>0?(y(),N(D(R),{key:0,size:"small",icon:e.item.children.find((e=>e.mode==D(d).ALWAYS))?"pi pi-eye":"pi pi-eye-slash",text:"",rounded:"",severity:"secondary",onClick:s[1]||(s[1]=H((e=>o.$emit("changeMode")),["stop"])),onMousedown:s[2]||(s[2]=H((e=>o.$emit("mousedown")),["stop"])),onMouseup:s[3]||(s[3]=H((e=>o.$emit("mouseup")),["stop"]))},null,8,["icon"])):S("",!0)])]),(null==(a=e.item.children)?void 0:a.length)>0&&e.item.info.show_nodes?(y(),_("div",ge,[G(o.$slots,"default")])):S("",!0)],64)}}},ye={__name:"tree",props:{item:Object,index:Number,showGroupOnly:Boolean},emits:["dragstart","dragend","dragover","contextmenu","changeGroupMode","changeNodeMode","mousedown","mouseup"],setup:e=>(o,s)=>{var n,t,a,l;const i=z("Tree",!0);return y(),_("li",{onDragstart:s[10]||(s[10]=s=>o.$emit("dragstart",s,e.index)),onDragend:s[11]||(s[11]=s=>o.$emit("dragend",s,e.index)),onDragover:s[12]||(s[12]=s=>o.$emit("dragover",s,e.index)),draggable:!0,onContextmenu:s[13]||(s[13]=H((s=>o.$emit("contextmenu",s,e.item)),["stop"]))},[(null==(n=e.item.children)?void 0:n.length)||(null==(a=null==(t=e.item)?void 0:t.info)?void 0:a.sub_groups)?(y(),N(fe,{key:0,item:e.item,onChangeMode:s[4]||(s[4]=s=>o.$emit("changeGroupMode",e.item)),onMousedown:s[5]||(s[5]=s=>o.$emit("mousedown",e.item,"group")),onMouseup:s[6]||(s[6]=e=>o.$emit("mouseup"))},{default:E((()=>[M("ol",null,[(y(!0),_(w,null,b(e.item.children,((n,t)=>(y(),N(i,{key:t,item:n,index:t,showGroupOnly:e.showGroupOnly,onDragstart:e=>o.$emit("dragstart",e,t),onDragend:e=>o.$emit("dragend",e,t),onDragover:e=>o.$emit("dragover",e,t),onContextmenu:e=>o.$emit("contextmenu",e,n),onChangeGroupMode:s[0]||(s[0]=e=>o.$emit("changeGroupMode",e)),onChangeNodeMode:s[1]||(s[1]=e=>o.$emit("changeNodeMode",e)),onMousedown:s[2]||(s[2]=e=>o.$emit("mousedown",e[0],e[1])),onMouseup:s[3]||(s[3]=e=>o.$emit("mouseup"))},null,8,["item","index","showGroupOnly","onDragstart","onDragend","onDragover","onContextmenu"])))),128))])])),_:1},8,["item"])):e.showGroupOnly?S("",!0):(y(),N(pe,{key:1,node:(null==(l=e.item)?void 0:l.info)||e.item,onChangeMode:s[7]||(s[7]=s=>{var n;return o.$emit("changeNodeMode",(null==(n=e.item)?void 0:n.info)||e.item)}),onMousedown:s[8]||(s[8]=s=>{var n;return o.$emit("mousedown",(null==(n=e.item)?void 0:n.info)||e.item,"node")}),onMouseup:s[9]||(s[9]=e=>o.$emit("mouseup"))},null,8,["node"]))],32)}},_e={class:"title"},we={class:"toolbar"},be={key:0},xe={key:1},Me={key:2,class:"no_result",style:{height:"100%"}},ke="comfyui-easyuse-map-nodes",Ce={__name:"nodesMap",emits:["handleHeader"],setup(e){const o=a(),{groups_nodes:n,groups:t,nodes:p}=O(o),c=A((e=>l("EasyUse.NodesMap.DisplayGroupOnly"))),m=g(!1),v=e=>{m.value=!m.value,s.canvas.graph._groups.forEach((e=>{e.show_nodes=m.value})),o.setGroups(s.canvas.graph._groups)},h=g(""),f=A((e=>(null==p?void 0:p.value.filter((e=>{var o,s,n,t;return(null==(s=null==(o=e.id)?void 0:o.toString())?void 0:s.includes(h.value))||(null==(n=e.type)?void 0:n.includes(h.value))||(null==(t=e.title)?void 0:t.includes(h.value))})))||[])),C=g(null),V=g(!1),z=A((()=>V.value?[{label:u("Jump to this node"),icon:"pi pi-arrow-circle-right",visible:!0,command:()=>j(U.value)},{label:u("Rename node"),icon:"pi pi-file-edit",visible:!0,command:()=>Y(U.value)},{label:u("Delete node"),icon:"pi pi-trash",command:()=>q(U.value),visible:!0}]:[{label:u("Rename group"),icon:"pi pi-file-edit",visible:!0,command:()=>K(U.value)},{label:u("Delete group"),icon:"pi pi-trash",command:()=>X(U.value),visible:!0}])),U=g(null),L=(e,o)=>{U.value=o,V.value=!o.children,C.value.show(e)},j=e=>{i((null==e?void 0:e.info)?e.info.id:e.id)},Y=e=>{e.info?e.info.is_edit=!0:e.is_edit=!0},q=e=>{const n=e.info?e.info.id:e.id;s.canvas.graph.beforeChange(),s.canvas.graph._nodes.splice(s.canvas.graph._nodes.findIndex((e=>e.id==n)),1),s.canvas.graph.afterChange(),s.canvas.setDirty(!0,!0),o.setNodes(s.canvas.graph._nodes)},K=e=>{e.info.is_edit=!0},X=e=>{s.canvas.graph.beforeChange(),s.canvas.graph._groups.splice(s.canvas.graph._groups.findIndex((o=>o.id==e.info.id)),1),s.canvas.graph.afterChange(),s.canvas.setDirty(!0,!0),o.setGroups(s.canvas.graph._groups)};let J,Q=0,Z=0,ee=!1;const oe=(e,n=!1)=>{if(ee)return void(ee=!1);const t=e.children.find((e=>e.mode==d.ALWAYS)),a=e.children.map((e=>e.id));s.canvas.graph._nodes.forEach((e=>{a.includes(e.id)&&(e.mode=t?n?d.NEVER:d.BYPASS:d.ALWAYS,s.graph.change())})),o.setNodes(s.canvas.graph._nodes)},se=(e,n=!1)=>{if(ee)return void(ee=!1);const t=e.mode==d.ALWAYS,a=s.canvas.graph._nodes.find((o=>o.id==e.id));a&&(a.mode=t?n?d.NEVER:d.BYPASS:d.ALWAYS,s.graph.change(),o.setNodes(s.canvas.graph._nodes))},ne=(e,o="group")=>{Q=(new Date).getTime(),clearTimeout(J),J=setTimeout((s=>{"group"==o?oe(e,!0):se(e,!0)}),500)},te=e=>{Z=(new Date).getTime(),Z-Q>500&&(ee=!0),clearTimeout(J)};let ae=g(null),ie=g(null);g(!1);const de=(e,o)=>{ae.value=o,e.currentTarget.style.opacity="0.6",e.currentTarget.style.border="1px dashed yellow",e.dataTransfer.effectAllowed="move"},ue=(e,n)=>{e.target.style.opacity="1",e.currentTarget.style.border="1px dashed transparent";if("Manual drag&drop sorting"!==l("EasyUse.NodesMap.Sorting"))return void r.warn(u("For drag and drop sorting, please find Nodes map sorting mode in Settings->EasyUse and change it to manual"));let t=s.canvas.graph._groups,a=t[ae.value],i=t[ie.value];s.canvas.graph._groups[ae.value]=i,s.canvas.graph._groups[ie.value]=a,o.setGroups(s.canvas.graph._groups)},re=(e,o)=>{e.preventDefault(),e.currentIndex!=ae.value&&(ie.value=o)};return(e,o)=>{var s,a,l;return y(),_("div",{class:x(ke)},[M("div",{class:x(ke+"__header"),onMousedown:o[0]||(o[0]=o=>e.$emit("handleHeader",o))},[M("div",_e,k(D(u)("NODES MAP")),1),M("div",we,[(null==(s=D(t))?void 0:s.length)>0?T((y(),N(D(R),{key:0,icon:m.value?"pi pi-angle-double-down":"pi pi-angle-double-up",text:"",rounded:"",severity:"secondary",onClick:H(v,["stop"]),size:"small"},null,8,["icon"])),[[D(P),m.value?D(u)("Collapse All"):D(u)("Expand All"),void 0,{top:!0}]]):S("",!0),G(e.$slots,"icon")])],34),M("div",{class:x(ke+"__content")},[M("div",{class:x(ke+"__content-searchbox")},[$(D(W),null,{default:E((()=>[$(D(B),{class:"search-box-input",modelValue:h.value,"onUpdate:modelValue":o[1]||(o[1]=e=>h.value=e),placeholder:D(u)("Search by Node ID/Name..."),variant:"outlined",style:{width:"100%"}},null,8,["modelValue","placeholder"]),h.value?(y(),N(D(I),{key:1,class:"pi pi-times",onClick:o[2]||(o[2]=e=>h.value="")})):(y(),N(D(I),{key:0,class:"pi pi-search"}))])),_:1})],2),(null==(a=f.value)?void 0:a.length)>0&&h.value?(y(),_("ul",be,[(y(!0),_(w,null,b(f.value,((e,o)=>(y(),_("li",{key:o},[$(pe,{node:e,onChangeMode:o=>se(e),onMousedown:o=>ne(e,"node"),onMouseup:te},null,8,["node","onChangeMode","onMousedown"])])))),128))])):(null==(l=D(n))?void 0:l.length)>0&&!h.value?(y(),_("ul",xe,[(y(!0),_(w,null,b(D(n),((e,o)=>(y(),N(ye,{key:o,item:e,index:o,showGroupOnly:c.value,onDragstart:de,onDragend:ue,onDragover:re,onContextmenu:L,onChangeGroupMode:oe,onChangeNodeMode:se,onMousedown:ne,onMouseup:te},null,8,["item","index","showGroupOnly"])))),128))])):(y(),_("div",Me,[$(le,{icon:"pi pi-sitemap",title:D(u)("No Nodes",!0),message:h.value?D(u)("No nodes found in the search"):D(u)("No nodes found in the map",!0)},null,8,["title","message"])]))],2),$(D(F),{ref_key:"menuRef",ref:C,model:z.value,autoZIndex:!1,appendTo:"self"},null,8,["model"])])}}},Se="comfyui-easyuse-toolbar",Ne={__name:"index",setup(e){const o=a(),s=g(!1);h((e=>s.value),(e=>{e?o.watchGraph(!0):o.unwatchGraph()}));const n=g(null),t=e=>{const o=n.value;var s=e.clientX||0,t=e.clientY||0,a=o.offsetLeft,l=o.offsetTop;function i(e){var n=e.clientX,i=e.clientY,d=n-s,u=i-t;o.style.left=a+d+"px",o.style.top=l+u+"px"}document.addEventListener("mousemove",i),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)}))};return(e,o)=>(y(),_(w,null,[M("div",{class:x(["flex-c",Se])},[M("div",{class:x(["group flex-c",Se+"-icon"]),onClick:o[0]||(o[0]=e=>s.value=!s.value)},o[3]||(o[3]=[M("svg",{class:"icon",t:"1714565543756",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"22538",width:"200",height:"200"},[M("path",{d:"M871.616 64H152.384c-31.488 0-60.416 25.28-60.416 58.24v779.52c0 32.896 26.24 58.24 60.352 58.24h719.232c34.112 0 60.352-25.344 60.352-58.24V122.24c0.128-32.96-28.8-58.24-60.288-58.24zM286.272 512c-23.616 0-44.672-20.224-44.672-43.008 0-22.784 20.992-43.008 44.608-43.008 23.616 0 44.608 20.224 44.608 43.008A43.328 43.328 0 0 1 286.272 512z m0-202.496c-23.616 0-44.608-20.224-44.608-43.008 0-22.784 20.992-43.008 44.608-43.008 23.616 0 44.608 20.224 44.608 43.008a43.456 43.456 0 0 1-44.608 43.008zM737.728 512H435.904c-23.68 0-44.672-20.224-44.672-43.008 0-22.784 20.992-43.008 44.608-43.008h299.264c23.616 0 44.608 20.224 44.608 43.008a42.752 42.752 0 0 1-41.984 43.008z m0-202.496H435.904c-23.616 0-44.608-20.224-44.608-43.008 0-22.784 20.992-43.008 44.608-43.008h299.264c23.616 0 44.608 20.224 44.608 43.008a42.88 42.88 0 0 1-42.048 43.008z","p-id":"22539",fill:"currentColor"})],-1)]),2),M("div",{class:x(["rocket flex-c",Se+"-icon"]),onClick:o[1]||(o[1]=(...e)=>D(p)&&D(p)(...e))},o[4]||(o[4]=[M("svg",{class:"icon",t:"1714565020764",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7999",width:"200",height:"200"},[M("path",{d:"M810.438503 379.664884l-71.187166-12.777183C737.426025 180.705882 542.117647 14.602496 532.991087 7.301248c-12.777184-10.951872-32.855615-10.951872-47.45811 0-9.12656 7.301248-204.434938 175.229947-206.26025 359.586453l-67.536542 10.951871c-18.253119 3.650624-31.030303 18.253119-31.030303 36.506239v189.832442c0 10.951872 5.475936 21.903743 12.777184 27.379679 7.301248 5.475936 14.602496 9.12656 23.729055 9.12656h5.475936l133.247772-23.729055c40.156863 47.458111 91.265597 73.012478 151.500891 73.012477 60.235294 0 111.344029-27.379679 151.500891-74.837789l136.898396 23.729055h5.475936c9.12656 0 16.427807-3.650624 23.729055-9.12656 9.12656-7.301248 12.777184-16.427807 12.777184-27.379679V412.520499c1.825312-14.602496-10.951872-29.204991-27.379679-32.855615zM620.606061 766.631016H401.568627c-20.078431 0-36.506239 16.427807-36.506238 36.506239v109.518716c0 14.602496 9.12656 29.204991 23.729055 34.680927 14.602496 5.475936 31.030303 1.825312 40.156863-9.126559l16.427807-18.25312 32.855615 80.313726c5.475936 14.602496 18.253119 23.729055 34.680927 23.729055 16.427807 0 27.379679-9.12656 34.680927-23.729055l32.855615-80.313726 16.427807 18.25312c10.951872 10.951872 25.554367 14.602496 40.156863 9.126559 14.602496-5.475936 23.729055-18.253119 23.729055-34.680927v-109.518716c-3.650624-20.078431-20.078431-36.506239-40.156862-36.506239z",fill:"currentColor","p-id":"8000"})],-1)]),2)]),s.value?(y(),_("div",{key:0,ref_key:"nodesMapRef",ref:n,class:x(Se+"-nodes-map")},[$(Ce,{onHandleHeader:t},{icon:E((()=>[T($(D(R),{icon:"pi pi-times",text:"",rounded:"",severity:"secondary",onClick:o[2]||(o[2]=e=>s.value=!1),size:"small"},null,512),[[D(P),D(u)("Close"),void 0,{top:!0}]])])),_:1})],2)):S("",!0)],64))}},De={__name:"index",setup(e){const o=a();return f((e=>{o.watchGraph()})),(e,o)=>(y(),_("div",{class:x("comfyui-easyuse-map")},[$(Ce)]))}},$e="Comfy.UseNewMenu",Ee={__name:"App",setup(e){const o=g(null);return f((e=>{try{(async()=>{l("EasyUse.NodesMap.Enable",null)&&s.extensionManager.registerSidebarTab({id:c,icon:"pi pi-sitemap",title:u("NodesMap",!0),tooltip:u("NodesMap",!0),type:"custom",render:e=>{e.style.height="100%",U(L(De,{}),e)}});const e=await m.fetchApi("/easyuse/version");if(200===e.status){let o=await e.json();o.version&&s.registerExtension({name:"EasyUse Version",aboutPageBadges:[{label:"EasyUse v"+o.version,url:"https://github.com/yolain/ComfyUI-Easy-Use",icon:"pi pi-github"}]})}o.value=l($e),v($e,(e=>{o.value=e}))})()}catch(n){}})),(e,s)=>(y(),_(w,null,[$(se),s[0]||(s[0]=M("img",{id:"easyuse-model-thumbnail"},null,-1)),"Disabled"==o.value?(y(),N(Ne,{key:0})):S("",!0)],64))}},Ae=null==(e=document.getElementsByClassName("graph-canvas-container"))?void 0:e[0],Ve=document.createElement("div");Ve.id="comfyui-easyuse-components",Ae?Ae.append(Ve):document.body.append(Ve);const He=j(Ee);He.use(X),He.use(q()),He.mount("#"+Ve.id); +var e;import{u as o,a as s,s as n,g as t,b as a,c as l,j as i,N as d,$ as u,t as r,d as p,e as c,f as m,h as v}from"./assets/extensions-BcsTHXcg.js";import{w as h,r as g,o as f,a as y,c as _,F as w,i as b,n as x,b as M,t as k,l as C,k as S,f as N,u as D,d as $,A as E,h as A,y as V,j as H,z as G,Q as z,e as T,_ as U,$ as L,B as j}from"./assets/vue-DfGw76ex.js";import{e as O,s as R,k as Y,g as B,T as P,f as I,i as W,l as F,m as q}from"./assets/vendor-DrOEdrAG.js";import{c as K}from"./assets/lodash-DkvwM0Z9.js";import{P as X}from"./assets/primevue-keNb8gkp.js";import"./assets/vueuse-Bf7Wy5dB.js";import"./assets/primeuix-CNMLIuxO.js";const J=["data-id"],Q=["onMousedown","onDblclick"],Z="comfyui-easyuse-slider",ee="ipadapter layer weights",oe={__name:"sliderControl",props:{id:{type:String|Number,default:""},mode:{type:String,default:""},type:{type:String,default:""},values:{type:Array,default:[]},show:{type:Boolean,default:!1}},emits:["changeValues","showSlider"],setup(e,{emit:o}){const s=e,n=o,t=(e,o,s)=>(e-o)/(s-o)*100,a=(e,o,n=void 0)=>{if(s.mode===ee){let s={3:2.5,6:1}[o]||0;return{default:12==e?s:0,min:-1,max:3,step:.05,value:void 0!==n?n:12==e?s:0,top:void 0!==n?100-t(n,-1,3)+"%":null,height:void 0!==n?t(n,-1,3)+"%":null}}};h((e=>s.mode),(async(e,o)=>{var t;if(e!==o&&e===ee)if(!o&&(null==(t=s.values)?void 0:t.length)>0){const e=s.values.map((e=>{const o=e.split(":");return a(s.values.length,o[0],parseFloat(o[1]))}));await n("changeValues",e)}else{let e="sd1"==s.type?16:12,o=Array.from({length:e},((o,s)=>a(e,s)));await n("changeValues",o)}n("showSlider")}),{immediate:!0}),h((e=>s.type),((e,o)=>{if(e!=o&&s.mode==ee){let e="sd1"==s.type?16:12,o=Array.from({length:e},((o,s)=>a(e,s)));n("changeValues",o)}}));const l=g(null),i=g(null);return f((()=>{document.onmouseup=e=>document.onmousemove=null})),(o,a)=>{var d;return y(),_("div",{class:x(Z),"data-id":e.id},[(null==(d=e.values)?void 0:d.length)>0&&e.show?(y(!0),_(w,{key:0},b(e.values,((o,a)=>(y(),_("div",{class:x([Z+"-item",{positive:3==a&&"sdxl"==e.type&&e.mode==ee},{negative:6==a&&"sdxl"==e.type&&e.mode==ee}]),key:a},[M("div",{class:x(Z+"-item-input")},k(o.value),3),M("div",{class:x(Z+"-item-scroll"),ref_for:!0,ref_key:"scroll",ref:l},[M("div",{class:x(Z+"-item-bar"),ref_for:!0,ref_key:"bar",ref:i,style:C({top:o.top||100-t(o.default,o.min,o.max)+"%"}),onMousedown:e=>((e,o,t)=>{let a=e||window.event,d=l.value[t],u=i.value[t],r=K(s.values),p=a.clientY-u.offsetTop;document.onmousemove=e=>{let s=(e||window.event).clientY-p;s<0?s=0:s>d.offsetHeight-u.offsetHeight&&(s=d.offsetHeight-u.offsetHeight);let a=(o.max-o.min)/o.step,l=(d.offsetHeight-u.offsetHeight)/a;s=Math.round(s/l)*l;const i=Math.floor(s/(d.offsetHeight-u.offsetHeight)*100)+"%",c=Math.floor((d.offsetHeight-u.offsetHeight-s)/(d.offsetHeight-u.offsetHeight)*100)+"%",m=parseFloat(parseFloat(o.max-(o.max-o.min)*(s/(d.offsetHeight-u.offsetHeight))).toFixed(2));r[t]={...r[t],top:i,height:c,value:m},n("changeValues",r),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}})(e,o,a),onDblclick:e=>((e,o,t)=>{let a=K(s.values);a[t]={...a[t],top:null,height:null,value:o.default},n("changeValues",a)})(0,o,a)},null,46,Q),M("div",{class:x(Z+"-item-area"),style:C({height:o.height||t(o.default,o.min,o.max)+"%"})},null,6)],2),M("div",{class:x(Z+"-item-label")},[M("span",null,k(o.label),1)],2)],2)))),128)):S("",!0)],8,J)}}},se={__name:"index",setup(e){const a=o(),{slider_controls:l}=O(a),i=g({}),d=async e=>{var o,s,d,u,r;await n(1);const p=t(e,"mode"),c=t(e,"model_type"),m=(null==(o=e.properties.values)?void 0:o.length)>0?e.properties.values:[];(null==(s=e.flags)?void 0:s.collapsed)&&e.collapse();let v=K(l.value);v.push({id:e.id,type:c.value,mode:p.value,value:m,show:!1});const h=v.length-1;await a.setSliderControls(v);let g=null==(r=null==(u=null==(d=i.value[e.id])?void 0:d._)?void 0:u.vnode)?void 0:r.el;if(!g)return;e.addDOMWidget("values","btn",g,{setValue(){},getValue(){var o;const s=(null==(o=l.value)?void 0:o[h].value)||[];return e.properties.values=s.map(((e,o)=>`${o}:${e.value}`)),e.properties.values.join(",")}}),e.properties.values||e.setProperty("values",[]),e.setSize("sdxl"==c.value?[375,320]:[455,320]),c.callback=o=>{v=K(l.value),v[h].type!=o&&(e.setSize("sdxl"==o?[375,320]:[455,320]),v[h].value=[],v[h].type=o,a.setSliderControls(v))};const f=e.onRemoved;e.onRemoved=function(){if(f&&(null==f||f.apply(this,arguments)),void 0!==l.value.findIndex((o=>o.id==e.id))){let e=K(l.value);e.splice(h,1),a.setSliderControls(e)}return f}};return f((e=>{s.registerExtension({name:"Comfy.EasyUse.Components",async beforeRegisterNodeDef(e,o){const s=e.prototype.onNodeCreated;"easy sliderControl"==o.name&&(e.prototype.onNodeCreated=async function(){return s&&(null==s||s.apply(this,arguments)),await d(this),s}),"easy poseEditor"==o.name&&(e.prototype.onNodeCreated=async function(){s&&(null==s||s.apply(this,arguments));const e=document.createElement("div");return e.className="comfyui-easyuse-poseEditor",e.innerHTML='
This node is about to be removed, you can use ComfyUI_Custom_Nodes_AlekPet to replace it.
',this.addDOMWidget("editor","btn",e),s})}})})),(e,o)=>(y(!0),_(w,null,b(D(l),((e,o)=>(y(),N(oe,{ref_for:!0,ref:o=>{o&&(i.value[e.id]=o)},type:e.type,key:o,id:e.id,show:e.show,mode:e.mode,values:e.value,onChangeValues:e=>((e,o)=>{let s=K(l.value);s[o].value=e,a.setSliderControls(s)})(e,o),onShowSlider:e=>(e=>{let o=K(l.value);o[e].show=!0,a.setSliderControls(o)})(o)},null,8,["type","id","show","mode","values","onChangeValues","onShowSlider"])))),128))}},ne={class:"no-result-placeholder"},te={class:"no-result-placeholder-content"},ae={key:0},le={__name:"noResultsPlaceholder",props:{icon:{type:String,default:"",required:!1},iconSize:{type:String,default:"3rem",required:!1},title:{type:String,required:!0},message:{type:String,required:!1},buttonLabel:{type:String,default:"",required:!1}},emits:["action"],setup:e=>(o,s)=>(y(),_("div",ne,[$(D(Y),null,{content:E((()=>[M("div",te,[M("i",{class:x(e.icon),style:C({"font-size":e.iconSize,"margin-bottom":".5rem"})},null,6),M("h3",null,k(e.title),1),e.message?(y(),_("p",ae,k(e.message),1)):S("",!0),e.buttonLabel?(y(),N(D(R),{key:1,label:e.buttonLabel,onClick:s[0]||(s[0]=e=>o.$emit("action")),class:"p-button-text"},null,8,["label"])):S("",!0)])])),_:1})]))},ie={class:"left flex-1"},de={key:0,class:"node_id"},ue={key:1,class:"edit"},re={class:"right toolbar"},pe={__name:"node",props:{node:{type:Object,default:{}}},emits:["mousedown","mouseup","changeMode"],setup(e){const o=a(),n=A((e=>l("EasyUse.NodesMap.DisplayNodeID"))),t=e,u=g(!1),r=g(null),p=g("");h((e=>t.node.is_edit),(e=>{e&&(p.value=t.node.title)}));const c=async()=>{let e=s.canvas.graph._nodes.find((e=>e.id==t.node.id));e?(e.is_edit=!1,e.title=p.value,await o.setNodes(s.canvas.graph._nodes),u.value=!1):u.value=!1};return(o,s)=>{var t;return y(),_("div",{draggable:!1,class:x(["comfyui-easyuse-map-nodes-node",{never:void 0!==e.node.mode&&e.node.mode==D(d).NEVER},{bypass:void 0!==e.node.mode&&e.node.mode==D(d).BYPASS}])},[M("div",ie,[n.value?(y(),_("span",de,k(e.node.id),1)):S("",!0),(null==(t=e.node)?void 0:t.is_edit)?(y(),_("div",ue,[$(D(B),{ref_key:"modifyRef",ref:r,modelValue:p.value,"onUpdate:modelValue":s[0]||(s[0]=e=>p.value=e),variant:"outline",size:"small",type:"text",onBlur:c,onKeydown:[V(c,["enter"]),V(c,["esc"])],style:{width:"100%"}},null,8,["modelValue"])])):void 0!==e.node.title?(y(),_("span",{key:2,class:"label",onDblclick:s[1]||(s[1]=H((o=>D(i)(e.node.id)),["stop"]))},k(e.node.title),33)):(y(),_("span",{key:3,class:"label error",onDblclick:s[2]||(s[2]=H((o=>D(i)(e.node.id)),["stop"]))},k(e.node.type),33))]),M("div",re,[$(D(R),{size:"small",icon:e.node.mode==D(d).ALWAYS?"pi pi-eye":"pi pi-eye-slash",text:"",rounded:"",severity:"secondary",onClick:s[3]||(s[3]=H((e=>o.$emit("changeMode")),["stop"])),onMousedown:s[4]||(s[4]=H((e=>o.$emit("mousedown")),["stop"])),onMouseup:s[5]||(s[5]=H((e=>o.$emit("mouseup")),["stop"]))},null,8,["icon"])])],2)}}},ce={class:"left flex-1"},me={key:1,class:"edit"},ve={key:2,class:"label"},he={class:"right toolbar"},ge={key:0,class:"child"},fe={__name:"group",props:{item:{type:Object,default:{}}},emits:["mousedown","mouseup","changeMode"],setup(e){const o=e,n=a(),t=g(!1),l=g(null),i=g("");h((e=>o.item.info.is_edit),(e=>{e&&(i.value=o.item.info.title)}));const u=e=>{var t,a;let l=o.item;if(!(null==(t=l.info)?void 0:t.is_edit)&&(null==(a=l.children)?void 0:a.length)>0){let e=s.canvas.graph._groups.find((e=>e.pos[0]==l.info.pos[0]&&e.pos[1]==l.info.pos[1]));e&&(e.show_nodes=!e.show_nodes,n.setGroups(s.canvas.graph._groups))}},r=async()=>{let e=o.item,a=s.canvas.graph._groups.find((o=>o.pos[0]==e.info.pos[0]&&o.pos[1]==e.info.pos[1]));a?(a.is_edit=!1,a.title=i.value,await n.setGroups(s.canvas.graph._groups),t.value=!1):t.value=!1};return(o,s)=>{var n,t,a;return y(),_(w,null,[M("div",{class:x("comfyui-easyuse-map-nodes-group"),onClick:u},[M("div",ce,[e.item.children?(y(),_("i",{key:0,class:x(["icon",e.item.info.show_nodes?"pi pi-folder-open":"pi pi-folder"]),style:C({color:e.item.info.color})},null,6)):S("",!0),(null==(n=e.item.info)?void 0:n.is_edit)?(y(),_("div",me,[$(D(B),{ref_key:"modifyRef",ref:l,modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=e=>i.value=e),variant:"outline",size:"small",type:"text",onBlur:r,onKeydown:[V(r,["enter"]),V(r,["esc"])],style:{width:"100%"}},null,8,["modelValue"])])):(y(),_("div",ve,[M("span",null,k(e.item.info.title),1)]))]),M("div",he,[(null==(t=e.item.children)?void 0:t.length)>0?(y(),N(D(R),{key:0,size:"small",icon:e.item.children.find((e=>e.mode==D(d).ALWAYS))?"pi pi-eye":"pi pi-eye-slash",text:"",rounded:"",severity:"secondary",onClick:s[1]||(s[1]=H((e=>o.$emit("changeMode")),["stop"])),onMousedown:s[2]||(s[2]=H((e=>o.$emit("mousedown")),["stop"])),onMouseup:s[3]||(s[3]=H((e=>o.$emit("mouseup")),["stop"]))},null,8,["icon"])):S("",!0)])]),(null==(a=e.item.children)?void 0:a.length)>0&&e.item.info.show_nodes?(y(),_("div",ge,[G(o.$slots,"default")])):S("",!0)],64)}}},ye={__name:"tree",props:{item:Object,index:Number,showGroupOnly:Boolean},emits:["dragstart","dragend","dragover","contextmenu","changeGroupMode","changeNodeMode","mousedown","mouseup"],setup:e=>(o,s)=>{var n,t,a,l;const i=z("Tree",!0);return y(),_("li",{onDragstart:s[10]||(s[10]=s=>o.$emit("dragstart",s,e.index)),onDragend:s[11]||(s[11]=s=>o.$emit("dragend",s,e.index)),onDragover:s[12]||(s[12]=s=>o.$emit("dragover",s,e.index)),draggable:!0,onContextmenu:s[13]||(s[13]=H((s=>o.$emit("contextmenu",s,e.item)),["stop"]))},[(null==(n=e.item.children)?void 0:n.length)||(null==(a=null==(t=e.item)?void 0:t.info)?void 0:a.sub_groups)?(y(),N(fe,{key:0,item:e.item,onChangeMode:s[4]||(s[4]=s=>o.$emit("changeGroupMode",e.item)),onMousedown:s[5]||(s[5]=s=>o.$emit("mousedown",e.item,"group")),onMouseup:s[6]||(s[6]=e=>o.$emit("mouseup"))},{default:E((()=>[M("ol",null,[(y(!0),_(w,null,b(e.item.children,((n,t)=>(y(),N(i,{key:t,item:n,index:t,showGroupOnly:e.showGroupOnly,onDragstart:e=>o.$emit("dragstart",e,t),onDragend:e=>o.$emit("dragend",e,t),onDragover:e=>o.$emit("dragover",e,t),onContextmenu:e=>o.$emit("contextmenu",e,n),onChangeGroupMode:s[0]||(s[0]=e=>o.$emit("changeGroupMode",e)),onChangeNodeMode:s[1]||(s[1]=e=>o.$emit("changeNodeMode",e)),onMousedown:s[2]||(s[2]=e=>o.$emit("mousedown",e[0],e[1])),onMouseup:s[3]||(s[3]=e=>o.$emit("mouseup"))},null,8,["item","index","showGroupOnly","onDragstart","onDragend","onDragover","onContextmenu"])))),128))])])),_:1},8,["item"])):e.showGroupOnly?S("",!0):(y(),N(pe,{key:1,node:(null==(l=e.item)?void 0:l.info)||e.item,onChangeMode:s[7]||(s[7]=s=>{var n;return o.$emit("changeNodeMode",(null==(n=e.item)?void 0:n.info)||e.item)}),onMousedown:s[8]||(s[8]=s=>{var n;return o.$emit("mousedown",(null==(n=e.item)?void 0:n.info)||e.item,"node")}),onMouseup:s[9]||(s[9]=e=>o.$emit("mouseup"))},null,8,["node"]))],32)}},_e={class:"title"},we={class:"toolbar"},be={key:0},xe={key:1},Me={key:2,class:"no_result",style:{height:"100%"}},ke="comfyui-easyuse-map-nodes",Ce={__name:"nodesMap",emits:["handleHeader"],setup(e){const o=a(),{groups_nodes:n,groups:t,nodes:p}=O(o),c=A((e=>l("EasyUse.NodesMap.DisplayGroupOnly"))),m=g(!1),v=e=>{m.value=!m.value,s.canvas.graph._groups.forEach((e=>{e.show_nodes=m.value})),o.setGroups(s.canvas.graph._groups)},h=g(""),f=A((e=>(null==p?void 0:p.value.filter((e=>{var o,s,n,t;return(null==(s=null==(o=e.id)?void 0:o.toString())?void 0:s.includes(h.value))||(null==(n=e.type)?void 0:n.includes(h.value))||(null==(t=e.title)?void 0:t.includes(h.value))})))||[])),C=g(null),V=g(!1),z=A((()=>V.value?[{label:u("Jump to this node"),icon:"pi pi-arrow-circle-right",visible:!0,command:()=>j(U.value)},{label:u("Rename node"),icon:"pi pi-file-edit",visible:!0,command:()=>Y(U.value)},{label:u("Delete node"),icon:"pi pi-trash",command:()=>q(U.value),visible:!0}]:[{label:u("Rename group"),icon:"pi pi-file-edit",visible:!0,command:()=>K(U.value)},{label:u("Delete group"),icon:"pi pi-trash",command:()=>X(U.value),visible:!0}])),U=g(null),L=(e,o)=>{U.value=o,V.value=!o.children,C.value.show(e)},j=e=>{i((null==e?void 0:e.info)?e.info.id:e.id)},Y=e=>{e.info?e.info.is_edit=!0:e.is_edit=!0},q=e=>{const n=e.info?e.info.id:e.id;s.canvas.graph.beforeChange(),s.canvas.graph._nodes.splice(s.canvas.graph._nodes.findIndex((e=>e.id==n)),1),s.canvas.graph.afterChange(),s.canvas.setDirty(!0,!0),o.setNodes(s.canvas.graph._nodes)},K=e=>{e.info.is_edit=!0},X=e=>{s.canvas.graph.beforeChange(),s.canvas.graph._groups.splice(s.canvas.graph._groups.findIndex((o=>o.id==e.info.id)),1),s.canvas.graph.afterChange(),s.canvas.setDirty(!0,!0),o.setGroups(s.canvas.graph._groups)};let J,Q=0,Z=0,ee=!1;const oe=(e,n=!1)=>{if(ee)return void(ee=!1);const t=e.children.find((e=>e.mode==d.ALWAYS)),a=e.children.map((e=>e.id));s.canvas.graph._nodes.forEach((e=>{a.includes(e.id)&&(e.mode=t?n?d.NEVER:d.BYPASS:d.ALWAYS,s.graph.change())})),o.setNodes(s.canvas.graph._nodes)},se=(e,n=!1)=>{if(ee)return void(ee=!1);const t=e.mode==d.ALWAYS,a=s.canvas.graph._nodes.find((o=>o.id==e.id));a&&(a.mode=t?n?d.NEVER:d.BYPASS:d.ALWAYS,s.graph.change(),o.setNodes(s.canvas.graph._nodes))},ne=(e,o="group")=>{Q=(new Date).getTime(),clearTimeout(J),J=setTimeout((s=>{"group"==o?oe(e,!0):se(e,!0)}),500)},te=e=>{Z=(new Date).getTime(),Z-Q>500&&(ee=!0),clearTimeout(J)};let ae=g(null),ie=g(null);g(!1);const de=(e,o)=>{ae.value=o,e.currentTarget.style.opacity="0.6",e.currentTarget.style.border="1px dashed yellow",e.dataTransfer.effectAllowed="move"},ue=(e,n)=>{e.target.style.opacity="1",e.currentTarget.style.border="1px dashed transparent";if("Manual drag&drop sorting"!==l("EasyUse.NodesMap.Sorting"))return void r.warn(u("For drag and drop sorting, please find Nodes map sorting mode in Settings->EasyUse and change it to manual"));let t=s.canvas.graph._groups,a=t[ae.value],i=t[ie.value];s.canvas.graph._groups[ae.value]=i,s.canvas.graph._groups[ie.value]=a,o.setGroups(s.canvas.graph._groups)},re=(e,o)=>{e.preventDefault(),e.currentIndex!=ae.value&&(ie.value=o)};return(e,o)=>{var s,a,l;return y(),_("div",{class:x(ke)},[M("div",{class:x(ke+"__header"),onMousedown:o[0]||(o[0]=o=>e.$emit("handleHeader",o))},[M("div",_e,k(D(u)("NODES MAP")),1),M("div",we,[(null==(s=D(t))?void 0:s.length)>0?T((y(),N(D(R),{key:0,icon:m.value?"pi pi-angle-double-down":"pi pi-angle-double-up",text:"",rounded:"",severity:"secondary",onClick:H(v,["stop"]),size:"small"},null,8,["icon"])),[[D(P),m.value?D(u)("Collapse All"):D(u)("Expand All"),void 0,{top:!0}]]):S("",!0),G(e.$slots,"icon")])],34),M("div",{class:x(ke+"__content")},[M("div",{class:x(ke+"__content-searchbox")},[$(D(W),null,{default:E((()=>[$(D(B),{class:"search-box-input",modelValue:h.value,"onUpdate:modelValue":o[1]||(o[1]=e=>h.value=e),placeholder:D(u)("Search by Node ID/Name..."),variant:"outlined",style:{width:"100%"}},null,8,["modelValue","placeholder"]),h.value?(y(),N(D(I),{key:1,class:"pi pi-times",onClick:o[2]||(o[2]=e=>h.value="")})):(y(),N(D(I),{key:0,class:"pi pi-search"}))])),_:1})],2),(null==(a=f.value)?void 0:a.length)>0&&h.value?(y(),_("ul",be,[(y(!0),_(w,null,b(f.value,((e,o)=>(y(),_("li",{key:o},[$(pe,{node:e,onChangeMode:o=>se(e),onMousedown:o=>ne(e,"node"),onMouseup:te},null,8,["node","onChangeMode","onMousedown"])])))),128))])):(null==(l=D(n))?void 0:l.length)>0&&!h.value?(y(),_("ul",xe,[(y(!0),_(w,null,b(D(n),((e,o)=>(y(),N(ye,{key:o,item:e,index:o,showGroupOnly:c.value,onDragstart:de,onDragend:ue,onDragover:re,onContextmenu:L,onChangeGroupMode:oe,onChangeNodeMode:se,onMousedown:ne,onMouseup:te},null,8,["item","index","showGroupOnly"])))),128))])):(y(),_("div",Me,[$(le,{icon:"pi pi-sitemap",title:D(u)("No Nodes",!0),message:h.value?D(u)("No nodes found in the search"):D(u)("No nodes found in the map",!0)},null,8,["title","message"])]))],2),$(D(F),{ref_key:"menuRef",ref:C,model:z.value,autoZIndex:!1,appendTo:"self"},null,8,["model"])])}}},Se="comfyui-easyuse-toolbar",Ne={__name:"index",setup(e){const o=a(),s=g(!1);h((e=>s.value),(e=>{e?o.watchGraph(!0):o.unwatchGraph()}));const n=g(null),t=e=>{const o=n.value;var s=e.clientX||0,t=e.clientY||0,a=o.offsetLeft,l=o.offsetTop;function i(e){var n=e.clientX,i=e.clientY,d=n-s,u=i-t;o.style.left=a+d+"px",o.style.top=l+u+"px"}document.addEventListener("mousemove",i),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)}))};return(e,o)=>(y(),_(w,null,[M("div",{class:x(["flex-c",Se])},[M("div",{class:x(["group flex-c",Se+"-icon"]),onClick:o[0]||(o[0]=e=>s.value=!s.value)},o[3]||(o[3]=[M("svg",{class:"icon",t:"1714565543756",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"22538",width:"200",height:"200"},[M("path",{d:"M871.616 64H152.384c-31.488 0-60.416 25.28-60.416 58.24v779.52c0 32.896 26.24 58.24 60.352 58.24h719.232c34.112 0 60.352-25.344 60.352-58.24V122.24c0.128-32.96-28.8-58.24-60.288-58.24zM286.272 512c-23.616 0-44.672-20.224-44.672-43.008 0-22.784 20.992-43.008 44.608-43.008 23.616 0 44.608 20.224 44.608 43.008A43.328 43.328 0 0 1 286.272 512z m0-202.496c-23.616 0-44.608-20.224-44.608-43.008 0-22.784 20.992-43.008 44.608-43.008 23.616 0 44.608 20.224 44.608 43.008a43.456 43.456 0 0 1-44.608 43.008zM737.728 512H435.904c-23.68 0-44.672-20.224-44.672-43.008 0-22.784 20.992-43.008 44.608-43.008h299.264c23.616 0 44.608 20.224 44.608 43.008a42.752 42.752 0 0 1-41.984 43.008z m0-202.496H435.904c-23.616 0-44.608-20.224-44.608-43.008 0-22.784 20.992-43.008 44.608-43.008h299.264c23.616 0 44.608 20.224 44.608 43.008a42.88 42.88 0 0 1-42.048 43.008z","p-id":"22539",fill:"currentColor"})],-1)]),2),M("div",{class:x(["rocket flex-c",Se+"-icon"]),onClick:o[1]||(o[1]=(...e)=>D(p)&&D(p)(...e))},o[4]||(o[4]=[M("svg",{class:"icon",t:"1714565020764",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7999",width:"200",height:"200"},[M("path",{d:"M810.438503 379.664884l-71.187166-12.777183C737.426025 180.705882 542.117647 14.602496 532.991087 7.301248c-12.777184-10.951872-32.855615-10.951872-47.45811 0-9.12656 7.301248-204.434938 175.229947-206.26025 359.586453l-67.536542 10.951871c-18.253119 3.650624-31.030303 18.253119-31.030303 36.506239v189.832442c0 10.951872 5.475936 21.903743 12.777184 27.379679 7.301248 5.475936 14.602496 9.12656 23.729055 9.12656h5.475936l133.247772-23.729055c40.156863 47.458111 91.265597 73.012478 151.500891 73.012477 60.235294 0 111.344029-27.379679 151.500891-74.837789l136.898396 23.729055h5.475936c9.12656 0 16.427807-3.650624 23.729055-9.12656 9.12656-7.301248 12.777184-16.427807 12.777184-27.379679V412.520499c1.825312-14.602496-10.951872-29.204991-27.379679-32.855615zM620.606061 766.631016H401.568627c-20.078431 0-36.506239 16.427807-36.506238 36.506239v109.518716c0 14.602496 9.12656 29.204991 23.729055 34.680927 14.602496 5.475936 31.030303 1.825312 40.156863-9.126559l16.427807-18.25312 32.855615 80.313726c5.475936 14.602496 18.253119 23.729055 34.680927 23.729055 16.427807 0 27.379679-9.12656 34.680927-23.729055l32.855615-80.313726 16.427807 18.25312c10.951872 10.951872 25.554367 14.602496 40.156863 9.126559 14.602496-5.475936 23.729055-18.253119 23.729055-34.680927v-109.518716c-3.650624-20.078431-20.078431-36.506239-40.156862-36.506239z",fill:"currentColor","p-id":"8000"})],-1)]),2)]),s.value?(y(),_("div",{key:0,ref_key:"nodesMapRef",ref:n,class:x(Se+"-nodes-map")},[$(Ce,{onHandleHeader:t},{icon:E((()=>[T($(D(R),{icon:"pi pi-times",text:"",rounded:"",severity:"secondary",onClick:o[2]||(o[2]=e=>s.value=!1),size:"small"},null,512),[[D(P),D(u)("Close"),void 0,{top:!0}]])])),_:1})],2)):S("",!0)],64))}},De={__name:"index",setup(e){const o=a();return f((e=>{o.watchGraph()})),(e,o)=>(y(),_("div",{class:x("comfyui-easyuse-map")},[$(Ce)]))}},$e="Comfy.UseNewMenu",Ee={__name:"App",setup(e){const o=g(null);return f((e=>{try{(async()=>{l("EasyUse.NodesMap.Enable",null)&&s.extensionManager.registerSidebarTab({id:c,icon:"pi pi-sitemap",title:u("NodesMap",!0),tooltip:u("NodesMap",!0),type:"custom",render:e=>{e.style.height="100%",U(L(De,{}),e)}});const e=await m.fetchApi("/easyuse/version");if(200===e.status){let o=await e.json();o.version&&s.registerExtension({name:"EasyUse Version",aboutPageBadges:[{label:"EasyUse v"+o.version,url:"https://github.com/yolain/ComfyUI-Easy-Use",icon:"pi pi-github"}]})}o.value=l($e),v($e,(e=>{o.value=e}))})()}catch(n){}})),(e,s)=>(y(),_(w,null,[$(se),s[0]||(s[0]=M("img",{id:"easyuse-model-thumbnail"},null,-1)),"Disabled"==o.value?(y(),N(Ne,{key:0})):S("",!0)],64))}},Ae=null==(e=document.getElementsByClassName("graph-canvas-container"))?void 0:e[0],Ve=document.createElement("div");Ve.id="comfyui-easyuse-components",Ae?Ae.append(Ve):document.body.append(Ve);const He=j(Ee);He.use(X),He.use(q()),He.mount("#"+Ve.id);