PageSourceSearch

https://commmune.com/_next/static/chunks/pages/admin/site/edit/ReleaseButton-fdcde4e8aadf60e4.js

js commmune.com collected 2026-10-02 06:27:23 UTC 10,007 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c85d50d2-6119-564a-8353-1716676edf87")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7378],{13467:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/site/edit/ReleaseButton",function(){return n(82553)}])},30020:(e,t,n)=>{"use strict";n.d(t,{mh:()=>y,qY:()=>b});var o=!1;if("u">typeof window){var i={get passive(){o=!0;return}};window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}var r="u">typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),d=[],a=!1,l=-1,s=void 0,c=void 0,u=void 0,f=function(e){return d.some(function(t){return!!(t.options.allowTouchMove&&t.options.allowTouchMove(e))})},m=function(e){var t=e||window.event;return!!f(t.target)||t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1)},v=function(e){if(void 0===u){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(t&&n>0){var o=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);u=document.body.style.paddingRight,document.body.style.paddingRight=o+n+"px"}}void 0===s&&(s=document.body.style.overflow,document.body.style.overflow="hidden")},p=function(){void 0!==u&&(document.body.style.paddingRight=u,u=void 0),void 0!==s&&(document.body.style.overflow=s,s=void 0)},h=function(){if(void 0!==c){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=c.position,document.body.style.top=c.top,document.body.style.left=c.left,window.scrollTo(t,e),c=void 0}},g=function(e,t){var n=e.targetTouches[0].clientY-l;return!f(e.target)&&(t&&0===t.scrollTop&&n>0?m(e):t&&t.scrollHeight-t.scrollTop<=t.clientHeight&&n<0?m(e):(e.stopPropagation(),!0))},y=function(e,t){e?!d.some(function(t){return t.targetElement===e})&&(d=[].concat(function(e){if(!Array.isArray(e))return Array.from(e);for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}(d),[{targetElement:e,options:t||{}}]),r?window.requestAnimationFrame(function(){if(void 0===c){c={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,n=e.scrollX,o=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-n,setTimeout(function(){return window.requestAnimationFrame(function(){var e=o-window.innerHeight;e&&t>=o&&(document.body.style.top=-(t+e))})},300)}}):v(t),r&&(e.ontouchstart=function(e){1===e.targetTouches.length&&(l=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&g(t,e)},a||(document.addEventListener("touchmove",m,o?{passive:!1}:void 0),a=!0))):console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},b=function(){r&&(d.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),a&&(document.removeEventListener("touchmove",m,o?{passive:!1}:void 0),a=!1),l=-1),r?h():p(),d=[]}},35713:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(36439),i=n(53763);let r=function(e){var t=(0,o.useRef)(e);t.current=e,(0,i.A)(function(){return function(){return t.current()}})}},40794:(e,t,n)=>{"use strict";n.d(t,{$:()=>o.$});var o=n(45432)},51495:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(72354);let i=({children:e,container:t=document.body})=>(0,o.createPortal)(e,t)},53763:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(36439);let i=function(e){(0,o.useEffect)(e,[])}},82553:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>w});var o=n(45023),i=n(2004),r=n.n(i),d=n(36439),a=n(90524),l=n(88816),s=n(35713),c=n(62786),u=n(40794),f=n(82501),m=n(39282),v=n(98677);let p=({isOpen:e,setIsOpen:t,confirmNavigation:n,cancelNavigation:i})=>{let{t:d}=(0,a.B)(["components/organisms/admin"]);return(0,o.Y)(v.a,{isOpen:e,setIsOpen:t,content:(0,o.FD)("div",{className:"jsx-406a4b203a33e9d1 modal
3-container",children:[(0,o.FD)("div",{className:"jsx-406a4b203a33e9d1 modal-content-header",children:[(0,o.Y)(f.E,{variant:"medium",fontWeight:"bold",children:d("Discard your changes?")}),(0,o.Y)(f.E,{variant:"small",children:d("Click [Publish] to save community page settings.")})]}),(0,o.FD)("div",{className:"jsx-406a4b203a33e9d1 modal-content-footer",children:[(0,o.Y)(u.$,{fullWidth:!0,onClick:n,size:"medium",backgroundColor:"#CE324E",children:d("Discard")}),(0,o.Y)(u.$,{fullWidth:!0,onClick:i,size:"medium",backgroundColor:"#FFFFFF",style:"secondary",children:d("Keep Editing")})]}),(0,o.Y)(r(),{id:"406a4b203a33e9d1",children:".modal-container.jsx-406a4b203a33e9d1{display:flex;flex-direction:column;gap:24px}.modal-content-header.jsx-406a4b203a33e9d1{display:flex;flex-direction:column;gap:8px}.modal-content-footer.jsx-406a4b203a33e9d1{display:flex;flex-direction:column;gap:20px}"})]})})};var h=n(28115),g=n(32412),y=n(50698),b=n(77149);let w=function(){let e,t,n,i,{isEditing:v}=(0,y.PC)(),{t:w}=(0,a.B)(["pages/admin/site/edit"]),{releasePreview:x}=(0,g.ph)(),E=w(v?"In Edit mode":"Published"),{isEditing:k}=(0,y.PC)(),{discardPreview:C}=(0,g.ph)(),{isModalOpen:Y,confirmNavigation:A,cancelNavigation:F,setIsModalOpen:P,handleLeave:$}=((e,t,n)=>{let[o,i]=(0,d.useState)(!1),[r,a]=(0,d.useState)(""),l=(0,h.R)(),s=(0,d.useCallback)(e=>{let r=!t||o||n(e);return r||(i(!0),a(e)),{continueRedirect:r}},[t,o,n]),c=(0,d.useCallback)(()=>{e(),i(!1),r&&l.push(r)},[r,l,e]),u=(0,d.useCallback)(()=>{i(!1);let e=l.getPath();e&&l.replaceRoute(e)},[l]);return{isModalOpen:o,setIsModalOpen:i,confirmNavigation:c,cancelNavigation:u,handleLeave:s}})(C,k,e=>e.includes(c.URL_PREFIX.ADMIN_SITE_EDIT)),{reloadWithoutAlert:_}=(e=(0,d.useRef)(!1),t=(0,d.useCallback)(()=>{e.current=!0,window.location.reload()},[]),(0,d.useEffect)(()=>{if(!k)return;let t=t=>{if(e.current){e.current=!1;return}t.preventDefault(),t.returnValue=""};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[k]),{reloadWithoutAlert:t});(0,l.A)(C),n=(0,h.R)(),i=(0,d.useCallback)(e=>{let{continueRedirect:t}=$(e);if(!t)throw n.events.emit("routeChangeError"),Error},[n,$]),(0,d.useEffect)(()=>(n.events.on("routeChangeStart",i),()=>{n.events.off("routeChangeStart",i)}),[i,n.events]),(0,s.A)(C);let[D,T]=(0,d.useState)(!1),R=(0,d.useCallback)(async()=>{T(!0);try{await x(),_()}catch{(0,b.i)(),T(!1)}},[x,_]);return(0,o.FD)(o.FK,{children:[(0,o.FD)("div",{className:r().dynamic([["741906d106fa2001",[m.Q1.user.border.default,m.Q1.user.background.default]]])+" release-button-area",children:[(0,o.Y)(f.E,{children:E}),(0,o.Y)(u.$,{"data-cy":"site-state-changes-release-button",onClick:R,loading:D,children:w("Publish")}),(0,o.Y)(r(),{id:"741906d106fa2001",dynamic:[m.Q1.user.border.default,m.Q1.user.background.default],children:`.release-button-area.__jsx-style-dynamic-selector{border-bottom:1px solid ${m.Q1.user.border.default};background-color:${m.Q1.user.background.default};display:flex;justify-content:end;gap:8px;align-items:center;padding:8px}`})]}),(0,o.Y)(p,{isOpen:Y,setIsOpen:P,confirmNavigation:A,cancelNavigation:F})]})}},88816:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(53763);let i=function(e){(0,o.A)(function(){e()})}},90384:(e,t,n)=>{"use strict";n.d(t,{a:()=>d});var o=n(45023);n(36439);var i=n(30915),r=n(39282);function d({as:e="div",id:t,children:n,"data-cy":i,reverseOrder:r=!1,...l}){return(0,o.Y)(e,{id:t,css:a({reverseOrder:r,...l}),"data-cy":i,children:n})}let a=({gap:e,columnGap:t,rowGap:n,width:o,height:d,alignItems:a,justifyContent:l,flexGrow:s,flexShrink:c,flexBasis:u,reverseOrder:f})=>(0,i.AH)("display:flex;",void 0!==e&&`gap: ${r.Kz[e]};`," ",void 0!==t&&`column-gap: ${r.Kz[t]};`," ",void 0!==n&&`row-gap: ${r.Kz[n]};`," ",void 0!==o&&`width: ${r.Po[o]};`," ",void 0!==d&&`height: ${r.Ch[d]};`,"  align-items:",a,";justify-content:",l,";",void 0!==s&&`flex-grow: ${s};`," ",void 0!==c&&`flex-shrink: ${c};`," ",void 0!==u&&`flex-basis: ${"number"==typeof u?`${u}px`:u};`,"  flex-direction:",f?"column-reverse":"column",";")},98677:(e,t,n)=>{"use strict";n.d(t,{a:()=>p});var o=n(45023),i=n(36439),r=n(30915),d=n(39282),a=n(30020);
3function l(e){let{targetRef:t}=e;(0,i.useEffect)(()=>(t.current&&(0,a.mh)(t.current),()=>{(0,a.qY)()}))}let s=function({type:e="modalWindow",onClick:t}){let n=(0,i.useRef)(null);return l({targetRef:n}),(0,o.Y)("div",{ref:n,css:c(e),"aria-label":"Backdrop",tabIndex:0,onClick:t,onKeyDown:e=>{"Enter"===e.key&&t&&t()}})},c=e=>(0,r.AH)("position:fixed;top:0;left:0;width:100%;height:100%;background-color:",d.Q1.user.background.subdued,";opacity:0.8;z-index:",d.Pj[e]-1,";");var u=n(51495),f=n(90384),m=n(40794),v=n(82501);function p({isOpen:e=!1,setIsOpen:t,title:n,content:r,maxWidth:d,isCloseButton:a,isCloseOutside:c=!0}){let y=i.useRef(null),b=()=>{t(!1)};return l({targetRef:y}),(0,o.Y)(o.FK,{children:e&&(0,o.FD)(o.FK,{children:[(0,o.Y)(u.A,{children:(0,o.FD)("div",{css:h(d),ref:y,children:[a&&(0,o.Y)("span",{css:g,children:(0,o.Y)(m.$,{onClick:b,type:"delete",size:"small"})}),(0,o.FD)(f.a,{gap:3,children:[n&&(0,o.Y)(v.E,{fontWeight:"bold",children:n}),r]})]})}),(0,o.Y)(s,{onClick:c?b:void 0})]})})}let h=e=>(0,r.AH)("padding:",d.Kz[10]," ",d.Kz[9],";border-radius:",d.TI[9],";border:1px solid ",d.Q1.user.border.default,";background-color:",d.Q1.user.background.white,";position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);max-width:",e||327,"px;z-index:",d.Pj.modalWindow,";"),g=(0,r.AH)("position:absolute;top:",d.Kz[6],";right:",d.Kz[6],";")}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=13467)),_N_E=e.O()}]);
4//# sourceMappingURL=ReleaseButton-fdcde4e8aadf60e4.js.map
5//# debugId=c85d50d2-6119-564a-8353-1716676edf87

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.