Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- ComfyUI_INSTARAW/__init__.pyAdded+40
- ComfyUI_INSTARAW/__pycache__/__init__.cpython-310.pycAdded
- ComfyUI_INSTARAW/js/advanced_image_loader.cssAdded+760
- ComfyUI_INSTARAW/js/advanced_image_loader.jsAdded
- ComfyUI_INSTARAW/js/api_model_selector.jsAdded+45
- ComfyUI_INSTARAW/js/api_nodes.jsAdded+53
- ComfyUI_INSTARAW/js/batch_image_generator.jsAdded
- ComfyUI_INSTARAW/js/boolean_bypass.jsAdded+90
- ComfyUI_INSTARAW/js/branding_node.jsAdded+91
- ComfyUI_INSTARAW/js/ding.mp3Added
- ComfyUI_INSTARAW/js/filter.cssAdded+106
- ComfyUI_INSTARAW/js/floating_window.cssAdded+94
- ComfyUI_INSTARAW/js/floating_window.jsAdded+63
- ComfyUI_INSTARAW/js/group_bypass_detector.jsAdded+42
- ComfyUI_INSTARAW/js/image_filter.jsAdded+123
- ComfyUI_INSTARAW/js/instaraw.svgAdded
- ComfyUI_INSTARAW/js/log.jsAdded+25
- ComfyUI_INSTARAW/js/mask_utils.jsAdded+79
- ComfyUI_INSTARAW/js/nano_banana_aspect_ratio.jsAdded+130
- ComfyUI_INSTARAW/js/popup.jsAdded+1238
- ComfyUI_INSTARAW/js/reality_prompt_generator.cssAdded+2841
- ComfyUI_INSTARAW/js/reality_prompt_generator.jsAdded
- ComfyUI_INSTARAW/js/shared/combo-cards.jsAdded+64
- ComfyUI_INSTARAW/js/utils.jsAdded+9
- ComfyUI_INSTARAW/js/zoomed.cssAdded+61
- ComfyUI_INSTARAW/modules/__init__.pyAdded
- ComfyUI_INSTARAW/modules/__pycache__/__init__.cpython-310.pycAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_12.iccAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_12.jsonAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_13_pro.iccAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_13_pro.jsonAdded+1095
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_14_plus.iccAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_14_plus.jsonAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_14_pro_max.iccAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_14_pro_max.jsonAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_15_pro_max.iccAdded
- ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_15_pro_max.jsonAdded
- ComfyUI_INSTARAW/modules/color_profiles/sRGB_IEC61966-2-1_no_black_scaling.iccAdded
- ComfyUI_INSTARAW/modules/detection_bypass/__init__.pyAdded
- ComfyUI_INSTARAW/modules/detection_bypass/__pycache__/__init__.cpython-310.pycAdded
- ComfyUI_INSTARAW/modules/detection_bypass/__pycache__/camera_pipeline.cpython-310.pycAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/DJI_O3AirUnit_CineonFilmLog_minimal_natural_sunrise_snow_forest_glow_1.DJI_0064_stabilized_4.cubeAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/KORNEV_LUT_HLG_3.cubeAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/LOOK1.cubeAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/LOW_SAT_-_Braw_Vivid_Ludeman_LUT.cubeAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/Shibuya_01.cubeAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/experimento.cubeAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/interview-cool_17.C0003.cubeAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/natural_look.cubeAdded
- ComfyUI_INSTARAW/modules/detection_bypass/_luts/ntrl_2.A054_06130550_C013.cubeAdded
12345678910111213141516171819202122232425262728293031323334353637383940"""
ComfyUI INSTARAW
A general-purpose custom nodes package by Instara
INSTARAW is a collection of powerful custom nodes for ComfyUI that brings together
hard-to-install dependencies and integrations in one convenient package.
Features:
- API Integrations: SeeDream, Ideogram, and more
- Easy Installation: Pre-packaged dependencies
- Modular Design: Easy to extend and customize
- INSTARAW Brand: Where we push the boundaries
Created by Instara
"""
import os
import nodes
# This line is critical for loading the JavaScript and CSS files.
# It tells ComfyUI where to find the web assets for this extension.
if "ComfyUI_INSTARAW" not in nodes.EXTENSION_WEB_DIRS:
nodes.EXTENSION_WEB_DIRS["ComfyUI_INSTARAW"] = os.path.join(os.path.dirname(os.path.realpath(__file__)), "js")
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
# Import creative API to register endpoints (after nodes are loaded)
try:
from .nodes.api_nodes import creative_api
except Exception as e:
print(f"[INSTARAW] Warning: Could not load creative_api: {e}")
print("[INSTARAW] Creative/Character generation features will not be available.")
# Required exports for ComfyUI
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
# Package metadata
__version__ = "1.2.0" # Version bumped to reflect the major addition
__author__ = "Instara"
__description__ = "INSTARAW - General purpose custom nodes for ComfyUI"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760/* ---
// Filename: ../ComfyUI_INSTARAW/js/advanced_image_loader.css
// --- */
.instaraw-adv-loader-container {
background: #0d0f12;
padding: 16px;
border-radius: 4px;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
/* Brand Row */
.instaraw-adv-loader-brand-row {
position: relative;
display: inline-flex;
align-items: center;
margin-bottom: 12px;
}
.instaraw-adv-loader-logo {
width: 140px;
height: auto;
opacity: 0.85;
}
.instaraw-adv-loader-version {
position: absolute;
right: 0;
top: 50%;
transform: translate(122%, -50%);
font-family: monospace;
font-size: 14px;
color: rgba(255, 255, 255, 0.5);
white-space: nowrap;
}
/* Top Bar - Mode + Stats */
.instaraw-adv-loader-topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
padding: 10px 12px;
background: rgba(255, 255, 255, 0.04);
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.08);
}
.instaraw-adv-loader-topbar-left {
display: flex;
align-items: center;
gap: 10px;
}
.instaraw-adv-loader-topbar-right {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: rgba(249, 250, 251, 0.7);
}
.instaraw-adv-loader-separator {
color: rgba(255, 255, 255, 0.3);
}
.instaraw-adv-loader-mode-select {
display: flex;
align-items: center;
}
.instaraw-adv-loader-progress-badge {
font-size: 11px;
color: #818cf8;
font-weight: 600;
background: rgba(129, 140, 248, 0.15);
padding: 4px 8px;
border-radius: 4px;
}
/* Mode Badge */
.instaraw-adv-loader-mode-badge {
padding: 6px 12px;
border-radius: 4px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.5px;
text-transform: uppercase;
}
.instaraw-adv-loader-mode-txt2img {
background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
color: #ffffff;
border: 2px solid #a78bfa;
}
.instaraw-adv-loader-mode-img2img {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
color: #ffffff;
border: 2px solid #60a5fa;
}
.instaraw-adv-loader-mode-selector {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 16px;
padding: 12px;
background: rgba(255, 255, 255, 0.03);
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.06);
}
.instaraw-adv-loader-mode-selector label {
color: rgba(249, 250, 251, 0.7);
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
}
.instaraw-adv-loader-mode-dropdown {
background: rgba(255, 255, 255, 0.05);
color: #f9fafb;
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 6px 10px;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
font-weight: 500;
outline: none;
}
.instaraw-adv-loader-mode-dropdown:hover {
background: rgba(255, 255, 255, 0.08);
border-color: #818cf8;
transition: none;
}
.instaraw-adv-loader-mode-dropdown:focus {
border-color: #a78bfa;
}
.instaraw-adv-loader-queue-all-btn {
background: #7c3aed;
color: #ffffff;
border: none;
padding: 10px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-queue-all-btn:hover {
background: #6d28d9;
transition: none;
}
.instaraw-adv-loader-add-latent-btn {
background: #059669;
color: #ffffff;
border: none;
padding: 10px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-add-latent-btn:hover {
background: #047857;
transition: none;
}
.instaraw-adv-loader-batch-add-btn {
background: #059669;
color: #ffffff;
border: none;
padding: 10px 14px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-batch-add-btn:hover {
background: #047857;
transition: none;
}
.instaraw-adv-loader-batch-add-controls {
display: flex;
align-items: center;
gap: 4px;
}
.instaraw-adv-loader-batch-count-input {
width: 50px;
padding: 9px 8px;
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 4px;
background: rgba(255, 255, 255, 0.05);
color: #f9fafb;
font-size: 13px;
text-align: center;
}
.instaraw-adv-loader-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.instaraw-adv-loader-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 12px;
}
.instaraw-adv-loader-upload-btn {
background: #6366f1;
color: #ffffff;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-upload-btn:hover {
background: #4f46e5;
transition: none;
}
.instaraw-adv-loader-upload-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.instaraw-adv-loader-delete-all-btn {
background: #dc2626;
color: #ffffff;
border: none;
padding: 10px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-delete-all-btn:hover {
background: #ef4444;
transition: none;
}
.instaraw-adv-loader-duplicate-btn {
background: #374151;
color: #ffffff;
border: none;
padding: 10px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-duplicate-btn:hover {
background: #4b5563;
transition: none;
}
.instaraw-adv-loader-sync-btn {
background: #4f46e5;
color: #ffffff;
border: none;
padding: 10px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-sync-btn:hover {
background: #6366f1;
transition: none;
}
.instaraw-adv-loader-stats {
display: flex;
align-items: center;
gap: 16px;
color: #f9fafb;
font-size: 12px;
}
.instaraw-adv-loader-count {
font-weight: 600;
color: rgba(249, 250, 251, 0.9);
}
.instaraw-adv-loader-total {
font-weight: 500;
color: rgba(167, 139, 250, 0.9);
}
.instaraw-adv-loader-progress {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
background: rgba(167, 139, 250, 0.08);
border-radius: 4px;
margin-bottom: 16px;
border: 1px solid rgba(167, 139, 250, 0.2);
}
.instaraw-adv-loader-progress .instaraw-adv-loader-progress-label {
color: rgba(249, 250, 251, 0.7);
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
}
.instaraw-adv-loader-progress .instaraw-adv-loader-progress-value {
color: #a78bfa;
font-size: 16px;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.instaraw-adv-loader-gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 12px;
min-height: 120px;
overflow: visible;
position: relative;
}
.instaraw-adv-loader-empty {
grid-column: 1 / -1;
text-align: center;
padding: 48px 24px;
background: rgba(255, 255, 255, 0.02);
border-radius: 4px;
border: 1px dashed rgba(167, 139, 250, 0.2);
}
.instaraw-adv-loader-empty p {
margin: 8px 0;
color: rgba(249, 250, 251, 0.7);
font-size: 13px;
font-weight: 500;
}
.instaraw-adv-loader-empty .instaraw-adv-loader-hint {
font-size: 12px;
color: rgba(129, 140, 248, 0.6);
font-weight: 400;
}
.instaraw-adv-loader-item {
background: rgba(255, 255, 255, 0.04);
border-radius: 4px;
overflow: hidden;
cursor: move;
position: relative;
border: 2px solid rgba(255, 255, 255, 0.08);
}
.instaraw-adv-loader-item:hover {
border-color: rgba(99, 102, 241, 0.5);
transition: none;
}
.instaraw-adv-loader-item-active {
border-color: #a78bfa !important;
background: rgba(167, 139, 250, 0.08);
}
.instaraw-adv-loader-item-processing {
border-color: #10b981 !important;
background: rgba(16, 185, 129, 0.08);
}
.instaraw-adv-loader-item-done {
opacity: 0.5;
}
.instaraw-adv-loader-index-badge {
position: absolute;
top: 8px;
left: 8px;
background: #6366f1;
color: #ffffff;
padding: 4px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
z-index: 10;
}
.instaraw-adv-loader-processing-indicator {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #10b981;
color: #ffffff;
padding: 8px 16px;
border-radius: 4px;
font-size: 11px;
font-weight: 600;
z-index: 10;
}
.instaraw-adv-loader-active-indicator {
position: absolute;
top: 8px;
right: 8px;
background: #7c3aed;
color: #ffffff;
padding: 4px 10px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
z-index: 10;
}
.instaraw-adv-loader-done-indicator {
position: absolute;
top: 8px;
right: 8px;
background: #10b981;
color: #ffffff;
width: 24px;
height: 24px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
z-index: 10;
}
.instaraw-adv-loader-item.instaraw-adv-loader-drop-before::before {
content: '';
position: absolute;
top: -7px;
left: 0;
right: 0;
height: 4px;
background: #a78bfa;
border-radius: 2px;
z-index: 1000;
pointer-events: none;
}
.instaraw-adv-loader-item.instaraw-adv-loader-drop-after::after {
content: '';
position: absolute;
bottom: -7px;
left: 0;
right: 0;
height: 4px;
background: #a78bfa;
border-radius: 2px;
z-index: 1000;
pointer-events: none;
}
.instaraw-adv-loader-thumb {
width: 100%;
height: 140px;
overflow: hidden;
background: #000000;
position: relative;
}
.instaraw-adv-loader-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.instaraw-adv-loader-controls {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
background: rgba(0, 0, 0, 0.3);
border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.instaraw-adv-loader-controls label {
color: rgba(249, 250, 251, 0.6);
font-size: 11px;
font-weight: 500;
}
.instaraw-adv-loader-repeat-input {
width: 55px;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f9fafb;
padding: 6px;
border-radius: 4px;
text-align: center;
font-size: 12px;
font-weight: 600;
outline: none;
}
.instaraw-adv-loader-repeat-input:hover {
background: rgba(255, 255, 255, 0.08);
border-color: #818cf8;
transition: none;
}
.instaraw-adv-loader-repeat-input:focus {
border-color: #a78bfa;
}
.instaraw-adv-loader-delete-btn {
margin-left: auto;
background: #ef4444;
color: #ffffff;
border: none;
width: 28px;
height: 28px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 14px;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
}
.instaraw-adv-loader-delete-btn:hover {
background: #dc2626;
transition: none;
}
.instaraw-adv-loader-info {
padding: 8px 10px;
font-size: 11px;
background: rgba(0, 0, 0, 0.2);
border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.instaraw-adv-loader-info .instaraw-adv-loader-filename {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 4px;
color: rgba(249, 250, 251, 0.9);
font-weight: 500;
line-height: 1.3;
}
.instaraw-adv-loader-info .instaraw-adv-loader-dimensions {
color: #818cf8;
font-size: 11px;
font-weight: 600;
}
/* ===== Txt2Img Mode Styles ===== */
/* Batch add controls */
.instaraw-adv-loader-batch-add-controls {
display: inline-flex;
align-items: center;
gap: 6px;
}
.instaraw-adv-loader-batch-count-input {
width: 54px;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f9fafb;
padding: 8px;
border-radius: 4px;
text-align: center;
font-size: 12px;
font-weight: 600;
outline: none;
}
.instaraw-adv-loader-batch-count-input:hover {
background: rgba(255, 255, 255, 0.08);
border-color: #818cf8;
transition: none;
}
.instaraw-adv-loader-batch-count-input:focus {
border-color: #a78bfa;
}
.instaraw-adv-loader-batch-add-btn {
background: #8b5cf6;
color: #ffffff;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
white-space: nowrap;
}
.instaraw-adv-loader-batch-add-btn:hover {
background: #7c3aed;
transition: none;
}
.instaraw-adv-loader-add-latent-btn {
background: #8b5cf6;
color: #ffffff;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-add-latent-btn:hover {
background: #7c3aed;
transition: none;
}
/* Empty latent placeholder */
.instaraw-adv-loader-latent-thumb {
width: 100%;
height: 140px;
overflow: hidden;
position: relative;
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
}
.instaraw-adv-loader-latent-aspect {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
color: #ffffff;
}
.instaraw-adv-loader-latent-aspect-icon {
font-size: 24px;
opacity: 0.9;
}
.instaraw-adv-loader-latent-aspect-label {
font-size: 13px;
font-weight: 600;
opacity: 0.95;
background: rgba(0, 0, 0, 0.2);
padding: 4px 10px;
border-radius: 4px;
}
.instaraw-adv-loader-latent-id {
position: absolute;
bottom: 8px;
left: 8px;
background: rgba(0, 0, 0, 0.5);
color: rgba(255, 255, 255, 0.8);
padding: 4px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 500;
font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
}
.instaraw-adv-loader-latent-resolution {
color: #c4b5fd;
font-size: 11px;
font-weight: 600;
}
/* Aspect ratio preview box */
.instaraw-adv-loader-aspect-preview {
max-width: 80%;
max-height: 80%;
background: rgba(255, 255, 255, 0.1);
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
padding: 12px;
}
.instaraw-adv-loader-aspect-content {
text-align: center;
color: white;
}
/* === Drag and Drop File Upload Visual Feedback === */
.instaraw-adv-loader-drag-over {
position: relative;
outline: 3px dashed #60a5fa !important;
outline-offset: -3px !important;
background: rgba(59, 130, 246, 0.1) !important;
box-shadow: 0 0 20px rgba(59, 130, 246, 0.3) !important;
}
.instaraw-adv-loader-drag-over::before {
content: "📁 Drop images here to upload";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(59, 130, 246, 0.95);
color: white;
padding: 20px 40px;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
z-index: 1000;
pointer-events: none;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
border: 2px solid rgba(255, 255, 255, 0.3);
}
/* ===== Selection Mode Styles ===== */
.instaraw-adv-loader-select-all-btn,
.instaraw-adv-loader-deselect-all-btn,
.instaraw-adv-loader-cancel-selection-btn,
.instaraw-adv-loader-enter-selection-btn {
background: #374151;
color: #ffffff;
border: none;
padding: 10px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-select-all-btn:hover,
.instaraw-adv-loader-deselect-all-btn:hover,
.instaraw-adv-loader-cancel-selection-btn:hover,
.instaraw-adv-loader-enter-selection-btn:hover {
background: #4b5563;
transition: none;
}
.instaraw-adv-loader-delete-selected-btn {
background: #dc2626;
color: #ffffff;
border: none;
padding: 10px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-adv-loader-delete-selected-btn:hover {
background: #ef4444;
transition: none;
}
.instaraw-adv-loader-delete-selected-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Selection checkbox in card */
.instaraw-adv-loader-selection-checkbox {
position: absolute;
top: 8px;
left: 8px;
z-index: 20;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.instaraw-adv-loader-image-checkbox {
width: 22px;
height: 22px;
cursor: pointer;
accent-color: #8b5cf6;
}
/* Selection mode item styling */
.instaraw-adv-loader-item-selection {
cursor: pointer;
}
.instaraw-adv-loader-item-selection:hover {
border-color: #8b5cf6;
transition: none;
}
.instaraw-adv-loader-item-selected {
border-color: #8b5cf6 !important;
background: rgba(139, 92, 246, 0.15);
}
.instaraw-adv-loader-item-selection .instaraw-adv-loader-controls {
opacity: 0.5;
pointer-events: none;
}123456789101112131415161718192021222324252627282930313233343536373839404142434445import { app } from '../../scripts/app.js';
import { ComfyWidgets } from '../../scripts/widgets.js';
app.registerExtension({
name: 'Comfy.INSTARAW.APIModelSelector',
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeData.name === 'INSTARAW_API_ModelSelector') {
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function () {
onNodeCreated?.apply(this, arguments);
// Create the warning widget for this node
const warningWidget = ComfyWidgets["STRING"](this, "unreliable_provider_warning", ["STRING", { multiline: true }], app).widget;
warningWidget.inputEl.readOnly = true;
warningWidget.inputEl.style.backgroundColor = '#442222';
warningWidget.inputEl.style.color = '#FFCCCC';
warningWidget.inputEl.style.opacity = '0.8';
warningWidget.value = '⚠️ For this model, the fal.ai provider is unreliable for Image-to-Image (Edit) tasks. wavespeed.ai recommended.';
warningWidget.hidden = true; // Initially hidden
const modelWidget = this.widgets.find((w) => w.name === 'model');
if (modelWidget) {
const originalCallback = modelWidget.callback;
// Add our logic to the dropdown's callback
modelWidget.callback = (value) => {
originalCallback?.(value);
this.updateWarningWidget();
};
}
// Add a function to the node to update the widget
this.updateWarningWidget = () => {
const isProblematic = (modelWidget.value === 'Nano Banana');
warningWidget.hidden = !isProblematic;
this.computeSize();
this.setDirtyCanvas(true, true);
};
// Run once on creation to set the initial state
setTimeout(() => this.updateWarningWidget(), 1);
};
}
},
});1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253import { app } from '../../scripts/app.js';
const _al = Array.isArray([]);
app.registerExtension({
name: 'Comfy.INSTARAW.DynamicAPINodes',
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeData.name === 'INSTARAW_APITextToImage' || nodeData.name === 'INSTARAW_APIImageToImage') {
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function () {
onNodeCreated?.apply(this, arguments);
this.last_model = null; // Cache property
};
const onDrawForeground = nodeType.prototype.onDrawForeground;
nodeType.prototype.onDrawForeground = function(ctx) {
onDrawForeground?.apply(this, arguments);
const modelInput = this.inputs?.find((i) => i.name === 'model');
let current_model = null;
if (modelInput && modelInput.link != null) {
const link = app.graph.links[modelInput.link];
if (link) {
const origin_node = app.graph.getNodeById(link.origin_id);
const origin_widget = origin_node?.widgets.find(w => w.name === 'model');
if (origin_widget) current_model = origin_widget.value;
}
}
if (this.last_model === current_model) {
return; // No change, do nothing
}
this.last_model = current_model;
const isSeeDream = current_model?.startsWith('SeeDream');
this.widgets.find(w => w.name === 'width').hidden = !isSeeDream;
this.widgets.find(w => w.name === 'height').hidden = !isSeeDream;
this.widgets.find(w => w.name === 'enable_safety_checker').hidden = !isSeeDream;
const aspectRatioWidget = this.widgets.find(w => w.name === 'aspect_ratio');
if (aspectRatioWidget) {
aspectRatioWidget.hidden = isSeeDream;
}
this.computeSize();
this.setDirtyCanvas(true, true);
};
}
},
});123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990// --- Filename: ../ComfyUI_INSTARAW/js/boolean_bypass.js (FINAL, GROUP-BYPASS-AWARE VERSION) ---
import { app } from "../../scripts/app.js";
const MODE_ALWAYS = 0; // Corresponds to LiteGraph.ALWAYS
const MODE_BYPASS = 4;
app.registerExtension({
name: "Comfy.INSTARAW.BooleanBypass.Final.V4", //
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeData.name === "INSTARAW_BooleanBypass") {
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function () {
onNodeCreated?.apply(this, arguments);
this.lastKnownState = undefined;
};
const onDrawForeground = nodeType.prototype.onDrawForeground;
nodeType.prototype.onDrawForeground = function(ctx) {
onDrawForeground?.apply(this, arguments);
// --- THIS IS THE FIX ---
// If this node itself is currently bypassed (e.g., by a group bypasser),
// we must reset its internal state. This ensures that the next time it becomes
// active, it will perform a full re-sync of its upstream nodes.
if (this.mode !== MODE_ALWAYS) {
this.lastKnownState = undefined;
return; // Do nothing further while bypassed.
}
// --- END FIX ---
// Find all our required widgets and inputs
const booleanWidget = this.widgets.find(w => w.name === 'boolean');
const invertWidget = this.widgets.find(w => w.name === 'invert_input');
const booleanInput = this.inputs.find(i => i.name === 'boolean');
if (!booleanWidget || !invertWidget || !booleanInput) return; // Safety check
// 1. Determine the RAW boolean state from the controller (internal or external)
let rawIsEnabled = false;
if (booleanInput.link != null) {
const link = app.graph.links[booleanInput.link];
const originNode = link && app.graph.getNodeById(link.origin_id);
if (originNode) {
let originWidget = originNode.widgets?.find(w => w.name === (originNode.outputs[link.origin_slot]?.name));
if (!originWidget && originNode.widgets?.length === 1) {
originWidget = originNode.widgets[0];
}
if (originWidget) {
rawIsEnabled = !!originWidget.value;
} else {
rawIsEnabled = originNode.outputs[link.origin_slot]?.value !== undefined ? !!originNode.outputs[link.origin_slot].value : false;
}
}
} else {
rawIsEnabled = booleanWidget.value;
}
// 2. Apply the inversion logic
const shouldInvert = invertWidget.value;
const finalIsEnabled = shouldInvert ? !rawIsEnabled : rawIsEnabled;
// 3. Only proceed if the final state has changed (or if state was just reset)
if (this.lastKnownState === finalIsEnabled) {
return;
}
this.lastKnownState = finalIsEnabled;
// 4. Update UI and apply bypass
booleanWidget.value = rawIsEnabled;
const newMode = finalIsEnabled ? MODE_ALWAYS : MODE_BYPASS;
for (const input of this.inputs) {
if (input.name === 'boolean' || input.name === 'invert_input') continue; // Skip control inputs
if (input.link != null) {
const link = app.graph.links[input.link];
const connectedNode = link && app.graph.getNodeById(link.origin_id);
if (connectedNode) {
connectedNode.mode = newMode;
}
}
}
};
}
},
});12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091import { app } from '../../scripts/app.js';
app.registerExtension({
name: 'Comfy.INSTARAW.BrandingNode', //
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeData.name === 'INSTARAW_BrandingNode') {
// This function is called once when the node is added to the graph.
const onAdded = nodeType.prototype.onAdded;
nodeType.prototype.onAdded = function () {
onAdded?.apply(this, arguments);
this.properties = this.properties || {};
// Set default properties ONLY if they don't already exist.
if (!this.properties.logo_url) {
this.properties.logo_url = 'https://instara.s3.us-east-1.amazonaws.com/INSTARAW_logomark_only.svg';
}
if (this.properties.width == null) {
this.properties.width = 120;
}
if (this.properties.height == null) {
this.properties.height = 105;
}
this.logoImage = new Image();
this.logoImage.onload = () => {
this.setDirtyCanvas(true, false);
};
this.bgcolor = 'transparent';
this.boxcolor = 'transparent';
};
// This function is called every frame to draw the node.
const onDrawForeground = nodeType.prototype.onDrawForeground;
nodeType.prototype.onDrawForeground = function (ctx) {
onDrawForeground?.apply(this, arguments);
// --- THIS IS THE FIX ---
// We no longer force the title to be empty.
// this.title = ""; <-- THIS LINE HAS BEEN REMOVED.
const url = this.properties.logo_url;
if (url && this.logoImage.src !== url) {
this.logoImage.src = url;
}
if (this.size && this.logoImage.complete && this.logoImage.naturalWidth > 0) {
const horizontalPadding = 10;
const verticalPadding = 10; // New: Define vertical padding
const nodeWidth = this.size[0];
const nodeHeight = this.size[1];
// The available area for drawing is now smaller
const drawAreaWidth = nodeWidth - horizontalPadding * 2;
const drawAreaHeight = nodeHeight - verticalPadding * 2; // Changed: Account for top and bottom padding
const imgAspect = this.logoImage.naturalWidth / this.logoImage.naturalHeight;
let drawWidth = drawAreaWidth;
let drawHeight = drawWidth / imgAspect;
if (drawHeight > drawAreaHeight) {
drawHeight = drawAreaHeight;
drawWidth = drawHeight * imgAspect;
}
// The x position calculation remains the same
const x = horizontalPadding + (drawAreaWidth - drawWidth) / 2;
// The y position now starts after the top padding
const y = verticalPadding + (drawAreaHeight - drawHeight) / 2; // Changed: Add the top padding offset
ctx.drawImage(this.logoImage, x, y, drawWidth, drawHeight);
}
};
// This function controls the node's size.
const computeSize = nodeType.prototype.computeSize;
nodeType.prototype.computeSize = function () {
const size = computeSize?.apply(this, arguments);
// Get the size from our properties.
const width = this.properties.width || 120;
const height = this.properties.height || 105;
// Ensure the node is big enough to show the title if it exists.
return [Math.max(size[0], width), height];
};
}
}
});123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106.instaraw_popup {
position: absolute;
width:100%;
height:100%;
background-color: rgba(0, 0, 0, 0.95);
z-index: 100000;
--text_area_height: 0px;
}
.instaraw_popup .grid {
position: absolute;
width:70%;
left:15%;
height:calc(100% - 60px - var(--text_area_height));
top:55px;
display: grid;
justify-items: center;
align-items: center;
}
.instaraw_popup .overlaygrid {
opacity: 0.5;
pointer-events: none;
}
.instaraw_popup .title {
position: absolute;
width:100%;
text-align: center;
top: 10px;
font-size: 250%;
}
.instaraw_popup .tip {
display: block;
padding-top: 10px;
line-height: 20px;
}
.instaraw_popup .buttons {
position: absolute;
width:14%;
left:86%;
height:90%;
top:5%;
font-size: small;
}
.instaraw_popup .control_text:after {
content:"\a";
white-space: pre;
}
.instaraw_popup .grid img {
margin: 2px;
border: 1px solid white;
padding: 4px;
max-width: 100%;
max-height: 100%;
}
.instaraw_popup .grid img.selected {
border: 3px solid green;
padding: 2px;
}
.instaraw_popup .grid img.hover {
box-shadow: 0 0 4px 4px red;
}
.instaraw_popup.hidden {
display:none !important;
}
.instaraw_popup .hidden {
display: none !important;
}
.cgfloat .hidden {
display: none !important;
}
/* --- Interactive Crop Styles --- */
.instaraw_popup .crop_container {
position: absolute;
width: 70%;
left: 15%;
height: calc(100% - 60px);
top: 55px;
display: flex;
justify-content: center;
align-items: center;
user-select: none;
}
.instaraw_popup .crop_image_bg {
max-width: 100%;
max-height: 100%;
object-fit: contain;
pointer-events: none;
}
.instaraw_popup .crop_canvas_overlay {
position: absolute;
cursor: crosshair;
}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
.cgfloat {
position: absolute;
z-index: 999999;
border: 1px solid black;
background-color: rgba(95, 158, 160, 0.713);
width: fit-content;
}
.cgfloat.hidden {
display:none
}
.cgfloat_header {
width: 100%;
text-align: center;
background-color: rgba(28, 51, 52, 0.713);
color: whitesmoke;
border-bottom: 1px solid black;
padding:4px;
font-size:larger;
}
.tiny .cgfloat_header {
font-size: smaller;
}
.cgfloat_body {
min-width: fit-content;
display:flex;
flex-direction: column;
}
.cgfloat_body .row {
color: white;
padding: 0px 4px;
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1px dashed rgba(0, 0, 0, 0.45);
}
/* Countdown */
.cgfloat_body .counter_text {
min-width:50px;
text-align: right;
}
.cgfloat_body .counter_reset {
margin-left: 5px;
padding: 1px;
}
/* Buttons */
.cgfloat_body .row.buttons {
justify-content: space-evenly;
}
.cgfloat_body button {
margin: 4px;
padding: 2px;
min-width: 70px;
}
/* Extras */
.cgfloat_body .row.extras {
flex-direction: column;
}
.cgfloat_body .row.extras .extra {
width: 100%;
margin: 2px 0;
}
/* Tips */
.cgfloat_body .row.tip {
margin: 4px;
padding: 4px 0px;
justify-content: flex-start;
}
/* Text Edit */
.cgfloat_body .row.text_edit {
margin: 4px;
}
.cgfloat .tiny_image {
padding: 1px;
width: auto;
max-height: 100px;
object-fit: contain;
pointer-events: none;
}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263const _ax = encodeURI('');
export class FloatingWindow extends HTMLElement {
constructor(title, x, y, parent, movecallback) {
super()
this.movecallback = movecallback
this.classList.add('cgfloat')
this.header = document.createElement('div')
this.header.classList.add('cgfloat_header')
this.header.innerText = title
this.append(this.header)
this.body = document.createElement('div')
this.body.classList.add('cgfloat_body')
this.append(this.body)
this.header.addEventListener('mousedown',this.header_mousedown.bind(this))
document.addEventListener('mouseup',this.header_mouseup.bind(this))
document.addEventListener('mousemove',this.header_mousemove.bind(this))
document.addEventListener('mouseleave',this.header_mouseup.bind(this))
this.dragging = false
this.move_to(x,y)
if (parent) parent.append(this)
else document.body.append(this)
}
show() { this.style.display = 'block' }
hide() { this.style.display = 'none' }
set_title(title) { this.header.innerText = title }
move_to(x,y,supress) {
this.position = {x:x,y:y}
this.style.left = `${this.position.x}px`
this.style.top = `${this.position.y}px`
if (!supress) this.movecallback(x,y)
}
swallow(e) {
e.stopPropagation()
e.preventDefault()
}
header_mousedown(e) {
this.dragging = true
this.swallow(e)
}
header_mouseup(e) {
this.dragging = false
}
header_mousemove(e) {
if (this.dragging) {
this.move_to( this.position.x + e.movementX , this.position.y + e.movementY )
this.swallow(e)
}
}
}
// Renamed custom element to be unique to INSTARAW
customElements.define('instaraw-floater', FloatingWindow);123456789101112131415161718192021222324252627282930313233343536373839404142// --- Filename: ../ComfyUI_INSTARAW/js/group_bypass_detector.js ---
import { app } from "../../scripts/app.js";
const MODE_ALWAYS = 0; // LiteGraph.ALWAYS
app.registerExtension({
name: "Comfy.INSTARAW.GroupBypassDetector",
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeData.name === "INSTARAW_GroupBypassToBoolean") {
// Store the last known state on the node instance to prevent unnecessary updates
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function () {
onNodeCreated?.apply(this, arguments);
this.lastBypassState = undefined;
};
// Every frame, check if our bypass state has changed
const onDrawForeground = nodeType.prototype.onDrawForeground;
nodeType.prototype.onDrawForeground = function(ctx) {
onDrawForeground?.apply(this, arguments);
const widget = this.widgets.find(w => w.name === 'is_active');
if (!widget) return;
// The node's mode tells us if it's bypassed. 0 means active.
const isActive = this.mode === MODE_ALWAYS;
// Only update the widget if the state has actually changed
if (this.lastBypassState !== isActive) {
this.lastBypassState = isActive;
widget.value = isActive;
// Make sure the UI reflects the change immediately
app.graph.setDirtyCanvas(true);
}
};
}
},
});123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
import { create } from "./utils.js";
import { popup } from "./popup.js";
import { ComfyWidgets } from "../../scripts/widgets.js";
const FILTER_TYPES = ["INSTARAW_ImageFilter", "INSTARAW_TextImageFilter", "INSTARAW_MaskImageFilter", "INSTARAW_Interactive_Crop", "INSTARAW_PromptFilter", "INSTARAW_BatchImageGenerator"];
app.registerExtension({
name: "Comfy.INSTARAW.InteractiveNodes", //
settings: [
{
id: "INSTARAW.Interactive.Header",
name: "INSTARAW Interactive Nodes",
type: () => {
const x = document.createElement('span');
const a = document.createElement('a');
a.innerText = "Based on original work by chrisgoringe (cg-image-filter)";
a.href = "https://github.com/chrisgoringe/cg-image-filter";
a.target = "_blank";
a.style.paddingRight = "12px";
x.appendChild(a);
return x;
},
},
{ id: "INSTARAW.Interactive.PlaySound", name: "Play sound when activating", type: "boolean", defaultValue: true },
{ id: "INSTARAW.Interactive.EnlargeSmall", name: "Enlarge small images in grid", type: "boolean", defaultValue: true },
{ id: "INSTARAW.Interactive.ClickSends", name: "Clicking an image sends it", tooltip: "Use if you always want to send exactly one image.", type: "boolean", defaultValue: false },
{ id: "INSTARAW.Interactive.AutosendIdentical", name: "If all images are identical, autosend one", type: "boolean", defaultValue: false },
{ id: "INSTARAW.Interactive.StartZoomed", name: "Enter the Image Filter node with an image zoomed", type: "combo", options: [{ value: 0, text: "No" }, { value: "1", text: "first" }, { value: "-1", text: "last" }], default: 0 },
{ id: "INSTARAW.Interactive.SmallWindow", name: "Show a small popup instead of covering the screen", type: "boolean", tooltip: "Click the small popup to activate it", defaultValue: false },
{ id: "INSTARAW.Interactive.DetailedLogging", name: "Turn on detailed logging", tooltip: "If you are asked to for debugging!", type: "boolean", defaultValue: false },
{ id: "INSTARAW.Interactive.FPS", name: "Video Frames per Second", type: "int", defaultValue: 5 }
],
setup() {
create('link', null, document.getElementsByTagName('HEAD')[0], { 'rel': 'stylesheet', 'type': 'text/css', 'href': 'extensions/ComfyUI_INSTARAW/filter.css' });
create('link', null, document.getElementsByTagName('HEAD')[0], { 'rel': 'stylesheet', 'type': 'text/css', 'href': 'extensions/ComfyUI_INSTARAW/floating_window.css' });
create('link', null, document.getElementsByTagName('HEAD')[0], { 'rel': 'stylesheet', 'type': 'text/css', 'href': 'extensions/ComfyUI_INSTARAW/zoomed.css' });
create('link', null, document.getElementsByTagName('HEAD')[0], { 'rel': 'stylesheet', 'type': 'text/css', 'href': 'extensions/ComfyUI_INSTARAW/advanced_image_loader.css' });
create('link', null, document.getElementsByTagName('HEAD')[0], { 'rel': 'stylesheet', 'type': 'text/css', 'href': 'extensions/ComfyUI_INSTARAW/reality_prompt_generator.css' });
api.addEventListener("execution_interrupted", popup.send_cancel.bind(popup));
api.addEventListener("instaraw-interactive-images", popup.handle_message.bind(popup));
},
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeType.comfyClass === "Pick from List" || nodeType.comfyClass === "INSTARAW_PickFromList") {
const onConnectionsChange = nodeType.prototype.onConnectionsChange;
nodeType.prototype.onConnectionsChange = function(side, slot, connect, link_info, output) {
if (side == 1 && slot == 0 && link_info && connect) {
const originNode = this.graph.getNodeById(link_info.origin_id);
if (originNode?.outputs?.[link_info.origin_slot]) {
const type = originNode.outputs[link_info.origin_slot].type;
this.outputs[0].type = type;
this.inputs[0].type = type;
}
} else if (side == 1 && slot == 0 && !connect) {
this.outputs[0].type = "*";
this.inputs[0].type = "*";
}
return onConnectionsChange?.apply(this, arguments);
}
}
if (FILTER_TYPES.includes(nodeType.comfyClass)) {
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function() {
const onCreatedResult = onNodeCreated?.apply(this, arguments);
this._ni_widget = this.widgets.find((n) => n.name == 'node_identifier');
if (!this._ni_widget) {
this._ni_widget = ComfyWidgets["INT"](this, "node_identifier", ["INT", { "default": 0 }], app).widget;
}
this._ni_widget.hidden = true;
this._ni_widget.computeSize = () => [0, 0];
this._ni_widget.value = Math.floor(Math.random() * 1000000);
if (this.comfyClass === "INSTARAW_TextImageFilter") {
const buttonWidget = this.addWidget("button", "Clear Node Cache", null, async () => {
buttonWidget.name = "Clearing...";
this.disabled = true;
try {
const resp = await api.fetchApi('/instaraw/clear_text_filter_cache', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ uid: this._ni_widget.value }),
});
if (resp.status === 200) {
buttonWidget.success();
} else {
throw new Error(await resp.text());
}
} catch (e) {
console.error("INSTARAW: Failed to clear cache:", e);
buttonWidget.error();
}
});
buttonWidget.name = "clear_cache_button";
buttonWidget.success = () => {
buttonWidget.name = "Cache Cleared!";
this.disabled = false;
setTimeout(() => {
buttonWidget.name = "Clear Node Cache";
}, 2000);
};
buttonWidget.error = () => {
buttonWidget.name = "Error Clearing!";
this.disabled = false;
setTimeout(() => {
buttonWidget.name = "Clear Node Cache";
}, 3000);
};
}
return onCreatedResult;
}
}
},
});12345678910111213141516171819202122232425// ---
// Filename: ../ComfyUI_INSTARAW/js/log.js
// ---
import { app } from "../../scripts/app.js";
export class Log {
static log(s) { if (s) console.log(s) }
static error(e) { console.error(e) }
static detail(s) {
// Updated settings key
if (app.ui.settings.getSettingValue("INSTARAW.Interactive.DetailedLogging")) Log.log(s)
}
static message_in(message, extra) {
// Updated settings key
if (!app.ui.settings.getSettingValue("INSTARAW.Interactive.DetailedLogging")) return
if (message.detail && !message.detail.tick) Log.log(`--> ${JSON.stringify(message.detail)}` + (extra ? ` ${extra}` : ""))
if (message.detail && message.detail.tick) Log.log(`--> tick`)
}
static message_out(response, extra) {
// Updated settings key
if (!app.ui.settings.getSettingValue("INSTARAW.Interactive.DetailedLogging")) return
Log.log(`"<-- ${JSON.stringify(response)}` + (extra ? ` ${extra}` : ""))
}
}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879import { app, ComfyApp } from "../../scripts/app.js";
export function new_editor() {
return app.ui.settings.getSettingValue('Comfy.MaskEditor.UseNewEditor')
}
function get_mask_editor_element() {
// Try newer dialog-based mask editor first
const newer = document.getElementsByClassName('p-dialog-mask')
if (newer.length == 1) return newer[0]
return new_editor() ? document.getElementById('maskEditor') : document.getElementById('maskCanvas')?.parentElement
}
export function mask_editor_showing() {
return get_mask_editor_element() && get_mask_editor_element().style.display != 'none'
}
export function hide_mask_editor() {
if (mask_editor_showing() && document.getElementById('maskEditor')) document.getElementById('maskEditor').style.display = 'none'
}
function get_mask_editor_cancel_button() {
var button = document.getElementById("maskEditor_topBarCancelButton")
if (button) return button
try {
button = Array.from(get_mask_editor_element().getElementsByTagName('button')).find((b) => (b.ariaLabel == 'Cancel'))
if (button) return button
} catch {}
return get_mask_editor_element()?.parentElement?.lastChild?.childNodes[2]
}
function get_mask_editor_save_button() {
var button = document.getElementById("maskEditor_topBarSaveButton")
if (button) return button
try {
button = Array.from(get_mask_editor_element().getElementsByTagName('button')).find((b) => (b.ariaLabel == 'Save'))
if (button) return button
} catch {}
return get_mask_editor_element()?.parentElement?.lastChild?.childNodes[1]
}
export function mask_editor_listen_for_cancel(callback) {
const cancel_button = get_mask_editor_cancel_button()
if (cancel_button && !cancel_button.filter_listener_added) {
cancel_button.addEventListener('click', callback)
cancel_button.filter_listener_added = true
}
}
export function press_maskeditor_save() {
get_mask_editor_save_button()?.click()
}
export function press_maskeditor_cancel() {
get_mask_editor_cancel_button()?.click()
}
export function open_maskeditor(node) {
// Try old API first (ComfyApp.open_maskeditor)
if (typeof ComfyApp.open_maskeditor === 'function') {
ComfyApp.copyToClipspace(node)
ComfyApp.clipspace_return_node = node
ComfyApp.open_maskeditor()
} else {
// New API: Use extension command system
const me_extension = app.extensions.find((e) => (e.name == 'Comfy.MaskEditor'))
if (me_extension) {
const me_command = me_extension.commands.find((c) => (c.id == 'Comfy.MaskEditor.OpenMaskEditor'))
if (me_command) {
app.canvas.selected_nodes = [node]
me_command.function()
} else {
console.error('[INSTARAW] Could not find MaskEditor command')
}
} else {
console.error('[INSTARAW] Could not find MaskEditor extension')
}
}
}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130// ---
// ComfyUI INSTARAW - Nano Banana Pro Aspect Ratio Visual Preview
// Copyright © 2025 Instara. All rights reserved.
// PROPRIETARY SOFTWARE - ALL RIGHTS RESERVED
// ---
import { app } from "../../scripts/app.js";
// Aspect ratio numerical values for preview rendering
const ASPECT_RATIO_VALUES = {
"1:1 (Square)": { w: 1, h: 1 },
"3:2 (Landscape)": { w: 3, h: 2 },
"2:3 (Portrait)": { w: 2, h: 3 },
"3:4 (Portrait)": { w: 3, h: 4 },
"4:3 (Landscape)": { w: 4, h: 3 },
"4:5 (Portrait)": { w: 4, h: 5 },
"5:4 (Landscape)": { w: 5, h: 4 },
"9:16 (Tall Portrait)": { w: 9, h: 16 },
"16:9 (Wide Landscape)": { w: 16, h: 9 },
"21:9 (Ultrawide)": { w: 21, h: 9 },
};
// Resolution labels with approximate dimensions
const RESOLUTION_INFO = {
"1K": "~1024px",
"2K": "~2048px",
"4K": "~4096px",
};
app.registerExtension({
name: "Comfy.INSTARAW.NanoBananaAspectRatio",
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeData.name !== "INSTARAW_NanoBananaAspectRatio") {
return;
}
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function () {
onNodeCreated?.apply(this, arguments);
// Store reference to node
const node = this;
// Find the aspect_ratio widget
const aspectWidget = this.widgets.find((w) => w.name === "aspect_ratio");
const resolutionWidget = this.widgets.find((w) => w.name === "resolution");
if (!aspectWidget) return;
// Create custom preview widget
const previewWidget = {
name: "aspect_preview",
type: "custom",
value: null,
computeSize: function () {
return [0, 80]; // Fixed height for preview area
},
draw: function (ctx, node, width, y) {
const selectedRatio = aspectWidget.value || "1:1 (Square)";
const selectedRes = resolutionWidget?.value || "1K";
const ratio = ASPECT_RATIO_VALUES[selectedRatio] || { w: 1, h: 1 };
// Calculate preview box dimensions
const maxWidth = width - 40;
const maxHeight = 60;
let boxWidth, boxHeight;
if (ratio.w / ratio.h > maxWidth / maxHeight) {
// Width constrained
boxWidth = maxWidth;
boxHeight = (maxWidth * ratio.h) / ratio.w;
} else {
// Height constrained
boxHeight = maxHeight;
boxWidth = (maxHeight * ratio.w) / ratio.h;
}
// Center the box
const boxX = (width - boxWidth) / 2;
const boxY = y + (80 - boxHeight) / 2;
// Draw background
ctx.fillStyle = "#1a1a2e";
ctx.fillRect(10, y + 5, width - 20, 70);
// Draw aspect ratio preview box
ctx.fillStyle = "#4a90d9";
ctx.fillRect(boxX, boxY, boxWidth, boxHeight);
// Draw border
ctx.strokeStyle = "#6ab0ff";
ctx.lineWidth = 2;
ctx.strokeRect(boxX, boxY, boxWidth, boxHeight);
// Draw ratio text below the preview box
const ratioText = selectedRatio.split(" ")[0]; // e.g., "16:9"
const resInfo = RESOLUTION_INFO[selectedRes] || "";
ctx.fillStyle = "#ffffff";
ctx.font = "bold 11px Arial";
ctx.textAlign = "center";
ctx.textBaseline = "top";
ctx.fillText(`${ratioText} • ${selectedRes} (${resInfo})`, width / 2, boxY + boxHeight + 6);
},
};
// Add preview widget after resolution
this.addCustomWidget(previewWidget);
// Update preview when aspect ratio changes
const originalAspectCallback = aspectWidget.callback;
aspectWidget.callback = (value) => {
originalAspectCallback?.(value);
node.setDirtyCanvas(true, true);
};
// Update preview when resolution changes
if (resolutionWidget) {
const originalResCallback = resolutionWidget.callback;
resolutionWidget.callback = (value) => {
originalResCallback?.(value);
node.setDirtyCanvas(true, true);
};
}
// Ensure proper sizing
this.computeSize();
};
},
});12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238import { app, ComfyApp } from '../../scripts/app.js';
import { api } from '../../scripts/api.js';
import {
mask_editor_listen_for_cancel,
mask_editor_showing,
hide_mask_editor,
press_maskeditor_cancel,
press_maskeditor_save,
new_editor,
open_maskeditor
} from './mask_utils.js';
import { Log } from './log.js';
import { create } from './utils.js';
import { FloatingWindow } from './floating_window.js';
// Renamed to INSTARAW node class names
const POPUP_NODES = ['INSTARAW_ImageFilter', 'INSTARAW_TextImageFilter', 'INSTARAW_Interactive_Crop'];
const MASK_NODES = ['INSTARAW_MaskImageFilter'];
const REQUEST_RESHOW = '-1';
const CANCEL = '-3';
const GRID_IMAGE_SPACE = 10;
function get_full_url(url) {
return api.apiURL(
`/view?filename=${encodeURIComponent(url.filename ?? v)}&type=${url.type ?? 'input'}&subfolder=${url.subfolder ?? ''}&r=${Math.random()}`
);
}
const State = Object.freeze({
INACTIVE: 0,
TINY: 1,
MASK: 2,
FILTER: 3,
TEXT: 4,
ZOOMED: 5,
CROP: 6 // Our new state for the interactive cropper
});
class Popup extends HTMLElement {
constructor() {
super();
// Path updated to point to our package's assets
this.audio = new Audio('extensions/ComfyUI_INSTARAW/ding.mp3');
this.classList.add('instaraw_popup');
this.grid = create('span', 'grid', this);
this.overlaygrid = create('span', 'grid overlaygrid', this);
this.grid.addEventListener('click', this.on_click.bind(this));
// --- NEW CROP UI ELEMENTS ---
this.crop_container = create('div', 'crop_container', this);
this.crop_image_bg = create('img', 'crop_image_bg', this.crop_container);
this.crop_canvas = create('canvas', 'crop_canvas_overlay', this.crop_container);
this.crop_ctx = this.crop_canvas.getContext('2d');
this.crop_canvas.addEventListener('mousedown', this.on_crop_mouse_down.bind(this));
// We now listen for moves on the canvas for cursor updates, and the whole document for dragging
this.crop_canvas.addEventListener('mousemove', this.on_crop_mouse_move.bind(this));
document.addEventListener('mouseup', this.on_crop_mouse_up.bind(this));
document.addEventListener('mousemove', this.on_document_mouse_move.bind(this));
this.crop_data = { active: false, box: null, mode: null };
// --- END NEW CROP UI ---
this.zoomed = create('span', 'zoomed', this);
this.zoomed_prev = create('span', 'zoomed_prev', this.zoomed);
this.zoomed_prev_arrow = create('span', 'zoomed_arrow', this.zoomed_prev, { innerHTML: '⇦' });
this.zoomed_image = create('img', 'zoomed_image', this.zoomed);
this.zoomed_next = create('span', 'zoomed_next', this.zoomed);
this.zoomed_number = create('span', 'zoomed_number', this.zoomed_next);
this.zoomed_next_arrow = create('span', 'zoomed_arrow', this.zoomed_next, { innerHTML: '⇨' });
this.zoomed_prev_arrow.addEventListener('click', this.zoom_prev.bind(this));
this.zoomed_next_arrow.addEventListener('click', this.zoom_next.bind(this));
this.zoomed_image.addEventListener('click', this.click_zoomed.bind(this));
this.tiny_window = new FloatingWindow('', 100, 100, null, this.tiny_moved.bind(this));
this.tiny_window.classList.add('tiny');
this.tiny_image = create('img', 'tiny_image', this.tiny_window.body);
this.tiny_window.addEventListener('click', this.handle_deferred_message.bind(this));
this.floating_window = new FloatingWindow('', 100, 100, null, this.floater_moved.bind(this));
this.counter_row = create('span', 'counter row', this.floating_window.body);
this.counter_reset_button = create('button', 'counter_reset', this.counter_row, { innerText: 'Reset' });
this.counter_text = create('span', 'counter_text', this.counter_row);
this.counter_reset_button.addEventListener('click', this.request_reset.bind(this));
this.extras_row = create('span', 'extras row', this.floating_window.body);
this.tip_row = create('span', 'tip row', this.floating_window.body);
this.button_row = create('span', 'buttons row', this.floating_window.body);
this.send_button = create('button', 'control', this.button_row, { innerText: 'Send' });
this.cancel_button = create('button', 'control', this.button_row, { innerText: 'Cancel' });
this.toggle_button = create('button', 'control', this.button_row, { innerText: 'Hide' });
this.send_button.addEventListener('click', this.send_current_state.bind(this));
this.cancel_button.addEventListener('click', this.send_cancel.bind(this));
this.toggle_button.addEventListener('click', this.toggleHide.bind(this));
this.mask_button_row = create('span', 'buttons row', this.floating_window.body);
this.mask_send_button = create('button', 'control', this.mask_button_row, { innerText: 'Send' });
this.mask_cancel_button = create('button', 'control', this.mask_button_row, { innerText: 'Cancel' });
this.mask_send_button.addEventListener('click', press_maskeditor_save);
this.mask_cancel_button.addEventListener('click', press_maskeditor_cancel);
this.text_edit = create('textarea', 'text_edit row', this.floating_window.body);
this.picked = new Set();
document.addEventListener('keydown', this.on_key_down.bind(this));
document.addEventListener('keypress', this.on_key_press.bind(this));
document.body.appendChild(this);
this.last_response_sent = 0;
this.state = State.INACTIVE;
this.hidden_by_toggle = false;
this.render();
}
toggleHide() {
this.hidden_by_toggle = !this.hidden_by_toggle;
this.render();
}
floater_moved(x, y) {
if (this.node?.properties) {
this.node.properties['filter_floater_xy'] = { x: x, y: y };
}
}
floater_position() {
return this.node?.properties?.['filter_floater_xy'];
}
tiny_moved(x, y) {
if (this.node?.properties) {
this.node.properties['filter_tiny_xy'] = { x: x, y: y };
}
}
tiny_position() {
return this.node?.properties?.['filter_tiny_xy'];
}
visible(item, value) {
if (value) item.classList.remove('hidden');
else item.classList.add('hidden');
}
disabled(item, value) {
item.disabled = value;
}
highlighted(item, value) {
if (value) item.classList.add('highlighted');
else item.classList.remove('highlighted');
}
render() {
const state = this.state;
// --- UPDATED RENDER LOGIC ---
const isVisible =
(state === State.FILTER || state === State.TEXT || state === State.ZOOMED || state === State.CROP) &&
!this.hidden_by_toggle;
this.visible(this, isVisible);
this.visible(this.tiny_window, state === State.TINY);
this.visible(this.zoomed, state === State.ZOOMED);
// Hide grid when in CROP mode to prevent bleed-through from previous filter images
this.visible(this.grid, state === State.FILTER || state === State.ZOOMED || state === State.TEXT);
this.visible(this.overlaygrid, state === State.FILTER || state === State.ZOOMED || state === State.TEXT);
this.visible(this.crop_container, state === State.CROP);
const showFloater =
state === State.FILTER ||
state === State.ZOOMED ||
state === State.TEXT ||
state === State.MASK ||
state === State.CROP;
this.visible(this.floating_window, showFloater);
this.visible(this.button_row, state !== State.MASK);
// Disable send button if no images picked (filter) or no crop box drawn (crop)
const sendDisabled =
((state === State.FILTER || state === State.ZOOMED) && this.picked.size === 0) ||
(state === State.CROP && (!this.crop_data.box || this.crop_data.box.width <= 0 || this.crop_data.box.height <= 0));
this.disabled(this.send_button, sendDisabled);
this.visible(this.mask_button_row, state === State.MASK && new_editor());
this.visible(this.extras_row, this.n_extras > 0);
this.visible(this.tip_row, this.tip_row.innerHTML.length > 0);
this.visible(this.text_edit, state === State.TEXT);
if (state === State.ZOOMED) {
const img_index = this.zoomed_image_holder.image_index;
this.highlighted(this.zoomed, this.picked.has(`${img_index}`));
this.zoomed_number.innerHTML = `${img_index + 1}/${this.n_images}`;
}
if (state !== State.MASK) hide_mask_editor();
this.toggle_button.innerText = this.hidden_by_toggle ? 'Show' : 'Hide';
const showToggleButton =
state === State.FILTER || state === State.ZOOMED || state === State.TEXT || state === State.CROP;
this.visible(this.toggle_button, showToggleButton);
}
_send_response(msg = {}, keep_open = false) {
if (Date.now() - this.last_response_sent < 1000) {
Log.message_out(msg, '(throttled)');
return;
}
const unique = this.node?._ni_widget?.value;
if (!unique) {
if (this.node) Log.error(`Node ${this.node.id} has no _ni_widget when trying to send ${msg}`);
else Log.error(`No node when trying to send ${msg}`);
return;
}
msg.unique = `${unique}`;
if (!msg.special) {
if (this.n_extras > 0) {
msg.extras = Array.from(this.extras_row.children).map((e) => e.value);
}
if (this.state === State.FILTER || this.state === State.ZOOMED) msg.selection = Array.from(this.picked);
if (this.state === State.TEXT) msg.text = this.text_edit.value;
// --- NEW: Add crop data to the response ---
if (this.state === State.CROP && this.crop_data.box) {
// Convert from canvas-space to original image-space before sending
const { box, scale } = this.crop_data;
// Send 'crop' at the top level, not nested under 'response'
msg.crop = {
x: Math.round(box.x / scale),
y: Math.round(box.y / scale),
width: Math.round(box.width / scale),
height: Math.round(box.height / scale)
};
}
this.last_response_sent = Date.now();
}
try {
const body = new FormData();
body.append('response', JSON.stringify(msg));
api.fetchApi('/instaraw/interactive_message', { method: 'POST', body });
Log.message_out(msg);
} catch (e) {
Log.error(e);
} finally {
if (!keep_open) this.close();
}
}
send_current_state() {
if (this.state == State.TEXT) {
this._send_response();
} else {
this._send_response();
}
}
send_cancel() {
// Only send cancel if we're in an active state that's waiting for response
if (this.state !== State.INACTIVE && this.state !== State.TINY) {
this._send_response({ special: CANCEL });
}
}
request_reset() {
this._send_response({ special: REQUEST_RESHOW }, true);
}
close() {
this.state = State.INACTIVE;
this.render();
}
maybe_play_sound() {
// Updated settings key
if (app.ui.settings.getSettingValue('INSTARAW.Interactive.PlaySound')) this.audio.play();
}
handle_message(message) {
Log.message_in(message);
Log.log(this._handle_message(message, false));
this.render();
}
handle_deferred_message(e) {
Log.message_in(this.saved_message, '(deferred)');
Log.log(this._handle_message(this.saved_message, true));
this.render();
}
autosend() {
// Updated settings key
return app.ui.settings.getSettingValue('INSTARAW.Interactive.AutosendIdentical') && this.allsame;
}
on_new_node(nd) {
this.node = nd;
const fp = this.floater_position();
if (fp) this.floating_window.move_to(fp.x, fp.y, true);
const tp = this.tiny_position();
if (tp) this.tiny_window.move_to(tp.x, tp.y, true);
}
find_node(uid) {
const bits = uid.split(':');
if (bits.length == 1) {
return app.graph._nodes_by_id[uid];
} else {
var graph = app.graph;
var node;
bits.forEach((bit) => {
node = graph._nodes_by_id[bit];
graph = node.subgraph;
});
}
return node;
}
_handle_message(message, using_saved) {
const detail = message.detail;
const uid = detail.uid;
const the_node = this.find_node(uid);
if (this.node != the_node) this.on_new_node(the_node);
if (!this.node) return console.log(`Message was for ${uid} which doesn't exist`);
if (this.node._ni_widget?.value != message.detail.unique) return console.log(`Message unique id wasn't mine`);
if (detail.tick) {
this.counter_text.innerText = `${detail.tick}s`;
if (this.state == State.INACTIVE) this.request_reset();
return;
}
if (detail.timeout) {
this.close();
return `Timeout`;
}
if (this.handling_message) return `Ignoring message because we're already handling a message`;
this.set_title(this.node.title ?? 'INSTARAW Image Filter'); // Updated default title
this.allsame = detail.allsame || false;
if (detail.tip) this.tip_row.innerHTML = detail.tip.replace(/(?:\r\n|\r|\n)/g, '<br/>');
else this.tip_row.innerHTML = '';
// Updated settings key
if (
this.state == State.INACTIVE &&
app.ui.settings.getSettingValue('INSTARAW.Interactive.SmallWindow') &&
!using_saved &&
!this.autosend()
) {
this.state = State.TINY;
this.saved_message = message;
this.tiny_image.src = get_full_url(message.detail.urls[message.detail.urls.length - 1]);
this.maybe_play_sound();
return `Deferring message and showing small window`;
}
try {
this.handling_message = true;
this.n_extras = detail.extras ? message.detail.extras.length : 0;
this.extras_row.innerHTML = '';
for (let i = 0; i < this.n_extras; i++) {
create('input', 'extra', this.extras_row, { value: detail.extras[i] });
}
if (!using_saved && !this.autosend()) this.maybe_play_sound();
if (detail.interactive_crop) {
this.handle_crop(detail);
} else if (detail.maskedit) {
// existing logic
this.handle_maskedit(detail);
} else if (detail.urls) {
// existing logic
this.handle_urls(detail);
}
} finally {
this.handling_message = false;
}
}
window_not_showing(uid) {
const node = this.find_node(uid);
return (
(POPUP_NODES.includes(node.type) && this.classList.contains('hidden')) ||
(MASK_NODES.includes(node.type) && !mask_editor_showing())
);
}
set_title(title) {
this.floating_window.set_title(title);
var pos = this.floater_position();
if (pos) this.floating_window.move_to(pos.x, pos.y);
pos = this.tiny_position();
if (pos) this.tiny_window.move_to(pos.x, pos.y);
this.tiny_window.set_title(title);
}
handle_maskedit(detail) {
// Reset state from any previous mode
this.grid.innerHTML = '';
this.overlaygrid.innerHTML = '';
this.crop_data = { active: false, box: null, mode: null, scale: 1 };
if (!this.node) {
Log.log(`No node to handle maskedit - maybe it's been removed`);
this.seen_editor = true;
} else {
this.state = State.MASK;
this.node.imgs = [];
this.node.images = [];
detail.urls.forEach((url, i) => {
this.node.imgs.push(new Image());
this.node.imgs[i].src = api.apiURL(
`/view?filename=${encodeURIComponent(url.filename)}&type=${url.type}&subfolder=${url.subfolder}`
);
this.node.images.push(url);
});
this.node.imageIndex = 0;
open_maskeditor(this.node);
this.seen_editor = false;
}
setTimeout(this.wait_while_mask_editing.bind(this), 200);
}
wait_while_mask_editing() {
if (!this.seen_editor && mask_editor_showing()) {
mask_editor_listen_for_cancel(this.send_cancel.bind(this));
this.render();
this.seen_editor = true;
}
if (mask_editor_showing()) {
setTimeout(this.wait_while_mask_editing.bind(this), 100);
} else {
// Handle both file-based (old) and data URL (new) mask editor formats
const masked_image = this.extract_filename(this.node.imgs[0].src);
if (masked_image) {
this._send_response({ masked_image: masked_image });
} else {
// New mask editor stores as data URL
this._send_response({ masked_data: this.node.imgs[0].src });
}
}
}
extract_filename(url_string) {
return new URL(url_string).searchParams.get('filename');
}
handle_urls(detail) {
// Reset crop state from any previous mode
this.crop_data = { active: false, box: null, mode: null, scale: 1 };
this.video_frames = detail.video_frames || 1;
if (this.autosend()) {
return this._send_response({ selection: [0] });
}
this.autozoom_pending = false;
if (detail.text != null) {
this.state = State.TEXT;
this.text_edit.value = detail.text;
if (detail.textareaheight) this.text_edit.style.height = `${detail.textareaheight}px`;
} else {
// Updated settings key
if (
this.state != State.FILTER &&
this.state != State.ZOOMED &&
app.ui.settings.getSettingValue('INSTARAW.Interactive.StartZoomed') != 0
) {
this.autozoom_pending = true;
}
this.state = State.FILTER;
}
this.n_images = detail.urls?.length;
this.laidOut = -1;
this.picked = new Set();
if (this.n_images == 1) this.picked.add('0');
this.grid.innerHTML = '';
this.overlaygrid.innerHTML = '';
var latestImage = null;
detail.urls.forEach((url, i) => {
console.log(url);
if (i % this.video_frames == 0) {
const thisImage = create('img', null, this.grid, { src: get_full_url(url) });
latestImage = thisImage;
latestImage.onload = this.layout.bind(this);
latestImage.image_index = i / this.video_frames;
latestImage.addEventListener('mouseover', (e) => this.on_mouse_enter(thisImage));
latestImage.addEventListener('mouseout', (e) => this.on_mouse_out(thisImage));
latestImage.frames = [get_full_url(url)];
} else {
latestImage.frames.push(get_full_url(url));
}
if (detail.mask_urls) {
create('img', null, this.overlaygrid, { src: get_full_url(detail.mask_urls[i]) });
}
});
this.layout();
if (this.video_frames > 1) {
this.frame = 0;
setTimeout(this.advance_videos.bind(this), 1000);
}
}
advance_videos() {
if (this.state == State.INACTIVE) return;
this.frame = (this.frame + 1) % this.video_frames;
Array.from(this.grid.children).forEach((img) => {
img.src = img.frames[this.frame];
});
// Updated settings key
const fps = app.ui.settings.getSettingValue('INSTARAW.Interactive.FPS');
const delay = fps > 0 ? 1000 / fps : 1000;
setTimeout(this.advance_videos.bind(this), delay);
}
on_mouse_enter(img) {
this.mouse_is_over = img;
this.redraw();
}
on_mouse_out(img) {
this.mouse_is_over = null;
this.redraw();
}
zoom_auto() {
this.autozoom_pending = false;
// Updated settings key
const startZoomed = app.ui.settings.getSettingValue('INSTARAW.Interactive.StartZoomed');
if (startZoomed == 1) {
this.zoomed_image_holder = this.grid.firstChild;
} else if (startZoomed == -1) {
this.zoomed_image_holder = this.grid.lastChild;
} else {
return;
}
if (this.zoomed_image_holder.image_index >= 0) {
this.state = State.ZOOMED;
return this.show_zoomed();
}
}
zoom_next() {
this.zoomed_image_holder = this.zoomed_image_holder.nextSibling || this.zoomed_image_holder.parentNode.firstChild;
this.show_zoomed();
}
zoom_prev() {
this.zoomed_image_holder =
this.zoomed_image_holder.previousSibling || this.zoomed_image_holder.parentNode.lastChild;
this.show_zoomed();
}
click_zoomed() {
const fake_event = { target: this.zoomed_image_holder };
this.on_click(fake_event);
this.show_zoomed();
}
show_zoomed() {
this.zoomed_image.src = this.zoomed_image_holder.src;
return this.render();
}
eat_event(e) {
e.stopPropagation();
e.preventDefault();
}
on_key_press(e) {
if (document.activeElement?.type == 'text' || document.activeElement?.type == 'textarea') {
if (this.floating_window.contains(document.activeElement) || this.contains(document.activeElement)) return;
}
if (this.state != State.INACTIVE && this.state != State.TINY) {
this.eat_event(e);
}
}
on_key_down(e) {
if (document.activeElement?.type == 'text' || document.activeElement?.type == 'textarea') {
if (this.floating_window.contains(document.activeElement) || this.contains(document.activeElement)) return;
if (this.state == State.INACTIVE && this.state == State.TINY) return;
}
if (this.state == State.FILTER || this.state == State.TEXT) {
if (e.key == 'Enter') {
this.send_current_state();
return this.eat_event(e);
}
if (e.key == 'Escape') {
this.send_cancel();
return this.eat_event(e);
}
if (`${parseInt(e.key)}` == e.key) {
this.select_unselect(parseInt(e.key));
this.render();
return this.eat_event(e);
}
}
if (this.state == State.FILTER) {
if (e.key == ' ' && this.mouse_is_over) {
this.state = State.ZOOMED;
this.zoomed_image_holder = this.mouse_is_over;
this.eat_event(e);
return this.show_zoomed();
}
if (e.key == 'a' && e.ctrlKey) {
if (this.picked.size > this.n_images / 2) {
this.picked.clear();
console.log('unselect all');
} else {
this.picked.clear();
for (var i = 0; i < this.n_images; i++) {
this.picked.add(`${i}`);
}
console.log('select all');
}
this.eat_event(e);
return this.redraw();
}
}
if (this.state == State.ZOOMED) {
if (e.key == ' ') {
this.state = State.FILTER;
this.zoomed_image_holder = null;
this.eat_event(e);
return this.render();
} else if (e.key == 'ArrowUp') {
this.click_zoomed();
return this.eat_event(e);
} else if (e.key == 'ArrowDown') {
// select or unselect
} else if (e.key == 'ArrowRight') {
this.zoom_next();
return this.eat_event(e);
} else if (e.key == 'ArrowLeft') {
this.zoom_prev();
return this.eat_event(e);
}
}
}
select_unselect(n) {
if (n < 0 || n > this.n_images) {
return;
}
const s = `${n}`;
// Updated settings key
if (app.ui.settings.getSettingValue('INSTARAW.Interactive.ClickSends')) {
this.picked.add(s);
this._send_response();
} else {
if (this.picked.has(s)) this.picked.delete(s);
else this.picked.add(s);
this.redraw();
}
}
on_click(e) {
if (e.target.image_index != undefined) {
this.select_unselect(e.target.image_index);
}
}
layout(norepeat) {
const box = this.grid.getBoundingClientRect();
if (this.laidOut == box.width) return;
const im_w = this.grid.firstChild.naturalWidth;
const im_h = this.grid.firstChild.naturalHeight;
if (!im_w || !im_h || !box.width || !box.height) {
if (!norepeat) setTimeout(this.layout.bind(this), 100, [true]);
return;
} else {
var best_scale = 0;
var best_pick;
var per_row;
for (per_row = 1; per_row <= this.n_images; per_row++) {
const rows = Math.ceil(this.n_images / per_row);
const scale = Math.min(box.width / (im_w * per_row), box.height / (im_h * rows));
if (scale > best_scale) {
best_scale = scale;
best_pick = per_row;
}
}
this.per_row = best_pick;
this.laidOut = box.width;
}
this.rows = Math.ceil(this.n_images / this.per_row);
const w = box.width / this.per_row - GRID_IMAGE_SPACE;
const h = box.height / this.rows - GRID_IMAGE_SPACE;
var template_columns = '';
for (let i = 0; i < this.per_row; i++) template_columns += ` ${w + GRID_IMAGE_SPACE}px`;
var template_rows = '';
for (let i = 0; i < this.rows; i++) template_rows += ` ${h + GRID_IMAGE_SPACE}px`;
this.grid.style.gridTemplateColumns = template_columns;
this.grid.style.gridTemplateRows = template_rows;
this.overlaygrid.style.gridTemplateColumns = template_columns;
this.overlaygrid.style.gridTemplateRows = template_rows;
Array.from(this.grid.children).forEach((c, i) => {
c.style.gridArea = `${Math.floor(i / this.per_row) + 1} / ${(i % this.per_row) + 1} / auto / auto`;
});
Array.from(this.overlaygrid.children).forEach((c, i) => {
c.style.gridArea = `${Math.floor(i / this.per_row) + 1} / ${(i % this.per_row) + 1} / auto / auto`;
});
this.redraw();
setTimeout(this.rescale_images.bind(this), 100);
if (this.autozoom_pending) {
this.zoom_auto();
}
}
rescale_images() {
const box = this.grid.getBoundingClientRect();
const sub = this.grid.firstChild.getBoundingClientRect();
const w_used = ((sub.width + GRID_IMAGE_SPACE) * this.per_row) / box.width;
const h_used = ((sub.height + GRID_IMAGE_SPACE) * this.rows) / box.height;
const could_zoom = 1.0 / Math.max(w_used, h_used);
// Updated settings key
if (could_zoom > 1 && app.ui.settings.getSettingValue('INSTARAW.Interactive.EnlargeSmall')) {
Array.from(this.grid.children).forEach((img) => {
img.style.width = `${sub.width * could_zoom}px`;
});
Array.from(this.overlaygrid.children).forEach((img) => {
img.style.width = `${sub.width * could_zoom}px`;
});
}
}
redraw() {
Array.from(this.grid.children).forEach((c, i) => {
if (this.picked.has(`${i}`)) c.classList.add('selected');
else c.classList.remove('selected');
if (c == this.mouse_is_over) c.classList.add('hover');
else c.classList.remove('hover');
});
}
handle_crop(detail) {
// Reset state from any previous mode
this.grid.innerHTML = '';
this.overlaygrid.innerHTML = '';
this.crop_data = { active: false, box: null, mode: null, scale: 1, aspectRatio: null };
// Store locked aspect ratio if provided
if (detail.lock_aspect_ratio) {
this.crop_data.aspectRatio = detail.lock_aspect_ratio.width / detail.lock_aspect_ratio.height;
this.crop_data.aspectRatioLabel = detail.lock_aspect_ratio.label;
console.log(`🔒 Crop aspect ratio locked to ${detail.lock_aspect_ratio.label} (${this.crop_data.aspectRatio.toFixed(3)})`);
}
this.state = State.CROP;
this.crop_image_bg.onload = () => {
const img = this.crop_image_bg;
const container = this.crop_container;
const containerRect = container.getBoundingClientRect();
// Calculate the scaled (displayed) size of the image to fit the container
const imgAspect = img.naturalWidth / img.naturalHeight;
const containerAspect = containerRect.width / containerRect.height;
let displayWidth, displayHeight;
if (imgAspect > containerAspect) {
displayWidth = containerRect.width;
displayHeight = displayWidth / imgAspect;
} else {
displayHeight = containerRect.height;
displayWidth = displayHeight * imgAspect;
}
// Position and size the canvas overlay to perfectly match the displayed image
this.crop_canvas.width = displayWidth;
this.crop_canvas.height = displayHeight;
this.crop_canvas.style.left = `${(containerRect.width - displayWidth) / 2}px`;
this.crop_canvas.style.top = `${(containerRect.height - displayHeight) / 2}px`;
// Store the scaling factor. This is crucial for converting UI coordinates back to original image coordinates.
this.crop_data.scale = displayWidth / img.naturalWidth;
// If a proposed crop was sent from the backend, use it to initialize the crop box.
if (detail.proposed_crop) {
const proposal = detail.proposed_crop;
const scale = this.crop_data.scale;
// Convert the proposed crop (in original image coordinates) to canvas coordinates
this.crop_data.box = {
x: proposal.x * scale,
y: proposal.y * scale,
width: proposal.width * scale,
height: proposal.height * scale
};
} else {
// If there's no proposal, start with no crop box.
this.crop_data.box = null;
}
// Initial draw of the UI
this.draw_crop_box();
// Update the main render loop to enable/disable the 'Send' button correctly
this.render();
};
// Set the source of the background image, which triggers the onload event above
this.crop_image_bg.src = get_full_url(detail.urls[0]);
}
// --- NEW: Drawing logic for the crop box ---
draw_crop_box() {
if (this.state !== State.CROP) return;
const ctx = this.crop_ctx;
const canvas = this.crop_canvas;
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = 'rgba(0, 0, 0, 0.7)';
ctx.beginPath();
ctx.rect(0, 0, canvas.width, canvas.height);
if (this.crop_data.box) {
const { x, y, width, height } = this.get_normalized_box(this.crop_data.box);
ctx.rect(x, y, width, height);
}
ctx.fill('evenodd');
if (this.crop_data.box) {
const { x, y, width, height } = this.get_normalized_box(this.crop_data.box);
const brandColor = '#818cf8';
const outlineColor = '#1e1b4b'; // Dark indigo for contrast
const handles = this.get_crop_handles();
const handleSize = 10;
// Draw crop box - outline first, then brand color
ctx.strokeStyle = outlineColor;
ctx.lineWidth = 4;
ctx.strokeRect(x, y, width, height);
ctx.strokeStyle = brandColor;
ctx.lineWidth = 2;
ctx.strokeRect(x, y, width, height);
// Draw corner handles (squares) - outline then fill
for (const handle of ['top-left', 'top-right', 'bottom-left', 'bottom-right']) {
const h = handles[handle];
if (h) {
ctx.fillStyle = outlineColor;
ctx.fillRect(h.x - handleSize / 2 - 1, h.y - handleSize / 2 - 1, handleSize + 2, handleSize + 2);
ctx.fillStyle = brandColor;
ctx.fillRect(h.x - handleSize / 2, h.y - handleSize / 2, handleSize, handleSize);
}
}
// Draw edge handles (smaller rectangles)
const edgeHandleW = 16;
const edgeHandleH = 6;
// Top and bottom (horizontal bars)
for (const handle of ['top', 'bottom']) {
const h = handles[handle];
if (h) {
ctx.fillStyle = outlineColor;
ctx.fillRect(h.x - edgeHandleW / 2 - 1, h.y - edgeHandleH / 2 - 1, edgeHandleW + 2, edgeHandleH + 2);
ctx.fillStyle = brandColor;
ctx.fillRect(h.x - edgeHandleW / 2, h.y - edgeHandleH / 2, edgeHandleW, edgeHandleH);
}
}
// Left and right (vertical bars)
for (const handle of ['left', 'right']) {
const h = handles[handle];
if (h) {
ctx.fillStyle = outlineColor;
ctx.fillRect(h.x - edgeHandleH / 2 - 1, h.y - edgeHandleW / 2 - 1, edgeHandleH + 2, edgeHandleW + 2);
ctx.fillStyle = brandColor;
ctx.fillRect(h.x - edgeHandleH / 2, h.y - edgeHandleW / 2, edgeHandleH, edgeHandleW);
}
}
// Draw center handle (crosshair/move icon) - outline then brand
const center = handles['center'];
if (center) {
const size = 12;
// Dark outline pass
ctx.strokeStyle = outlineColor;
ctx.lineWidth = 4;
ctx.beginPath();
ctx.moveTo(center.x - size, center.y);
ctx.lineTo(center.x + size, center.y);
ctx.stroke();
ctx.beginPath();
ctx.moveTo(center.x, center.y - size);
ctx.lineTo(center.x, center.y + size);
ctx.stroke();
ctx.beginPath();
ctx.arc(center.x, center.y, 6, 0, Math.PI * 2);
ctx.stroke();
// Brand color pass
ctx.strokeStyle = brandColor;
ctx.lineWidth = 2;
ctx.beginPath();
ctx.moveTo(center.x - size, center.y);
ctx.lineTo(center.x + size, center.y);
ctx.stroke();
ctx.beginPath();
ctx.moveTo(center.x, center.y - size);
ctx.lineTo(center.x, center.y + size);
ctx.stroke();
ctx.beginPath();
ctx.arc(center.x, center.y, 6, 0, Math.PI * 2);
ctx.stroke();
}
// Show crop dimensions in original image coordinates
const scale = this.crop_data.scale;
const origWidth = Math.round(width / scale);
const origHeight = Math.round(height / scale);
ctx.font = 'bold 14px monospace';
ctx.textAlign = 'center';
const label = `${origWidth} x ${origHeight}`;
// Text shadow
ctx.fillStyle = outlineColor;
ctx.fillText(label, x + width / 2 + 1, y + height + 21);
ctx.fillText(label, x + width / 2 - 1, y + height + 21);
ctx.fillText(label, x + width / 2, y + height + 22);
ctx.fillText(label, x + width / 2, y + height + 20);
// Brand color text
ctx.fillStyle = brandColor;
ctx.fillText(label, x + width / 2, y + height + 21);
}
// Show aspect ratio lock indicator
if (this.crop_data.aspectRatioLabel) {
const brandColor = '#818cf8';
const outlineColor = '#1e1b4b';
ctx.font = 'bold 12px sans-serif';
ctx.textAlign = 'left';
const lockLabel = `🔒 ${this.crop_data.aspectRatioLabel}`;
// Text shadow
ctx.fillStyle = outlineColor;
ctx.fillText(lockLabel, 11, 21);
ctx.fillText(lockLabel, 9, 21);
ctx.fillText(lockLabel, 10, 22);
ctx.fillText(lockLabel, 10, 20);
// Brand color
ctx.fillStyle = brandColor;
ctx.fillText(lockLabel, 10, 21);
}
}
get_normalized_box(box) {
if (!box) return null;
return {
x: box.width < 0 ? box.x + box.width : box.x,
y: box.height < 0 ? box.y + box.height : box.y,
width: Math.abs(box.width),
height: Math.abs(box.height),
};
}
get_crop_handles() {
const box = this.get_normalized_box(this.crop_data.box);
if (!box) return {};
const { x, y, width, height } = box;
return {
// Corner handles for resize
'top-left': { x, y }, 'top-right': { x: x + width, y },
'bottom-left': { x, y: y + height }, 'bottom-right': { x: x + width, y: y + height },
// Edge handles for resize
'top': { x: x + width / 2, y }, 'bottom': { x: x + width / 2, y: y + height },
'left': { x, y: y + height / 2 }, 'right': { x: x + width, y: y + height / 2 },
// Center handle for move
'center': { x: x + width / 2, y: y + height / 2 }
};
}
get_crop_hit_area(localPos) {
const handleSize = 16;
const handles = this.get_crop_handles();
// Check corner handles first (for resize)
for (const mode of ['top-left', 'top-right', 'bottom-left', 'bottom-right']) {
const handle = handles[mode];
if (handle && Math.abs(localPos.x - handle.x) < handleSize / 2 && Math.abs(localPos.y - handle.y) < handleSize / 2) {
return 'resize-corner';
}
}
// Check edge handles (for resize)
for (const mode of ['top', 'bottom']) {
const handle = handles[mode];
if (handle && Math.abs(localPos.x - handle.x) < handleSize / 2 && Math.abs(localPos.y - handle.y) < handleSize / 2) {
return 'resize-vertical'; // Drag vertically
}
}
for (const mode of ['left', 'right']) {
const handle = handles[mode];
if (handle && Math.abs(localPos.x - handle.x) < handleSize / 2 && Math.abs(localPos.y - handle.y) < handleSize / 2) {
return 'resize-horizontal'; // Drag horizontally
}
}
// Check center handle (for move)
const center = handles['center'];
if (center && Math.abs(localPos.x - center.x) < handleSize && Math.abs(localPos.y - center.y) < handleSize) {
return 'move';
}
// Check if inside box (also move)
const box = this.get_normalized_box(this.crop_data.box);
if (box) {
const { x, y, width, height } = box;
if (localPos.x > x && localPos.x < x + width && localPos.y > y && localPos.y < y + height) {
return 'move';
}
}
return 'new';
}
update_crop_cursor(e) {
if (this.state !== State.CROP || this.crop_data.active) return;
const rect = this.crop_canvas.getBoundingClientRect();
const localPos = { x: e.clientX - rect.left, y: e.clientY - rect.top };
const mode = this.get_crop_hit_area(localPos);
const cursorMap = {
'resize-corner': 'nwse-resize',
'resize-vertical': 'ns-resize',
'resize-horizontal': 'ew-resize',
'move': 'move',
'new': 'crosshair'
};
this.crop_canvas.style.cursor = cursorMap[mode] || 'crosshair';
}
on_crop_mouse_down(e) {
if (this.state !== State.CROP) return;
const rect = this.crop_canvas.getBoundingClientRect();
const localPos = { x: e.clientX - rect.left, y: e.clientY - rect.top };
this.crop_data.active = true;
this.crop_data.mode = this.get_crop_hit_area(localPos);
this.crop_data.startPos = localPos;
this.crop_data.originalBox = this.crop_data.box ? { ...this.get_normalized_box(this.crop_data.box) } : null;
if (this.crop_data.mode === 'new') {
this.crop_data.box = { x: localPos.x, y: localPos.y, width: 0, height: 0 };
this.crop_data.originalBox = null;
}
}
on_document_mouse_move(e) {
if (this.state !== State.CROP || !this.crop_data.active) return;
const rect = this.crop_canvas.getBoundingClientRect();
let localPos = { x: e.clientX - rect.left, y: e.clientY - rect.top };
const canvasW = this.crop_canvas.width;
const canvasH = this.crop_canvas.height;
localPos.x = Math.max(0, Math.min(localPos.x, canvasW));
localPos.y = Math.max(0, Math.min(localPos.y, canvasH));
const dx = localPos.x - this.crop_data.startPos.x;
const dy = localPos.y - this.crop_data.startPos.y;
const { mode, originalBox, aspectRatio } = this.crop_data;
let x, y, width, height;
if (mode === 'new') {
// Drawing new box from click point
x = this.crop_data.box.x; // Starting point
width = localPos.x - x;
height = localPos.y - this.crop_data.box.y;
y = this.crop_data.box.y;
// Enforce aspect ratio when drawing new box
if (aspectRatio) {
const absWidth = Math.abs(width);
const absHeight = Math.abs(height);
const currentRatio = absWidth / (absHeight || 1);
if (currentRatio > aspectRatio) {
width = Math.sign(width || 1) * absHeight * aspectRatio;
} else {
height = Math.sign(height || 1) * absWidth / aspectRatio;
}
}
// Normalize
let normX = width < 0 ? x + width : x;
let normY = height < 0 ? y + height : y;
let normW = Math.abs(width);
let normH = Math.abs(height);
// Clamp to canvas
normX = Math.max(0, normX);
normY = Math.max(0, normY);
if (normX + normW > canvasW) normW = canvasW - normX;
if (normY + normH > canvasH) normH = canvasH - normY;
this.crop_data.box = { x: normX, y: normY, width: Math.max(10, normW), height: Math.max(10, normH) };
} else if (mode === 'move') {
// Move box, keeping size constant
x = originalBox.x + dx;
y = originalBox.y + dy;
width = originalBox.width;
height = originalBox.height;
// Clamp to keep box fully inside canvas
x = Math.max(0, Math.min(x, canvasW - width));
y = Math.max(0, Math.min(y, canvasH - height));
this.crop_data.box = { x, y, width, height };
} else if (mode === 'resize-corner' || mode === 'resize-vertical' || mode === 'resize-horizontal') {
// Center-based resize using delta from drag start
const origCenterX = originalBox.x + originalBox.width / 2;
const origCenterY = originalBox.y + originalBox.height / 2;
// Calculate size change based on drag delta (not absolute position)
// This prevents the "jump" when first clicking a handle
let deltaSize;
if (mode === 'resize-corner') {
// Use diagonal movement for corners
deltaSize = (dx + dy) / 2;
} else if (mode === 'resize-vertical') {
// Use vertical movement for top/bottom edges
deltaSize = dy;
} else {
// Use horizontal movement for left/right edges
deltaSize = dx;
}
// Scale factor based on delta (positive = grow, negative = shrink)
const scaleFactor = 1 + (deltaSize * 2) / Math.max(originalBox.width, originalBox.height);
let newWidth = originalBox.width * Math.max(0.1, scaleFactor);
let newHeight = originalBox.height * Math.max(0.1, scaleFactor);
// Enforce aspect ratio
if (aspectRatio) {
const currentRatio = newWidth / newHeight;
if (currentRatio > aspectRatio) {
newWidth = newHeight * aspectRatio;
} else {
newHeight = newWidth / aspectRatio;
}
}
width = newWidth;
height = newHeight;
// Clamp dimensions to canvas size
if (width > canvasW || height > canvasH) {
const scaleW = canvasW / width;
const scaleH = canvasH / height;
const clampScale = Math.min(scaleW, scaleH);
width *= clampScale;
height *= clampScale;
}
// Calculate center position - try to keep original center but slide if needed
let centerX = origCenterX;
let centerY = origCenterY;
const halfW = width / 2;
const halfH = height / 2;
// Slide center to keep box in bounds
if (centerX - halfW < 0) {
centerX = halfW;
}
if (centerX + halfW > canvasW) {
centerX = canvasW - halfW;
}
if (centerY - halfH < 0) {
centerY = halfH;
}
if (centerY + halfH > canvasH) {
centerY = canvasH - halfH;
}
x = centerX - halfW;
y = centerY - halfH;
// Ensure minimum size
width = Math.max(20, width);
height = Math.max(20, height);
// If aspect ratio locked and we hit minimum, enforce ratio on minimum too
if (aspectRatio && (width <= 20 || height <= 20)) {
if (width / height > aspectRatio) {
width = height * aspectRatio;
} else {
height = width / aspectRatio;
}
}
this.crop_data.box = { x, y, width, height };
}
this.draw_crop_box();
}
on_crop_mouse_move(e) {
this.update_crop_cursor(e);
}
on_crop_mouse_up(e) {
if (this.state !== State.CROP || !this.crop_data.active) return;
this.crop_data.active = false;
if (this.crop_data.box) {
this.crop_data.box = this.get_normalized_box(this.crop_data.box);
}
this.draw_crop_box();
this.render();
}
}
customElements.define('instaraw-imgae-filter-popup', Popup); // Renamed custom element
export const popup = new Popup();123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841/* ---
// Filename: ../ComfyUI_INSTARAW/js/reality_prompt_generator.css
// Reality Prompt Generator (RPG) - Styling (Following AIL Theme Exactly)
// --- */
/* === Main Container (AIL Pattern) === */
.instaraw-rpg-container {
background: #0d0f12;
padding: 16px;
border-radius: 4px;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
color: #f9fafb;
}
/* === Global Select/Dropdown Dark Mode Fix (Chrome compatibility) === */
.instaraw-rpg-container select {
color-scheme: dark;
}
.instaraw-rpg-container select option {
background: #1f2937;
color: #f9fafb;
}
.instaraw-rpg-topbar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.instaraw-rpg-mode-card {
flex: 1 1 320px;
border: 1px solid rgba(255, 255, 255, 0.08);
background: rgba(255, 255, 255, 0.03);
border-radius: 4px;
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;
}
.instaraw-rpg-mode-meta {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
}
.instaraw-rpg-mode-hint {
font-size: 12px;
color: rgba(249, 250, 251, 0.6);
}
.instaraw-rpg-mode-pill {
background: rgba(167, 139, 250, 0.2);
color: #c4b5fd;
padding: 4px 10px;
border-radius: 999px;
font-size: 11px;
font-weight: 600;
}
.instaraw-rpg-kpi-row {
display: flex;
flex: 1 1 240px;
gap: 12px;
justify-content: flex-end;
flex-wrap: wrap;
}
.instaraw-rpg-kpi {
flex: 1 1 100px;
border: 1px solid rgba(255, 255, 255, 0.08);
background: rgba(255, 255, 255, 0.02);
border-radius: 4px;
padding: 10px 14px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 2px;
min-width: 100px;
}
.instaraw-rpg-kpi span {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: rgba(249, 250, 251, 0.5);
font-weight: 500;
}
.instaraw-rpg-kpi strong {
font-size: 20px;
font-weight: 700;
color: #a78bfa;
font-variant-numeric: tabular-nums;
}
/* === Header & Tabs === */
.instaraw-rpg-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
gap: 12px;
flex-wrap: wrap;
}
.instaraw-rpg-tabs {
display: flex;
gap: 8px;
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 4px;
padding: 12px;
margin-top: 12px;
}
.instaraw-rpg-tab {
background: rgba(255, 255, 255, 0.05);
color: rgba(249, 250, 251, 0.7);
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
font-weight: 500;
display: flex;
align-items: center;
gap: 6px;
}
.instaraw-rpg-tab:hover {
background: rgba(255, 255, 255, 0.08);
border-color: #818cf8;
color: #f9fafb;
}
.instaraw-rpg-tab.active {
background: #6366f1;
color: #ffffff;
border-color: #6366f1;
}
/* === Mode Selector (AIL Pattern) === */
.instaraw-rpg-mode-selector {
display: flex;
align-items: center;
gap: 12px;
}
.instaraw-rpg-mode-selector label {
color: rgba(249, 250, 251, 0.7);
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
}
.instaraw-rpg-mode-dropdown {
background: rgba(255, 255, 255, 0.05);
color: #f9fafb;
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 8px 12px;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
font-weight: 500;
outline: none;
min-width: 140px;
color-scheme: dark;
}
.instaraw-rpg-mode-dropdown:hover {
background: rgba(255, 255, 255, 0.08);
border-color: #818cf8;
}
.instaraw-rpg-mode-dropdown:focus {
border-color: #a78bfa;
}
.instaraw-rpg-mode-dropdown option {
background: #1f2937;
color: #f9fafb;
}
/* === Content Layout (Two-Column Grid: 50% Main Panel | 50% Batch) === */
.instaraw-rpg-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin-bottom: 16px;
}
.instaraw-rpg-main-panel {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 4px;
padding: 16px;
}
.instaraw-rpg-batch-panel {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 4px;
padding: 16px;
min-height: 200px;
/* No max-height - let it grow naturally */
overflow-y: visible;
}
.instaraw-rpg-panel-card {
margin-top: 12px;
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 4px;
padding: 12px;
}
/* === Buttons (AIL Pattern) === */
.instaraw-rpg-btn-primary {
background: #6366f1;
color: #ffffff;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
}
.instaraw-rpg-btn-primary:hover {
background: #4f46e5;
}
.instaraw-rpg-btn-primary:disabled {
background: #4f46e5;
cursor: not-allowed;
color: rgba(255, 255, 255, 0.7);
}
.instaraw-rpg-btn-secondary {
background: rgba(255, 255, 255, 0.08);
color: #f9fafb;
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 500;
font-size: 12px;
}
.instaraw-rpg-btn-secondary:hover {
background: rgba(255, 255, 255, 0.12);
border-color: #818cf8;
}
.instaraw-rpg-btn-secondary:disabled {
background: rgba(255, 255, 255, 0.05);
cursor: not-allowed;
color: rgba(249, 250, 251, 0.5);
}
.instaraw-rpg-btn-warning {
background: rgba(245, 158, 11, 0.15);
border-color: rgba(245, 158, 11, 0.4);
color: #fbbf24;
}
.instaraw-rpg-btn-warning:hover {
background: rgba(245, 158, 11, 0.25);
border-color: rgba(245, 158, 11, 0.6);
}
.instaraw-rpg-btn-danger {
background: #ef4444;
color: #ffffff;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
width: 100%;
margin-top: 12px;
}
.instaraw-rpg-btn-danger:hover {
background: #dc2626;
}
/* === Loading State === */
.instaraw-rpg-loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 64px 24px;
text-align: center;
}
.instaraw-rpg-loading-spinner {
width: 48px;
height: 48px;
border: 4px solid rgba(167, 139, 250, 0.2);
border-top-color: #a78bfa;
border-radius: 50%;
animation: instaraw-rpg-spin 1s linear infinite;
margin-bottom: 16px;
}
@keyframes instaraw-rpg-spin {
to { transform: rotate(360deg); }
}
.instaraw-rpg-progress-bar {
width: 100%;
max-width: 400px;
height: 8px;
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
overflow: hidden;
margin: 16px 0;
}
.instaraw-rpg-progress-fill {
height: 100%;
background: linear-gradient(90deg, #6366f1, #a78bfa);
}
.instaraw-rpg-progress-text {
font-size: 12px;
color: rgba(249, 250, 251, 0.7);
margin-top: 8px;
}
/* === Button Loading Progress Bar === */
.instaraw-rpg-progress-bar-loading {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, #c4b5fd, #818cf8, #c4b5fd);
background-size: 200% 100%;
animation: instaraw-rpg-progress-slide 1.5s linear infinite;
opacity: 1;
box-shadow: 0 0 8px rgba(167, 139, 250, 0.6);
}
@keyframes instaraw-rpg-progress-slide {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
/* === Empty State (AIL Pattern) === */
.instaraw-rpg-empty {
text-align: center;
padding: 48px 24px;
background: rgba(255, 255, 255, 0.02);
border-radius: 4px;
border: 1px dashed rgba(167, 139, 250, 0.2);
grid-column: 1 / -1;
}
.instaraw-rpg-empty p {
margin: 8px 0;
color: rgba(249, 250, 251, 0.7);
font-size: 13px;
font-weight: 500;
}
.instaraw-rpg-hint {
font-size: 12px;
color: rgba(129, 140, 248, 0.6);
font-weight: 400;
}
/* === Library Tab === */
.instaraw-rpg-library {
display: flex;
flex-direction: column;
gap: 16px;
}
.instaraw-rpg-filters {
display: flex;
flex-direction: column;
gap: 8px;
}
.instaraw-rpg-search-input {
width: 100%;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f9fafb;
padding: 10px 12px;
border-radius: 4px;
font-size: 13px;
outline: none;
}
.instaraw-rpg-search-input:focus {
border-color: #a78bfa;
background: rgba(255, 255, 255, 0.08);
}
.instaraw-rpg-filter-row {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.instaraw-rpg-filter-dropdown {
flex: 1;
min-width: 120px;
background: rgba(255, 255, 255, 0.05);
color: #f9fafb;
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 8px 10px;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
outline: none;
color-scheme: dark;
}
.instaraw-rpg-filter-dropdown:hover {
background: rgba(255, 255, 255, 0.08);
border-color: #818cf8;
}
.instaraw-rpg-filter-dropdown:focus {
border-color: #818cf8;
outline: none;
}
.instaraw-rpg-filter-dropdown option {
background: #1f2937;
color: #f9fafb;
}
/* Ensure classification dropdowns in edit mode are clickable */
.instaraw-rpg-user-prompt-edit-content-type,
.instaraw-rpg-user-prompt-edit-safety-level,
.instaraw-rpg-user-prompt-edit-shot-type {
position: relative;
z-index: 10;
pointer-events: auto;
}
.instaraw-rpg-checkbox-label {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 4px;
cursor: pointer;
font-size: 12px;
color: #f9fafb;
white-space: nowrap;
user-select: none;
}
.instaraw-rpg-checkbox-label:hover {
background: rgba(255, 255, 255, 0.08);
border-color: #818cf8;
}
.instaraw-rpg-checkbox-label input[type="checkbox"] {
cursor: pointer;
margin: 0;
}
.instaraw-rpg-library-header {
margin: 12px 0 8px 0;
padding: 8px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.instaraw-rpg-result-count {
font-size: 13px;
color: rgba(249, 250, 251, 0.7);
font-weight: 500;
}
.instaraw-rpg-sdxl-toggle {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
background: rgba(167, 139, 250, 0.15);
border: 1px solid rgba(167, 139, 250, 0.3);
border-radius: 4px;
cursor: pointer;
font-size: 12px;
color: #c4b5fd;
white-space: nowrap;
user-select: none;
}
.instaraw-rpg-sdxl-toggle:hover {
background: rgba(167, 139, 250, 0.25);
border-color: rgba(167, 139, 250, 0.5);
}
.instaraw-rpg-sdxl-toggle input[type="checkbox"] {
cursor: pointer;
margin: 0;
}
.instaraw-rpg-pagination-top {
margin-bottom: 12px;
}
.instaraw-rpg-library-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 3)), 1fr));
gap: 12px;
}
@media (max-width: 420px) {
.instaraw-rpg-library-grid {
grid-template-columns: 1fr;
}
}
.instaraw-rpg-library-card {
background: rgba(255, 255, 255, 0.04);
border: 2px solid rgba(255, 255, 255, 0.08);
border-radius: 4px;
overflow: hidden;
position: relative;
max-width: 500px;
}
.instaraw-rpg-library-card:hover {
border-color: rgba(99, 102, 241, 0.5);
}
.instaraw-rpg-library-card.in-batch {
border-color: rgba(167, 139, 250, 0.4);
}
/* Selection mode styling */
.instaraw-rpg-library-card.selection-mode {
cursor: pointer;
}
.instaraw-rpg-library-card.selection-mode:hover {
border-color: rgba(59, 130, 246, 0.6);
background: rgba(59, 130, 246, 0.05);
}
/* Selected card indicator */
.instaraw-rpg-library-card.selection-mode:has(.instaraw-rpg-prompt-checkbox:checked) {
border-color: rgba(59, 130, 246, 0.8);
background: rgba(59, 130, 246, 0.12);
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}
.instaraw-rpg-selection-checkbox {
flex-shrink: 0;
}
.instaraw-rpg-selection-checkbox input[type="checkbox"] {
accent-color: #3b82f6;
}
/* Badge removed - button now shows Remove state instead */
.instaraw-rpg-library-card-header {
display: flex;
justify-content: space-between;
padding: 8px;
background: rgba(0, 0, 0, 0.2);
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.instaraw-rpg-bookmark-btn {
background: transparent;
border: none;
color: rgba(249, 250, 251, 0.5);
font-size: 16px;
cursor: pointer;
}
.instaraw-rpg-bookmark-btn:hover {
color: #fbbf24;
}
.instaraw-rpg-bookmark-btn.bookmarked {
color: #fbbf24;
}
.instaraw-rpg-add-to-batch-btn {
background: #6366f1;
color: #ffffff;
border: none;
padding: 4px 12px;
border-radius: 4px;
cursor: pointer;
font-size: 11px;
font-weight: 600;
}
.instaraw-rpg-add-to-batch-btn:hover {
background: #4f46e5;
}
.instaraw-rpg-batch-controls {
display: flex;
gap: 4px;
}
.instaraw-rpg-undo-batch-btn {
background: #dc2626;
color: #ffffff;
border: none;
padding: 4px 10px;
border-radius: 4px;
cursor: pointer;
font-size: 11px;
font-weight: 600;
}
.instaraw-rpg-undo-batch-btn:hover {
background: #b91c1c;
}
.instaraw-rpg-library-card-content {
padding: 12px;
}
.instaraw-rpg-prompt-preview {
font-size: 12px;
color: rgba(249, 250, 251, 0.8);
line-height: 1.42;
margin-bottom: 8px;
}
.instaraw-rpg-error-text {
color: rgba(156, 163, 175, 0.8) !important;
font-style: italic;
}
.instaraw-rpg-library-card-tags {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.instaraw-rpg-tag {
background: rgba(167, 139, 250, 0.2);
color: #c4b5fd;
padding: 2px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 500;
}
.instaraw-rpg-tag-more {
background: rgba(129, 140, 248, 0.2);
color: #818cf8;
padding: 2px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 500;
}
/* === Search Highlighting === */
.instaraw-rpg-highlight {
background: rgba(251, 191, 36, 0.4);
color: #fbbf24;
font-weight: 600;
padding: 1px 2px;
border-radius: 4px;
}
/* === Match Badge === */
.instaraw-rpg-match-badge {
display: inline-block;
background: rgba(34, 197, 94, 0.2);
color: #22c55e;
padding: 4px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
margin-bottom: 8px;
}
/* === SDXL Mode Styles === */
.instaraw-rpg-tags-primary {
margin-bottom: 8px;
}
/* SDXL mode uses existing .instaraw-rpg-prompt-preview for clean display */
.instaraw-rpg-expandable-tags {
display: flex;
flex-wrap: wrap;
gap: 4px;
align-items: center;
}
.instaraw-rpg-expandable-tags[data-expanded="false"] {
max-height: 80px;
overflow: hidden;
}
.instaraw-rpg-expandable-tags[data-expanded="true"] {
max-height: none;
}
.instaraw-rpg-expand-tags-btn {
background: rgba(99, 102, 241, 0.2);
color: #818cf8;
border: 1px solid rgba(99, 102, 241, 0.3);
padding: 2px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
cursor: pointer;
}
.instaraw-rpg-expand-tags-btn:hover {
background: rgba(99, 102, 241, 0.3);
border-color: rgba(99, 102, 241, 0.5);
}
.instaraw-rpg-prompt-preview-small {
font-size: 11px;
color: rgba(249, 250, 251, 0.5);
line-height: 1.42;
font-style: italic;
}
.instaraw-rpg-toggle-tags-btn {
background: rgba(129, 140, 248, 0.2);
color: #818cf8;
border: 1px solid rgba(129, 140, 248, 0.3);
padding: 2px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
cursor: pointer;
}
.instaraw-rpg-toggle-tags-btn:hover {
background: rgba(129, 140, 248, 0.3);
border-color: rgba(129, 140, 248, 0.5);
}
/* === Pagination === */
.instaraw-rpg-pagination {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
}
.instaraw-rpg-page-info {
font-size: 12px;
color: rgba(249, 250, 251, 0.7);
}
/* === Creative/Character Tabs === */
.instaraw-rpg-creative,
.instaraw-rpg-character {
display: flex;
flex-direction: column;
gap: 16px;
}
.instaraw-rpg-model-settings {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 4px;
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
}
.instaraw-rpg-model-row {
display: flex;
flex-direction: column;
gap: 6px;
}
.instaraw-rpg-model-row label {
font-size: 12px;
font-weight: 500;
color: rgba(249, 250, 251, 0.7);
}
.instaraw-rpg-model-select,
.instaraw-rpg-model-temp,
.instaraw-rpg-model-top-p,
.instaraw-rpg-system-prompt {
width: 100%;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 4px;
padding: 8px 10px;
color: #f9fafb;
font-size: 13px;
outline: none;
color-scheme: dark;
}
.instaraw-rpg-model-select option {
background: #1f2937;
color: #f9fafb;
}
.instaraw-rpg-model-select:focus,
.instaraw-rpg-model-temp:focus,
.instaraw-rpg-model-top-p:focus,
.instaraw-rpg-system-prompt:focus {
border-color: #a78bfa;
}
.instaraw-rpg-model-grid {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.instaraw-rpg-model-control {
flex: 1 1 160px;
display: flex;
flex-direction: column;
gap: 6px;
}
.instaraw-rpg-system-prompt {
min-height: 90px;
resize: vertical;
font-family: 'Inter', sans-serif;
line-height: 1.42;
}
.instaraw-rpg-creative-header h3 {
margin: 0 0 8px 0;
font-size: 16px;
color: #f9fafb;
}
.instaraw-rpg-creative-header p {
margin: 0;
font-size: 12px;
color: rgba(249, 250, 251, 0.6);
}
.instaraw-rpg-inspiration-section label {
display: block;
margin-bottom: 8px;
font-size: 12px;
font-weight: 500;
color: rgba(249, 250, 251, 0.8);
}
.instaraw-rpg-inspiration-list {
background: rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 4px;
padding: 12px;
max-height: 150px;
overflow-y: auto;
}
.instaraw-rpg-inspiration-item {
padding: 8px;
background: rgba(255, 255, 255, 0.04);
border-radius: 4px;
margin-bottom: 6px;
}
.instaraw-rpg-inspiration-item:last-child {
margin-bottom: 0;
}
.instaraw-rpg-inspiration-text {
font-size: 11px;
color: rgba(249, 250, 251, 0.7);
line-height: 1.42;
}
.instaraw-rpg-creative-controls {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.instaraw-rpg-control-group {
flex: 1;
min-width: 120px;
}
.instaraw-rpg-control-group label {
display: block;
margin-bottom: 6px;
font-size: 12px;
font-weight: 500;
color: rgba(249, 250, 251, 0.8);
}
.instaraw-rpg-number-input {
width: 100%;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f9fafb;
padding: 8px 10px;
border-radius: 4px;
font-size: 13px;
outline: none;
}
.instaraw-rpg-number-input:focus {
border-color: #a78bfa;
background: rgba(255, 255, 255, 0.08);
outline: none;
box-shadow: 0 0 0 1px #a78bfa;
}
.instaraw-rpg-checkbox {
margin-right: 6px;
accent-color: #6366f1;
}
.instaraw-rpg-character-ref-input {
width: 100%;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f9fafb;
padding: 10px 12px;
border-radius: 4px;
font-size: 13px;
font-family: 'Inter', monospace;
outline: none;
resize: vertical;
line-height: 1.42;
}
.instaraw-rpg-character-ref-input:focus {
border-color: #a78bfa;
background: rgba(255, 255, 255, 0.08);
}
.instaraw-rpg-creative-preview {
background: rgba(167, 139, 250, 0.08);
border: 1px solid rgba(167, 139, 250, 0.2);
border-radius: 4px;
padding: 16px;
}
.instaraw-rpg-creative-preview h4 {
margin: 0 0 12px 0;
font-size: 14px;
color: #a78bfa;
}
.instaraw-rpg-creative-preview-list,
.instaraw-rpg-character-preview-list {
max-height: 200px;
overflow-y: auto;
margin-bottom: 12px;
}
.instaraw-rpg-preview-item {
background: rgba(0, 0, 0, 0.2);
padding: 10px;
border-radius: 4px;
margin-bottom: 8px;
}
.instaraw-rpg-preview-item-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 6px;
}
.instaraw-rpg-preview-images {
display: flex;
gap: 4px;
}
.instaraw-rpg-preview-item strong {
color: #c4b5fd;
font-size: 11px;
flex-shrink: 0;
}
.instaraw-rpg-preview-item p {
margin: 0;
font-size: 12px;
color: rgba(249, 250, 251, 0.8);
line-height: 1.42;
}
/* === Batch Panel === */
.instaraw-rpg-batch-container {
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 4px;
padding: 12px;
margin-top: 12px;
}
.instaraw-rpg-batch-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 12px;
margin-bottom: 16px;
}
.instaraw-rpg-batch-header h3 {
margin: 0;
font-size: 16px;
color: #f9fafb;
}
.instaraw-rpg-batch-subtitle {
margin: 10px 0 0 0;
font-size: 12px;
color: rgba(249, 250, 251, 0.6);
}
.instaraw-rpg-batch-actions {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.instaraw-rpg-batch-count {
background: rgba(167, 139, 250, 0.2);
color: #c4b5fd;
padding: 6px 12px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
}
.instaraw-rpg-reorder-toggle-btn {
background: rgba(99, 102, 241, 0.2);
color: #818cf8;
border: 1px solid rgba(99, 102, 241, 0.3);
padding: 6px 12px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
}
.instaraw-rpg-reorder-toggle-btn:hover {
background: rgba(99, 102, 241, 0.3);
border-color: rgba(99, 102, 241, 0.5);
}
.instaraw-rpg-batch-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 3)), 1fr));
gap: 12px;
}
@media (max-width: 720px) {
.instaraw-rpg-batch-grid {
grid-template-columns: 1fr;
}
}
.instaraw-rpg-batch-item {
position: relative;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 4px;
padding: 12px;
cursor: move;
min-height: 220px;
display: flex;
flex-direction: column;
gap: 8px;
max-width: 500px;
}
.instaraw-rpg-batch-item:hover {
border-color: rgba(99, 102, 241, 0.5);
}
.instaraw-rpg-batch-item.instaraw-rpg-drop-before::before {
content: '';
position: absolute;
top: -7px;
left: 0;
right: 0;
height: 4px;
background: #a78bfa;
border-radius: 2px;
z-index: 1000;
pointer-events: none;
}
.instaraw-rpg-batch-item.instaraw-rpg-drop-after::after {
content: '';
position: absolute;
bottom: -7px;
left: 0;
right: 0;
height: 4px;
background: #a78bfa;
border-radius: 2px;
z-index: 1000;
pointer-events: none;
}
/* === Batch Card Thumbnails === */
.instaraw-rpg-batch-thumbnail {
position: relative;
width: 100%;
height: 180px;
border-radius: 4px;
overflow: hidden;
background: #000000;
border: 2px solid rgba(255, 255, 255, 0.1);
margin-bottom: 8px;
display: flex;
align-items: center;
justify-content: center;
}
.instaraw-rpg-batch-thumbnail img {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
}
.instaraw-rpg-batch-thumbnail-latent {
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
}
/* Aspect ratio preview box for batch cards */
.instaraw-rpg-batch-aspect-preview {
width: 120px;
max-height: 160px; /* Prevent tall portraits from overflowing */
background: rgba(255, 255, 255, 0.1);
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
padding: 8px;
}
.instaraw-rpg-batch-aspect-content {
text-align: center;
color: #ffffff;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.instaraw-rpg-batch-thumbnail-missing {
background: rgba(245, 158, 11, 0.1);
border-color: rgba(245, 158, 11, 0.3);
border-style: dashed;
}
.instaraw-rpg-batch-thumbnail-placeholder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #9ca3af;
text-align: center;
padding: 8px;
}
.instaraw-rpg-batch-thumbnail-index {
position: absolute;
top: 6px;
left: 6px;
background: rgba(0, 0, 0, 0.85);
color: #ffffff;
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 700;
border: 1px solid rgba(255, 255, 255, 0.3);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
z-index: 10;
}
.instaraw-rpg-batch-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.instaraw-rpg-batch-item-number {
background: #6366f1;
color: #ffffff;
padding: 4px 10px;
border-radius: 4px;
font-size: 11px;
font-weight: 600;
}
.instaraw-rpg-source-badge {
padding: 4px 8px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
}
.instaraw-rpg-source-badge.user {
background: rgba(255, 255, 255, 0.1);
color: rgba(249, 250, 251, 0.7);
}
.instaraw-rpg-source-badge.library {
background: rgba(59, 130, 246, 0.2);
color: #60a5fa;
}
/* Prompt Meta Info (model/theme at bottom of card) */
.instaraw-rpg-prompt-meta {
display: flex;
flex-direction: column;
gap: 4px;
margin-top: 10px;
padding-top: 8px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.instaraw-rpg-prompt-meta-item {
font-size: 10px;
color: rgba(249, 250, 251, 0.4);
font-weight: 400;
}
.instaraw-rpg-id-badge-container {
display: flex;
align-items: center;
gap: 2px;
background: rgba(0, 0, 0, 0.3);
border-radius: 4px;
padding: 2px;
}
.instaraw-rpg-id-badge {
padding: 2px 6px;
font-size: 9px;
font-weight: 500;
color: rgba(249, 250, 251, 0.5);
font-family: monospace;
cursor: help;
}
.instaraw-rpg-id-copy-btn {
background: none;
border: none;
padding: 2px 4px;
cursor: pointer;
font-size: 11px;
opacity: 0.6;
border-radius: 2px;
}
.instaraw-rpg-id-copy-btn:hover {
opacity: 1;
background: rgba(255, 255, 255, 0.1);
}
.instaraw-rpg-copy-prompt-btn {
background: none;
border: none;
padding: 2px 2px;
cursor: pointer;
font-size: 11px;
opacity: 0.6;
border-radius: 2px;
}
.instaraw-rpg-copy-prompt-btn:hover {
opacity: 1;
background: rgba(255, 255, 255, 0.1);
}
.instaraw-rpg-source-badge.from-library {
background: rgba(59, 130, 246, 0.2);
color: #60a5fa;
}
.instaraw-rpg-source-badge.from-ai {
background: rgba(167, 139, 250, 0.2);
color: #c4b5fd;
}
.instaraw-rpg-source-badge.from-character {
background: rgba(236, 72, 153, 0.2);
color: #f9a8d4;
}
/* Repeat Count Status Badges */
.instaraw-rpg-repeat-status {
font-size: 10px;
padding: 3px 8px;
border-radius: 4px;
font-weight: 600;
border: 1px solid;
}
.instaraw-rpg-repeat-match {
background: rgba(34, 197, 94, 0.15);
color: #4ade80;
border-color: rgba(34, 197, 94, 0.3);
}
.instaraw-rpg-repeat-mismatch {
background: rgba(245, 158, 11, 0.15);
color: #fbbf24;
border-color: rgba(245, 158, 11, 0.4);
}
.instaraw-rpg-crop-indicator {
position: absolute;
bottom: 4px;
right: 4px;
background: rgba(139, 92, 246, 0.85);
color: #ffffff;
font-size: 9px;
font-weight: 600;
padding: 2px 6px;
border-radius: 4px;
pointer-events: none;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.instaraw-rpg-batch-delete-btn {
background: #ef4444;
color: #ffffff;
border: none;
width: 28px;
height: 28px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
font-size: 16px;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
}
.instaraw-rpg-batch-delete-btn:hover {
background: #dc2626;
}
.instaraw-rpg-batch-item-content {
display: flex;
flex-direction: column;
gap: 8px;
}
.instaraw-rpg-batch-tags-display {
display: flex;
flex-wrap: wrap;
gap: 4px;
padding: 8px;
background: rgba(167, 139, 250, 0.1);
border: 1px solid rgba(167, 139, 250, 0.2);
border-radius: 4px;
margin-bottom: 8px;
}
.instaraw-rpg-batch-tags-text {
font-size: 12px;
line-height: 1.42;
color: rgba(249, 250, 251, 0.9);
padding: 10px;
background: rgba(167, 139, 250, 0.08);
border: 1px solid rgba(167, 139, 250, 0.2);
border-radius: 4px;
margin-bottom: 12px;
font-family: 'Inter', monospace;
white-space: pre-wrap;
word-break: break-word;
}
/* SDXL mode now uses standard .instaraw-rpg-positive-textarea */
.instaraw-rpg-batch-item-content label,
.instaraw-rpg-thumbnail-label {
font-size: 11px;
font-weight: 500;
color: rgba(249, 250, 251, 0.7);
text-transform: uppercase;
display: block;
}
.instaraw-rpg-prompt-textarea {
width: 100%;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f9fafb;
padding: 8px 10px;
border-radius: 4px;
font-size: 12px;
font-family: 'Inter', monospace;
outline: none;
resize: vertical;
line-height: 1.42;
min-height: 60px;
max-height: 200px;
overflow-y: auto;
}
.instaraw-rpg-prompt-textarea:focus {
border-color: #a78bfa;
background: rgba(255, 255, 255, 0.08);
outline: none;
box-shadow: 0 0 0 1px #a78bfa;
}
/* Batch queue textareas - allow unlimited resize to view full prompts */
.instaraw-rpg-batch-item .instaraw-rpg-prompt-textarea,
.instaraw-rpg-positive-textarea,
.instaraw-rpg-negative-textarea {
max-height: none;
}
.instaraw-rpg-negative-toggle {
display: flex;
align-items: center;
}
.instaraw-rpg-batch-item-controls {
display: flex;
align-items: center;
gap: 8px;
}
.instaraw-rpg-batch-item-controls label {
color: rgba(249, 250, 251, 0.6);
font-size: 11px;
font-weight: 500;
text-transform: none;
}
.instaraw-rpg-repeat-input {
width: 60px;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f9fafb;
padding: 6px;
border-radius: 4px;
text-align: center;
font-size: 12px;
font-weight: 600;
outline: none;
}
.instaraw-rpg-repeat-input:hover {
background: rgba(255, 255, 255, 0.08);
border-color: #818cf8;
}
.instaraw-rpg-repeat-input:focus {
border-color: #a78bfa;
outline: none;
box-shadow: 0 0 0 1px #a78bfa;
}
.instaraw-rpg-seed-input:focus {
border-color: #a78bfa !important;
outline: none !important;
box-shadow: 0 0 0 1px #a78bfa !important;
}
.instaraw-rpg-random-count-input:focus {
border-color: #a78bfa !important;
outline: none !important;
box-shadow: 0 0 0 1px #a78bfa !important;
}
.instaraw-rpg-batch-item-tags {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin-top: 4px;
}
/* === Image Preview Section === */
.instaraw-rpg-image-preview-section {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 4px;
padding: 16px;
margin-bottom: 12px;
}
.instaraw-rpg-image-preview-empty {
text-align: center;
padding: 32px 16px;
padding-top: 10px;
}
.instaraw-rpg-image-preview-empty p {
margin: 4px 0;
font-size: 13px;
color: rgba(249, 250, 251, 0.6);
}
.instaraw-rpg-image-preview-header {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
font-size: 12px;
color: rgba(249, 250, 251, 0.8);
}
.instaraw-rpg-validation-badge {
padding: 6px 12px;
border-radius: 4px;
font-weight: 600;
}
.instaraw-rpg-validation-match {
background: rgba(16, 185, 129, 0.2);
color: #10b981;
}
.instaraw-rpg-validation-mismatch {
background: rgba(251, 191, 36, 0.2);
color: #fbbf24;
}
.instaraw-rpg-image-preview-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 12px; /* Increased from 8px for better spacing */
}
.instaraw-rpg-preview-thumb {
position: relative; /* For index badge positioning */
width: 100%;
height: 120px; /* Fixed height container */
border-radius: 4px;
overflow: hidden;
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%); /* Purple gradient like latents */
border: 2px solid rgba(139, 92, 246, 0.4);
display: flex;
align-items: center;
justify-content: center;
}
/* Aspect ratio box inside preview thumb (for IMG2IMG) */
.instaraw-rpg-preview-thumb .instaraw-rpg-preview-aspect-box {
width: 90px;
max-height: 105px; /* Prevent tall portraits from overflowing */
border-radius: 4px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.instaraw-rpg-preview-thumb img {
width: 100%;
height: 100%;
object-fit: cover; /* Fill the aspect ratio box */
display: block;
}
.instaraw-rpg-preview-more {
display: flex;
align-items: center;
justify-content: center;
background: rgba(167, 139, 250, 0.2);
color: #a78bfa;
font-size: 11px;
font-weight: 600;
border-radius: 4px;
}
/* === Footer Stats === */
.instaraw-rpg-footer {
background: rgba(0, 0, 0, 0.2);
padding: 12px 16px;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.06);
}
.instaraw-rpg-stats {
display: flex;
align-items: center;
gap: 16px;
flex-wrap: wrap;
}
.instaraw-rpg-stat-badge {
background: rgba(167, 139, 250, 0.2);
color: #c4b5fd;
padding: 6px 14px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
white-space: nowrap;
}
.instaraw-rpg-stat-label {
font-size: 11px;
color: rgba(249, 250, 251, 0.7);
font-weight: 500;
white-space: nowrap;
}
/* === Scrollbar Styling === */
.instaraw-rpg-main-panel::-webkit-scrollbar,
.instaraw-rpg-batch-panel::-webkit-scrollbar,
.instaraw-rpg-inspiration-list::-webkit-scrollbar,
.instaraw-rpg-creative-preview-list::-webkit-scrollbar,
.instaraw-rpg-character-preview-list::-webkit-scrollbar {
width: 8px;
}
.instaraw-rpg-main-panel::-webkit-scrollbar-track,
.instaraw-rpg-batch-panel::-webkit-scrollbar-track,
.instaraw-rpg-inspiration-list::-webkit-scrollbar-track,
.instaraw-rpg-creative-preview-list::-webkit-scrollbar-track,
.instaraw-rpg-character-preview-list::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.2);
border-radius: 4px;
}
.instaraw-rpg-main-panel::-webkit-scrollbar-thumb,
.instaraw-rpg-batch-panel::-webkit-scrollbar-thumb,
.instaraw-rpg-inspiration-list::-webkit-scrollbar-thumb,
.instaraw-rpg-creative-preview-list::-webkit-scrollbar-thumb,
.instaraw-rpg-character-preview-list::-webkit-scrollbar-thumb {
background: rgba(167, 139, 250, 0.3);
border-radius: 4px;
}
.instaraw-rpg-main-panel::-webkit-scrollbar-thumb:hover,
.instaraw-rpg-batch-panel::-webkit-scrollbar-thumb:hover,
.instaraw-rpg-inspiration-list::-webkit-scrollbar-thumb:hover,
.instaraw-rpg-creative-preview-list::-webkit-scrollbar-thumb:hover,
.instaraw-rpg-character-preview-list::-webkit-scrollbar-thumb:hover {
background: rgba(167, 139, 250, 0.5);
}
/* === Unified Generate Tab Styles === */
.instaraw-rpg-generate-unified {
display: flex;
flex-direction: column;
gap: 16px;
}
.instaraw-rpg-section {
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 4px;
padding: 14px;
}
.instaraw-rpg-section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
gap: 10px;
}
.instaraw-rpg-section-header-no-margin-bottom {
margin-bottom: 0px;
}
.instaraw-rpg-section-label {
font-size: 13px;
font-weight: 600;
color: #e5e7eb;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.instaraw-rpg-mode-badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 14px;
font-size: 12px;
font-weight: 700;
border-radius: 4px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.instaraw-rpg-mode-img2img {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
border: 2px solid #60a5fa;
color: #ffffff;
}
.instaraw-rpg-mode-txt2img {
background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
border: 2px solid #a78bfa;
color: #ffffff;
}
.instaraw-rpg-hint-badge {
padding: 4px 10px;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 4px;
font-size: 11px;
color: #d1d5db;
}
.instaraw-rpg-hint-text {
font-size: 11px;
color: #9ca3af;
font-style: italic;
}
.instaraw-rpg-character-section {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.instaraw-rpg-character-actions {
display: flex;
gap: 10px;
margin-top: 10px;
}
.instaraw-rpg-character-preview {
margin-top: 12px;
padding: 10px;
background: rgba(139, 92, 246, 0.1);
border: 1px solid rgba(139, 92, 246, 0.3);
border-radius: 4px;
}
.instaraw-rpg-character-desc-text {
margin: 6px 0 0 0;
font-size: 12px;
color: #d1d5db;
line-height: 1.42;
}
.instaraw-rpg-checkbox-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
margin-top: 10px;
}
.instaraw-rpg-checkbox-label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
padding: 8px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 4px;
}
.instaraw-rpg-checkbox-label:hover {
background: rgba(255, 255, 255, 0.06);
border-color: rgba(139, 92, 246, 0.4);
}
.instaraw-rpg-checkbox-label input[type="checkbox"]:checked + span {
color: #a78bfa;
font-weight: 600;
}
.instaraw-rpg-checkbox-row {
display: flex;
gap: 16px;
flex-wrap: wrap;
margin-top: 10px;
}
.instaraw-rpg-txt2img-settings {
margin-top: 12px;
}
.instaraw-rpg-user-text-input {
width: 100%;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #f9fafb;
padding: 10px 12px;
border-radius: 4px;
font-size: 13px;
font-family: 'Inter', sans-serif;
outline: none;
resize: vertical;
line-height: 1.42;
}
.instaraw-rpg-user-text-input:focus {
border-color: #a78bfa;
background: rgba(255, 255, 255, 0.08);
}
.instaraw-rpg-library-controls {
margin-top: 12px;
}
.instaraw-rpg-control-row {
display: flex;
align-items: center;
gap: 10px;
margin-top: 8px;
}
.instaraw-rpg-control-row span {
font-size: 13px;
color: #d1d5db;
}
.instaraw-rpg-btn-text {
background: transparent;
border: 1px solid rgba(139, 92, 246, 0.4);
color: #a78bfa;
padding: 6px 12px;
font-size: 12px;
border-radius: 4px;
cursor: pointer;
}
.instaraw-rpg-btn-text:hover {
background: rgba(139, 92, 246, 0.2);
border-color: #a78bfa;
color: #c4b5fd;
}
.instaraw-rpg-generate-unified-btn {
width: 100%;
margin-top: 8px;
}
/* === Generation Progress Section === */
.instaraw-rpg-generation-progress {
margin-top: 12px;
padding: 14px;
background: rgba(99, 102, 241, 0.08);
border: 1px solid rgba(99, 102, 241, 0.3);
border-radius: 4px;
}
.instaraw-rpg-progress-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.instaraw-rpg-progress-header h4 {
margin: 0;
color: #e5e7eb;
font-size: 14px;
font-weight: 600;
}
.instaraw-rpg-progress-items {
display: flex;
flex-direction: column;
gap: 12px;
}
.instaraw-rpg-progress-item {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 4px;
padding: 12px;
}
.instaraw-rpg-progress-item.success {
border-color: rgba(34, 197, 94, 0.4);
background: rgba(34, 197, 94, 0.08);
}
.instaraw-rpg-progress-item.error {
border-color: rgba(239, 68, 68, 0.4);
background: rgba(239, 68, 68, 0.08);
}
.instaraw-rpg-progress-item.in-progress {
border-color: rgba(99, 102, 241, 0.5);
background: rgba(99, 102, 241, 0.1);
}
.instaraw-rpg-progress-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
gap: 8px;
}
.instaraw-rpg-progress-images {
display: flex;
gap: 4px;
flex: 1;
}
.instaraw-rpg-progress-item-label {
font-size: 12px;
font-weight: 600;
color: #e5e7eb;
}
.instaraw-rpg-progress-item-status {
font-size: 11px;
padding: 3px 8px;
border-radius: 4px;
font-weight: 600;
}
.instaraw-rpg-progress-item-status.pending {
background: rgba(156, 163, 175, 0.2);
color: #9ca3af;
}
.instaraw-rpg-progress-item-status.in-progress {
background: rgba(99, 102, 241, 0.3);
color: #818cf8;
animation: instaraw-rpg-pulse 2s ease-in-out infinite;
}
.instaraw-rpg-progress-item-status.success {
background: rgba(34, 197, 94, 0.3);
color: #22c55e;
}
.instaraw-rpg-progress-item-status.error {
background: rgba(239, 68, 68, 0.3);
color: #ef4444;
}
.instaraw-rpg-progress-item-status.retrying {
background: rgba(245, 158, 11, 0.3);
color: #fbbf24;
animation: instaraw-rpg-pulse 1.5s ease-in-out infinite;
}
.instaraw-rpg-progress-item-bar {
width: 100%;
height: 4px;
background: rgba(255, 255, 255, 0.08);
border-radius: 4px;
overflow: hidden;
margin-top: 10px;
position: relative;
}
.instaraw-rpg-progress-item-fill {
height: 100%;
background: linear-gradient(90deg, #6366f1, #a78bfa);
position: relative;
overflow: hidden;
}
.instaraw-rpg-progress-item-fill.animating {
background: linear-gradient(90deg, #a78bfa, #818cf8, #6366f1, #818cf8, #a78bfa);
background-size: 300% 100%;
animation: instaraw-rpg-progress-shimmer 2s ease-in-out infinite;
border-radius: 4px;
box-shadow: 0 0 12px rgba(139, 92, 246, 0.5), 0 0 24px rgba(99, 102, 241, 0.2);
position: relative;
}
.instaraw-rpg-progress-item-fill.animating::after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
animation: instaraw-rpg-progress-shine 2.5s ease-in-out infinite;
}
@keyframes instaraw-rpg-progress-shine {
0% { left: -100%; }
50%, 100% { left: 200%; }
}
.instaraw-rpg-progress-item-message {
font-size: 11px;
color: rgba(249, 250, 251, 0.7);
margin-top: 6px;
font-style: italic;
}
.instaraw-rpg-progress-item-message.error {
color: #fca5a5;
}
@keyframes instaraw-rpg-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.6; }
}
@keyframes instaraw-rpg-progress-shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
.instaraw-rpg-generate-preview {
margin-top: 16px;
padding: 14px;
background: rgba(139, 92, 246, 0.1);
border: 1px solid rgba(139, 92, 246, 0.3);
border-radius: 4px;
}
.instaraw-rpg-generate-preview h4 {
margin: 0 0 12px 0;
color: #e5e7eb;
font-size: 14px;
}
.instaraw-rpg-generate-preview-list {
max-height: 300px;
overflow-y: auto;
margin-bottom: 12px;
}
.instaraw-rpg-generate-preview button {
margin-right: 10px;
}
/* === Mode Display Updates === */
.instaraw-rpg-mode-indicator-container {
display: flex;
align-items: center;
gap: 8px;
flex: 1;
}
.instaraw-rpg-mode-source {
font-size: 11px;
color: #9ca3af;
font-style: italic;
padding: 4px 10px;
background: rgba(255, 255, 255, 0.05);
border-radius: 4px;
}
/* Reuse mode badges from Generate tab */
.instaraw-rpg-mode-card .instaraw-rpg-mode-badge {
flex: 0 0 auto;
}
/* === Latent Preview Styles === */
.instaraw-rpg-preview-latent {
position: relative;
width: 100%;
height: 120px; /* Fixed height container (same as AIL) */
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
overflow: visible; /* Changed from hidden to show badges */
border: 2px solid rgba(139, 92, 246, 0.4);
}
/* Aspect ratio preview box inside latent card */
.instaraw-rpg-preview-aspect-box {
width: 80px;
max-height: 105px; /* Prevent tall portraits from overflowing */
background: rgba(255, 255, 255, 0.1);
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
padding: 6px;
}
.instaraw-rpg-preview-aspect-content {
text-align: center;
color: #ffffff;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
}
.instaraw-rpg-latent-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #ffffff;
text-align: center;
padding: 4px;
width: 100%;
height: 100%;
}
.instaraw-rpg-preview-repeat {
position: absolute;
top: 4px;
right: 4px;
background: rgba(0, 0, 0, 0.85);
color: #ffffff;
padding: 2px 6px;
border-radius: 4px;
font-size: 10px;
font-weight: 700;
border: 1px solid rgba(255, 255, 255, 0.3);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* === Index Number Badges (Preview Section) === */
.instaraw-rpg-preview-index {
position: absolute;
top: 4px;
left: 4px;
background: rgba(0, 0, 0, 0.85);
color: #ffffff;
padding: 3px 7px;
border-radius: 4px;
font-size: 11px;
font-weight: 700;
border: 1px solid rgba(255, 255, 255, 0.3);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
z-index: 10;
}
.instaraw-rpg-preview-aspect-label {
position: absolute;
bottom: 4px;
right: 4px;
background: rgba(0, 0, 0, 0.85);
color: #ffffff;
padding: 3px 7px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
z-index: 10;
}
/* === Generation Modal === */
.instaraw-rpg-generation-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
padding: 20px;
}
.instaraw-rpg-generation-modal {
background: #0d0f12;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 8px;
padding: 24px;
max-width: 600px;
width: 100%;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
.instaraw-rpg-generation-modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 16px;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.instaraw-rpg-generation-modal-title {
font-size: 18px;
font-weight: 600;
color: #f9fafb;
margin: 0;
}
.instaraw-rpg-generation-modal-close {
background: none;
border: none;
color: rgba(249, 250, 251, 0.6);
font-size: 24px;
cursor: pointer;
padding: 0;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
}
.instaraw-rpg-generation-modal-close:hover {
background: rgba(255, 255, 255, 0.08);
color: #f9fafb;
}
.instaraw-rpg-generation-modal-overall {
margin-bottom: 20px;
padding: 16px;
background: rgba(255, 255, 255, 0.03);
border-radius: 6px;
border: 1px solid rgba(255, 255, 255, 0.08);
}
.instaraw-rpg-generation-modal-overall-text {
font-size: 14px;
color: rgba(249, 250, 251, 0.8);
margin-bottom: 8px;
}
.instaraw-rpg-generation-modal-overall-bar {
width: 100%;
height: 8px;
background: rgba(255, 255, 255, 0.08);
border-radius: 4px;
overflow: hidden;
}
.instaraw-rpg-generation-modal-overall-fill {
height: 100%;
background: linear-gradient(90deg, #8b5cf6, #a78bfa);
border-radius: 4px;
}
.instaraw-rpg-generation-modal-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.instaraw-rpg-generation-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
background: rgba(255, 255, 255, 0.03);
border-radius: 6px;
border: 1px solid rgba(255, 255, 255, 0.08);
}
.instaraw-rpg-generation-item-index {
font-size: 14px;
font-weight: 600;
color: rgba(249, 250, 251, 0.6);
min-width: 40px;
}
.instaraw-rpg-generation-item-status {
flex: 1;
display: flex;
align-items: center;
gap: 8px;
}
.instaraw-rpg-generation-item-icon {
font-size: 16px;
line-height: 1;
}
.instaraw-rpg-generation-item-text {
font-size: 13px;
color: rgba(249, 250, 251, 0.8);
}
.instaraw-rpg-generation-item.status-pending {
border-color: rgba(156, 163, 175, 0.3);
}
.instaraw-rpg-generation-item.status-pending .instaraw-rpg-generation-item-icon {
color: #9ca3af;
}
.instaraw-rpg-generation-item.status-generating {
border-color: rgba(139, 92, 246, 0.5);
background: rgba(139, 92, 246, 0.08);
}
.instaraw-rpg-generation-item.status-generating .instaraw-rpg-generation-item-icon {
color: #a78bfa;
animation: spin 1s linear infinite;
}
.instaraw-rpg-generation-item.status-success {
border-color: rgba(34, 197, 94, 0.5);
background: rgba(34, 197, 94, 0.08);
}
.instaraw-rpg-generation-item.status-success .instaraw-rpg-generation-item-icon {
color: #22c55e;
}
.instaraw-rpg-generation-item.status-throttled {
border-color: rgba(251, 191, 36, 0.5);
background: rgba(251, 191, 36, 0.08);
}
.instaraw-rpg-generation-item.status-throttled .instaraw-rpg-generation-item-icon {
color: #fbbf24;
}
.instaraw-rpg-generation-item.status-error {
border-color: rgba(239, 68, 68, 0.5);
background: rgba(239, 68, 68, 0.08);
}
.instaraw-rpg-generation-item.status-error .instaraw-rpg-generation-item-icon {
color: #ef4444;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.instaraw-rpg-generation-modal-footer {
margin-top: 20px;
padding-top: 16px;
border-top: 1px solid rgba(255, 255, 255, 0.08);
display: flex;
justify-content: flex-end;
gap: 12px;
}
.instaraw-rpg-generation-modal-btn {
padding: 8px 16px;
border-radius: 4px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
border: none;
}
.instaraw-rpg-generation-modal-btn-primary {
background: #8b5cf6;
color: white;
}
.instaraw-rpg-generation-modal-btn-primary:hover:not(:disabled) {
background: #7c3aed;
}
.instaraw-rpg-generation-modal-btn-primary:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.instaraw-rpg-generation-modal-btn-secondary {
background: rgba(255, 255, 255, 0.08);
color: rgba(249, 250, 251, 0.9);
}
.instaraw-rpg-generation-modal-btn-secondary:hover {
background: rgba(255, 255, 255, 0.12);
}
/* Generated prompts badge */
.instaraw-rpg-source-badge.generated {
background: rgba(139, 92, 246, 0.2);
color: #a78bfa;
}
/* === Expression Control Styles === */
.instaraw-rpg-expressions-section {
margin-top: 12px;
}
.instaraw-rpg-expressions-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 8px;
margin-bottom: 8px;
}
.instaraw-rpg-expression-toggle {
display: flex !important;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 4px;
cursor: pointer;
user-select: none;
}
.instaraw-rpg-expression-toggle:hover {
background: rgba(255, 255, 255, 0.06);
border-color: rgba(139, 92, 246, 0.3);
}
.instaraw-rpg-expression-checkbox {
cursor: pointer;
width: 16px;
height: 16px;
margin: 0;
flex-shrink: 0;
vertical-align: middle;
}
.instaraw-rpg-expression-label {
font-size: 12px;
color: #e5e7eb;
flex: 1;
line-height: 16px;
}
.instaraw-rpg-expression-toggle:has(.instaraw-rpg-expression-checkbox:checked) {
background: rgba(139, 92, 246, 0.15);
border-color: rgba(139, 92, 246, 0.5);
}
.instaraw-rpg-expression-toggle:has(.instaraw-rpg-expression-checkbox:checked) .instaraw-rpg-expression-label {
color: #c4b5fd;
font-weight: 500;
}
.instaraw-rpg-default-expression-select {
width: 100%;
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #e5e7eb;
padding: 8px 12px;
border-radius: 4px;
font-size: 12px;
cursor: pointer;
}
.instaraw-rpg-default-expression-select:focus {
outline: none;
border-color: rgba(139, 92, 246, 0.5);
}
.instaraw-rpg-default-mix-slider {
width: 100%;
height: 6px;
border-radius: 3px;
background: rgba(255, 255, 255, 0.1);
outline: none;
cursor: pointer;
}
.instaraw-rpg-default-mix-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 16px;
height: 16px;
border-radius: 50%;
background: #8b5cf6;
cursor: pointer;
}
.instaraw-rpg-default-mix-slider::-moz-range-thumb {
width: 16px;
height: 16px;
border-radius: 50%;
background: #8b5cf6;
cursor: pointer;
border: none;
}
.instaraw-rpg-default-mix-value {
font-weight: 600;
color: #c4b5fd;
}
/* === Custom Tab Styles === */
.instaraw-rpg-custom-tab {
display: flex;
flex-direction: column;
gap: 16px;
}
.instaraw-rpg-custom-template-textarea {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
min-height: 100px;
max-height: 250px;
overflow-y: auto !important;
}
/* Model instructions textarea - allow unlimited expansion */
.instaraw-rpg-model-instructions {
min-height: 80px;
max-height: none;
}
.instaraw-rpg-variables-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 12px;
}
.instaraw-rpg-variable-item {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 4px;
padding: 10px;
}
.instaraw-rpg-variable-item:hover {
background: rgba(255, 255, 255, 0.06);
border-color: rgba(139, 92, 246, 0.3);
}
.instaraw-rpg-variable-insert-btn {
width: 100%;
background: transparent;
border: none;
padding: 4px 0;
cursor: pointer;
text-align: left;
color: inherit;
font-family: inherit;
}
.instaraw-rpg-variable-name {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 12px;
color: #8b5cf6;
font-weight: 600;
display: block;
margin-bottom: 4px;
}
.instaraw-rpg-variable-desc {
font-size: 11px;
color: #9ca3af;
line-height: 1.4;
}
.instaraw-rpg-variable-insert-btn:hover .instaraw-rpg-variable-name {
color: #a78bfa;
}
/* === Preview Modal Styles === */
.instaraw-rpg-preview-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
padding: 20px;
}
.instaraw-rpg-preview-modal {
background: #1a1d23;
border: 1px solid rgba(139, 92, 246, 0.3);
border-radius: 8px;
max-width: 900px;
width: 100%;
max-height: 90vh;
display: flex;
flex-direction: column;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.instaraw-rpg-preview-modal-header {
padding: 20px 24px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
justify-content: space-between;
align-items: center;
}
.instaraw-rpg-preview-modal-header h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #e5e7eb;
}
.instaraw-rpg-preview-modal-close {
background: transparent;
border: none;
color: #9ca3af;
font-size: 24px;
cursor: pointer;
padding: 0;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
}
.instaraw-rpg-preview-modal-close:hover {
background: rgba(255, 255, 255, 0.1);
color: #e5e7eb;
}
.instaraw-rpg-preview-modal-body {
padding: 24px;
overflow-y: auto;
flex: 1;
}
.instaraw-rpg-preview-section {
margin-bottom: 24px;
}
.instaraw-rpg-preview-section:last-child {
margin-bottom: 0;
}
.instaraw-rpg-preview-section h4 {
margin: 0 0 12px 0;
font-size: 14px;
font-weight: 600;
color: #c4b5fd;
}
.instaraw-rpg-preview-settings {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
padding: 16px;
display: grid;
gap: 8px;
}
.instaraw-rpg-preview-settings div {
font-size: 13px;
color: #d1d5db;
line-height: 1.6;
}
.instaraw-rpg-preview-settings strong {
color: #a78bfa;
font-weight: 600;
margin-right: 8px;
}
.instaraw-rpg-preview-prompt {
background: rgba(0, 0, 0, 0.4);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
padding: 16px;
max-height: 400px;
overflow-y: auto;
}
.instaraw-rpg-preview-prompt pre {
margin: 0;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 12px;
line-height: 1.6;
color: #e5e7eb;
white-space: pre-wrap;
word-wrap: break-word;
}
.instaraw-rpg-preview-modal-footer {
padding: 16px 24px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
justify-content: flex-end;
gap: 12px;
}
/* === Multi-Image Combination Cards === */
/* Compact flowing rectangles showing image combinations */
.instaraw-combo-grid {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.instaraw-combo-card {
display: flex;
align-items: center;
gap: 4px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 4px;
padding: 3px 6px;
}
.instaraw-combo-card:hover {
border-color: rgba(139, 92, 246, 0.3);
background: rgba(255, 255, 255, 0.05);
}
.instaraw-combo-header {
display: flex;
align-items: center;
}
.instaraw-combo-number {
font-size: 10px;
font-weight: 600;
color: rgba(255, 255, 255, 0.5);
min-width: 20px;
}
.instaraw-combo-slots {
display: flex;
gap: 3px;
}
.instaraw-combo-slot {
display: flex;
align-items: center;
}
.instaraw-combo-slot-image {
width: 42px;
height: 42px;
border-radius: 3px;
overflow: hidden;
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
align-items: center;
justify-content: center;
}
.instaraw-combo-slot-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.instaraw-combo-slot-image.empty {
border-style: dashed;
border-color: rgba(255, 255, 255, 0.15);
}
.instaraw-combo-slot-image.empty::after {
content: '—';
color: rgba(255, 255, 255, 0.3);
font-size: 10px;
}
.instaraw-combo-slot-label {
display: none;
}
/* Simple grid fallback for single input mode */
.instaraw-simple-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 8px;
}
.instaraw-simple-grid-item {
position: relative;
width: 100%;
aspect-ratio: 1;
border-radius: 4px;
overflow: hidden;
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.instaraw-simple-grid-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.instaraw-simple-grid-item-index {
position: absolute;
top: 3px;
left: 3px;
background: rgba(0, 0, 0, 0.8);
color: #ffffff;
padding: 2px 5px;
border-radius: 3px;
font-size: 10px;
font-weight: 600;
border: 1px solid rgba(255, 255, 255, 0.2);
}
/* Multi-image header indicator */
.instaraw-multi-image-indicator {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
background: rgba(139, 92, 246, 0.1);
border: 1px solid rgba(139, 92, 246, 0.2);
border-radius: 4px;
font-size: 11px;
color: #c4b5fd;
}
.instaraw-multi-image-indicator-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #a78bfa;
}
.instaraw-multi-image-count {
font-weight: 600;
}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364/**
* Shared combo card renderer for multi-image display
* Used by: reality_prompt_generator.js, batch_image_generator.js
*/
/**
* Render combo cards HTML for multi-image mode
* @param {Array} inputsWithImages - Array of {label, images/urls} objects
* @param {Object} options - { getImageUrl: function to extract URL from item }
* @returns {string} HTML string for combo cards
*/
export function renderComboCards(inputsWithImages, options = {}) {
const getItems = (input) => input.images || input.urls || [];
const maxLen = Math.max(...inputsWithImages.map(i => getItems(i).length));
let html = '';
for (let idx = 0; idx < maxLen; idx++) {
const slots = inputsWithImages.map(input => {
const items = getItems(input);
const item = items[idx];
const url = options.getImageUrl ? options.getImageUrl(item) : (item?.url || item);
if (url) {
return `
<div class="instaraw-combo-slot">
<div class="instaraw-combo-slot-image">
<img src="${url}" alt="${input.label}" style="background: rgba(0,0,0,0.3);" onerror="this.style.opacity='0.3'; this.src='data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath fill=%22%239ca3af%22 d=%22M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z%22/%3E%3C/svg%3E';" />
</div>
<span class="instaraw-combo-slot-label">${input.label}</span>
</div>
`;
} else {
return `
<div class="instaraw-combo-slot">
<div class="instaraw-combo-slot-image empty"></div>
<span class="instaraw-combo-slot-label">${input.label}</span>
</div>
`;
}
}).join('');
html += `
<div class="instaraw-combo-card">
<div class="instaraw-combo-header">
<span class="instaraw-combo-number">#${idx + 1}</span>
</div>
<div class="instaraw-combo-slots">
${slots}
</div>
</div>
`;
}
return html;
}
/**
* Get the maximum length across all inputs
* @param {Array} inputsWithImages - Array of {label, images/urls} objects
* @returns {number} Maximum number of items
*/
export function getComboMaxLength(inputsWithImages) {
const getItems = (input) => input.images || input.urls || [];
return Math.max(...inputsWithImages.map(i => getItems(i).length));
}123456789const _aq = !!true;
export function create( tag, clss, parent, properties ) {
const nd = document.createElement(tag);
if (clss) clss.split(" ").forEach((s) => nd.classList.add(s))
if (parent) parent.appendChild(nd);
if (properties) Object.assign(nd, properties);
return nd;
}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
.instaraw_popup .zoomed {
position: absolute;
width: 100%;
left: 0;
height: 100%;
right: 0;
display: flex;
justify-content: space-evenly;
align-items: center;
z-index: 120000;
background-color: rgba(29, 29, 29, 0.886);
}
.instaraw_popup .zoomed_prev, .zoomed_next {
flex-grow: 1;
}
.instaraw_popup .zoomed_prev {
text-align: right;
}
.instaraw_popup .zoomed_arrow {
font-size: 48px;
border-radius: 40px;
padding: 0px 8px 4px 8px;
margin: 6px;
border: 1px solid rgb(128, 128, 128, 1.0);
}
.instaraw_popup .zoomed_arrow:hover {
border: 1px solid rgb(255, 128, 128, 1.0);
}
.instaraw_popup .zoomed_image {
max-width: calc(100% - 140px);
height: 100%;
object-fit: contain;
border: 1px solid white;
padding: 4px;
}
.instaraw_popup .zoomed_number {
position: absolute;
top: 12px;
margin-left: 12px;
color: white;
padding: 10px 8px 8px 8px;
border-radius: 4px;
z-index: 110000;
background-color: rgba(128, 128, 128, 0.5);
border: 1px solid rgba(128, 128, 128, 1.0);
}
.instaraw_popup .zoomed.highlighted .zoomed_image {
border: 3px solid green;
padding: 2px;
}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095[
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:CreateDate": "2025:09:08 11:00:37",
"XMP:CreatorTool": 18.5,
"XMP:ModifyDate": "2025:09:08 11:00:37",
"XMP:RegionAreaY": "0.42702451954937037",
"XMP:RegionAreaW": "0.026242544731610362",
"XMP:RegionAreaX": "0.66737176938369791",
"XMP:RegionAreaH": "0.035069582504970165",
"XMP:RegionAreaUnit": "normalized",
"XMP:RegionType": "Face",
"XMP:RegionExtensionsAngleInfoYaw": 12,
"XMP:RegionExtensionsAngleInfoRoll": 23,
"XMP:RegionExtensionsConfidenceLevel": 1,
"XMP:RegionExtensionsFaceID": 3,
"XMP:RegionAppliedToDimensionsH": 3024,
"XMP:RegionAppliedToDimensionsW": 4032,
"XMP:RegionAppliedToDimensionsUnit": "pixel",
"XMP:DateCreated": "2025:09:08 11:00:37",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:CreateDate": "2025:09:08 11:06:18",
"XMP:CreatorTool": 18.5,
"XMP:ModifyDate": "2025:09:08 11:06:18",
"XMP:RegionAreaY": "0.87999999999999989",
"XMP:RegionAreaW": "0.048190476190476172",
"XMP:RegionAreaX": "0.33866666666666667",
"XMP:RegionAreaH": "0.063999999999999946",
"XMP:RegionAreaUnit": "normalized",
"XMP:RegionType": "Face",
"XMP:RegionExtensionsAngleInfoYaw": 321,
"XMP:RegionExtensionsAngleInfoRoll": 247,
"XMP:RegionExtensionsConfidenceLevel": 1,
"XMP:RegionExtensionsFaceID": 3,
"XMP:RegionAppliedToDimensionsH": 3024,
"XMP:RegionAppliedToDimensionsW": 4032,
"XMP:RegionAppliedToDimensionsUnit": "pixel",
"XMP:DateCreated": "2025:09:08 11:06:18",
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:CreateDate": "2025:09:09 10:38:38",
"XMP:CreatorTool": 18.5,
"XMP:ModifyDate": "2025:09:09 10:38:38",
"XMP:DateCreated": "2025:09:09 10:38:38",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:CreateDate": "2025:09:09 16:04:09",
"XMP:CreatorTool": 18.5,
"XMP:ModifyDate": "2025:09:09 16:04:09",
"XMP:DateCreated": "2025:09:09 16:04:09",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 3024,
"File:ImageHeight": 4032,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "3024 4032",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:SemanticSegmentationMatteVersion": 65536,
"XMP:AuxiliaryImageType": "urn:com:apple:photo:2019:aux:semanticskinmatte",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:SemanticSegmentationMatteVersion": 65536,
"XMP:AuxiliaryImageType": "urn:com:apple:photo:2020:aux:semanticskymatte",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:SemanticSegmentationMatteVersion": 65536,
"XMP:AuxiliaryImageType": "urn:com:apple:photo:2019:aux:semanticskinmatte",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:SemanticSegmentationMatteVersion": 65536,
"XMP:AuxiliaryImageType": "urn:com:apple:photo:2019:aux:semanticskinmatte",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:SemanticSegmentationMatteVersion": 65536,
"XMP:AuxiliaryImageType": "urn:com:apple:photo:2019:aux:semanticskinmatte",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:SemanticSegmentationMatteVersion": 65536,
"XMP:AuxiliaryImageType": "urn:com:apple:photo:2020:aux:semanticskymatte",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
},
{
"File:FileType": "JPEG",
"File:FileTypeExtension": "JPG",
"File:MIMEType": "image/jpeg",
"File:ImageWidth": 4032,
"File:ImageHeight": 3024,
"File:EncodingProcess": 0,
"File:BitsPerSample": 8,
"File:ColorComponents": 3,
"File:YCbCrSubSampling": "1 1",
"JFIF:JFIFVersion": "1 1",
"JFIF:ResolutionUnit": 0,
"JFIF:XResolution": 0,
"JFIF:YResolution": 0,
"XMP:XMPToolkit": "XMP Core 6.0.0",
"XMP:SemanticSegmentationMatteVersion": 65536,
"XMP:AuxiliaryImageType": "urn:com:apple:photo:2020:aux:semanticskymatte",
"Composite:ImageSize": "4032 3024",
"Composite:Megapixels": 12.192768,
"_instaraw_icc_profile_file": "iphone_13_pro.icc"
}
]ComfyUI_INSTARAW/__init__.pyAdded+40
ComfyUI_INSTARAW/__pycache__/__init__.cpython-310.pycAdded
ComfyUI_INSTARAW/js/advanced_image_loader.cssAdded+760
ComfyUI_INSTARAW/js/advanced_image_loader.jsAdded
ComfyUI_INSTARAW/js/api_model_selector.jsAdded+45
ComfyUI_INSTARAW/js/api_nodes.jsAdded+53
ComfyUI_INSTARAW/js/batch_image_generator.jsAdded
ComfyUI_INSTARAW/js/boolean_bypass.jsAdded+90
ComfyUI_INSTARAW/js/branding_node.jsAdded+91
ComfyUI_INSTARAW/js/ding.mp3Added
ComfyUI_INSTARAW/js/filter.cssAdded+106
ComfyUI_INSTARAW/js/floating_window.cssAdded+94
ComfyUI_INSTARAW/js/floating_window.jsAdded+63
ComfyUI_INSTARAW/js/group_bypass_detector.jsAdded+42
ComfyUI_INSTARAW/js/image_filter.jsAdded+123
ComfyUI_INSTARAW/js/instaraw.svgAdded
ComfyUI_INSTARAW/js/log.jsAdded+25
ComfyUI_INSTARAW/js/mask_utils.jsAdded+79
ComfyUI_INSTARAW/js/nano_banana_aspect_ratio.jsAdded+130
ComfyUI_INSTARAW/js/popup.jsAdded+1238
ComfyUI_INSTARAW/js/reality_prompt_generator.cssAdded+2841
ComfyUI_INSTARAW/js/reality_prompt_generator.jsAdded
ComfyUI_INSTARAW/js/shared/combo-cards.jsAdded+64
ComfyUI_INSTARAW/js/utils.jsAdded+9
ComfyUI_INSTARAW/js/zoomed.cssAdded+61
ComfyUI_INSTARAW/modules/__init__.pyAdded
ComfyUI_INSTARAW/modules/__pycache__/__init__.cpython-310.pycAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_12.iccAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_12.jsonAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_13_pro.iccAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_13_pro.jsonAdded+1095
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_14_plus.iccAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_14_plus.jsonAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_14_pro_max.iccAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_14_pro_max.jsonAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_15_pro_max.iccAdded
ComfyUI_INSTARAW/modules/authenticity_profiles/iphone_15_pro_max.jsonAdded
ComfyUI_INSTARAW/modules/color_profiles/sRGB_IEC61966-2-1_no_black_scaling.iccAdded
ComfyUI_INSTARAW/modules/detection_bypass/__init__.pyAdded
ComfyUI_INSTARAW/modules/detection_bypass/__pycache__/__init__.cpython-310.pycAdded
ComfyUI_INSTARAW/modules/detection_bypass/__pycache__/camera_pipeline.cpython-310.pycAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/DJI_O3AirUnit_CineonFilmLog_minimal_natural_sunrise_snow_forest_glow_1.DJI_0064_stabilized_4.cubeAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/KORNEV_LUT_HLG_3.cubeAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/LOOK1.cubeAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/LOW_SAT_-_Braw_Vivid_Ludeman_LUT.cubeAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/Shibuya_01.cubeAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/experimento.cubeAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/interview-cool_17.C0003.cubeAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/natural_look.cubeAdded
ComfyUI_INSTARAW/modules/detection_bypass/_luts/ntrl_2.A054_06130550_C013.cubeAdded