1import{_ as N,o as a,e as l,aR as pe,j as o,h as v,i as y,r as w,t as u,l as p,m as S,g as E,aS as he,w as U,aT as de,aU as me,aV as ge,a8 as _e,aW as fe,aX as Se,B as ye,aY as be,ag as ve,aZ as ke,au as we,a_ as Ie,a1 as Pe,an as Ce,z as b,p as f,x as g,F as P,v as x,q as C,k as xe,f as j,A as L,T as Re,y as Fe,aL as qe,a$ as Te,E as Me,b0 as Ee,b1 as Oe,b2 as Ae,b3 as H,b4 as De,b5 as Le,b6 as F,U as z,S as V,b7 as Be,b as W,b8 as J,b9 as X,ba as K,bb as Y,bc as Z,bd as Q,be as $,bf as ee,bg as te,bh as se,bi as ie,bj as re,bk as oe,bl as ne,bm as Ne,bn as Ge,bo as Ue,bp as ae,a as B,aA as je,bq as He,br as ze,bs as Ve,c as We,u as Je,M as Xe}from"./app-Brzv3Rd5.js";import{P as Ke}from"./PeepPickCircle-BYp7rcM2.js";const Ye={props:{modelValue:{type:Number,default:0},is_disabled:{type:Boolean,default:!1},scale:{type:Number,default:.8},colorNegative:{type:String,default:"#f3df00"},colorNeutral:{type:String,default:"#00bfff"},colorPositive:{type:String,default:"#2ecc71"}},data(){return{currentState:this.modelValue}},computed:{dims(){const e=this.scale;return{width:60*e,height:25*e,knob:20*e,knobOffset:2*e,knobTop:2.5*e,radius:25*e}},toggleClass(){return{disabled:this.is_disabled,negative:this.currentState===-1,neutral:this.currentState===0,positive:this.currentState===1}},wrapperStyle(){let e=this.colorPositive;return this.currentState===-1&&(e=this.colorNegative),this.currentState===0&&(e=this.colorNeutral),{width:`${this.dims.width}px`,height:`${this.dims.height}px`,borderRadius:`${this.dims.radius}px`,backgroundColor:e}},knobStyle(){return{width:`${this.dims.knob}px`,height:`${this.dims.knob}px`,top:`${this.dims.knobTop}px`,left:this.knobPosition}},knobPosition(){return this.currentState===-1?`${this.dims.knobOffset}px`:this.currentState===0?`calc(50% - ${this.dims.knob/2}px)`:`calc(100% - ${this.dims.knob+this.dims.knobOffset}px)`}},methods:{cycleState(){this.currentState=this.currentState===1?-1:this.currentState+1,this.$emit("update:modelValue",this.currentState)}},watch:{modelValue(e){this.currentState=e}}};function Ze(e,t,r,c,i,s){return a(),l("div",{class:"text-and-toggle",onClick:t[0]||(t[0]=h=>!r.is_disabled&&s.cycleState())},[pe(e.$slots,"default",{},void 0,!0),o("div",{class:y(["toggle-wrapper three-state",s.toggleClass]),style:v(s.wrapperStyle)},[o("div",{class:"toggle-knob",style:v(s.knobStyle)},null,4)],6)])}const Qe=N(Ye,[["render",Ze],["__scopeId","data-v-b4bb49ab"]]),$e={name:"ThreeModeToggleLabels",components:{ThreeWayToggle:Qe},props:{scale:{type:Number,default:.8},modelValue:{required:!0},labels:{type:Array,required:!0,validator:e=>e.length===3},values:{type:Array,validator:e=>e.length===3,default:()=>[-1,0,1]},disabled:{type:Boolean,default:!1},title:{type:String,default:""}},computed:{selectedIndex(){const e=this.values.findIndex(t=>t===this.modelValue);return e===0?-1:e===1?0:e===2?1:0},wrapStyle(){return{gap:`${.35*this.scale}rem`}},titleStyle(){return{fontSize:`${1*this.scale}rem`,marginBottom:`${.2*this.scale}rem`}},labelStyle(){return{fontSize:`${.95*this.scale}rem`,minHeight:`${1.1*this.scale}rem`}},topRowStyle(){return{gridTemplateColumns:`minmax(${80*this.scale}px, max-content) auto minmax(${80*this.scale}px, max-content)`,columnGap:`${.75*this.scale}rem`}}},methods:{isActiveByIndex(e){return this.selectedIndex===e},onToggleUpdate(e){const r={"-1":this.values[0],0:this.values[1],1:this.values[2]}[e];this.$emit("update:modelValue",r),this.$emit("change",r)}}},et={class:"bottom-row"};function tt(e,t,r,c,i,s){const h=w("three-way-toggle");return a(),l("div",{class:"three-mode-toggle-wrap",style:v(s.wrapStyle)},[r.title?(a(),l("div",{key:0,class:"title xblue",style:v(s.titleStyle)},u(r.title),5)):p("",!0),o("div",{class:"top-row",style:v(s.topRowStyle)},[o("div",{class:y(["side-label left",s.isActiveByIndex(-1)?"active-mode":"no-active-mode"]),style:v(s.labelStyle)},u(r.labels[0]),7),S(h,{class:"toggle-core",is_disabled:r.disabled,scale:r.scale,"model-value":s.selectedIndex,"onUpdate:modelValue":s.onToggleUpdate},null,8,["is_disabled","scale","model-value","onUpdate:modelValue"]),o("div",{class:y(["side-label right",s.isActiveByIndex(1)?"active-mode":"no-active-mode"]),style:v(s.labelStyle)},u(r.labels[2]),7)],4),o("div",et,[o("div",{class:y(["bottom-label",s.isActiveByIndex(0)?"active-mode":"no-active-mode"]),style:v(s.labelStyle)},u(r.labels[1]),7)])],4)}const st=N($e,[["render",tt],["__scopeId","data-v-50d1ca87"]]),q="Surprise NSFW",it=500,rt=.75,ot={components:{PeepPickCircle:Ke,PanelPage:Pe,WikiHelpButton:Ie,PeepCoin:we,TagSelector:ke,InlineTagSelector:ve,ThreeWayToggleLabels:st,PanelMessage:be,BaseButton:ye,CoolDropdown:Se,ToggleBit:fe,HrSection:_e,PeepCoinsLeft:ge,CustomImageUploadPanel:me,InfoHint:de},props:{aiId:{type:String,required:!1,default:null},fromGroupChat:{type:Boolean,required:!1,default:!1},edit_mode:{type:Boolean,default:!1}},computed:{IS_APP(){return F},selectedEngineDesc(){const e={Forge:"forgeDesc",Photoreal:"photorealDesc",Prism:"prismDesc",Anime:"animeDesc"}[this.selected_image_model];return e?this.$t("picRequester."+e):""},showGenerateTabs(){return!this.isGroupChatContext&&this.$route.name==="MakeImage"},tabsPeep(){return this.current_ai_id?{ai_id:this.current_ai_id,name:this.peep_name,image:this.peep_image}:null},isGroupChatContext(){return this.fromGroupChat},full_control_mode_str(){return"full_control_mode"+(this.current_ai_id?"":"_edit")},promptHint(){return["Prism","Anime"].includes(this.selected_image_model)?`${this.$t("picRequester.prismAnimeTip")} <a href="/wiki/prompting/">${this.$t("picRequester.faqMoreDetails")}</a>`:this.$t("picRequester.forgePhotorealTip")},advancedSummary(){const e=this.userStore.creations_settings,t=[];if(this.showOrientationControls){const r=this.imageFormats.find(c=>c.name===this.currentFormatName);r&&t.push(r.name==="custom"&&e.custom_ratio_a&&e.custom_ratio_b?`${e.custom_ratio_a}:${e.custom_ratio_b}`:r.label),this.hdActive&&t.push(this.enhanceLabel)}else t.push(this.$t("picRequester.sameAsFirstImage"));if(this.selected_image_model=="Prism"&&e.hyper_realism_level!=null&&t.push(this.$t("picRequester.sumRealism",{n:e.hyper_realism_level})),this.canFollowGlobalStyle){const r=e.global_style_strength;r!=null&&Number(r)===0?t.push(this.$t("picRequester.sumStyleOff")):r!=null&&this.selected_image_model!="Photoreal"&&t.push(this.$t("picRequester.sumStyle",{n:r}))}
1return!this.isFullControl&&this.selected_image_model=="Forge"&&e.use_custom_images&&e.each_image_a_character&&this.userStore.misc_data.edit_images.length+(this.current_ai_id?1:0)>1&&t.push(this.$t("picRequester.sumEachChar")),e.force_solo&&!["Forge","Photoreal"].includes(this.selected_image_model)&&!this.strictManual&&t.push(this.$t("picRequester.sumSolo")),this.selected_image_model!="Photoreal"&&(e.negative_prompt||"").trim()&&t.push(this.$t("picRequester.sumNegative")),t},isFullControl(){return!!this.userStore.creations_settings[this.full_control_mode_str]},subjectHint(){const e=[];return this.current_ai_id?e.push(this.$t("picRequester.fromScratchPeepHint"),this.$t("picRequester.fromScratchPeepTip")):e.push(this.$t("picRequester.fromScratchHint")),this.selected_image_model=="Forge"&&this.atLeastOneImageUsed&&this.userStore.misc_data.edit_images.length<this.maxEditImages&&e.push(this.$t("picRequester.combineImagesTip",{subject:this.current_ai_id?this.$t("picRequester.combineSubjectPeep"):this.$t("picRequester.combineSubjectAny"),n:this.maxEditImages})),e.join("<br><br>")},isGroupForgeMulti(){return this.isGroupChatContext&&this.selected_image_model=="Forge"},groupParticipants(){const e=this.chatStore.chatData?.ai_uids||[],t=this.chatStore.chatData?.ai_chat_states||{};return e.map((r,c)=>{const i=t[r],s=i?.nickname||V(i?.characteristics?.name||i?.name)||"Peep",h=z(r)||i?.face_image_url||i?.images?.[0]?.url||"";return{uid:r,name:s,image:h,color:Xe(c)}})},showOrientationControls(){return!this.userStore.creations_settings.same_orient_as_first_image||this.userStore.misc_data.edit_images.length==0||!this.atLeastOneImageUsed||this.selected_image_model!="Forge"},customRatioInfo(){const e=this.userStore.creations_settings.custom_ratio_a,t=this.userStore.creations_settings.custom_ratio_b;return e&&t?`\u2192 ${e}:${t}`:"1\u201332"},maxLength(){const e=this.sharedInfoStore?.sharedInfo,t=this.selected_image_model==="Forge",r=!this.current_ai_id&&(!t||this.userStore.misc_data.edit_images.length===0);if(this.selected_image_model=="Photoreal"){const c=e?.max_photoreal_combined_prompt_chars??4800,i=!!this.userStore.creations_settings[this.full_control_mode_str];let h=(this.strictManual||i&&!this.current_ai_id?0:e?.photoreal_prompt_overhead??281)+this.photorealSlotsReserve;this.strictManual?h+=(this.appearanceDescription||"").length:this.current_ai_id&&(h+=this.photorealPeepPart);const d=this.strictManual?c:(r?e?.max_photoreal_prompt_length_no_peep:e?.max_photoreal_prompt_length)??c;return Math.max(100,Math.min(d,c-h))}if(this.selected_image_model=="Forge"){const c=e?.max_forge_prompt_chars??2200;let i=this.photorealSlotsReserve;this.strictManual?i+=(this.appearanceDescription||"").length+(e?.forge_prompt_overhead??300):this.current_ai_id?i+=e?.forge_guided_identity_chars??700:i+=250;const s=(r?e?.max_image_prompt_length_no_peep:e?.max_image_prompt_length)??c;return Math.max(100,Math.min(s,c-i))}return(r?e?.max_image_prompt_length_no_peep:e?.max_image_prompt_length)??e?.max_image_prompt_length},additionalImagesShown(){return this.editCardShown},editCardShown(){return!this.isGroupChatContext&&this.selected_image_model=="Forge"&&this.userStore.misc_data.edit_images.length>0},attachedPeepImageIndex(){return this.current_ai_id?-1:this.userStore.misc_data.edit_images.slice(0,this.maxEditImages).findIndex(e=>e.type==="peep")},attachedPeepId(){return this.current_ai_id?this.current_ai_id:this.userStore.misc_data.edit_images.slice(0,this.maxEditImages).find(t=>t.type==="peep")?.data?.ai_persona_id||null},showEachImageToggleUp(){return this.isGroupChatContext||this.selected_image_model!=="Forge"||this.userStore.creations_settings[this.full_control_mode_str]||!this.userStore.creations_settings.use_custom_images?!1:this.userStore.misc_data.edit_images.slice(0,this.maxEditImages).length+(this.current_ai_id?1:0)>1},canUploadCustomImages(){return!F&&this.sharedInfoStore.sharedInfo?.custom_uploads_enabled!==!1},isDeviceUpload(){return e=>e.type==="custom"&&!e.data?.image_id},generatedImageWillBePrivate(){return this.userStore.creations_settings.use_custom_images?this.userStore.misc_data.edit_images.slice(0,this.maxEditImages).some(e=>this.isDeviceUpload(e)||e.data?.using_custom):!1},numberCustomImages(){return this.userStore.creations_settings.use_custom_images?this.userStore.misc_data.edit_images.filter(this.isDeviceUpload).length:0},pureEditMode(){return!this.passed_ai_id},atLeastOneImageUsed(){return this.current_ai_id||this.userStore.misc_data.edit_images.length>0},totalActiveImages(){return(this.current_ai_id?1:0)+this.userStore.misc_data.edit_images.length},inImageEditMode(){return this.selected_image_model==="Forge"&&this.userStore.misc_data.edit_images.length>=1},editModeTitle(){return this.totalActiveImages>1?this.$t("picRequester.combineAnyImage"):this.$t("picRequester.editAnyImage")},maxEditImages(){return this.current_ai_id?2:3},hdAvailable(){const e=this.sharedInfoStore?.sharedInfo?.hd_image_types||[];return this.showOrientationControls&&e.includes(this.selected_image_model)},enhanceLevels(){return this.sharedInfoStore?.sharedInfo?.enhance_levels||{1:{label:"HD",cost_multiplier:this.sharedInfoStore?.sharedInfo?.hd_cost_multiplier||2}}},enhanceMax(){return this.hdAvailable?(this.sharedInfoStore?.sharedInfo?.enhance_plus_types||[]).includes(this.selected_image_model)?Math.max(1,...Object.keys(this.enhanceLevels).map(Number)):1:0},enhanceLevel(){const e=Number(this.userStore.creations_settings.enhance||0);return Math.max(0,Math.min(e,this.enhanceMax))},hdActive(){return this.enhanceLevel>=1},enhanceMultiplier(){return this.hdActive?Number(this.enhanceLevels[this.enhanceLevel]?.cost_multiplier||2):1},enhanceLabel(){return this.enhanceStopLabel(this.enhanceLevel)},enhanceHint(){if(!this.hdActive)return this.$t("picRequester.enhanceOffHint");const e=["","enhanceHdHint","enhancePlusHint","enhancePlusPlusHint"][this.enhanceLevel]||"enhancePlusHint";return this.$t(`picRequester.${e}`,{n:this.enhanceMultiplier})},unitImageCost(){const e=this.sharedInfoStore?.sharedInfo?.image_token_cost||0;return Math.round(e*this.enhanceMultiplier)},imageCost(){return(this.unitImageCost+(this.numberCustomImages>=1?this.sharedInfoStore?.sharedInfo?.upcharge_custom_images:0))*Math.max(1,Math.min(this.howManyLeft,this.numBatchImages))+(this.willAutoEnhance?this.enhancePromptCost:0)}
1,backgroundOptions(){const e=[...this.peepDefaultBackground?[{name:this.peepDefaultBackground,emoji:"\u{1F4CC}",bk_color:"green"}]:[],...this.chatScenePill("background",this.peepDefaultBackground),{name:"Surprise",emoji:"\u2753",bk_color:"violet"}];this.canFollowGlobalStyle&&e.push({name:"Follow Global Style"});const t=this.sharedInfoStore.backgrounds.by_types||[],r=this.sharedInfoStore.backgrounds.by_styles||[],c=this.notIn(e),i=t.map(d=>[...e,...[...d.content].sort((_,m)=>_.localeCompare(m)).filter(c)]),h=(r?Object.keys(r).some(d=>d===this.peep_style_type):!1)?[[...e,...Object.values(r[this.peep_style_type]).filter(c)],...i]:i;return this.withMineGroup(h,e,"background")},outfitsOptions(){const e=[...this.peepDefaultOutfit?[{name:this.peepDefaultOutfit,emoji:"\u{1F4CC}",bk_color:"green"}]:[],...this.chatScenePill("outfit",this.peepDefaultOutfit),{name:"Surprise",emoji:"\u2753",bk_color:"violet"},...F?[]:[{name:q,emoji:"\u2753\u{1F336}\uFE0F",bk_color:"red"}]];this.canFollowGlobalStyle&&e.push({name:"Follow Global Style"});const t=this.sharedInfoStore.outfits.by_types||[],r=this.sharedInfoStore.outfits.by_styles||[],c=this.notIn(e),i=t.map(d=>[...e,...[...d.content].sort((_,m)=>_.localeCompare(m)).filter(c)]),h=(r?Object.keys(r).some(d=>d===this.peep_style_type):!1)?[[...e,...Object.values(r[this.peep_style_type]).filter(c)],...i]:i;return this.withMineGroup(h,e,"outfit")},posesOptions(){const e=[{name:"Surprise",emoji:"\u2753",bk_color:"violet"},...F?[]:[{name:q,emoji:"\u2753\u{1F336}\uFE0F",bk_color:"red"}]],t=this.sharedInfoStore.poses.by_types||[],r=this.sharedInfoStore.sharedInfo?.supported_forge_nsfw_poses||[],c=t.map(i=>{let s=i.content;return i.title==="NSFW"&&this.userStore.creations_settings.type_picture==="Forge"&&(s=r),[...e,...[...s].sort((h,d)=>h.localeCompare(d))]});return this.withMineGroup(c,e,"pose")},expressionOptions(){const e=[{name:"Surprise",emoji:"\u2753",bk_color:"violet"}],t=[...e,...this.sharedInfoStore?.expressions||[]];return this.withMineGroup([t],e,"expression")},expressionTitles(){return[`<strong>\u{1F642} ${this.$t("picRequester.expressionsAll")}</strong>`,...this.showMine?[this.mineTitle]:[]]},showMine(){return!!this.userStore.isAuthorized},mineTitle(){return`<strong>${this.$t("picRequester.mineGroup")}</strong>`},mineLocked(){const e=this.userStore.slotPresetLimit(),t={};for(const r of["outfit","background","pose","expression"])t[r]=this.mineItems(r).slice(e).filter(c=>c!==this.pinnedOf(r));return t},canFollowGlobalStyle(){return!!this.current_ai_id&&!!this.peep_style_type},strictManual(){return!!this.current_ai_id&&!!this.peep_appearance_prompt},slotSizes(){const e=this.userStore.creations_settings,t=(r,c=!1)=>(r=String(r||"").trim(),r?c&&this.nsfw_pose_selected?285:({surprise:80,"surprise nsfw":120,"follow global style":160}[r.toLowerCase()]??r.length)+25:0);return{outfit:t(this.outfitToSend),background:t(this.backgroundToSend),pose:t(e.pose,!0),expression:t(e.expression)}},peepDefaultOutfit(){return this.current_ai_id&&this.peep_default_outfit||""},peepDefaultBackground(){return this.current_ai_id&&this.peep_default_background||""},peepPrefillOutfit(){return this.strictManual?this.peepDefaultOutfit:""},peepPrefillBackground(){return this.strictManual?this.peepDefaultBackground:""},photorealSlotsReserve(){if(this.userStore.creations_settings[this.full_control_mode_str])return 0;const e=this.userStore.creations_settings,t=[[this.outfitToSend,18],[this.backgroundToSend,30],[e.pose,this.nsfw_pose_selected?200:34],[e.expression,22]].filter(([r])=>!!r);return t.length?12+t.reduce((r,[c,i])=>r+String(c).length+i,0):0},slotsMayConflictWithLook(){if(!this.strictManual)return!1;const e=this.userStore.creations_settings,t=(r,c)=>!!r&&r!==c;return!!(t(this.outfitToSend,this.peepDefaultOutfit)||t(this.backgroundToSend,this.peepDefaultBackground)||e.pose||e.expression)},canResetToPeepLook(){return this.strictManual&&(this.appearanceDescription||"").trim()!==(this.peep_appearance_prompt||"").trim()},appearanceDescriptionPreview(){const e=(this.appearanceDescription||"").trim().replace(/\s+/g," ");return e.length>50?`${e.slice(0,50)}\u2026`:e},photorealPeepPart(){const e=this.peep_photoreal_desc;if(!e||!e.appearance)return 1300;const t=this.userStore.creations_settings;let r=String(e.appearance).length+String(e.vibe||"").length+60;return t.outfit==="Follow Global Style"&&(r+=String(e.outfit||"").length),t.background==="Follow Global Style"&&(r+=String(e.background||"").length),r},globalStyleOn(){const e=this.userStore.creations_settings.global_style_strength;return e==null||Number(e)!==0},maxSlotLength(){return this.sharedInfoStore?.sharedInfo?.max_image_slot_length||4800},slotBudget(){const e=this.sharedInfoStore?.sharedInfo,t=(this.appearanceDescription||"").length,r=!!this.userStore.creations_settings[this.full_control_mode_str];if(this.selected_image_model=="Photoreal"&&!r){const c=e?.max_photoreal_combined_prompt_chars??4800,i=this.strictManual?t:(this.current_ai_id?this.photorealPeepPart:0)+(e?.photoreal_prompt_overhead??281);return c-i-100}if(this.selected_image_model=="Forge"){const c=e?.max_forge_prompt_chars??2200,i=this.strictManual?t+(e?.forge_prompt_overhead??300):this.current_ai_id?e?.forge_guided_identity_chars??700:250;return c-i-100}return 1/0},slotsShareOfPrompt(){if(!isFinite(this.slotBudget))return 0;const e=this.slotBudget+100;return e<=0?1:Object.values(this.slotSizes).reduce((r,c)=>r+c,0)/e},maxAppearanceLength(){return this.sharedInfoStore?.sharedInfo?.max_appearance_prompt_length||1e3},appearanceCharactersLeft(){return this.maxAppearanceLength-(this.appearanceDescription||"").length},descriptionForRequest(){return this.composeDescription(this.description)},autoEnhanceOn(){return!!this.userStore.creations_settings.enhance_prompt},enhancePromptCost(){return this.sharedInfoStore?.sharedInfo?.enhance_prompt_cost??1},alreadyEnhanced(){if(!this.lastEnhancedPrompt||!this.description.trim())return!1;const e=c=>c.toLowerCase().match(/[\p{L}\p{N}
1']+/gu)||[],t=new Set(e(this.description)),r=e(this.lastEnhancedPrompt);return r.filter(c=>t.has(c)).length/r.length>=.6},willAutoEnhance(){return this.enhanceAvailable&&this.autoEnhanceOn&&!!this.description.trim()&&!this.alreadyEnhanced},enhanceAvailable(){return!(this.isGroupForgeMulti||this.selected_image_model==="Forge"&&this.userStore.creations_settings.use_custom_images&&(this.userStore.misc_data.edit_images||[]).slice(0,this.maxEditImages).some(t=>t.type==="custom"||!this.current_ai_id||t.data?.ai_persona_id!==this.current_ai_id))},nsfwToSend(){return F?-1:this.strictManual?this.userStore.creations_settings.is_nsfw===1?1:0:this.userStore.creations_settings.is_nsfw},startingBackgroundTags(){const e=this.slotValue("background",this.peepPrefillBackground);return e?[e]:[]},startingOutfitTags(){const e=this.slotValue("outfit",this.peepPrefillOutfit);return e?[e]:[]},backgroundToSend(){return this.slotValue("background",this.peepPrefillBackground)},outfitToSend(){return this.slotValue("outfit",this.peepPrefillOutfit)},backgroundTitles(){const e=this.sharedInfoStore.backgrounds.by_types||[],t=this.sharedInfoStore.backgrounds.by_styles||[],r=e.map(i=>`<strong>${this.backgroundEmojis[i.title]||""} ${i.title}</strong>`);return[...(t?Object.keys(t).some(i=>i===this.peep_style_type):!1)?[`<strong>\u{1F97B} Global Style (${this.peep_style_type})</strong>`,...r]:r,...this.showMine?[this.mineTitle]:[]]},outfitsTitles(){const e=this.sharedInfoStore.outfits.by_types||[],t=this.sharedInfoStore.outfits.by_styles||[],r=e.map(i=>`<strong>${this.outfitEmojis[i.title]||""} ${i.title}</strong>`);return[...(t?Object.keys(t).some(i=>i===this.peep_style_type):!1)?[`<strong>\u{1F97B} Global Style (${this.peep_style_type})</strong>`,...r]:r,...this.showMine?[this.mineTitle]:[]]},posesTitles(){return[...(this.sharedInfoStore.poses.by_types||[]).map(r=>`<strong>${this.posesEmojis[r.title]||""} ${r.title}</strong>`),...this.showMine?[this.mineTitle]:[]]},howManyLeft(){return Math.floor(this.userStore.totPeepCoinsLeft/this.unitImageCost)},charactersLeft(){return this.maxLength-this.description.length},charactersLeftNP(){return this.maxLengthNP-this.userStore.creations_settings.negative_prompt.length},isPoseSupportedByForge(){return!(this.nsfw_pose_selected&&!this.sharedInfoStore.sharedInfo?.supported_forge_nsfw_poses.includes(this.userStore.creations_settings.pose))},nsfw_pose_selected(){if(this.sharedInfoStore?.poses?.by_types){const e=this.sharedInfoStore.poses.by_types.find(t=>t.title==="NSFW");if(e&&e.content.includes(this.userStore.creations_settings.pose))return this.userStore.setCreationsSetting("is_nsfw",1),!0}return!1},imageFormats(){return[{name:"portrait",label:this.$t("picRequester.portrait"),w:"10px",h:"15px"},{name:"landscape",label:this.$t("picRequester.landscape"),w:"15px",h:"10px"},{name:"square",label:this.$t("picRequester.square"),w:"12px",h:"12px"},{name:"widescreen",label:this.$t("picRequester.widescreen"),w:"18px",h:"10px"},{name:"screen",label:this.$t("picRequester.myScreen"),isNew:!0,icon:"fas fa-mobile-screen-button"},{name:"custom",label:this.$t("picRequester.custom"),w:"13px",h:"12px"}]},currentFormatName(){const e=this.userStore.creations_settings;return e.image_orientation==="custom"&&e.custom_screen?"screen":e.image_orientation},selectedOrientationLabel(){return this.imageFormats.find(e=>e.name===this.currentFormatName)?.label||""},engineStats(){return[{key:"consistency",label:this.$t("picRequester.statLikeness")},{key:"detail",label:this.$t("picRequester.statDetail")},{key:"realism",label:this.$t("picRequester.statRealism")},...F?[]:[{key:"spice",label:this.$t("picRequester.statSpice")}]]},imageEngines(){return[{value:"Photoreal",emoji:"\u{1F4F7}",label:"Photoreal",tag:this.$t("picRequester.tagPhotorealistic"),badge:this.$t("picRequester.badgeRecommended"),recommended:!0,stats:{consistency:5,detail:4,realism:5,spice:4}},{value:"Forge",emoji:"\u{1F528}",label:"Forge",tag:this.$t("picRequester.tagAnyStyle"),badge:this.$t("picRequester.badgeEditing"),stats:{consistency:4,detail:4,realism:4,spice:3}},{value:"Prism",emoji:"\u{1F31F}",label:"Prism",tag:this.$t("picRequester.tagGlam"),stats:{consistency:3,detail:5,realism:3,spice:5}},{value:"Anime",emoji:"\u{1F9DA}",label:"Anime",tag:this.$t("picRequester.tagAnime"),stats:{consistency:4,detail
1:4,realism:2,spice:5}}]},navPrompts(){const e=this.current_ai_id?this.peepPrompt:"",t=this.promptHistory.filter(r=>r&&r!==e);return e?[e,...t]:t},hasPeepSlot(){return!!(this.current_ai_id&&this.peepPrompt)},promptNavLabel(){if(this.historyIndex<0||this.hasPeepSlot&&this.historyIndex===0)return"";const e=this.navPrompts.length-(this.hasPeepSlot?1:0);return`${this.hasPeepSlot?this.historyIndex:this.historyIndex+1}/${e}`},isPeepPromptActive(){return!!(this.current_ai_id&&this.peepPrompt&&this.description===this.peepPrompt)},canSetPeepPrompt(){return!!(this.current_ai_id&&this.description&&this.description.trim()&&!this.isPeepPromptActive)},atNewestPrompt(){return this.historyIndex===-1||this.historyIndex===0&&this.hasPeepSlot&&!this.currentTypedDescription}},data(){let e=B(),t=this.aiId;t?e.setMiscData("ai_id_in_pic_req",this.aiId):t=e.misc_data.ai_id_in_pic_req;const r=(t?ae(t):"")||"",c=JSON.parse(localStorage.getItem("prompt_history")||"[]"),i=E("image_description",""),s=r||i,h=JSON.parse(localStorage.getItem("prompt_enhance_state")||"{}");return{SLOT_COUNTER_BELOW:it,SLOTS_SHARE_WARNING:rt,MAX_SUBSCRIPTION_TIER:Ve,backgroundEmojis:ze,outfitEmojis:He,posesEmojis:{NSFW:"\u{1F336}\uFE0F",flirty:"\u{1F609}",fun:"\u{1F389}",standard:"\u{1F9CD}"},current_ai_id:t,passed_ai_id:t,loadingPeepData:!1,ai_image_url:null,showUploadImage:!1,leftForgeWithEditImages:!1,model_auto_switched:!1,selected_image_model:B().creations_settings.type_picture,peep_background_styles:null,noPeepImageConfirmed:E("noPeepImageConfirmed","false")=="true",numBatchImages:E("numBatchImages","1"),chatStore:Je(),showAdvancedOptions:E("adv_opt_open","false")=="true",animeStyleVariationOptions:je.attributes.anime_style_variation,maxLengthNP:150,promptEnhancing:!1,promptBeforeEnhance:h.before??null,lastEnhancedPrompt:h.enhanced||"",enhanceError:"",description:s,appearanceDescription:"",showLookEditor:!1,scenario:this.customScenario,userStore:B(),outputMessage:"",imageRequested:!1,sharedInfoStore:We(),peep_image:null,peep_style_type:null,peep_appearance_prompt:null,peep_default_outfit:null,peep_default_background:null,defaultFill:{outfit:!1,background:!1},peep_photoreal_desc:null,peep_created_by:null,manualSlots:{pose:!1,outfit:!1,background:!1,expression:!1},autoSelecting:!1,peep_name:null,peepPrompt:r,promptHistory:c,historyIndex:r?0:-1,currentTypedDescription:r?"":s,zoomedEngineSample:null}},beforeUnmount(){this.userStore.saveSettings()},inject:{createShellTabs:{default:null}},watch:{description(e){!(e||"").trim()&&(this.promptBeforeEnhance!==null||this.lastEnhancedPrompt)&&this.clearEnhanceState()},tabsPeep:{handler(e){this.createShellTabs&&(this.createShellTabs.peep=e)},immediate:!0},"userStore.isAuthorized":{handler(e){e&&this.sharedInfoStore.loadSlotLists()},immediate:!0},"userStore.userRecord.uid":{handler(e){e&&this.userStore.loadSlotPresets().catch(()=>{})},immediate:!0},current_ai_id(e){this.peepPrompt=(e?ae(e):"")||"",this.peepPrompt?(this.historyIndex=0,this.description=this.peepPrompt,this.currentTypedDescription=""):(this.historyIndex=-1,this.description=E("image_description",""),this.currentTypedDescription=this.description)}},async mounted(){const e=[];this.current_ai_id&&(!this.peep_image||!this.peep_name)?(this.loadingPeepData=!0,e.push(W(`get/ai_id/${this.current_ai_id}?fields=face_image_url&fields=characteristics.style_type&fields=characteristics.name&fields=characteristics.appearance_prompt&fields=characteristics.default_outfit&fields=characteristics.default_background&fields=characteristics.photoreal_desc&fields=created_by`,null,"GET").then(t=>{this.peep_image=t.face_image_url,this.peep_appearance_prompt=t.characteristics.appearance_prompt||null,this.peep_style_type=this.peep_appearance_prompt?null:t.characteristics.style_type||null,this.peep_name=t.characteristics.name,this.peep_default_outfit=t.characteristics.default_outfit||null,this.peep_default_background=t.characteristics.default_background||null,this.applyEmptySlotDefaults(),this.peep_photoreal_desc=t.characteristics.photoreal_desc||null,this.peep_created_by=t.created_by||null,this.syncLookBox()}).catch(()=>{this.deselectPeep()}).finally(()=>{this.loadingPeepData=!1}))):this.loadingPeepData=!1,await Promise.all(e)},methods:{chatScenePill(e,t){const r=this.current_ai_id;if(!r||!this.chatStore.chatData?.ai_uids?.includes(r))return[];const c=(this.chatStore.chatData?.ai_chat_states?.[r]?.scene?.[e]||"").trim();return!c||c===(t||"").trim()?[]:[{name:c,display_name:c.length>32?`${c.slice(0,30).trimEnd()}\u2026`:c,full_chip:!0,emoji:"\u{1F4CC}",bk_color:"blue"}]},enhanceStopLabel(e){return e?this.enhanceLevels[e]?.label||"HD":this.$t("picRequester.enhanceOff")},pickFormat(e){e==="screen"?(this.userStore.setCreationsSetting("image_orientation","custom"),this.userStore.setCreationsSetting("custom_screen",!0)):(this.userStore.setCreationsSetting("image_orientation",e),this.userStore.setCreationsSetting("custom_screen",!1))},toggleAdvancedOptions(){this.showAdvancedOptions=!this.showAdvancedOptions,U("adv_opt_open",this.showAdvancedOptions)},async setFullControl(e){const t=this.$refs.modeSeg,r=t?.getBoundingClientRect().top;if(this.userStore.setCreationsSetting(this.full_control_mode_str,e),r==null)return;await this.$nextTick();const c=t.getBoundingClientRect().top-r;if(Math.abs(c)<1)return;let i=t.parentElement;for(;i&&i!==document.body;){const s=getComputedStyle(i).overflowY;if((s==="auto"||s==="scroll")&&i.scrollHeight>i.clientHeight)break;
1i=i.parentElement}i&&i!==document.body?i.scrollTop+=c:window.scrollBy(0,c)},engineSample(e){if(e==="Anime"){const r=(this.userStore.creations_settings.style_variation||"Default").toLowerCase().replace(/\s+/g,"-");return new URL(Object.assign({"../assets/engine-samples/anime-bimbo.webp":ne,"../assets/engine-samples/anime-cute.webp":oe,"../assets/engine-samples/anime-default.webp":re,"../assets/engine-samples/anime-detailed-monochrome.webp":ie,"../assets/engine-samples/anime-detailed.webp":se,"../assets/engine-samples/anime-drawbook.webp":te,"../assets/engine-samples/anime-more-realistic.webp":ee,"../assets/engine-samples/anime-pixel-art.webp":$,"../assets/engine-samples/anime-rainbow.webp":Q,"../assets/engine-samples/anime-retro.webp":Z,"../assets/engine-samples/anime-sketch.webp":Y,"../assets/engine-samples/anime-stilized.webp":K,"../assets/engine-samples/anime-vintage.webp":X,"../assets/engine-samples/anime-watercolors.webp":J})[`../assets/engine-samples/anime-${r}.webp`],import.meta.url).href}return new URL(Object.assign({"../assets/engine-samples/anime-bimbo.webp":ne,"../assets/engine-samples/anime-cute.webp":oe,"../assets/engine-samples/anime-default.webp":re,"../assets/engine-samples/anime-detailed-monochrome.webp":ie,"../assets/engine-samples/anime-detailed.webp":se,"../assets/engine-samples/anime-drawbook.webp":te,"../assets/engine-samples/anime-more-realistic.webp":ee,"../assets/engine-samples/anime-pixel-art.webp":$,"../assets/engine-samples/anime-rainbow.webp":Q,"../assets/engine-samples/anime-retro.webp":Z,"../assets/engine-samples/anime-sketch.webp":Y,"../assets/engine-samples/anime-stilized.webp":K,"../assets/engine-samples/anime-vintage.webp":X,"../assets/engine-samples/anime-watercolors.webp":J,"../assets/engine-samples/forge.webp":Ue,"../assets/engine-samples/photoreal.webp":Ge,"../assets/engine-samples/prism.webp":Ne})[`../assets/engine-samples/${e.toLowerCase()}.webp`],import.meta.url).href},deselectPeep(){this.current_ai_id=null,this.userStore.setMiscData("ai_id_in_pic_req",""),this.userStore.setCreationsSetting("use_custom_images",!0)},currentPick(e){return(e==="outfit"?this.outfitToSend:this.backgroundToSend)||""},canSetDefault(e){if(!this.current_ai_id||this.isGroupChatContext||!this.userStore.isAuthorized||!(!!this.peep_created_by&&this.peep_created_by===this.userStore.userRecord?.uid)&&!this.userStore.userRecord?.isAdmin||this.selected_image_model==="Forge"&&this.userStore.misc_data.edit_images.length>0)return!1;const r=this.currentPick(e);if(!r||["Surprise",q,"Follow Global Style"].includes(r))return!1;const c=e==="outfit"?this.peep_default_outfit:this.peep_default_background;return r!==c},setDefaultConfirm(e){const t=this.peep_name||"",r=this.$t(`picRequester.setDefaultConfirm.${e}`,{name:t}),c=this.$t("picRequester.setDefaultCreatorOnly",{name:t});return`<span>${r}</span><div class="tip-text row-container" style="gap: 0.6rem; align-items: center; justify-content: flex-start"><span>\u{1F4A1}</span><span>${c}</span></div>`},async setPeepDefault(e){const t=this.currentPick(e);let r=null;try{r=await W("api/peep-default-slot",{ai_id:this.current_ai_id,kind:e,text:t})}catch{r=null}if(r?.status!=="ok"){this.$refs[e==="outfit"?"outfitTagSelector":"backgroundTagSelector"]?.showMessage(this.$t("picRequester.setDefaultError"));return}e==="outfit"?this.peep_default_outfit=r.text:this.peep_default_background=r.text,this.$modalStore.textNotification={isOpen:!0,html:this.$t(`picRequester.setDefaultDone.${e}`,{name:this.peep_name||""}),duration:4e3}},mineItems(e){return this.showMine&&this.userStore.slot_presets?.[e]||[]},pinnedOf(e){return e==="outfit"?this.peepDefaultOutfit:e==="background"?this.peepDefaultBackground:""},mineDeletable(e){const t=this.pinnedOf(e);return this.mineItems(e).filter(r=>r!==t)},withMineGroup(e,t,r){if(!this.showMine)return e;const c=t.filter(d=>d.name!=="Surprise"&&d.name!==q),i=this.pinnedOf(r),s=this.notIn(c),h=this.mineItems(r).filter(d=>d!==i&&s(d)).map(d=>({name:d,emoji:"\u2B50",bk_color:"amber"}));return[...e,[...c,...h]]},notIn(e){const t=new Set(e.map(r=>typeof r=="string"?r:r.name));return r=>!t.has(typeof r=="string"?r:r?.name)},mineHints(e,t){if(!this.showMine)return[];const r=Be(this.$t,this.$te,t);return e.map((c,i)=>i===e.length-1?r:"")},mineUpsell(e,t){this.$refs[e]?.showMessage(t,{label:this.$t("picRequester.seePlans"),fn:()=>this.$modalStore.openSubscribePage()})},async saveMine(e,t,r){if(!this.userStore.isAuthorized){this.$modalStore.showSignInPanel=!0;return}const c=this.$refs[r];let i=null;try{i=await this.userStore.saveSlotPreset(e,t)}catch{i=null}if(i?.status==="ok"){const s=i.items?.[0]||t;c&&!c.selectedTags.includes(s)&&c.selectOption(s);return}if(i?.reason==="limit"){const s=this.sharedInfoStore.sharedInfo?.max_slot_presets_per_kind||{},h=Math.max(...Object.values(s).map(Number),0),d=this.$t(`picRequester.mineThis.${e}`);i.limit<h?this.mineUpsell(r,this.$t("picRequester.mineLimitUpsell",{thing:d,n:i.limit,pal:s[1],pro:s[2]})):c?.showMessage(this.$t("picRequester.mineLimitFull",{thing:d,n:i.limit}));return}c?.showMessage(this.$t(i?.reason==="reserved"?"picRequester.mineReserved":"picRequester.mineError"))},async deleteMine(e,t){try{await this.userStore.deleteSlotPreset(e,t)}catch{}},lockedMine(e,t){const r=this.sharedInfoStore.sharedInfo?.max_slot_presets_per_kind||{};this.mineUpsell(t,this.$t("picRequester.mineLocked",{thing:this.$t(`picRequester.mineThis.${e}`),n:this.userStore.slotPresetLimit(),pal:r[1],pro:r[2]}))},slotMax(e){if(!isFinite(this.slotBudget))return this.maxSlotLength;const t=Object.entries(this.slotSizes).filter(([c])=>c!==e).reduce((c,[,i])=>c+i,0),r=Math.max(0,(this.description||"").trim().length-100);return Math.max(0,Math.min(this.maxSlotLength,this.slotBudget-t-r-25))},slotValue(e,t){const r=this.userStore.creations_settings[e];return r==="Follow Global Style"&&!this.canFollowGlobalStyle?t:!r&&this.defaultFill[e]?e==="outfit"?this.peepDefaultOutfit:this.peepDefaultBackgroun
1d:r},applyEmptySlotDefaults(){const e=this.userStore.creations_settings;this.defaultFill={outfit:!e.outfit&&!!this.peepDefaultOutfit,background:!e.background&&!!this.peepDefaultBackground}},isPeepPicked(e){return this.isGroupForgeMulti?(this.userStore.misc_data.edit_images||[]).some(t=>t.data?.ai_persona_id===e):this.current_ai_id===e},toggleGroupPeep(e){if(!this.isGroupForgeMulti){this.selectGroupPeep(e);return}const t=[...this.userStore.misc_data.edit_images||[]],r=t.findIndex(c=>c.data?.ai_persona_id===e);if(r>=0)t.splice(r,1);else{const c=this.chatStore.chatData?.ai_chat_states?.[e]?.images?.[0];if(!c)return;t.length>=this.maxEditImages&&t.shift(),t.push({type:c.ai_persona_id?"peep":"custom",data:c})}this.userStore.setMiscData("edit_images",t),this.userStore.setCreationsSetting("use_custom_images",!0)},deselectAllGroup(){this.userStore.setMiscData("edit_images",[]),this.current_ai_id=null,this.userStore.setMiscData("ai_id_in_pic_req",""),this.userStore.setCreationsSetting("use_custom_images",!0)},selectGroupPeep(e){this.current_ai_id=e,this.userStore.setMiscData("ai_id_in_pic_req",e);const t=this.chatStore.chatData?.ai_chat_states?.[e];t&&(this.peep_image=z(e)||t.face_image_url||t.images?.[0]?.url||null,this.peep_appearance_prompt=t.characteristics?.appearance_prompt||null,this.peep_style_type=this.peep_appearance_prompt?null:t.characteristics?.style_type||null,this.peep_name=t.nickname||V(t.characteristics?.name||t.name)||null,this.peep_default_outfit=t.characteristics?.default_outfit||null,this.peep_default_background=t.characteristics?.default_background||null,this.applyEmptySlotDefaults(),this.peep_photoreal_desc=t.characteristics?.photoreal_desc||null,this.peep_created_by=t.created_by||null,this.syncLookBox())},restoreGroupForgeImages(){const e=(this.chatStore.chatData?.ai_uids||[]).map(t=>this.chatStore.chatData?.ai_chat_states?.[t]?.images?.[0]).filter(t=>t).slice(0,this.maxEditImages).map(t=>({type:t&&t.ai_persona_id?"peep":"custom",data:t}));this.userStore.setMiscData("edit_images",e),this.userStore.setCreationsSetting("use_custom_images",!0)},changeImageModel(e){const t=this.selected_image_model;if(this.leftForgeWithEditImages=t==="Forge"&&e!=="Forge"&&this.userStore.misc_data.edit_images.length>0,this.userStore.setCreationsSetting("type_picture",e),this.model_auto_switched=!1,this.selected_image_model=this.userStore.creations_settings.type_picture,this.isGroupChatContext){if(e=="Forge")this.restoreGroupForgeImages(),this.current_ai_id=null,this.userStore.setMiscData("ai_id_in_pic_req","");else if(t=="Forge"||!this.current_ai_id){this.userStore.setMiscData("edit_images",[]),this.userStore.setCreationsSetting("use_custom_images",!1);const r=this.groupParticipants[0];r&&this.selectGroupPeep(r.uid)}}},addEditImage(e){const t=this.userStore.misc_data.edit_images||[];t.length>=this.maxEditImages&&t.shift(),t.push({type:"custom",data:{type:"image",url:e}}),this.userStore.setMiscData("edit_images",t),this.userStore.setCreationsSetting("use_custom_images",!0),this.selected_image_model!=="Forge"&&this.changeImageModel("Forge")},autoSwitchImageModel(){this.nsfw_pose_selected&&this.selected_image_model=="Forge"&&this.current_ai_id&&this.userStore.misc_data.edit_images.length==0&&!this.sharedInfoStore.sharedInfo?.supported_forge_nsfw_poses.includes(this.userStore.creations_settings.pose)&&(this.userStore.setCreationsSetting("is_nsfw",1),this.userStore.creations_settings.type_picture="Prism",this.selected_image_model="Prism",this.model_auto_switched=!0)},selectPose(e){this.userStore.setCreationsSetting("pose",e[0]),this.markManual("pose",e),this.autoSwitchImageModel()},selectExpression(e){this.userStore.setCreationsSetting("expression",e[0]),this.markManual("expression",e)},markManual(e,t){this.autoSelecting||(this.manualSlots[e]=!!(t&&t.length))},rollFx(e){if(!e?.classList)return;const t=Date.now();t-(this.rollBatchAt||0)>60&&(this.rollBatchN=0),this.rollBatchAt=t;const r=(this.rollBatchN++||0)*45;e.classList.remove("pr-rolled"),e.offsetWidth,e.style.setProperty("--roll-delay",`${r}ms`),e.classList.add("pr-rolled"),clearTimeout(e.rollTimer),e.rollTimer=setTimeout(()=>e.classList.remove("pr-rolled"),900+r)},autoSelect(e,t){this.autoSelecting=!0;try{this.$refs[e]?.selectOption(t)}finally{this.autoSelecting=!1}},rollLook(e){e===null&&F&&(e=!1);const t=(h,d)=>{const _=(h||[]).filter(m=>m&&m!==d);return _.length?_[Math.floor(Math.random()*_.length)]:null},r=(h,d)=>(h||[]).filter(_=>e===null||_.title===d===e).flatMap(_=>_.content||[]),c=this.userStore.creations_settings,i=["pose","outfit","background"].concat(this.selected_image_model!="Prism"?["expression"]:[]);if(i.every(h=>this.manualSlots[h]))for(const h of i)this.manualSlots[h]=!1;const s=(h,d,_)=>{if(this.manualSlots[h])return;const m=t(_,c[h]);m&&(this.autoSelect(d,m),this.rollFx(this.$refs[d]?.$el))};s("pose","poseTagSelector",r(this.sharedInfoStore?.poses?.by_types,"NSFW")),s("outfit","outfitTagSelector",r(this.sharedInfoStore?.outfits?.by_types,"Sexy")),s("background","backgroundTagSelector",(this.sharedInfoStore?.backgrounds?.by_types||[]).flatMap(h=>
1h.content||[])),s("expression","expressionTagSelector",this.sharedInfoStore?.expressions),e===!1&&c.is_nsfw===1&&this.onNsfwToggle(0)},onNsfwToggle(e){if(this.nsfw_pose_selected||(this.userStore.setCreationsSetting("is_nsfw",e),e!==1||F))return;const t=this.userStore.creations_settings,r=(s,h)=>(s||[]).find(d=>d.title===h)?.content||null,c=r(this.sharedInfoStore?.poses?.by_types,"NSFW");c&&t.pose!==q&&!c.includes(t.pose)&&this.autoSelect("poseTagSelector",q);const i=r(this.sharedInfoStore?.outfits?.by_types,"Sexy");i&&t.outfit!==q&&!i.includes(t.outfit)&&this.autoSelect("outfitTagSelector",q)},clearStep(e,t){const r=e==="outfit"?this.outfitToSend:this.backgroundToSend,c=[e==="outfit"?this.peepDefaultOutfit:this.peepDefaultBackground,this.canFollowGlobalStyle?"Follow Global Style":""].filter(Boolean),i=c.indexOf(r),s=i===-1?c[0]:c[i+1];this.manualSlots[e]=!1,this.defaultFill[e]=!1,s?this.autoSelect(t,s):(this.$refs[t].selectedTags=[],this.userStore.setCreationsSetting(e,""))},checkSelectedBackgroundTagSelector(e){e.length==0?this.clearStep("background","backgroundTagSelector"):(this.defaultFill.background=!1,this.markManual("background",e),this.userStore.setCreationsSetting("background",this.asStoredSlot(e[0],this.peepPrefillBackground)))},checkSelectedOutfitTagSelector(e){e.length==0?this.clearStep("outfit","outfitTagSelector"):(this.defaultFill.outfit=!1,this.markManual("outfit",e),this.userStore.setCreationsSetting("outfit",this.asStoredSlot(e[0],this.peepPrefillOutfit)))},asStoredSlot(e,t){return t&&e===t?"Follow Global Style":e},shuffle(e){return e.map(t=>({v:t,sort:Math.random()})).sort((t,r)=>t.sort-r.sort).map(({v:t})=>t)},isVideo(e){return/\.(mp4|webm|ogg)$/i.test(e)},writeInLocalStorage:U,onPromptInput(){this.historyIndex=-1,this.currentTypedDescription=this.description},syncLookBox(){const e=this.current_ai_id?Le(this.current_ai_id):"";this.appearanceDescription=e||this.peep_appearance_prompt||"",this.showLookEditor=!1},onAppearanceInput(){if(!this.current_ai_id)return;const e=(this.appearanceDescription||"").trim();!e||e===(this.peep_appearance_prompt||"").trim()?H(this.current_ai_id):De(this.current_ai_id,this.appearanceDescription)},resetPromptToPeepLook(){this.appearanceDescription=this.peep_appearance_prompt||"",this.current_ai_id&&H(this.current_ai_id)},setAsPeepPrompt(){if(this.isPeepPromptActive){Ee(this.current_ai_id),this.peepPrompt="",this.currentTypedDescription=this.description,this.historyIndex=-1;return}if(!this.canSetPeepPrompt)return;let e=this.description.trim();e=Oe(e,this.peep_appearance_prompt),Ae(this.current_ai_id,e,20),this.peepPrompt=e,this.description=e,this.currentTypedDescription="",this.historyIndex=0},savePromptToHistory(e){if(!e.trim())return;const t=this.promptHistory.filter(r=>r!==e);t.unshift(e),this.promptHistory=t.slice(0,5),localStorage.setItem("prompt_history",JSON.stringify(this.promptHistory)),this.historyIndex=-1},navigateHistory(e){const t=this.navPrompts;if(e===1)if(this.historyIndex===-1)this.currentTypedDescription=this.description,this.historyIndex=0;else if(this.historyIndex<t.length-1)this.historyIndex++;else return;else{if(this.historyIndex===-1)return;if(this.historyIndex===0){this.historyIndex=-1,this.description=this.currentTypedDescription;return}this.historyIndex--}this.description=t[this.historyIndex]},setBatchToLocalStorage(e,t){localStorage[e]=t,this.numBatchImages=t},convertIsoToDate:he,async getChatContextTag(){if(!this.userStore.isAuthorized){this.$modalStore.showSignInPanel=!0;return}if(this.userStore.totPeepCoinsLeft<this.sharedInfoStore.sharedInfo?.cost_from_chat_image_prompt){this.$emit("close"),this.$modalStore.openNotEnoughCoins(this.sharedInfoStore.sharedInfo?.cost_from_chat_image_prompt);return}const e=await this.$apiCall("api/get_chat_context_tags");this.autoSelect("outfitTagSelector",e.outfit),this.autoSelect("backgroundTagSelector",e.background),this.autoSelect("poseTagSelector",e.pose),this.autoSelect("expressionTagSelector",e.expression),this.userStore.setCreationsSetting("is_nsfw",e.nsfw),this.autoSwitchImageModel(),this.description=e.other_info,this.showAdvancedOptions=!0,this.writeInLocalStorage("adv_opt_open",this.showAdvancedOptions)},getItemWithDefault:E,composeDescription(e){return this.strictManual?[(this.appearanceDescription||"").trim(),(e||"").trim()].filter(
1Boolean).join(` 2`):e},async fetchEnhancedPrompt(e){this.promptEnhancing=!0,this.enhanceError="";try{const t=await this.$apiCall("api/enhance-prompt",{prompt:e,ai_id:this.current_ai_id||null,nsfw:this.nsfwToSend,max_chars:this.maxLength,background:this.backgroundToSend,outfit:this.outfitToSend,pose:this.userStore.creations_settings.pose,expression:this.userStore.creations_settings.expression,full_control_mode:this.userStore.creations_settings[this.full_control_mode_str]});return t?.status==="ok"&&t.prompt?{prompt:t.prompt}:{prompt:null,reason:t?.reason||"failed"}}catch{return{prompt:null,reason:"failed"}}finally{this.promptEnhancing=!1}},async enhanceNow(){if(!this.userStore.isAuthorized){this.$modalStore.signInReason="gen_image",this.$modalStore.showSignInPanel=`<div style='color:red'>${this.$t("picRequester.signInRequired_html")}</div>`;return}if(this.userStore.totPeepCoinsLeft<this.enhancePromptCost){this.$emit("close"),this.$modalStore.openNotEnoughCoins(this.enhancePromptCost);return}const e=this.description,{prompt:t,reason:r}=await this.fetchEnhancedPrompt(e);if(!t){r!=="not_enough_tokens"&&(this.enhanceError=this.enhanceErrorText(r));return}this.applyEnhanced(e,t)},applyEnhanced(e,t){this.promptBeforeEnhance=e,this.lastEnhancedPrompt=t,this.description=t,this.historyIndex=-1,this.currentTypedDescription=t,localStorage.setItem("image_description",t),localStorage.setItem("prompt_enhance_state",JSON.stringify({before:e,enhanced:t}))},clearEnhanceState(){this.promptBeforeEnhance=null,this.lastEnhancedPrompt="",localStorage.removeItem("prompt_enhance_state")},enhanceErrorText(e){return e==="refused"?this.$t("picRequester.enhanceRefused"):e==="daily_cap"?this.$t("picRequester.enhanceDailyCap"):this.$t("picRequester.enhanceFailed")},undoEnhance(){this.description=this.promptBeforeEnhance??"",this.currentTypedDescription=this.description,localStorage.setItem("image_description",this.description),this.clearEnhanceState()},async requestPic(){if(this.promptEnhancing)return;if(!this.userStore.isAuthorized){this.$modalStore.signInReason="gen_image",this.$modalStore.showSignInPanel=`<div style='color:red'>${this.$t("picRequester.signInRequired_html")}</div>`;return}if(this.howManyLeft<1){this.$emit("close"),this.$modalStore.openNotEnoughCoins(this.imageCost);return}localStorage.setItem("image_description",this.description),localStorage.setItem("confirm18","true"),this.atLeastOneImageUsed||(this.noPeepImageConfirmed=!0,localStorage.setItem("noPeepImageConfirmed","true")),this.savePromptToHistory(this.description),E("askedNotification","false")=="false"&&!this.userStore.notificationsEnabled&&this.userStore.service_worker_registered&&(this.$modalStore.informNotificationPanel=!0,localStorage.askedNotification="true");let e=null;this.userStore.creations_settings.use_custom_images&&this.selected_image_model=="Forge"&&(e=this.userStore.misc_data.edit_images.slice(0,this.maxEditImages).map(_=>{if(_.data?.image_id)return{type:"peep",id:_.data.image_id};if(_.type==="custom")return{type:"custom",base64:_.data.url};throw new Error(`Unknown image type: ${_.type}`)}));let t="like_first";(!this.userStore.creations_settings.same_orient_as_first_image||!this.userStore.misc_data.edit_images.length>0||this.selected_image_model!="Forge")&&(t=this.userStore.creations_settings.image_orientation);let r=null,c=null,i=null;if(t==="custom"&&this.userStore.creations_settings.custom_screen)i=qe();else if(t==="custom"){const _=this.userStore.creations_settings.custom_ratio_a||null,m=this.userStore.creations_settings.custom_ratio_b||null;_&&m?(r=_,c=m):t="portrait"}let s=this.descriptionForRequest,h=this.alreadyEnhanced,d=Math.min(this.howManyLeft,this.numBatchImages);if(this.willAutoEnhance){const _=Math.floor((this.userStore.totPeepCoinsLeft-this.enhancePromptCost)/this.unitImageCost);if(_<1){this.$emit("close"),this.$modalStore.openNotEnoughCoins(this.unitImageCost+this.enhancePromptCost);return}d=Math.min(d,_);const{prompt:m,reason:I}=await this.fetchEnhancedPrompt(this.description);if(m)this.applyEnhanced(this.description,m),this.savePromptToHistory(m),s=this.composeDescription(m),h=!0;else if(I==="refused"||I==="not_enough_tokens"){I==="refused"&&(this.enhanceError=this.enhanceErrorText(I));return}else this.enhanceError=this.enhanceErrorText(I)}for(let _=0;_<d;_++){const m=Te(),I=await Me.currentUser.getIdToken();fetch("https://api.aipeeps.com/api/request-image",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${I}`},body:JSON.stringify({request_id:m,ai_id:this.current_ai_id,additional_images:this.selected_image_model=="Forge"&&this.userStore.creations_settings.use_custom_images?e:[],description:s,prompt_enhanced:h,prompt_has_appearance:this.strictManual,negative_prompt:this.userStore.creations_settings.negative_prompt,nsfw:this.nsfwToSend,type_picture:this.selected_image_model,background:this.backgroundToSend,outfit:this.outfitToSend,pose:this.userStore.creations_settings.pose,expression:this.userStore.creations_settings.expression,full_control_mode:this.userStore.creations_settings[this.full_control_mode_str],style_variation:this.selected_image_model=="Anime"?this.userStore.creations_settings.style_variation:"Default",force_solo:this.selected_image_model=="Forge"?!this.isGroupChatContext&&!this.userStore.creations_settings.each_image_a_character:this.strictManual?!1:this.userStore.creations_settings.force_solo,hyper_realism_level:this.userStore.creations_settings.hyper_realism_level,global_style_strength:this.canFollowGlobalStyle?this.userStore.creations_settings.global_style_strength:null,image_orientation:t,aspect_ratio_a:this.showOrientationControls?r:null,aspect_ratio_b:this.showOrientationControls?c:null,width:this.showOrientationControls&&i?i.w:null,height:this.showOrientationControls&&i?i.h:null,hd:this.hdActive,enhance:this.enhanceLevel})}),this.imageRequested=!0,setTimeout(()=>{this.outputMessage=""},5e3),setTimeout(()=>{this.imageRequested=!1},1e4),await new Promise(A=>setTimeout(()=>{this.outputMessage=`<span class='green'>${this.$t("picRequester.imageRequested",{n:_+1,total:this.numBatchImages})}</span>`,A()},500))}}}},nt={class:"text-mid-big pic-req-title"}
2,at={key:0,class:"group-peep-selector group-peep-selector-top"},lt={class:"group-peep-label"},ut={class:"peep-circles"},ct=["title","onClick"],pt=["src","alt"],ht={key:0,class:"row-container",style:{"flex-wrap":"wrap",gap:"0.5rem 1.5rem","align-items":"flex-start"}},dt={key:1,class:"circle-image-small"},mt={key:0,class:"peep-sel-name"},gt={style:{position:"relative"}},_t={key:0,class:"circle-image-loader"},ft=["src"],St=["src"],yt={class:"peep-deselect-wrap"},bt={key:2,class:"container edit-images-col"},vt={class:"edit-card-title"},kt={class:"row-container edit-images-row"},wt={key:0,class:"edit-thumb-badge"},It=["src"],Pt=["onClick"],Ct={key:2,class:"text-very-small each-image-hint"},xt={key:3,class:"container each-image-toggle-up"},Rt={class:"row-container",style:{gap:"0.6rem","align-items":"center","flex-wrap":"wrap"}},Ft={class:"text-very-small each-image-hint"},qt={key:4,class:"text-very-small"},Tt={key:1},Mt={class:"row-container",style:{"flex-wrap":"wrap",gap:"0.5rem 2rem","align-items":"center"}},Et={class:"row-container",style:{gap:"0.5rem 1.5rem","flex-wrap":"wrap"}},Ot={class:"container",style:{gap:"0.5rem"}},At={key:0,class:"group-forge-warning text-very-small"},Dt={key:1,class:"group-forge-warning edit-forge-warning text-very-small"},Lt={class:"engine-section-title"},Bt={class:"engine-cards"},Nt=["onClick"],Gt={key:0,class:"engine-new-ribbon"},Ut={class:"engine-head"},jt={class:"engine-emoji"},Ht={class:"engine-name"},zt={class:"engine-tag"},Vt={class:"engine-stats"},Wt={class:"stat-label"},Jt={key:0,class:"stat-peppers"},Xt={key:1,class:"stat-bars"},Kt=["aria-label"],Yt=["src","alt"],Zt={key:2,class:"engine-sample-desc text-very-small"},Qt=["src","alt"],$t={key:5,class:"red text-very-small"},es={key:0},ts={key:1},ss={class:"container",style:{gap:"0.5rem",width:"100%"}},is={ref:"modeSeg",class:"mode-seg",role:"radiogroup"},rs=["aria-checked"],os=["aria-checked"],ns={key:0,class:"container",style:{gap:"0.5rem",width:"min(25rem, 100%)","padding-top":"0.9rem"}},as={class:"row-container quick-fill-row"},ls={key:0,class:"roll-row"},us={key:1,class:"row-container",style:{gap:"0.3rem"}},cs={class:"infotag",style:{opacity:"1"}},ps={class:"sub-tier2"},hs={class:"tooltip-icon"},ds={class:"container",style:{gap:"1rem",width:"100%"}},ms={style:{"text-align":"center"}},gs={style:{"text-align":"center"}},_s={key:0,class:"text-very-small",style:{"text-align":"center"}},fs={style:{"text-align":"center"}},Ss={key:0,class:"text-very-small",style:{"text-align":"center"}},ys={style:{"text-align":"center"}},bs={class:"container",style:{gap:"0rem"}},vs={key:0,class:"text-very-small"},ks={key:2,style:{"margin-bottom":"0.5rem"},class:"text-very-small"},ws={key:1,class:"container",style:{position:"relative",gap:"0.5rem",width:"100%"}},Is={class:"prompt-head",style:{"justify-content":"flex-start",gap:"0.8rem"}},Ps={class:"xyellow"},Cs={class:"row-container",style:{gap:"0.4rem"}},xs={key:0,class:"text-small look-preview"},Rs={key:1,class:"textarea-char"},Fs=["maxlength"],qs={class:"char-left"},Ts={class:"container",style:{position:"relative",gap:"0.5rem",width:"100%"}},Ms={class:"prompt-head"},Es={class:"xyellow"},Os={class:"row-container",style:{gap:"0.4rem"}},As={class:"container",style:{gap:"0.2rem",width:"100%"}},Ds={class:"textarea-char"},Ls=["placeholder","maxlength"],Bs={class:"char-left"},Ns={key:0,class:"text-very-small"},Gs={key:1,class:"row-container",style:{gap:"0.5rem","align-self":"stretch","align-items":"center","justify-content":"space-between"}},Us={class:"row-container",style:{gap:"0.6rem","align-items":"center"}},js={key:0,class:"row-container enhance-toggle-row text-very-small"},Hs={class:"text-very-small",style:{opacity:"0.55"}},zs={class:"row-container",style:{gap:"0.4rem","align-items":"center"}},Vs=["title","aria-label"],Ws={key:2,class:"text-very-small"},Js={key:3,class:"text-very-small"},Xs={key:4,class:"text-very-small red"},Ks={class:"adv-toggle-wrap"},Ys=["aria-expanded"],Zs={class:"adv-toggle-title"},Qs={key:0,class:"adv-summary"},$s={class:"container",style:{gap:"0.5rem"}},ei={class:"container",style:{gap:"0.2rem"}},ti={class:"row-container"},si={class:"xblue"},ii={key:0,class:"row-container"},ri={key:0},oi={key:1},ni={key:0,class:"orient-picker"},ai={class:"orient-segment"},li=["title","aria-label","onClick"],ui={key:2,class:"orient-new"},ci={class:"text-very-small orient-current"},pi={key:1,class:"row-container",style:{gap:"0.4rem","align-items":"center","flex-wrap":"wrap","margin-top":"0.2rem"}},hi={class:"text-very-small"},di=["value"],mi=["value"],gi={class:"text-very-small"},_i={key:0,class:"container enhancer"},fi={class:"row-container enhancer-head"},Si={class:"xblue"},yi={class:"enhancer-level"},bi=["max","value","aria-label"],vi={class:"enhancer-stops text-very-small"},ki={class:"text-very-small hd-hint"},wi={key:1,class:"container",style:{gap:"0.2rem"}},Ii={class:"row-container"},Pi={class:"row-container",style:{gap:"0.4rem"}},Ci={class:"right-toggle-el"},xi={key:0,class:"row-container",style:{"margin-bottom":"0.5rem"}},Ri={class:"text-small"},Fi={class:"text-small"},qi={key:2,class:"row-container",style:{gap:"0.4rem"}},Ti={class:"tooltip-icon"},Mi={class:"right-toggle-el"},Ei={key:3,class:"container",style:{gap:"0.2rem"}},Oi={class:"row-container",style:{gap:"0.4rem"}},Ai={class:"tooltip-icon"},Di={class:"right-toggle-el"},Li={key:0},Bi={key:0,class:"row-container",style:{"margin-bottom":"0.5rem"}},Ni={class:"text-small"},Gi={class:"text-small"},Ui={key:4,class:"row-container",style:{"flex-wrap":"wrap",gap:"2rem"}},ji={class:"row-container",style:{gap:"0.4rem"}},Hi={class:"tooltip-icon"},zi={class:"right-toggle-el"},Vi={key:0,class:"textbox"},Wi={class:"textarea-char"},Ji={for:"description"},Xi=["placeholder","value","maxlength"],Ki={class:"char-left"},Yi={class:"request-and-num save"},Zi={class:"row-container"},Qi=["title"],$i={key:0,class:"green",style:{"font-weight":"bolder"}},er={key:0,class:"spinner"},tr=["innerHTML"],sr={class:"cost-line text-small"},ir={class:"row-container",style:{gap:"0.3rem"}},rr={class:"sub-tier2"},or={key:0,class:"circle-icon",style:{opacity:"1"}},nr={key:2,class:"shop-row"},ar={key:0,class:"row-container shop-upgrade"},lr={class:"sub-tier1"};function ur(e,t,r,c,i,s){const h=w("wiki-help-button"),d=w("hr-section"),_=w("peep-pick-circle"),m=w("base-button"),I=w("info-hint"),A=w("router-link"),T=w("toggle-bit"),G=w("cool-dropdown"),O=w("peep-coin"),D=w("inline-tag-selector"),le=w("three-way-toggle-labels"),ue=w("custom-image-upload-panel"),ce=w("panel-page"),M=Ce("tippy");return a(),b(ce,{"large-panel":""},{default:f(()=>[s.showGenerateTabs?p("",!0):(a(),b(d,{key:0},{default:f(()=>[o("div",nt,[g(" \u{1F5BC}\uFE0F\xA0"+u(s.inImageEditMode?s.editModeTitle:i.current_ai_id&&i.peep_name?e.$t("picRequester.titleOf",{name:i.peep_name}):e.$t("picRequester.title"))+"\xA0",1),S(h,{slug:"images"})])]),_:1})),o("div",{class:"container",style:v([{gap:"1.5rem",width:"100%"},{marginTop:s.showGenerateTabs?0:"1rem"}])},[s.isGroupChatContext&&s.groupParticipants.length?(a(),l("div",at,[o("div",lt,u(s.isGroupForgeMulti?e.$t("picRequester.groupChatPickPeeps",{max:s.maxEditImages}
2):e.$t("picRequester.groupChatPickPeep")),1),o("div",ut,[(a(!0),l(P,null,x(s.groupParticipants,(n,k)=>(a(),l("button",{key:n.uid,type:"button",class:y(["peep-circle",{selected:s.isPeepPicked(n.uid)}]),style:v({borderColor:n.color,zIndex:s.isPeepPicked(n.uid)?100:s.groupParticipants.length-k}),title:n.name,onClick:R=>s.toggleGroupPeep(n.uid)},[o("img",{src:e.$toCdnUrl(n.image),alt:n.name},null,8,pt)],14,ct))),128))]),o("div",{class:"from-scratch-link text-very-small",onClick:t[0]||(t[0]=(...n)=>s.deselectAllGroup&&s.deselectAllGroup(...n))},u(e.$t("picRequester.groupFromScratch")),1)])):p("",!0),o("div",{class:y(["container peep-zone",{reserve:!s.isGroupChatContext}])},[!s.isGroupChatContext&&(i.current_ai_id||s.editCardShown)?(a(),l("div",{key:0,class:y(["container",{"edit-card":s.editCardShown}])},[!s.isGroupChatContext&&(i.current_ai_id||s.editCardShown)?(a(),l("div",ht,[i.current_ai_id?p("",!0):(a(),b(_,{key:0,to:"/gallery/featured/?image_gen=true&gen_target=image",label:e.$t("picRequester.addPeep"),"label-on-top":"",onPick:t[1]||(t[1]=n=>e.$emit("close"))},null,8,["label"])),i.current_ai_id?(a(),l("div",dt,[i.peep_name&&!i.loadingPeepData?(a(),l("span",mt,u(i.peep_name),1)):p("",!0),o("div",gt,[i.loadingPeepData?(a(),l("div",_t,[...t[67]||(t[67]=[o("div",{class:"spinner loader-spinner"},null,-1)])])):(a(),l(P,{key:1},[i.peep_image?(a(),l(P,{key:0},[s.isVideo(i.peep_image)?(a(),l("video",{key:1,src:e.$toCdnUrl(i.peep_image),autoplay:"",muted:"",loop:"",playsinline:""},null,8,St)):(a(),l("img",{key:0,src:e.$toCdnUrl(i.peep_image),alt:"Your Image"},null,8,ft))],64)):p("",!0),C((a(),l("div",yt,[S(m,{class:"danger-btn","small-button":"",onClick:s.deselectPeep},{default:f(()=>[...t[68]||(t[68]=[o("div",{class:"container"},[o("i",{class:"fas fa-x",style:{"font-size":"0.5rem"}})],-1)])]),_:1},8,["onClick"])])),[[M,{content:e.$t("picRequester.deselectPeepTip")}]]),s.subjectHint?(a(),b(I,{key:1,class:"avatar-hint",text:s.subjectHint},null,8,["text"])):p("",!0)],64))]),s.isGroupChatContext?p("",!0):(a(),b(A,{key:1,to:"/gallery/featured/?image_gen=true&gen_target=image",class:"peep-change-link",onClick:t[2]||(t[2]=n=>e.$emit("close"))},{default:f(()=>[t[69]||(t[69]=o("i",{class:"fas fa-user"},null,-1)),g("\xA0"+u(e.$t("videoRequester.changePeep")),1)]),_:1}))])):p("",!0),s.editCardShown?(a(),l("div",bt,[o("div",vt,u(e.$t("picRequester.imagesToEdit")),1),o("div",kt,[(a(!0),l(P,null,x(i.userStore.misc_data.edit_images.slice(0,s.maxEditImages),(n,k)=>(a(),l("div",{key:k,class:"row-container"},[o("div",{style:{position:"relative"},class:y({"edit-thumb-unused":!i.userStore.creations_settings.use_custom_images}),onClick:t[3]||(t[3]=R=>!i.userStore.creations_settings.use_custom_images&&i.userStore.setCreationsSetting("use_custom_images",!0))},[i.userStore.creations_settings.use_custom_images?p("",!0):(a(),l("span",wt,u(e.$t("picRequester.notUsed")),1)),o("img",{src:e.$toCdnUrl(n.data.url),class:y(["rounded-img",`elements-${i.userStore.misc_data.edit_images.length}`]),tabindex:"0"},null,10,It),o("div",{class:"top-icon circle-icon x-close",onClick:xe(R=>{i.userStore.misc_data.edit_images.splice(k,1),i.userStore.setMiscData("edit_images",i.userStore.misc_data.edit_images)},["stop"])},[...t[70]||(t[70]=[o("i",{class:"fas fa-xmark close-icon"},null,-1)])],8,Pt)],2)]))),128)),s.editCardShown&&s.canUploadCustomImages&&i.userStore.misc_data.edit_images.length<s.maxEditImages?(a(),l("div",{key:0,class:"upload-tile",onClick:t[4]||(t[4]=n=>i.showUploadImage=!0)},[t[72]||(t[72]=o("i",{class:"fas fa-plus"},null,-1)),o("span",null,[g(u(e.$t("customUpload.uploadImage")),1),t[71]||(t[71]=o("span",{class:"new-tag"},"NEW",-1))])])):p("",!0)])])):p("",!0)])):p("",!0),s.editCardShown?(a(),l("span",{key:1,class:"text-very-small edit-card-link",onClick:t[5]||(t[5]=n=>i.userStore.setCreationsSetting("use_custom_images",!i.userStore.creations_settings.use_custom_images))},u(i.userStore.creations_settings.use_custom_images?e.$t("picRequester.generateWithout"):e.$t("picRequester.useImagesAgain")),1)):p("",!0),s.editCardShown&&i.userStore.creations_settings.use_custom_images&&i.userStore.creations_settings[s.full_control_mode_str]&&i.userStore.misc_data.edit_images.length+(i.current_ai_id?1:0)>1?(a(),l("div",Ct,u(e.$t("picRequester.toggleOffInFullControl")),1)):p("",!0),s.showEachImageToggleUp?(a(),l("div",xt,[o("div",Rt,[o("span",{class:y(["toggle-side",{active:!i.userStore.creations_settings.each_image_a_character}])},u(e.$t("picRequester.mergeIntoOne")),3),S(T,{"onUpdate:modelValue":t[6]||(t[6]=n=>i.userStore.setCreationsSetting("each_image_a_character",n)),"model-value":i.userStore.creations_settings.each_image_a_character},null,8,["model-value"]),o("span",{class:y(["toggle-side",{active:i.userStore.creations_settings.each_image_a_character}])},u(e.$t("picRequester.keepSeparate")),3)]),o("div",Ft,u(i.userStore.creations_settings.each_image_a_character?e.$t("picRequester.eachImageOnHint"):e.$t("picRequester.eachImageOffHint")),1)])):p("",!0),s.editCardShown&&s.generatedImageWillBePrivate?(a(),l("div",qt," \u{1F512} "+u(e.$t("picRequester.privateImage")),1)):p("",!0)],2)):p("",!0),!s.isGroupChatContext&&!s.editCardShown?(a(),l("div",Tt,[o("div",Mt,[o("div",{class:"container",style:v([{gap:"0.2rem"},{flexBasis:s.additionalImagesShown?"100%":"auto"}])},[o("div",Et,[!i.current_ai_id&&!s.isGroupChatContext&&!s.editCardShown?(a(),b(_,{key:0,to:"/gallery/featured/?image_gen=true&gen_target=image",label:i.userStore.misc_data.edit_images.length==0?e.$t("picRequester.selectPeep"):e.$t("picRequester.addPeep"),hint:i.userStore.misc_data.edit_images.length==0?e.$t("picRequester.orJustPrompt"):"","label-on-top":"",onPick:t[7]||(t[7]=n=>e.$emit("close"))},null,8,["label","hint"])):p("",!0),!i.current_ai_id&&!s.isGroupChatContext&&i.userStore.misc_data.edit_images.length==0?(a(),b(A,{key:1,to:"/create-peep/",class:"from-image-hint",onClick:t[8]||(t[8]=n=>e.$emit("close"))},{default:f(()=>[g(u(e.$t("picRequester.fromImageHint")),1)]),_:1})):p("",!0),s.canUploadCustomImages&&!s.editCardShown?(a(),l("span",{key:2,class:"peep-change-link",onClick:t[9]||(t[9]=n=>i.showUploadImage=!0)},[t[73]||(t[73]=o("i",{class:"fas fa-upload"},null,-1)),g("\xA0"+u(e.$t("customUpload.uploadImage")),1),t[74]||(t[74]=o("span",{class:"new-tag"},"NEW",-1))])):p("",!0)])],4)])])):p("",!0)],2),o("div",Ot,[s.isGroupChatContext&&i.selected_image_model!="Forge"?(a(),l("div",At," \u26A0\uFE0F "+u(e.$t("picRequester.groupChatForgeOnly")),1)):p("",!0),i.leftForgeWithEditImages&&!s.isGroupChatContext&&i.selected_image_model!="Forge"&&i.userStore.misc_data.edit_images.length>0&&i.userStore.creations_settings.use_custom_images?(a(),l("div",Dt," \u26A0\uFE0F "+u(e.$t("picRequester.editImagesForgeOnly")),1)):p("",!0),o("div",Lt,u(e.$t("picRequester.engineSectionTitle")),1),o("div",Bt,[(a(!0),l(P,null,x(s.imageEngines,n=>(a(),l("button",{key:n.value,type:"button",class:y(["engine-card",{selected:i.selected_image_model===n.value,recommended:n.recommended}]),onClick:k=>s.changeImageModel(n.value)},[n.isNew?(a(),l("span",Gt,"NEW")):p("",!0),o("div",Ut,[o("span",jt,u(n.emoji),1),o("span",Ht,u(n.label),1)]),o("div",zt,[g(u(n.tag)+" ",1),n.badge?(a(),l("strong",{key:0,class:y(["engine-badge",{rec:n.recommended}])},u(n.badge),3)):p("",!0)]),o("div",Vt,[(a(!0),l(P,null,x(s.engineStats,k=>(a(),l("div",{key:k.key,class:"stat-row"},[o("span",Wt,u(k.label),1),k.key==="spice"?(a(),l("span",Jt,[(a(),l(P,null,x(5,R=>o("span",{key:R,class:y(["pepper",{off:R>n.stats[k.key]}])},"\u{1F336}\uFE0F",2)),64))])):(a(),l("span",Xt,[(a(),l(P,null,x(5,R=>o("span",{key:R,class:y(["bar",{on:R<=n.stats[k.key]}])},null,2)),64))]))]))),128))])],10,Nt))),128)),i.selected_image_model?(a(),l("button",{key:0,t
2ype:"button",class:"engine-sample-card",onClick:t[10]||(t[10]=n=>i.zoomedEngineSample=s.engineSample(i.selected_image_model)),"aria-label":e.$t("picRequester.engineExampleAria",{engine:i.selected_image_model})},[o("img",{src:s.engineSample(i.selected_image_model),alt:e.$t("picRequester.engineExampleAlt",{engine:i.selected_image_model}),loading:"lazy"},null,8,Yt),t[75]||(t[75]=o("span",{class:"engine-sample-zoom"},"\u2922",-1))],8,Kt)):p("",!0)]),i.selected_image_model?(a(),l("div",Zt,u(s.selectedEngineDesc),1)):p("",!0),i.zoomedEngineSample?(a(),l("div",{key:3,class:"engine-sample-lightbox",onClick:t[11]||(t[11]=n=>i.zoomedEngineSample=null)},[o("img",{src:i.zoomedEngineSample,alt:e.$t("picRequester.engineExampleAltGeneric")},null,8,Qt)])):p("",!0),i.selected_image_model=="Anime"?(a(),b(G,{key:4,boxes:i.animeStyleVariationOptions,title:"\u{1F3A8}Style","first-selected-name":i.userStore.creations_settings.style_variation,onSelectedOption:t[12]||(t[12]=n=>i.userStore.setCreationsSetting("style_variation",n))},null,8,["boxes","first-selected-name"])):p("",!0),s.nsfw_pose_selected==1&&!i.userStore.creations_settings[s.full_control_mode_str]&&(i.model_auto_switched||!s.isPoseSupportedByForge&&i.selected_image_model=="Forge")?(a(),l("span",$t,[i.model_auto_switched?(a(),l("span",es,u(e.$t("picRequester.forgePoseAutoSwitch")),1)):!s.isPoseSupportedByForge&&i.selected_image_model=="Forge"?(a(),l("span",ts,u(e.$t("picRequester.forgePoseWarning")),1)):p("",!0)])):p("",!0)]),o("div",ss,[S(I,{centered:"",text:s.isFullControl?e.$t("picRequester.fullControlModeTip"):e.$t("picRequester.guidedModeTip")},{default:f(()=>[o("div",is,[o("button",{type:"button",role:"radio","aria-checked":!s.isFullControl,class:y({active:!s.isFullControl}),onClick:t[13]||(t[13]=n=>s.setFullControl(!1))}," \u{1F9ED} "+u(e.$t("picRequester.modeGuided")),11,rs),o("button",{type:"button",role:"radio","aria-checked":s.isFullControl,class:y({active:s.isFullControl}),onClick:t[14]||(t[14]=n=>s.setFullControl(!0))}," \u270D\uFE0F "+u(e.$t("picRequester.modeFull")),11,os)],512)]),_:1},8,["text"]),i.userStore.creations_settings[s.full_control_mode_str]?p("",!0):(a(),l("div",ns,[o("div",as,[o("button",{type:"button",class:"roll-any-btn",onClick:t[15]||(t[15]=n=>s.rollLook(null))}," \u{1F3B2} "+u(e.$t("charCreation.randomize")),1),s.IS_APP?p("",!0):(a(),l("div",ls,[o("span",{class:"roll-btn",role:"button",tabindex:"0","aria-label":"Random adult scene",onClick:t[16]||(t[16]=n=>s.rollLook(!0)),onKeydown:t[17]||(t[17]=j(n=>s.rollLook(!0),["enter"]))},"\u{1F336}\uFE0F",32),o("span",{class:"roll-btn",role:"button",tabindex:"0","aria-label":"Random safe scene",onClick:t[18]||(t[18]=n=>s.rollLook(!1)),onKeydown:t[19]||(t[19]=j(n=>s.rollLook(!1),["enter"]))},"\u{1F607}",32)])),i.chatStore.chatData?.ai_uids.includes(i.current_ai_id)?(a(),l("div",us,[S(m,{action:s.getChatContextTag,"very-small-button":"",class:"from-chat-fill-btn"},{default:f(()=>[g(u(e.$t("picRequester.fromChatButton"))+"\u{1FA84}\xA0",1),o("strong",null,[o("span",cs,[o("span",ps,u(i.sharedInfoStore?.sharedInfo?.cost_from_chat_image_prompt),1),t[76]||(t[76]=g("\xA0 ",-1)),S(O,{s:"",click:!1,text:!1})])])]),_:1},8,["action"]),C((a(),l("span",hs,[...t[77]||(t[77]=[g("?",-1)])])),[[M,{content:e.$t("picRequester.fromChatTip")}]])])):p("",!0)]),o("div",ds,[S(D,{collapsible:"","random-selection":"",onRandomized:s.rollFx,style:{width:"100%"},options:s.posesOptions,"max-tag-length":s.slotMax("pose"),"count-below":i.SLOT_COUNTER_BELOW,"small-button":"","free-form":!0,row_closed:"","close-on-selection":"",max_tags:1,"starting-group-index":!s.IS_APP&&i.userStore.creations_settings.is_nsfw?3:null,onSelectedOptions:t[20]||(t[20]=n=>s.selectPose(n)),"starting-options":i.userStore.creations_settings.pose?[i.userStore.creations_settings.pose]:[],title:'<span style="color: rgb(243, 223, 0)">\u{1F483} Action</span>',subtitles:s.posesTitles,ref:"poseTagSelector",savable:"","multiline-input":"","deletable-tags":s.mineDeletable("pose"),"locked-tags":s.mineLocked.pose,"delete-confirm-message":e.$t("picRequester.mineDeleteConfirm"),"group-hints":s.mineHints(s.posesOptions,"pose"),onSaveOption:t[21]||(t[21]=n=>s.saveMine("pose",n,"poseTagSelector")),onDeleteOption:t[22]||(t[22]=n=>s.deleteMine("pose",n)),onLockedClick:t[23]||(t[23]=n=>s.lockedMine("pose","poseTagSelector"))},{header:f(()=>[t[78]||(t[78]=o("br",null,null,-1)),o("div",ms,u(e.$t("picRequester.selectorHeaderAction")),1)]),_:1},8,["onRandomized","options","max-tag-length","count-below","starting-group-index","starting-options","subtitles","deletable-tags","locked-tags","delete-confirm-message","group-hints"]),S(D,{collapsible:"","random-selection":"",onRandomized:s.rollFx,style:{width:"100%"},options:s.backgroundOptions,"close-on-selection":"","small-button":"","free-form":!0,row_closed:"",max_tags:1,"max-tag-length":s.slotMax("background"),"count-below":i.SLOT_COUNTER_BELOW,"starting-options":s.startingBackgroun
2dTags,title:'<span style="color: rgb(243, 223, 0)">\u{1F3DE}\uFE0F Background</span>',subtitles:s.backgroundTitles,onSelectedOptions:t[24]||(t[24]=n=>s.checkSelectedBackgroundTagSelector(n)),special_tags:[...s.canFollowGlobalStyle?["Follow Global Style"]:[],...i.sharedInfoStore.backgrounds.by_styles?.[i.peep_style_type]??[]],special_tags_content:"\u{1F97B}",ref:"backgroundTagSelector","emoji-tips":{"\u{1F4CC}":e.$t("picRequester.pinTip")},savable:"","multiline-input":"","deletable-tags":s.mineDeletable("background"),"locked-tags":s.mineLocked.background,"delete-confirm-message":e.$t("picRequester.mineDeleteConfirm"),"group-hints":s.mineHints(s.backgroundOptions,"background"),onSaveOption:t[25]||(t[25]=n=>s.saveMine("background",n,"backgroundTagSelector")),onDeleteOption:t[26]||(t[26]=n=>s.deleteMine("background",n)),onLockedClick:t[27]||(t[27]=n=>s.lockedMine("background","backgroundTagSelector"))},{header:f(()=>[t[79]||(t[79]=o("br",null,null,-1)),o("div",gs,u(e.$t("picRequester.selectorHeaderBg")),1),s.peepPrefillBackground?(a(),l("div",_s,u(e.$t("picRequester.peepDefaultTip")),1)):p("",!0)]),"head-actions":f(()=>[s.canSetDefault("background")?(a(),b(m,{key:0,class:"pin-btn","small-button":"","use-confirm-dialog":"","confirm-message":s.setDefaultConfirm("background"),action:()=>s.setPeepDefault("background"),"aria-label":e.$t("picRequester.setDefault.background")},{default:f(()=>[...t[80]||(t[80]=[g("\u{1F4CC}",-1)])]),_:1},8,["confirm-message","action","aria-label"])):p("",!0)]),_:1},8,["onRandomized","options","max-tag-length","count-below","starting-options","subtitles","special_tags","emoji-tips","deletable-tags","locked-tags","delete-confirm-message","group-hints"]),S(D,{collapsible:"","random-selection":"",onRandomized:s.rollFx,style:{width:"100%"},options:s.outfitsOptions,"close-on-selection":"","small-button":"",row_closed:"","free-form":!0,max_tags:1,"max-tag-length":s.slotMax("outfit"),"count-below":i.SLOT_COUNTER_BELOW,"starting-options":s.startingOutfitTags,title:'<span style="color: rgb(243, 223, 0)">\u{1F457} Outfit</span>',special_tags_content:"\u{1F97B}",subtitles:s.outfitsTitles,onSelectedOptions:t[28]||(t[28]=n=>s.checkSelectedOutfitTagSelector(n)),special_tags:[...s.canFollowGlobalStyle?["Follow Global Style"]:[],...i.sharedInfoStore.outfits.by_styles?.[i.peep_style_type]??[]],ref:"outfitTagSelector","emoji-tips":{"\u{1F4CC}":e.$t("picRequester.pinTip")},savable:"","multiline-input":"","deletable-tags":s.mineDeletable("outfit"),"locked-tags":s.mineLocked.outfit,"delete-confirm-message":e.$t("picRequester.mineDeleteConfirm"),"group-hints":s.mineHints(s.outfitsOptions,"outfit"),onSaveOption:t[29]||(t[29]=n=>s.saveMine("outfit",n,"outfitTagSelector")),onDeleteOption:t[30]||(t[30]=n=>s.deleteMine("outfit",n)),onLockedClick:t[31]||(t[31]=n=>s.lockedMine("outfit","outfitTagSelector"))},{header:f(()=>[t[81]||(t[81]=o("br",null,null,-1)),o("div",fs,u(e.$t("picRequester.selectorHeaderOutfit")),1),s.peepPrefillOutfit?(a(),l("div",Ss,u(e.$t("picRequester.peepDefaultTip")),1)):p("",!0)]),"head-actions":f(()=>[s.canSetDefault("outfit")?(a(),b(m,{key:0,class:"pin-btn","small-button":"","use-confirm-dialog":"","confirm-message":s.setDefaultConfirm("outfit"),action:()=>s.setPeepDefault("outfit"),"aria-label":e.$t("picRequester.setDefault.outfit")},{default:f(()=>[...t[82]||(t[82]=[g("\u{1F4CC}",-1)])]),_:1},8,["confirm-message","action","aria-label"])):p("",!0)]),_:1},8,["onRandomized","options","max-tag-length","count-below","starting-options","subtitles","special_tags","emoji-tips","deletable-tags","locked-tags","delete-confirm-message","group-hints"]),i.selected_image_model!="Prism"?(a(),b(D,{key:0,collapsible:"","random-selection":"",onRandomized:s.rollFx,style:{width:"100%"},options:s.expressionOptions,subtitles:s.expressionTitles,"max-tag-length":s.slotMax("expression"),"count-below":i.SLOT_COUNTER_BELOW,"small-button":"","close-on-selection":"",row_closed:"","free-form":"",max_tags:1,"starting-options":i.userStore.creations_settings.expression?[i.userStore.creations_settings.expression]:[],title:'<span style="color: rgb(243, 223, 0)">\u{1F642} Expressions</span>',onSelectedOptions:t[32]||(t[32]=n=>s.selectExpression(n)),ref:"expressionTagSelector",savable:"","multiline-input":"","deletable-tags":s.mineDeletable("expression"),"locked-tags":s.mineLocked.expression,"delete-confirm-message":e.$t("picRequester.mineDeleteConfirm"),"group-hints":s.mineHints(s.expressionOptions,"expression"),onSaveOption:t[33]||(t[33]=n=>s.saveMine("expression",n,"expressionTagSelector")),onDeleteOption:t[34]||(t[34]=n=>
2s.deleteMine("expression",n)),onLockedClick:t[35]||(t[35]=n=>s.lockedMine("expression","expressionTagSelector"))},{header:f(()=>[t[83]||(t[83]=o("br",null,null,-1)),o("div",ys,u(e.$t("picRequester.selectorHeaderExpr")),1)]),_:1},8,["onRandomized","options","subtitles","max-tag-length","count-below","starting-options","deletable-tags","locked-tags","delete-confirm-message","group-hints"])):p("",!0),o("div",bs,[s.slotsMayConflictWithLook?(a(),l("div",vs," \u26A0\uFE0F "+u(e.$t("picRequester.slotsConflictTip")),1)):p("",!0),!s.strictManual&&!s.IS_APP?(a(),b(le,{key:1,scale:.9,modelValue:i.userStore.creations_settings.is_nsfw,"onUpdate:modelValue":t[36]||(t[36]=n=>i.userStore.creations_settings.is_nsfw=n),labels:["SFW \u{1F917}","Auto","NSFW \u{1F975}"],disabled:s.nsfw_pose_selected,onChange:t[37]||(t[37]=n=>s.onNsfwToggle(n))},null,8,["modelValue","disabled"])):p("",!0),s.nsfw_pose_selected?(a(),l("div",ks,[...t[84]||(t[84]=[o("em",null,"NSFW action selected",-1)])])):p("",!0)])])]))]),s.strictManual?(a(),l("div",ws,[o("div",Is,[S(I,{text:e.$t("picRequester.appearancePromptTip")},{default:f(()=>[o("span",null,[o("strong",Ps,u(e.$t("picRequester.appearancePrompt")),1),t[85]||(t[85]=g("\xA0\u{1F5BC}\uFE0F",-1))])]),_:1},8,["text"]),o("span",Cs,[i.showLookEditor?p("",!0):(a(),b(m,{key:0,"small-button":"",class:"blue-btn",onClick:t[38]||(t[38]=n=>i.showLookEditor=!0)},{default:f(()=>[t[86]||(t[86]=o("i",{class:"fas fa-pen"},null,-1)),g("\xA0"+u(e.$t("picRequester.edit")),1)]),_:1})),s.canResetToPeepLook?(a(),b(m,{key:1,onClick:s.resetPromptToPeepLook,"very-small-button":"",class:"blue-btn"},{default:f(()=>[t[87]||(t[87]=o("i",{class:"fas fa-rotate-left"},null,-1)),g("\xA0"+u(e.$t("picRequester.resetToPeepLook")),1)]),_:1},8,["onClick"])):p("",!0)])]),i.showLookEditor?(a(),l("div",Rs,[C(o("textarea",{id:"appearance_description",name:"appearance_description","onUpdate:modelValue":t[39]||(t[39]=n=>i.appearanceDescription=n),maxlength:s.maxAppearanceLength,onInput:t[40]||(t[40]=(...n)=>s.onAppearanceInput&&s.onAppearanceInput(...n))},null,40,Fs),[[L,i.appearanceDescription]]),o("div",qs,u(s.appearanceCharactersLeft),1)])):(a(),l("em",xs,u(s.appearanceDescriptionPreview),1))])):p("",!0),o("div",Ts,[o("div",Ms,[S(I,{text:s.promptHint},{default:f(()=>[o("span",null,[o("strong",Es,u(s.strictManual?e.$t("picRequester.additionalPrompt"):e.$t("picRequester.prompt")),1),t[88]||(t[88]=g("\xA0\u270F\uFE0F",-1))])]),_:1},8,["text"]),o("div",Os,[i.promptBeforeEnhance!==null&&s.alreadyEnhanced?(a(),b(m,{key:0,onClick:s.undoEnhance,"very-small-button":"",title:e.$t("picRequester.undoEnhance"),"aria-label":e.$t("picRequester.undoEnhance")},{default:f(()=>[...t[89]||(t[89]=[o("i",{class:"fas fa-rotate-left"},null,-1)])]),_:1},8,["onClick","title","aria-label"])):p("",!0),i.description.trim()&&s.enhanceAvailable?(a(),b(m,{key:1,onClick:s.enhanceNow,"is-disabled":i.promptEnhancing,"very-small-button":""},{default:f(()=>[g("\u2728 "+u(e.$t("picRequester.enhancePromptOnce"))+" ("+u(s.enhancePromptCost)+" ",1),S(O,{click:!1,text:!1}),t[90]||(t[90]=g(")",-1))]),_:1},8,["onClick","is-disabled"])):p("",!0),i.description?(a(),b(m,{key:2,onClick:t[41]||(t[41]=n=>i.description=""),"very-small-button":"",title:e.$t("picRequester.clearPrompt"),"aria-label":e.$t("picRequester.clearPrompt")},{default:f(()=>[...t[91]||(t[91]=[o("i",{class:"fas fa-xmark"},null,-1)])]),_:1},8,["title","aria-label"])):p("",!0)])]),o("div",As,[o("div",Ds,[C(o("textarea",{id:"description",name:"description",placeholder:e.$t("picRequester.promptPlaceholder"),"onUpdate:modelValue":t[42]||(t[42]=n=>i.description=n),maxlength:s.maxLength,onInput:t[43]||(t[43]=(...n)=>s.onPromptInput&&s.onPromptInput(...n))},null,40,Ls),[[L,i.description]]),o("div",Bs,u(s.charactersLeft),1)]),s.slotsShareOfPrompt>=i.SLOTS_SHARE_WARNING?(a(),l("div",Ns," \u26A0\uFE0F "+u(e.$t("picRequester.slotsTakeMostOfPrompt",{pct:Math.round(s.slotsShareOfPrompt*100)})),1)):p("",!0),s.navPrompts.length>0||i.current_ai_id||s.enhanceAvailable?(a(),l("div",Gs,[o("span",Us,[s.enhanceAvailable?(a(),l("span",js,[S(I,{text:e.$t("picRequester.enhancePromptHint",{n:s.enhancePromptCost})},{default:f(()=>[o("span",null,"\u2728 "+u(e.$t("picRequester.enhancePrompt")),1)]),_:1},8,["text"]),S(T,{scale:.6,"onUpdate:modelValue":t[44]||(t[44]=n=>i.userStore.setCreationsSetting("enhance_prompt",n)),"model-value":s.autoEnhanceOn},null,8,["model-value"])])):p("",!0),o("span",Hs,u(s.promptNavLabel),1)]),o("span",zs,[s.navPrompts.length>0?(a(),l(P,{key:0},[o("i",{class:"fas fa-clock-rotate-left history-icon",title:e.$t("picRequester.selectRecentPrompt"),"aria-label":e.$t("picRequester.selectRecentPrompt")},null,8,Vs),S(m,{"very-small-button":"",onClick:t[45]||(t[45]=n=>s.navigateHistory(1)),style:v(i.historyIndex>=s.navPrompts.length-1?"opacity: 0.35; pointer-events: none":""),title:e.$t("picRequester.prevPrompt")},{default:f(()=>[...t[92]||(t[92]=[o("i",{class:"fas fa-chevron-up"},null,-1)])]),_:1},8,["style","title"]),S(m,{"very-small-button":"",onClick:t[46]||(t[46]=n=>s.navigateHistory(-1)),style:v(s.atNewestPrompt?"opacity: 0.35; pointer-events: none":""),title:e.$t("picRequester.nextPrompt")},{default:f(()=>[...t[93]||(t[93]=[o("i",{class:"fas fa-chevron-down"},null,-1)])]),_:1},8,["style","title"])],64)):p("",!0),i.current_ai_id?C((a(),l("i",{key:1,class:y(["fas fa-user",s.isPeepPromptActive?"xblue":""]),style:v({fontSize:"0.8rem",marginLeft:"0.2rem",opacity:s.isPeepPromptActive?1:.35,cursor:s.canSetPeepPrompt||s.isPeepPromptActive?"pointer":"default"}),onClick:t[47]||(t[47]=(...n)=>s.setAsPeepPrompt&&s.setAsPeepPrompt(...n))},null,6)),[[M,{content:s.isPeepPromptActive?e.$t("picRequester.removePeepPrompt"):e.$t("picRequester.saveAsPeepPrompt")}]]):p("",!0)])])):p("",!0),s.autoEnhanceOn&&s.alreadyEnhanced?(a(),l("div",Ws," \u2728 "+u(e.$t("picRequester.alreadyEnhanced")),1
2)):p("",!0),i.promptEnhancing?(a(),l("div",Js," \u2728 "+u(e.$t("picRequester.enhancingPrompt")),1)):p("",!0),i.enhanceError?(a(),l("div",Xs,u(i.enhanceError),1)):p("",!0)])]),o("div",Ks,[o("button",{type:"button",class:y(["adv-toggle",{open:i.showAdvancedOptions}]),"aria-expanded":i.showAdvancedOptions,onClick:t[48]||(t[48]=(...n)=>s.toggleAdvancedOptions&&s.toggleAdvancedOptions(...n))},[o("span",Zs,"\u2699\uFE0F "+u(e.$t("picRequester.advancedSettings")),1),!i.showAdvancedOptions&&s.advancedSummary.length?(a(),l("span",Qs,[(a(!0),l(P,null,x(s.advancedSummary,n=>(a(),l("span",{key:n,class:"adv-chip"},u(n),1))),128))])):p("",!0),t[94]||(t[94]=o("i",{class:"fa-solid fa-chevron-down adv-caret"},null,-1))],10,Ys)]),S(Re,{name:"slide-bottom"},{default:f(()=>[C((a(),l("div",{key:i.showAdvancedOptions,class:"advanced-options adv-card"},[o("div",$s,[o("div",ei,[o("div",ti,[o("div",si,u(e.$t("picRequester.orientation")),1),i.selected_image_model=="Forge"&&i.userStore.misc_data.edit_images.length>0?(a(),l("div",ii,[i.userStore.creations_settings.same_orient_as_first_image&&i.userStore.misc_data.edit_images.length>0&&i.selected_image_model=="Forge"?(a(),l("div",ri,u(e.$t("picRequester.sameAsFirstImage")),1)):(a(),l("div",oi,u(e.$t("picRequester.custom")),1)),i.userStore.misc_data.edit_images.length>0&&i.selected_image_model=="Forge"?(a(),b(T,{key:2,"color-untoggle":"#beae1a","onUpdate:modelValue":t[49]||(t[49]=n=>i.userStore.setCreationsSetting("same_orient_as_first_image",n)),"model-value":i.userStore.creations_settings.same_orient_as_first_image},null,8,["model-value"])):p("",!0)])):p("",!0)]),s.showOrientationControls?(a(),l("div",ni,[o("div",ai,[(a(!0),l(P,null,x(s.imageFormats,n=>(a(),l("button",{key:n.name,type:"button",class:y(["orient-option",{selected:s.currentFormatName===n.name}]),title:n.label,"aria-label":n.label,onClick:k=>s.pickFormat(n.name)},[n.icon?(a(),l("i",{key:0,class:y(["orient-icon",n.icon])},null,2)):(a(),l("span",{key:1,class:y(["orient-rect",{dashed:n.name==="custom"}]),style:v({width:n.w,height:n.h})},null,6)),n.isNew?(a(),l("span",ui,"NEW")):p("",!0)],10,li))),128))]),o("span",ci,u(s.selectedOrientationLabel),1)])):p("",!0),s.showOrientationControls&&s.currentFormatName==="custom"?(a(),l("div",pi,[o("span",hi,u(e.$t("picRequester.aspectRatio")),1),o("input",{type:"number",min:"1",max:"32",placeholder:"A",class:"custom-res-input",value:i.userStore.creations_settings.custom_ratio_a||"",onInput:t[50]||(t[50]=n=>i.userStore.setCreationsSetting("custom_ratio_a",n.target.value?Math.min(32,Math.max(1,Math.round(Number(n.target.value)))):null))},null,40,di),t[95]||(t[95]=o("span",null,":",-1)),o("input",{type:"number",min:"1",max:"32",placeholder:"B",class:"custom-res-input",value:i.userStore.creations_settings.custom_ratio_b||"",onInput:t[51]||(t[51]=n=>i.userStore.setCreationsSetting("custom_ratio_b",n.target.value?Math.min(32,Math.max(1,Math.round(Number(n.target.value)))):null))},null,40,mi),o("span",gi,u(s.customRatioInfo),1)])):p("",!0)]),s.hdAvailable?(a(),l("div",_i,[o("div",fi,[o("strong",Si,u(e.$t("picRequester.enhancer")),1),o("span",yi,u(s.enhanceLabel),1)]),o("input",{id:"enhancer-slider",class:"enhancer-slider",type:"range",min:"0",max:s.enhanceMax,step:"1",value:s.enhanceLevel,"aria-label":e.$t("picRequester.enhancer"),onInput:t[52]||(t[52]=n=>i.userStore.setCreationsSetting("enhance",Number(n.target.value)))},null,40,bi),o("div",vi,[(a(!0),l(P,null,x(s.enhanceMax+1,n=>(a(),l("span",{key:n,class:y({on:n-1===s.enhanceLevel})},u(s.enhanceStopLabel(n-1)),3))),128))]),o("span",ki,u(s.enhanceHint),1)])):p("",!0),i.selected_image_model=="Prism"?(a(),l("div",wi,[o("div",Ii,[o("div",Pi,[o("strong",null,u(e.$t("picRequester.realismStyle")),1),o("div",Ci,[o("strong",null,u(i.userStore.creations_settings.hyper_realism_level==null?e.$t("picRequester.random"):e.$t("picRequester.setValue")),1),S(T,{"onUpdate:modelValue":t[53]||(t[53]=n=>i.userStore.setCreationsSetting("hyper_realism_level",n?i.userStore.creations_settings.hyper_realism_level==null?50:i.userStore.creations_settings.hyper_realism_level:null)),"model-value":i.userStore.creations_settings.hyper_realism_level!=null},null,8,["model-value"])])])]),i.userStore.creations_settings.hyper_realism_level!=null?(a(),l("div",xi,[o("div",Ri,u(e.$t("picRequester.naturalistic")),1),C(o("input",{type:"range",min:"0",max:"100","onUpdate:modelValue":t[54]||(t[54]=n=>i.userStore.creations_settings.hyper_realism_level=n),onInput:t[55]||(t[55]=n=>i.userStore.setCreationsSetting("hyper_realism_level",n.target.value))},null,544),[[L,i.userStore.creations_settings.hyper_realism_level]]),o("div",Fi,u(e.$t("picRequester.glossy")),1)])):p("",!0)])):p("",!0),s.canFollowGlobalStyle&&i.selected_image_model=="Photoreal"?(a(),l("div",qi,[C((a(),l("span",Ti,[...t[96]||(t[96]=[g("?",-1)])])),[[M,{content:e.$t("picRequester.globalStyleToggleTip")}]]),o("strong",null,u(e.$t("picRequester.globalStyleStrength")),1),o("div",Mi,[o("strong",null,u(s.globalStyleOn?"ON":"OFF"),1),S(T,{"model-value":s.globalStyleOn,"onUpdate:modelValue":t[56]||(t[56]=n=>i.userStore.setCreationsSetting("global_style_strength",n?null:0))}
2,null,8,["model-value"])])])):s.canFollowGlobalStyle?(a(),l("div",Ei,[o("div",Oi,[C((a(),l("span",Ai,[...t[97]||(t[97]=[g("?",-1)])])),[[M,{content:e.$t("picRequester.globalStyleStrengthTip")}]]),o("strong",null,u(e.$t("picRequester.globalStyleStrength")),1),o("div",Di,[o("strong",null,u(i.userStore.creations_settings.global_style_strength==null?e.$t("picRequester.auto"):i.userStore.creations_settings.global_style_strength==0?"OFF":e.$t("picRequester.setValue")),1),S(T,{"onUpdate:modelValue":t[57]||(t[57]=n=>i.userStore.setCreationsSetting("global_style_strength",n?i.userStore.creations_settings.global_style_strength==null?50:i.userStore.creations_settings.global_style_strength:null)),"model-value":i.userStore.creations_settings.global_style_strength!=null},null,8,["model-value"]),i.userStore.creations_settings.global_style_strength>0?(a(),l("span",Li,u(i.userStore.creations_settings.global_style_strength)+"%",1)):p("",!0)])]),i.userStore.creations_settings.global_style_strength!=null?(a(),l("div",Bi,[o("div",Ni,u(e.$t("picRequester.off")),1),C(o("input",{type:"range",min:"0",max:"100","onUpdate:modelValue":t[58]||(t[58]=n=>i.userStore.creations_settings.global_style_strength=n),onInput:t[59]||(t[59]=n=>i.userStore.setCreationsSetting("global_style_strength",n.target.value))},null,544),[[L,i.userStore.creations_settings.global_style_strength]]),o("div",Gi,u(e.$t("picRequester.max")),1)])):p("",!0)])):p("",!0),i.selected_image_model!="Forge"&&i.selected_image_model!="Photoreal"&&!s.strictManual?(a(),l("div",Ui,[o("div",ji,[o("span",null,[C((a(),l("span",Hi,[...t[98]||(t[98]=[g("?",-1)])])),[[M,{content:e.$t("picRequester.forceSoloTip")}]]),t[99]||(t[99]=g("\xA0",-1)),o("strong",null,u(e.$t("picRequester.forceSolo")),1)]),o("div",zi,[o("strong",null,u(i.userStore.creations_settings.force_solo?"ON":"OFF"),1),S(T,{"onUpdate:modelValue":t[60]||(t[60]=n=>i.userStore.setCreationsSetting("force_solo",n)),"model-value":i.userStore.creations_settings.force_solo},null,8,["model-value"])])])])):p("",!0)]),i.selected_image_model!="Photoreal"?(a(),l("div",Vi,[o("div",Wi,[o("div",Ji,[o("strong",null,u(e.$t("picRequester.negativePrompt")),1),t[100]||(t[100]=g("\xA0\u274C ",-1))])]),o("textarea",{id:"description",name:"description",placeholder:e.$t("picRequester.negativePromptPlaceholder"),value:i.userStore.creations_settings.negative_prompt,onInput:t[61]||(t[61]=n=>i.userStore.setCreationsSetting("negative_prompt",n.target.value)),maxlength:i.maxLengthNP},null,40,Xi),o("div",Ki,u(s.charactersLeftNP),1)])):p("",!0)])),[[Fe,i.showAdvancedOptions]])]),_:1}),o("div",Yi,[o("div",Zi,[s.howManyLeft>=2?(a(),l("div",{key:0,class:"row-container batch-pick",title:e.$t("picRequester.batchRequest")},[t[101]||(t[101]=o("span",{class:"batch-x","aria-hidden":"true"},"\xD7",-1)),(a(),b(G,{key:i.userStore.totPeepCoinsLeft,boxes:Array.from({length:Math.min(20,s.howManyLeft)},(n,k)=>(k+1).toString()),title:"",onSelectedOption:t[62]||(t[62]=n=>s.setBatchToLocalStorage("numBatchImages",n)),"first-selected-name":String(i.numBatchImages)},null,8,["boxes","first-selected-name"]))],8,Qi)):p("",!0),S(m,{icon:"fa-solid fa-image","icon-position":"left",action:s.requestPic,"use-confirm-dialog":!s.atLeastOneImageUsed&&!i.noPeepImageConfirmed,"confirm-message":e.$t("picRequester.noImageConfirm_html"),class:"cool-btn"},{default:f(()=>[o("span",null,[g("\xA0\xA0"+u(e.$t("picRequester.request"))+" ",1),Number(i.numBatchImages)>1?(a(),l("span",$i,u(Math.min(Math.max(1,s.howManyLeft),i.numBatchImages)),1)):p("",!0),g(" "+u(Number(i.numBatchImages)==1?e.$t("picRequester.image"):e.$t("picRequester.images"))+"!",1)])]),_:1},8,["action","use-confirm-dialog","confirm-message"])]),i.imageRequested&&!i.userStore.hasActiveJobs?(a(),l("div",er)):p("",!0),i.outputMessage!=""?(a(),l("div",{key:1,innerHTML:i.outputMessage},null,8,tr)):p("",!0),o("div",sr,[o("span",ir,[g(u(e.$t("picRequester.thisCost"))+" ",1),o("span",rr,u(s.imageCost),1),S(O,{s:i.sharedInfoStore?.sharedInfo?.image_token_cost*i.numBatchImages!=1},null,8,["s"]),i.sharedInfoStore?.sharedInfo?.upcharge_custom_images&&s.numberCustomImages>0?C((a(),l("span",or,[...t[102]||(t[102]=[g("?",-1)])])),[[M,{content:e.$t("picRequester.customImagesUpchargeTip",{n:i.sharedInfoStore?.sharedInfo?.upcharge_custom_images})}]]):p("",!0)]),i.userStore.isAuthorized&&i.userStore.totPeepCoinsLeft>0?(a(),l(P,{key:0},[t[103]||(t[103]=o("span",{class:"cost-sep","aria-hidden":"true"},"\xB7",-1)),o("span",{class:"cost-left",onClick:t[63]||(t[63]=n=>{e.$emit("close"),e.$router.push("/peepcoins/")})},[g(u(e.$t("picRequester.canGenerate"))+" ",1),o("span",{class:y(s.howManyLeft<i.sharedInfoStore?.sharedInfo?.image_token_cost?"red":"sub-tier2")},u(Math.floor(s.howManyLeft)),3),g(" "+u(Math.floor(s.howManyLeft)==1?e.$t("picRequester.moreImage"):e.$t("picRequester.moreImages")),1)])],64)):p("",!0)])]),i.userStore.isAuthorized?(a(),l("div",nr,[S(m,{"small-button":"",class:"spend",onClick:t[64]||(t[64]=n=>{e.$emit("close"),e.$router.push("/peepcoins/")})},{default:f(()=>[g(u(e.$t("picRequester.buyMore"))+" ",1),S(O,{s:"",imp:"",click:!1})]),_:1}),i.userStore.isAuthorized&&i.userStore.subscriptionTier!=i.MAX_
2SUBSCRIPTION_TIER?(a(),l("div",ar,[S(m,{"small-button":"",class:"spend",onClick:t[65]||(t[65]=n=>e.$modalStore.openSubscribePage())},{default:f(()=>[g(u(e.$t("picRequester.upgrade")),1)]),_:1}),o("span",null,[g(u(e.$t("picRequester.toGet"))+" ",1),o("strong",lr,u(i.sharedInfoStore.sharedInfo?.max_tokens_time_period[i.MAX_SUBSCRIPTION_TIER]),1),t[104]||(t[104]=g(" \xA0",-1)),S(O,{s:""}),g("\xA0"+u(e.$t("picRequester.monthly")),1)])])):p("",!0)])):p("",!0)],4),i.showUploadImage?(a(),b(ue,{key:1,purpose:"edit",onClose:t[66]||(t[66]=n=>{i.showUploadImage=!1,n&&s.addEditImage(n)})})):p("",!0)]),_:1})}const hr=N(ot,[["render",ur],["__scopeId","data-v-34b43155"]]);export{hr as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.