PageSourceSearch

https://www.smartcms.ai/_next/static/chunks/1440.4d832949c5a7f5f9.js

js smartcms.ai collected 2026-10-05 14:59:28 UTC 7,049 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1440],{40173:(e,t,r)=>{r.d(t,{I:()=>o,a:()=>c});var n=r(95155),l=r(12115);let a=(0,l.createContext)(null);function o(e){let{value:t,children:r}=e;return(0,n.jsx)(a.Provider,{value:t,children:r})}function c(){return(0,l.useContext)(a)}},43135:(e,t,r)=>{r.r(t),r.d(t,{CmsRecordSlideOver:()=>x,RecordEditorLevel:()=>m});var n=r(95155),l=r(12115),a=r(20063),o=r(99776),c=r(22454),s=r(96867),d=r(96469),i=r(3028),u=r(40173),b=r(48656),f=r(97782),h=r(31790);function m(e){let{spaceId:t,uiLocale:r,target:a,backToTitle:c,onBack:u,onCloseTop:b,blocked:f,onBlockedChange:h,onContentSaved:m,onContentPublished:x,localeSource:p,onSwitchToSourceLocale:v}=e,{resolveTarget:g,appId:k}=e,C=(0,l.useMemo)(()=>void 0!==g?g:(e,n)=>(function(e,t,r,n,l){let a=new URLSearchParams({spaceId:t,...n});return fetch("/api/apps/".concat(encodeURIComponent(e),"/cms-edit-target?").concat(a),{signal:l}).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error||("de-DE"===r?"Datensatz kann nicht ge\xf6ffnet werden":"Cannot open record"));return t})})(k,t,r,e,n),[g,k,t,r]),y=(0,l.useCallback)((e,t)=>"de-DE"===r?e:t,[r]),[j,w]=(0,l.useState)(null),I=(0,o.jE)();(0,l.useEffect)(()=>{let e=a.recordId;return()=>{I.removeQueries({queryKey:["contentRecord",e],exact:!0})}},[I,a.recordId]);let[S,E]=(0,l.useState)(null),N=(0,l.useRef)(null);return(0,l.useEffect)(()=>{w(null),E(null);let e=new AbortController;return C(a,e.signal).then(w).catch(t=>{e.signal.aborted||E(t instanceof Error?t.message:y("Datensatz kann nicht ge\xf6ffnet werden","Cannot open record"))}),()=>e.abort()},[C,a,y]),(0,l.useEffect)(()=>{let e=N.current;if(!j||!e)return;let t=()=>{let t=Array.from(e.querySelectorAll("[id]")).find(e=>(e.id===j.field||e.id==="".concat(j.field,".").concat(j.locale))&&e.matches("input, textarea, select, [contenteditable=true]"));return!!t&&(t.focus(),t.scrollIntoView({block:"center"}),!0)};if(t())return;let r=new MutationObserver(()=>{t()&&r.disconnect()});return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()},[j]),(0,n.jsxs)(s.lG,{open:!0,onClose:()=>{f||b()},className:"relative z-50",children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),(0,n.jsx)("div",{className:"fixed inset-0 flex justify-end",children:(0,n.jsxs)(s.Lj,{className:"flex h-full w-full max-w-5xl flex-col bg-white shadow-xl dark:bg-gray-900","data-testid":"cms-record-slide-over",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,n.jsxs)("div",{children:[u?(0,n.jsx)("button",{type:"button",onClick:u,disabled:f,className:"mb-1 block text-sm text-blue-700 hover:underline disabled:cursor-not-allowed disabled:opacity-50 dark:text-blue-300",children:y("← Zur\xfcck zu ".concat(c),"← Back to ".concat(c))}):null,(0,n.jsx)(s.L3,{className:"font-semibold",children:y("CMS-Inhalt bearbeiten","Edit CMS content")}),(0,n.jsxs)("p",{className:"text-sm text-gray-500",children:[a.field," \xb7 ",a.locale," \xb7 ",a.recordId]}),p&&p!==a.locale?(0,n.jsxs)("div",{role:"status",className:"mt-1 max-w-sm rounded-md border border-amber-300 bg-amber-50 px-2 py-1.5 text-xs text-amber-800 dark:border-amber-700/50 dark:bg-amber-900/20 dark:text-amber-200",children:[(0,n.jsx)("p",{children:y("Angezeigter Wert stammt aus ".concat(p,"; du legst die ").concat(a.locale,"-\xdcbersetzung an."),"The value shown comes from ".concat(p,"; you're creating the ").concat(a.locale," translation."))}),(0,n.jsx)("button",{type:"button",onClick:v,className:"mt-1 font-medium text-blue-700 hover:underline dark:text-blue-300",children:y("Stattdessen ".concat(p," bearbeiten"),"Edit ".concat(p," instead"))})]}):null]}),(0,n.jsx)("button",{type:"button",onClick:b,disabled:f,className:"rounded border px-3 py-2 disabled:opacity-50",children:y("Schlie\xdfen","Close")})]}),f&&(0,n.jsx)("p",{role:"status",className:"px-4 text-sm",children:y("\xc4nderungen werden gespeichert. Behebe eventuelle Speicherfehler, bevor du schlie\xdft.","Waiting for changes to save. Resolve any save error before closing.")}),(0,n.jsx)("div",{ref:N,className:"flex-1 overflow-y-auto p-4",children:S?(0,n.jsx)("p",{role:"alert",children:S}):j?(0,n.jsx)(i.D9,{value:{spaceId:j.spaceId,environmentId:j.environmentId,uiLocale:r},children:(0,n.jsx)(d.A,{recordId:j.recordId,locale:r,initialContentLocale:j.locale,onSaveStateChange:h,onContentSaved:m,onContentPublished:x},"".concat(j.recordId,":").concat(j.locale))}):(0,n.jsx)("p",{role:"status",children:y("Datensatz wird geladen…","Loading record…")})})]})})]})}function x(e){var t;let{appId:r,spaceId:s,target:d,localeSource:i,onClose:x,onContentSaved:p,onContentPublished:v}=e,g=(0,a.useParams)(),k="string"==typeof g.locale?g.locale:"en-US",C=(0,o.jE)(),y="".concat(d.recordId,"|").concat(d.field,"|").concat(d.locale),[j,w]=(0,l.useState)([d]),I=(0,l.useRef)(y);(0,l.useEffect)(()=>{I.current!==y&&(I.current=y,w([d]))},[y,d]);let[S,E]=(0,l.useState)([!1,!1]),N=(0,l.useCallback)(e=>t=>E(r=>
1{if(r[e]===t)return r;let n=[...r];return n[e]=t,n}),[]),L=(0,l.useCallback)(()=>{"string"==typeof i&&(w(e=>[{...e[0],locale:i}]),E(e=>[e[0],!1]))},[i]),R=(0,l.useCallback)(e=>{if(!S[e]){if(0===e)return void x();w(e=>e.slice(0,1)),E(e=>[e[0],!1])}},[S,x]),T=(0,l.useCallback)(e=>{C.invalidateQueries({queryKey:["referenced-record",e]}),C.invalidateQueries({queryKey:[...h.l0,r,"records"]}),p()},[C,p,r]),q=(0,l.useCallback)(()=>{C.invalidateQueries({queryKey:[...h.l0,r,"records"]}),v()},[C,v,r]),z=(0,l.useMemo)(()=>({openRecord(e,t){w(r=>{if(r.length>=2||r.some(t=>t.recordId===e))return r;let n=r[r.length-1];return[...r,{recordId:e,field:(null==t?void 0:t.field)||n.field,locale:(null==t?void 0:t.locale)||n.locale}]})},canOpen:e=>j.some(t=>t.recordId===e)?{ok:!1,reason:"already-open"}:j.length>=2?{ok:!1,reason:"depth"}:{ok:!0}}),[j]),A=j[0].recordId,{data:B}=(0,c.I)({queryKey:["referenced-record",A,s],queryFn:()=>(0,b.w)(A,s),staleTime:6e4,enabled:j.length>1}),D=B?(0,f.i4)(B,(null==(t=B.contentType)?void 0:t.fields)||[],{defaultLocale:B.defaultLocale}):A.slice(0,8)+"…";return(0,n.jsxs)(u.I,{value:z,children:[(0,n.jsx)(m,{appId:r,spaceId:s,uiLocale:k,target:j[0],onCloseTop:()=>R(0),blocked:S[0],onBlockedChange:N(0),onContentSaved:()=>T(j[0].recordId),onContentPublished:q,localeSource:i,onSwitchToSourceLocale:L}),j.length>1?(0,n.jsx)(m,{appId:r,spaceId:s,uiLocale:k,target:j[1],backToTitle:D,onBack:()=>R(1),onCloseTop:()=>R(1),blocked:S[1],onBlockedChange:N(1),onContentSaved:()=>T(j[1].recordId),onContentPublished:q}):null]})}},57218:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(12115);let l=n.forwardRef(function(e,t){let{title:r,titleId:l,...a}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":l},a),r?n.createElement("title",{id:l},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))})}}]);

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.