Files
prod/frontend/dist/assets/PlaceBlock-D2hRRmTG.js
T
2026-10-17 16:01:35 +07:00

106 lines
33 KiB
JavaScript

import{Ct as e,Dt as t,Et as n,H as r,Jt as i,Kt as a,Ln as o,Mt as s,Ot as c,Pt as l,Rn as u,St as d,U as f,Y as p,Yt as m,an as h,at as g,bt as _,d as v,f as y,g as ee,gn as b,ht as x,it as S,kt as C,ln as w,m as T,nt as E,ot as D,p as O,qt as k,r as A,tt as j,vn as M,wt as N,xn as P,xt as F,yn as I,zn as L}from"./client-lOiq7Q_J.js";import{t as te}from"./Card-Cjki8E-V.js";import{i as ne,n as re}from"./ui-GnK2cvI_.js";import{i as ie}from"./Suffix-vbkLTDDW.js";import{t as ae}from"./Modal-THVgLpGV.js";import{t as R}from"./use-merged-state-DtwURtxQ.js";import{r as oe,t as z}from"./Button-DfvYTndQ.js";import{a as B,c as se,i as ce,t as le}from"./_plugin-vue_export-helper-DFB8HrqU.js";import{n as ue,t as de}from"./Upload-CnkL1t4d.js";import{t as fe}from"./use-form-item-Bx8Y8eAa.js";import{t as pe}from"./Add-B3pQEvfy.js";import{t as V}from"./Input-CIaNJLrA.js";import{n as me,t as he}from"./Switch-GJoFp8gP.js";import{t as H}from"./Space-DWKcwC4-.js";import{t as U}from"./text-D0st0Ftb.js";import{D as ge,J as W,g as _e,k as ve,nt as ye,ut as G}from"./index-C3-4MRIk.js";import{n as K,r as q,t as be}from"./application-CT4iECRt.js";import{t as xe}from"./MessagePaper-AWb1GqOb.js";var Se=C({name:`ArrowDown`,render(){return s(`svg`,{viewBox:`0 0 28 28`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},s(`g`,{stroke:`none`,"stroke-width":`1`,"fill-rule":`evenodd`},s(`g`,{"fill-rule":`nonzero`},s(`path`,{d:`M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z`}))))}}),Ce=C({name:`ArrowUp`,render(){return s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},s(`g`,{fill:`none`},s(`path`,{d:`M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z`,fill:`currentColor`})))}}),we=E(`input-group`,`
display: inline-flex;
width: 100%;
flex-wrap: nowrap;
vertical-align: bottom;
`,[j(`>`,[E(`input`,[j(`&:not(:last-child)`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`),j(`&:not(:first-child)`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
margin-left: -1px!important;
`)]),E(`button`,[j(`&:not(:last-child)`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`,[S(`state-border, border`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`)]),j(`&:not(:first-child)`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`,[S(`state-border, border`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`)])]),j(`*`,[j(`&:not(:last-child)`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`,[j(`>`,[E(`input`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`),E(`base-selection`,[E(`base-selection-label`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`),E(`base-selection-tags`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`),S(`box-shadow, border, state-border`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`)])])]),j(`&:not(:first-child)`,`
margin-left: -1px!important;
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`,[j(`>`,[E(`input`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`),E(`base-selection`,[E(`base-selection-label`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`),E(`base-selection-tags`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`),S(`box-shadow, border, state-border`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`)])])])])])]),J=C({name:`InputGroup`,props:{},setup(e){let{mergedClsPrefixRef:t}=f(e);return T(`-input-group`,we,t),{mergedClsPrefix:t}},render(){let{mergedClsPrefix:e}=this;return s(`div`,{class:`${e}-input-group`},this.$slots)}}),Y=`0!important`,Te=`-1px!important`;function X(e){return g(`${e}-type`,[j(`& +`,[E(`button`,{},[g(`${e}-type`,[S(`border`,{borderLeftWidth:Y}),S(`state-border`,{left:Te})])])])])}function Z(e){return g(`${e}-type`,[j(`& +`,[E(`button`,[g(`${e}-type`,[S(`border`,{borderTopWidth:Y}),S(`state-border`,{top:Te})])])])])}var Ee=E(`button-group`,`
flex-wrap: nowrap;
display: inline-flex;
position: relative;
`,[D(`vertical`,{flexDirection:`row`},[D(`rtl`,[E(`button`,[j(`&:first-child:not(:last-child)`,`
margin-right: ${Y};
border-top-right-radius: ${Y};
border-bottom-right-radius: ${Y};
`),j(`&:last-child:not(:first-child)`,`
margin-left: ${Y};
border-top-left-radius: ${Y};
border-bottom-left-radius: ${Y};
`),j(`&:not(:first-child):not(:last-child)`,`
margin-left: ${Y};
margin-right: ${Y};
border-radius: ${Y};
`),X(`default`),g(`ghost`,[X(`primary`),X(`info`),X(`success`),X(`warning`),X(`error`)])])])]),g(`vertical`,{flexDirection:`column`},[E(`button`,[j(`&:first-child:not(:last-child)`,`
margin-bottom: ${Y};
margin-left: ${Y};
margin-right: ${Y};
border-bottom-left-radius: ${Y};
border-bottom-right-radius: ${Y};
`),j(`&:last-child:not(:first-child)`,`
margin-top: ${Y};
margin-left: ${Y};
margin-right: ${Y};
border-top-left-radius: ${Y};
border-top-right-radius: ${Y};
`),j(`&:not(:first-child):not(:last-child)`,`
margin: ${Y};
border-radius: ${Y};
`),Z(`default`),g(`ghost`,[Z(`primary`),Z(`info`),Z(`success`),Z(`warning`),Z(`error`)])])])]),De=C({name:`ButtonGroup`,props:{size:String,vertical:Boolean},setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n}=f(e);return T(`-button-group`,Ee,t),k(oe,e),{rtlEnabled:ee(`ButtonGroup`,n,t),mergedClsPrefix:t}},render(){let{mergedClsPrefix:e}=this;return s(`div`,{class:[`${e}-button-group`,this.rtlEnabled&&`${e}-button-group--rtl`,this.vertical&&`${e}-button-group--vertical`],role:`group`},this.$slots)}});function Oe(){return _e}var ke=y({name:`DynamicInput`,common:v,peers:{Input:ve,Button:ge},self:Oe}),Ae=p(`n-dynamic-input`),je=C({name:`DynamicInputInputPreset`,props:{clsPrefix:{type:String,required:!0},value:{type:String,default:``},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(){let{mergedThemeRef:e,placeholderRef:t}=l(Ae);return{mergedTheme:e,placeholder:t}},render(){let{mergedTheme:e,placeholder:t,value:n,clsPrefix:r,onUpdateValue:i,disabled:a}=this;return s(`div`,{class:`${r}-dynamic-input-preset-input`},s(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:n,placeholder:t,onUpdateValue:i,disabled:a}))}}),Me=C({name:`DynamicInputPairPreset`,props:{clsPrefix:{type:String,required:!0},value:{type:Object,default:()=>({key:``,value:``})},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(e){let{mergedThemeRef:t,keyPlaceholderRef:n,valuePlaceholderRef:r}=l(Ae);return{mergedTheme:t,keyPlaceholder:n,valuePlaceholder:r,handleKeyInput(t){e.onUpdateValue({key:t,value:e.value.value})},handleValueInput(t){e.onUpdateValue({key:e.value.key,value:t})}}},render(){let{mergedTheme:e,keyPlaceholder:t,valuePlaceholder:n,value:r,clsPrefix:i,disabled:a}=this;return s(`div`,{class:`${i}-dynamic-input-preset-pair`},s(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:r.key,class:`${i}-dynamic-input-pair-input`,placeholder:t,onUpdateValue:this.handleKeyInput,disabled:a}),s(V,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:r.value,class:`${i}-dynamic-input-pair-input`,placeholder:n,onUpdateValue:this.handleValueInput,disabled:a}))}}),Ne=E(`dynamic-input`,{width:`100%`},[E(`dynamic-input-item`,`
margin-bottom: 10px;
display: flex;
flex-wrap: nowrap;
`,[E(`dynamic-input-preset-input`,{flex:1,alignItems:`center`}),E(`dynamic-input-preset-pair`,`
flex: 1;
display: flex;
align-items: center;
`,[E(`dynamic-input-pair-input`,[j(`&:first-child`,{"margin-right":`12px`})])]),S(`action`,`
align-self: flex-start;
display: flex;
justify-content: flex-end;
flex-shrink: 0;
flex-grow: 0;
margin: var(--action-margin);
`,[g(`icon`,{cursor:`pointer`})]),j(`&:last-child`,{marginBottom:0})]),E(`form-item`,`
padding-top: 0 !important;
margin-right: 0 !important;
`,[E(`form-item-blank`,{paddingTop:`0 !important`})])]),Q=new WeakMap,$=C({name:`DynamicInput`,props:Object.assign(Object.assign({},O.props),{max:Number,min:{type:Number,default:0},value:Array,defaultValue:{type:Array,default:()=>[]},preset:{type:String,default:`input`},keyField:String,itemClass:String,itemStyle:[String,Object],keyPlaceholder:{type:String,default:``},valuePlaceholder:{type:String,default:``},placeholder:{type:String,default:``},disabled:Boolean,showSortButton:Boolean,createButtonProps:Object,onCreate:Function,onRemove:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClear:Function,onInput:[Function,Array]}),setup(e,{slots:t}){let{mergedComponentPropsRef:n,mergedClsPrefixRef:i,mergedRtlRef:a,inlineThemeDisabled:o}=f(),s=l(fe,null),c=b(e.defaultValue),u=R(I(e,`value`),c),d=O(`DynamicInput`,`-dynamic-input`,Ne,ke,e,i),p=_(()=>{let{value:t}=u;if(Array.isArray(t)){let{max:n}=e;return n!==void 0&&t.length>=n}return!1}),m=_(()=>{let{value:t}=u;return Array.isArray(t)?t.length<=e.min:!0}),h=_(()=>n?.value?.DynamicInput?.buttonSize);function g(t){let{onInput:n,"onUpdate:value":r,onUpdateValue:i}=e;n&&se(n,t),r&&se(r,t),i&&se(i,t),c.value=t}function v(e,t){if(typeof e!=`object`||!e)return t;let n=w(e)?M(e):e,r=Q.get(n);return r===void 0&&Q.set(n,r=ye()),r}function y(e,t){let{value:n}=u,r=Array.from(n??[]),i=r[e];if(r[e]=t,i&&t&&typeof i==`object`&&typeof t==`object`){let e=w(i)?M(i):i,n=w(t)?M(t):t,r=Q.get(e);r!==void 0&&Q.set(n,r)}g(r)}function x(){S(-1)}function S(n){let{value:r}=u,{onCreate:i}=e,a=Array.from(r??[]);if(i)a.splice(n+1,0,i(n+1)),g(a);else if(t.default)a.splice(n+1,0,null),g(a);else switch(e.preset){case`input`:a.splice(n+1,0,``),g(a);break;case`pair`:a.splice(n+1,0,{key:``,value:``}),g(a);break}}function C(t){let{value:n}=u;if(!Array.isArray(n))return;let{min:r}=e;if(n.length<=r)return;let{onRemove:i}=e;i&&i(t);let a=Array.from(n);a.splice(t,1),g(a)}function T(e,t,n){if(t<0||n<0||t>=e.length||n>=e.length||t===n)return;let r=e[t];e[t]=e[n],e[n]=r}function E(e,t){let{value:n}=u;if(!Array.isArray(n))return;let r=Array.from(n);e===`up`&&T(r,t,t-1),e===`down`&&T(r,t,t+1),g(r)}k(Ae,{mergedThemeRef:d,keyPlaceholderRef:I(e,`keyPlaceholder`),valuePlaceholderRef:I(e,`valuePlaceholder`),placeholderRef:I(e,`placeholder`)});let D=ee(`DynamicInput`,a,i),A=_(()=>{let{self:{actionMargin:e,actionMarginRtl:t}}=d.value;return{"--action-margin":e,"--action-margin-rtl":t}}),j=o?r(`dynamic-input`,void 0,A,e):void 0;return{locale:ie(`DynamicInput`).localeRef,rtlEnabled:D,buttonSize:h,mergedClsPrefix:i,NFormItem:s,uncontrolledValue:c,mergedValue:u,insertionDisabled:p,removeDisabled:m,handleCreateClick:x,ensureKey:v,handleValueChange:y,remove:C,move:E,createItem:S,mergedTheme:d,cssVars:o?void 0:A,themeClass:j?.themeClass,onRender:j?.onRender}},render(){let{$slots:e,itemClass:t,buttonSize:n,mergedClsPrefix:r,mergedValue:i,locale:a,mergedTheme:o,keyField:c,itemStyle:l,preset:u,showSortButton:d,NFormItem:f,ensureKey:p,handleValueChange:m,remove:h,createItem:g,move:_,onRender:v,disabled:y}=this;return v?.(),s(`div`,{class:[`${r}-dynamic-input`,this.rtlEnabled&&`${r}-dynamic-input--rtl`,this.themeClass],style:this.cssVars},!Array.isArray(i)||i.length===0?s(z,Object.assign({block:!0,ghost:!0,dashed:!0,size:n},this.createButtonProps,{disabled:this.insertionDisabled||y,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:this.handleCreateClick}),{default:()=>ce(e[`create-button-default`],()=>[a.create]),icon:()=>ce(e[`create-button-icon`],()=>[s(W,{clsPrefix:r},{default:()=>s(pe,null)})])}):i.map((a,v)=>s(`div`,{key:c?a[c]:p(a,v),"data-key":c?a[c]:p(a,v),class:[`${r}-dynamic-input-item`,t],style:l},B(e.default,{value:i[v],index:v},()=>[u===`input`?s(je,{disabled:y,clsPrefix:r,value:i[v],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${v}]`:void 0,onUpdateValue:e=>{m(v,e)}}):u===`pair`?s(Me,{disabled:y,clsPrefix:r,value:i[v],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${v}]`:void 0,onUpdateValue:e=>{m(v,e)}}):null]),B(e.action,{value:i[v],index:v,create:g,remove:h,move:_},()=>[s(`div`,{class:`${r}-dynamic-input-item__action`},s(De,{size:n},{default:()=>[s(z,{disabled:this.removeDisabled||y,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,circle:!0,onClick:()=>{h(v)}},{icon:()=>s(W,{clsPrefix:r},{default:()=>s(me,null)})}),s(z,{disabled:this.insertionDisabled||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{g(v)}},{icon:()=>s(W,{clsPrefix:r},{default:()=>s(pe,null)})}),d?s(z,{disabled:v===0||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{_(`up`,v)}},{icon:()=>s(W,{clsPrefix:r},{default:()=>s(Ce,null)})}):null,d?s(z,{disabled:v===i.length-1||y,circle:!0,theme:o.peers.Button,themeOverrides:o.peerOverrides.Button,onClick:()=>{_(`down`,v)}},{icon:()=>s(W,{clsPrefix:r},{default:()=>s(Se,null)})}):null]}))]))))}}),Pe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Fe=C({name:`CloseOutlined`,render:function(e,t){return a(),N(`svg`,Pe,t[0]||=[F(`path`,{d:`M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z`,fill:`currentColor`},null,-1)])}}),Ie={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Le=C({name:`LockOutlined`,render:function(e,t){return a(),N(`svg`,Ie,t[0]||=[F(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2z`,fill:`currentColor`},null,-1)])}}),Re={key:0},ze={class:`intro-text font`},Be={key:0,class:`intro-audio-block`},Ve=[`src`],He={class:`message-content`},Ue={key:0},We={key:1,class:`intro-empty`},Ge={key:2,class:`intro-audio-block`},Ke=[`src`],qe={key:2,class:`place-block`},Je={class:`intro-edit-audio`},Ye=[`src`],Xe={class:`slot-block`},Ze=le(C({__name:`IntroBlock`,props:{introduction:{},mode:{}},emits:[`update:mode`],setup(n,{emit:r}){let i=n,o=r,s=e=>{o(`update:mode`,e)},l=_(()=>!!i.introduction?.text),u=_(()=>!!i.introduction?.audio),f=_(()=>{let e=i.introduction?.audio;if(e)return/^https?:\/\//i.test(e)?e:`${A()}/api/files/${encodeURIComponent(e)}`}),p=()=>{i.introduction&&(i.introduction.audio=``,i.introduction.fileList=void 0)};return(r,o)=>(a(),N(x,null,[n.mode==`show`?(a(),N(`div`,Re,[c(xe,null,{default:h(()=>[o[4]||=F(`div`,{class:`font`},`Вступление`,-1),o[5]||=F(`hr`,{class:`intro-hr`},null,-1),F(`div`,ze,L(n.introduction.text),1),u.value?(a(),N(`div`,Be,[F(`audio`,{src:f.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ve)])):e(``,!0)]),_:1})])):e(``,!0),n.mode==`show-editor`?(a(),N(`div`,{key:1,class:`place-block-hover show-editor-block`,onClick:o[0]||=e=>s(`edit`)},[o[6]||=F(`div`,{class:`message-header`},`Вступление`,-1),o[7]||=F(`hr`,{class:`hr`},null,-1),F(`div`,He,[l.value?(a(),N(`span`,Ue,L(n.introduction.text),1)):(a(),N(`span`,We,`Введение не задано — нажмите, чтобы добавить`)),u.value?(a(),N(`div`,Ge,[F(`audio`,{src:f.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ke)])):e(``,!0)])])):e(``,!0),n.mode==`edit`?(a(),N(`div`,qe,[c(P(H),{vertical:``},{default:h(()=>[o[11]||=F(`p`,{class:`settings-header`},`Текст вступления`,-1),c(P(V),{value:i.introduction.text,"onUpdate:value":o[1]||=e=>i.introduction.text=e,type:`textarea`,autosize:{minRows:4,maxRows:12},placeholder:`Дорогие сыщики! В этом деле вам предстоит...`},null,8,[`value`]),o[12]||=F(`p`,{class:`settings-header`},`Аудио вступления`,-1),F(`div`,Je,[c(P(H),{vertical:``},{default:h(()=>[u.value?(a(),N(`audio`,{key:0,src:f.value,controls:``,preload:`none`,class:`intro-audio`},null,8,Ye)):(a(),d(P(U),{key:1,depth:`3`},{default:h(()=>[...o[8]||=[t(`Аудио не задано`,-1)]]),_:1})),c(P(z),{onClick:o[2]||=e=>p(),disabled:!u.value},{default:h(()=>[...o[9]||=[t(`Убрать аудио`,-1)]]),_:1},8,[`disabled`])]),_:1}),c(P(de),{"directory-dnd":``,max:1,"file-list":i.introduction.fileList,"onUpdate:fileList":o[3]||=e=>i.introduction.fileList=e},{default:h(()=>[c(P(ue),null,{default:h(()=>[c(P(U),{style:{"font-size":`16px`}},{default:h(()=>[...o[10]||=[t(` Щелкните или перетащите аудиофайл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),F(`div`,Xe,[m(r.$slots,`default`,{},void 0,!0)])]),_:3})])):e(``,!0)],64))}}),[[`__scopeId`,`data-v-11f63e45`]]),Qe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},$e=C({name:`Key24Regular`,render:function(e,t){return a(),N(`svg`,Qe,t[0]||=[F(`g`,{fill:`none`},[F(`path`,{d:`M18.25 7a1.25 1.25 0 1 1-2.5 0a1.25 1.25 0 0 1 2.5 0zM15.5 2.05A6.554 6.554 0 0 0 8.95 8.6c0 .387.05.76.11 1.104a.275.275 0 0 1-.07.244l-6.235 6.236a2.75 2.75 0 0 0-.806 1.944V20.3c0 .966.784 1.75 1.75 1.75h2.5a1.75 1.75 0 0 0 1.75-1.75v-1.25H9.7c.69 0 1.25-.56 1.25-1.25v-1.75h1.75a1.25 1.25 0 0 0 1.25-1.204c.496.128 1.02.204 1.55.204a6.554 6.554 0 0 0 6.55-6.55c0-3.631-2.953-6.45-6.55-6.45zM10.45 8.6a5.054 5.054 0 0 1 5.05-5.05c2.802 0 5.05 2.181 5.05 4.95a5.054 5.054 0 0 1-5.05 5.05c-.68 0-1.38-.171-2.005-.44a.75.75 0 0 0-1.046.69v.75H10.7c-.69 0-1.25.56-1.25 1.25v1.75H7.7c-.69 0-1.25.56-1.25 1.25v1.5a.25.25 0 0 1-.25.25H3.7a.25.25 0 0 1-.25-.25v-2.172c0-.331.132-.65.366-.884l6.236-6.235a1.774 1.774 0 0 0 .486-1.564a4.917 4.917 0 0 1-.088-.845z`,fill:`currentColor`})],-1)])}}),et={key:1,class:`place-block`},tt={class:`message-header`},nt={class:`message-content`},rt={key:0},it=[`src`,`alt`],at={class:`door-button-label`},ot={key:0,class:`hr`},st={class:`application-name`},ct=[`onClick`],lt=[`src`,`alt`],ut=[`src`],dt=[`href`],ft={class:`gray-block`},pt={key:0},mt={key:3},ht={class:`message-show-header font`},gt={key:0,class:`mcp-label`,title:`Ход сделан через MCP`},_t={class:`message-show-content font`},vt={key:0},yt=[`src`,`alt`],bt=[`src`,`alt`],xt={key:2,class:`show-applications-block`},St=[`onClick`],Ct=[`src`,`alt`],wt={key:0,class:`show-hr`},Tt=[`onClick`],Et={class:`button-dialog-text`},Dt={key:1,class:`show-hr`},Ot=[`href`],kt={class:`application-label`},At=[`src`],jt={key:4},Mt={class:`message-header font`},Nt={key:0,class:`mcp-label`,title:`Ход сделан через MCP`},Pt={key:5,class:`place-block`},Ft=[`src`,`alt`],It={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},Lt={key:0,class:`application-edit-file`},Rt=[`src`,`alt`],zt=[`src`],Bt=[`href`],Vt={style:{display:`flex`,"flex-direction":`column`}},Ht={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},Ut={class:`door-add-block`},Wt={class:`door-field`},Gt={style:{"align-items":`center`,display:`flex`,width:`100%`}},Kt={style:{"align-items":`center`,display:`flex`,width:`100%`}},qt={class:`slot-block`},Jt={key:0,class:`view-application-image-block`},Yt=[`src`,`alt`],Xt=[`src`],Zt=[`src`],Qt={key:3,class:`view-application-image-block`},$t=[`src`,`alt`],en=le(C({__name:`PlaceBlock`,props:{newPlaceCode:{},newPlaceName:{},newPlaceText:{},place:{},mode:{},mcp:{type:Boolean,default:!1},addAction:{}},emits:[`update:newPlaceCode`,`update:newPlaceName`,`update:newPlaceText`,`update:mode`,`navigate`],setup(r,{emit:s}){let l=r,d=s,f=e=>{d(`update:newPlaceCode`,e)},p=e=>{d(`update:newPlaceName`,e)},g=e=>{d(`update:newPlaceText`,e)},v=e=>{d(`update:mode`,e)};function y(){return{name:void 0,image:void 0,file_type:void 0}}function ee(){return{code:void 0,name:void 0,keys:void 0}}function S(){return{name:void 0}}function C(e){return e}function w(e){e.image=void 0,e.file_type=void 0,e.fileList=void 0}let T=b(null),E=b(null),D=b(!1),O=_(()=>E.value?E.value.url:K(T.value||void 0)==`image`?q(T.value?.image):``);function k(e){T.value=e,E.value=null,D.value=!0}function A(e,t){E.value={title:e,url:t},T.value=null,D.value=!0}function j(){D.value=!1,T.value=null,E.value=null}function M(e){let t=e||``;if(t.length==0)return{before:``,after:``};let n=Math.min(t.length,Math.max(120,Math.floor(t.length*.45))),r=-1,i=1/0;for(let e=0;e<t.length;e++){let a=t[e];if(a!=`
`&&a!=` `)continue;let o=Math.abs(t.length-e-n);o<i&&(i=o,r=e)}return r<0?{before:t,after:``}:{before:t.slice(0,r),after:t.slice(r)}}let I=_(()=>M(l.place?.text).before),ie=_(()=>M(l.place?.text).after),R=_(()=>l.place?.image?null:(l.place?.applications||[]).find(e=>K(e)==`image`&&e.image)||null),oe=_(()=>(l.place?.applications||[]).filter(e=>e===R.value?!1:K(e)==`image`&&e.image)),B=_(()=>(l.place?.applications||[]).filter(e=>e===R.value?!1:!(K(e)==`image`&&e.image)));return(s,_)=>(a(),N(x,null,[r.mode==`mini-add`?(a(),N(`div`,{key:0,class:`place-block-hover show-editor-block`,onClick:_[0]||=e=>v(`add`)},[..._[21]||=[F(`p`,{class:`place-image-plus`},`+`,-1)]])):e(``,!0),r.mode==`add`?(a(),N(`div`,et,[c(P(H),{vertical:``},{default:h(()=>[c(P(J),null,{default:h(()=>[c(P(V),{style:{width:`20%`},value:r.newPlaceCode,"onUpdate:value":f,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),c(P(V),{style:{width:`80%`},value:r.newPlaceName,"onUpdate:value":p,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),c(P(V),{value:r.newPlaceText,"onUpdate:value":g,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),m(s.$slots,`default`,{},void 0,!0)]),_:3})])):e(``,!0),r.mode==`show-editor`?(a(),N(`div`,{key:2,class:`place-block-hover show-editor-block`,onClick:_[4]||=e=>v(`edit`)},[F(`div`,tt,L(l.place?.code)+`: `+L(l.place?.name),1),_[22]||=F(`hr`,{class:`hr`},null,-1),F(`div`,nt,[l.place?.image?(a(),N(`div`,rt,[F(`div`,{class:`message-image-border`,onClick:_[1]||=G(e=>A(l.place?.name||``,l.place?.image||``),[`stop`])},[F(`img`,{src:l.place?.image,alt:l.place?.name||`Изображение точки`,class:`message-image`},null,8,it)])])):e(``,!0),F(`span`,null,L(l.place?.text),1)]),(a(!0),N(x,null,i(l.place?.doors,e=>(a(),N(`div`,{key:e.code,class:`door-block`},[c(P(z),{class:`door-button`,onClick:G(t=>d(`navigate`,e.code),[`stop`])},{default:h(()=>[F(`span`,at,L(e.name||e.code||`Перейти к точке`),1)]),_:2},1032,[`onClick`]),(a(!0),N(x,null,i(e.keys,e=>(a(),N(`span`,{key:e.name,class:`key-block`},[c(P(re),{class:`lock-icon`},{default:h(()=>[c(P(Le))]),_:1}),t(` `+L(e.name),1)]))),128))]))),128)),l.place?.applications?.length?(a(),N(`hr`,ot)):e(``,!0),(a(!0),N(x,null,i(l.place?.applications,t=>(a(),N(`div`,{class:`message-footer application-block`,key:t.name},[F(`div`,st,`Приложение: `+L(t.name),1),P(K)(t)==`image`&&t.image?(a(),N(`div`,{key:0,class:`application-image-border`,onClick:G(e=>k(t),[`stop`])},[F(`img`,{src:P(q)(t.image),alt:t.name||`Изображение улики`,class:`application-image`},null,8,lt)],8,ct)):P(K)(t)==`audio`&&t.image?(a(),N(`audio`,{key:1,src:P(q)(t.image),controls:``,preload:`none`,class:`application-audio`,onClick:_[2]||=G(()=>{},[`stop`])},null,8,ut)):P(K)(t)==`pdf`&&t.image?(a(),N(`a`,{key:2,href:P(q)(t.image),target:`_blank`,rel:`noopener`,class:`application-pdf-link`,onClick:_[3]||=G(()=>{},[`stop`])},` PDF `,8,dt)):e(``,!0)]))),128)),F(`p`,ft,[l.place?.hidden?(a(),N(`span`,pt,` Скрытая точка `)):e(``,!0),(a(!0),N(x,null,i(l.place?.keys,e=>(a(),N(`span`,{key:e.name,class:`key-block`},[c(P(re),{class:`lock-icon`},{default:h(()=>[c(P($e))]),_:1}),t(` `+L(e.name),1)]))),128))])])):e(``,!0),r.mode==`show`?(a(),N(`div`,mt,[c(xe,null,{default:h(()=>[F(`div`,ht,[r.mcp?(a(),N(`span`,gt,`MCP`)):e(``,!0),t(` `+L(r.place?.code)+`: `+L(r.place?.name)+` `,1),F(`span`,{class:`collapse-icon collapse-icon-up`,onClick:_[5]||=e=>v(`show-collapse`)})]),_[23]||=F(`hr`,{class:`show-hr`},null,-1),F(`div`,_t,[r.place?.image?.length?(a(),N(`div`,vt,[F(`div`,{class:`message-image-border`,onClick:_[6]||=e=>A(r.place?.name||``,r.place?.image||``)},[F(`img`,{src:r.place?.image,alt:r.place?.name||`Изображение точки`,class:`message-image`},null,8,yt)])])):R.value?(a(),N(`div`,{key:1,class:`message-image-border`,onClick:_[7]||=e=>k(R.value)},[F(`img`,{src:P(q)(R.value.image),alt:R.value.name||`Изображение улики`,class:`message-image`},null,8,bt)])):e(``,!0),F(`span`,null,L(I.value),1),oe.value.length?(a(),N(`div`,xt,[(a(!0),N(x,null,i(oe.value,e=>(a(),N(`div`,{class:`show-application`,key:e.name},[F(`div`,{class:`application-image-block`,onClick:t=>k(e)},[F(`img`,{src:P(q)(e.image),alt:e.name||`Изображение улики`,class:`application-image`},null,8,Ct)],8,St)]))),128))])):e(``,!0),F(`span`,null,L(ie.value),1)]),l.place?.doors?.length?(a(),N(`hr`,wt)):e(``,!0),(a(!0),N(x,null,i(l.place?.doors,e=>(a(),N(`div`,{key:e.code,class:`button-dialog font`,onClick:t=>r.addAction(e.code)},[F(`div`,Et,L(e.code)+` `+L(e.name),1)],8,Tt))),128)),B.value.length?(a(),N(`hr`,Dt)):e(``,!0),(a(!0),N(x,null,i(B.value,t=>(a(),N(`div`,{class:`message-show-footer font`,key:t.name},[P(K)(t)==`pdf`&&t.image?(a(),N(`a`,{key:0,href:P(q)(t.image),target:`_blank`,rel:`noopener`,class:`pdf-application-name`},` Приложение: `+L(t.name),9,Ot)):(a(),N(x,{key:1},[F(`div`,kt,`Приложение: `+L(t.name),1),P(K)(t)==`audio`&&t.image?(a(),N(`audio`,{key:0,src:P(q)(t.image),controls:``,preload:`none`,class:`application-audio`},null,8,At)):e(``,!0)],64))]))),128))]),_:1})])):e(``,!0),r.mode==`show-collapse`?(a(),N(`div`,jt,[c(xe,null,{default:h(()=>[F(`div`,Mt,[r.mcp?(a(),N(`span`,Nt,`MCP`)):e(``,!0),t(` `+L(r.place?.code)+`: `+L(r.place?.name)+` `,1),F(`span`,{class:`collapse-icon`,onClick:_[8]||=e=>v(`show`)})])]),_:1})])):e(``,!0),r.mode==`edit`?(a(),N(`div`,Pt,[c(P(H),{vertical:``},{default:h(()=>[c(P(J),null,{default:h(()=>[c(P(V),{style:{width:`20%`},value:l.place.code,"onUpdate:value":_[9]||=e=>l.place.code=e,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),c(P(V),{style:{width:`80%`},value:l.place.name,"onUpdate:value":_[10]||=e=>l.place.name=e,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),c(P(V),{value:l.place.text,"onUpdate:value":_[11]||=e=>l.place.text=e,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),_[37]||=F(`p`,{class:`settings-header`},`Картинка`,-1),F(`div`,null,[c(P(H),null,{default:h(()=>[c(P(H),{vertical:``},{default:h(()=>[F(`img`,{src:l.place.image,alt:l.place?.name||`Изображение точки`,class:`message-edit-image`},null,8,Ft),c(P(z),{onClick:_[12]||=e=>(l.place.image=``,l.place.fileList=void 0)},{default:h(()=>[..._[24]||=[t(`Убрать картинку`,-1)]]),_:1})]),_:1}),c(P(H),{vertical:``},{default:h(()=>[c(P(V),{value:l.place.image,"onUpdate:value":_[13]||=e=>l.place.image=e,type:`text`,placeholder:`Не задано`,disabled:``},null,8,[`value`]),c(P(de),{"directory-dnd":``,max:1,"file-list":l.place.fileList,"onUpdate:fileList":_[14]||=e=>l.place.fileList=e},{default:h(()=>[c(P(ue),null,{default:h(()=>[c(P(U),{style:{"font-size":`16px`}},{default:h(()=>[..._[25]||=[t(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),_:1})]),_:1})]),_[38]||=F(`p`,{class:`settings-header`},`Видимость точки`,-1),c(P(he),{value:l.place.hidden,"onUpdate:value":_[15]||=e=>l.place.hidden=e},{checked:h(()=>[..._[26]||=[t(` Скрытая точка `,-1)]]),unchecked:h(()=>[..._[27]||=[t(` Обычная точка `,-1)]]),_:1},8,[`value`]),_[39]||=t(` Улики `,-1),c(P($),{value:l.place.applications,"onUpdate:value":_[16]||=e=>l.place.applications=e,"on-create":y},{"create-button-default":h(()=>[..._[28]||=[t(` Добавить улику `,-1)]]),default:h(({value:n})=>[F(`div`,It,[c(P(V),{value:n.name,"onUpdate:value":e=>n.name=e,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`]),n.image?(a(),N(`div`,Lt,[c(P(H),{align:`center`,justify:`space-between`},{default:h(()=>[c(P(U),{depth:`3`},{default:h(()=>[t(L(P(be)(n.image))+` `,1),c(P(ne),{size:`small`,bordered:!1},{default:h(()=>[t(L(P(K)(n)||`файл`),1)]),_:2},1024)]),_:2},1024),c(P(z),{size:`small`,quaternary:``,onClick:e=>w(C(n))},{default:h(()=>[..._[29]||=[t(` Убрать файл `,-1)]]),_:1},8,[`onClick`])]),_:2},1024),P(K)(n)==`image`?(a(),N(`img`,{key:0,src:P(q)(n.image),alt:n.name||`Изображение улики`,class:`application-edit-image`},null,8,Rt)):P(K)(n)==`audio`?(a(),N(`audio`,{key:1,src:P(q)(n.image),controls:``,preload:`none`,class:`application-edit-audio`},null,8,zt)):P(K)(n)==`pdf`?(a(),N(`a`,{key:2,href:P(q)(n.image),target:`_blank`,rel:`noopener`,class:`application-pdf-link`},` PDF `,8,Bt)):e(``,!0)])):e(``,!0),c(P(de),{max:1,"file-list":C(n).fileList,"onUpdate:fileList":e=>C(n).fileList=e,accept:`image/*,application/pdf,audio/*`},{default:h(()=>[c(P(z),{size:`small`},{default:h(()=>[..._[30]||=[t(`Загрузить файл улики`,-1)]]),_:1})]),_:1},8,[`file-list`,`onUpdate:fileList`])])]),_:1},8,[`value`]),_[40]||=t(` Действия `,-1),c(P($),{value:l.place.doors,"onUpdate:value":_[17]||=e=>l.place.doors=e,"on-create":ee},{"create-button-default":h(()=>[..._[31]||=[t(` Добавить действие `,-1)]]),action:h(({index:e,create:n,remove:r})=>[F(`div`,Vt,[c(P(z),{onClick:()=>n(e),class:`plus-minus-buttons`},{default:h(()=>[..._[32]||=[t(`+`,-1)]]),_:1},8,[`onClick`]),c(P(z),{onClick:()=>r(e),class:`plus-minus-buttons`},{default:h(()=>[..._[33]||=[t(`-`,-1)]]),_:1},8,[`onClick`])])]),default:h(({value:e})=>[F(`div`,Ht,[F(`div`,Ut,[c(P(J),null,{default:h(()=>[c(P(V),{style:{width:`30%`},value:e.code,"onUpdate:value":t=>e.code=t,type:`text`,placeholder:`Код`},null,8,[`value`,`onUpdate:value`]),c(P(V),{style:{width:`70%`},value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),_[35]||=F(`p`,{class:`need-keys-text`},`Требуемые ключи`,-1),F(`div`,Wt,[c(P($),{value:e.keys,"onUpdate:value":t=>e.keys=t,"on-create":S},{"create-button-default":h(()=>[..._[34]||=[t(` Добавить ключ `,-1)]]),default:h(({value:e})=>[F(`div`,Gt,[c(P(V),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`,`onUpdate:value`])])])])]),_:1},8,[`value`]),_[41]||=t(` Получаемые ключи `,-1),c(P($),{value:l.place.keys,"onUpdate:value":_[18]||=e=>l.place.keys=e,"on-create":S},{"create-button-default":h(()=>[..._[36]||=[t(` Добавить ключ `,-1)]]),default:h(({value:e})=>[F(`div`,Kt,[c(P(V),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`]),F(`div`,qt,[m(s.$slots,`default`,{},void 0,!0)])]),_:3})])):e(``,!0),c(P(ae),{show:D.value,"onUpdate:show":_[20]||=e=>D.value=e,"mask-closable":!0},{default:h(()=>[c(P(te),{class:o({"photo-paper":O.value}),"theme-overrides":O.value?{titleTextColor:`black`,actionColor:`transparent`,paddingMedium:`14px`,borderRadius:`10px`}:void 0,style:u({maxWidth:`min(94vw, 1200px)`,width:O.value?`max-content`:`min(94vw, 1200px)`}),bordered:!1,role:`dialog`,"aria-modal":`true`,"header-style":O.value?{paddingBottom:`10px`}:void 0,"content-style":{padding:O.value?`0 14px`:`14px`}},n({header:h(()=>[F(`span`,{class:o({"photo-paper-title":O.value})},L(T.value?.name||E.value?.title),3)]),"header-extra":h(()=>[c(P(z),{quaternary:``,circle:``,"theme-overrides":O.value?{textColor:`black`,textColorHover:`#63e2b7`}:void 0,"aria-label":`Закрыть`,onClick:_[19]||=e=>j()},{default:h(()=>[c(P(re),{size:`20`},{default:h(()=>[c(P(Fe))]),_:1})]),_:1},8,[`theme-overrides`])]),default:h(()=>[T.value&&P(K)(T.value)==`image`?(a(),N(`div`,Jt,[F(`img`,{src:P(q)(T.value.image),alt:T.value.name||`Фото улики`,class:`view-application-image`},null,8,Yt)])):T.value&&P(K)(T.value)==`pdf`?(a(),N(`iframe`,{key:1,src:P(q)(T.value.image),class:`view-application-pdf`},null,8,Xt)):T.value&&P(K)(T.value)==`audio`?(a(),N(`audio`,{key:2,src:P(q)(T.value.image),controls:``,autoplay:``,class:`view-application-audio`},null,8,Zt)):E.value?(a(),N(`div`,Qt,[F(`img`,{src:E.value.url,alt:E.value.title||`Фото точки`,class:`view-application-image`},null,8,$t)])):e(``,!0)]),_:2},[O.value?{name:`action`,fn:h(()=>[c(P(z),{class:`photo-paper-action`,tag:`a`,href:O.value,target:`_blank`,rel:`noopener noreferrer`,bordered:!1,"theme-overrides":{textColor:`#bfa07d`,textColorHover:`#63e2b7`}},{default:h(()=>[..._[42]||=[t(` Открыть в новой вкладке `,-1)]]),_:1},8,[`href`])]),key:`0`}:void 0]),1032,[`class`,`theme-overrides`,`style`,`header-style`,`content-style`])]),_:1},8,[`show`])],64))}}),[[`__scopeId`,`data-v-c907363d`]]);export{Ze as n,J as r,en as t};