1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[455],{5741:function(e,a,n){var l=n(5893),i=n(7294),t=n(4184),s=n.n(t),_=n(1163),r=n(1664),o=n.n(r),d=n(7484),m=n.n(d),c=n(9828),u=n(6486),v=n(3306),p=n(5787),h=n(47);let f=e=>{var a,n,t,r,d;let{editData:f,isLoading:x=!1}=e,b=(0,_.useRouter)(),[j,w]=i.useState(!1),[g,N]=i.useState(""),A=null==f?void 0:null===(a=f.newsContent)||void 0===a?void 0:a.content;return(i.useEffect(()=>{N(A)},[A]),x)?null:(0,l.jsxs)("form",{className:"Admin__form",onSubmit:async e=>{var a,n,l,i,t,s,_;e.preventDefault();let r=null===(a=null==e?void 0:e.target)||void 0===a?void 0:a.elements,o={language:null===(n=null==r?void 0:r.namedItem("language"))||void 0===n?void 0:n.value,url:null===(l=null==r?void 0:r.namedItem("url"))||void 0===l?void 0:l.value,publishAt:Number(m()(null===(i=null==r?void 0:r.namedItem("publishAt"))||void 0===i?void 0:i.value)),topic:null===(t=null==r?void 0:r.namedItem("topic"))||void 0===t?void 0:t.value};if((0,u.isNil)(f)){let e=await (0,c.ET)((0,c.hJ)(v.db,"news"),o);o={...o,_id:null==e?void 0:e.id}}else await (0,c.pl)((0,c.JU)(v.db,"news",null==f?void 0:null===(s=f.news)||void 0===s?void 0:s._id),o),o={...o,_id:null==f?void 0:null===(_=f.news)||void 0===_?void 0:_._id};await (0,c.pl)((0,c.JU)(v.db,"news-contents",null==o?void 0:o._id),{content:null!=g?g:""}),b.push(p.x1)},children:[(0,l.jsxs)("div",{className:"Admin__form__row",children:[(0,l.jsxs)("label",{className:"Admin__form__label",children:[(0,l.jsx)("span",{className:"Admin__form__label__span",children:"News languages"}),(0,l.jsxs)("select",{className:"Admin__form__label__input Admin__form__label__input--select",name:"language",defaultValue:null==f?void 0:null===(n=f.news)||void 0===n?void 0:n.language,children:[(0,l.jsx)("option",{value:"ja",children:"Japanese"}),(0,l.jsx)("option",{value:"en",children:"English"})]})]}),(0,l.jsxs)("label",{className:"Admin__form__label",children:[(0,l.jsx)("span",{className:"Admin__form__label__span",children:"PR URL link"}),(0,l.jsx)("input",{type:"text",className:"Admin__form__label__input",name:"url",defaultValue:null==f?void 0:null===(t=f.news)||void 0===t?void 0:t.url})]})]}),(0,l.jsxs)("label",{className:"Admin__form__label",children:[(0,l.jsx)("span",{className:"Admin__form__label__span",children:"Publish at"}),(0,l.jsx)("input",{type:"datetime-local",className:"Admin__form__label__input",defaultValue:m()(null==f?void 0:null===(r=f.news)||void 0===r?void 0:r.publishAt).format("YYYY-MM-DD HH:mm"),name:"publishAt"})]}),(0,l.jsxs)("label",{className:"Admin__form__label",children:[(0,l.jsx)("span",{className:"Admin__form__label__span",children:"Topic"}),(0,l.jsx)("input",{type:"text",className:"Admin__form__label__input",name:"topic",defaultValue:null==f?void 0:null===(d=f.news)||void 0===d?void 0:d.topic})]}),(0,l.jsxs)("div",{className:"Admin__form__label",children:[(0,l.jsx)("span",{className:"Admin__form__label__span",children:"Content"}),(0,l.jsxs)("small",{className:"Admin__form__label__small",children:["In order for a local content to work, PR URL link has to be empty."," ",(0,l.jsx)("br",{}),"How to write a Markdown:"," ",(0,l.jsx)("a",{href:"https://www.markdownguide.org/cheat-sheet/",target:"_blank",rel:"nofollow noopener noreferrer",children:"https://www.markdownguide.org/cheat-sheet/"}),". ",(0,l.jsx)("br",{}),"Available elements are: h2, h3, bold, italic, blockquote, ordered list, unordered list, link, and image."]}),(0,l.jsxs)("div",{className:"Admin__form__label__tabs",children:[(0,l.jsxs)("div",{className:"Admin__form__label__tabs__nav",children:[(0,l.jsx)("a",{className:s()("Admin__form__label__tabs__nav__a",{"Admin__form__label__tabs__nav__a--active":!j}),onClick:()=>{w(!1)},children:"Editor"}),(0,l.jsx)("a",{className:s()("Admin__form__label__tabs__nav__a",{"Admin__form__label__tabs__nav__a--active":j}),onClick:()=>{w(!0)},children:"Preview"})]}),j?(0,l.jsx)("div",{className:"Admin__form__label__input",children:(0,l.jsx)("div",{className:"Admin__form__label__input__markdown",children:(0,l.jsx)(h.Z,{content:g})})}):(0,l.jsx)("textarea",{className:"Admin__form__label__input",rows:20,value:g,onChange:e=>{var a;N(null==e?void 0:null===(a=e.target)||void 0===a?void 0:a.value)}})]})]}),(0,l.jsxs)("div",{className:"Admin__form__buttons",children:[(0,l.jsx)("button",{className:"Admin__form__buttons__a",children:"Submit"}),(0,l.jsx)(o(),{className:"Admin__form__buttons__a Admin__form__buttons__a--gray",href:p.x1,children:"Cancel"})]})]})};a.Z=f},5303:function(e,a,n){var l=n(5893),i=n(7294),t=n(4184),s=n.n(t),_=n(1163),r=n(1664),o=n.n(r),d=n(3299),m=n(7927),c=n(3306),u=n(5787);let v=e=>{let{session:a,children:n}=e;return(0,l.jsx)(d.SessionProvider,{session:a,children:(0,l.jsx)(p,{children:n})})};a.Z=v;let p=e=>{var a,n;let{children:t}=e,s=(0,_.useRouter)(),r=(0,d.useSession)();return i.useEffect(()=>{(null==r?void 0:r.status)=="unauthenticated"&&s.pathname!=u.WG&&s.pathname!=u.mH&&(window.location.href=u.WG)},[null==r?void 0:r.status,s.pathname]),(0,l.jsxs)("div",{className:"Admin",children:[(0,l.jsx)("div",{className:"Admin__nav",children:(0,l.jsx)("div",{className:"container",children:s.pathname==u.WG||s.pathname==u.mH?(0,l.jsx)("div",{className:"Admin__nav__sign-in",children:(0,l.jsx)(o(),{href:u.WG,children:(0,l.jsx)("img",{className:"Admin__nav__a__img",src:"/images/Nav__a__img.svg"})})}):(0,l.jsxs)("div",{className:"Admin__nav__wrapper",children:[(0,l.jsx)(o(),{href:u.x1,className:"Admin__nav__a",children:(0,l.jsx)("img",{className:"Admin__nav__a__img",src:"/images/Nav__a__img.svg"})}),(0,l.jsx)("div",{className:"Admin__nav__links",children:null===(n=(a=[{label:"News",href:u.x1},{label:"News resources",href:u.wL}]).map)||void 0===n?void 0:n.call(a,(e,a)=>(0,l.jsx)(o(),{className:"Admin__nav__links__a",href:null==e?void 0:e.href,children:null==e?void 0:e.label},a))}),(0,l.jsx)(h,{})]})})}),t]})},h=()=>{var e,a;let n=(0,d.useSession)(),[t,_]=i.useState(!1);return(0,l.jsxs)("div",{className:s()("Admin__nav__profile",{"Admin__nav__profile--active":t}),children:[(0,l.jsx)("a",{className:"Admin__nav__profile__a",onClick:()=>{_(!0)},children:null==n?void 0:null===(e=n.data)||void 0===e?void 0:null===(a=e.user)||void 0===a?void 0:a.email}),(0,l.jsx)("a",{className:"Admin__nav__profile__overlay",onClick:()=>{_(!1)}}),(0,l.jsx)("div",{className:"Admin__nav__profile__panel",children:(0,l.jsx)("a",{className:"Admin__nav__profile__panel__a",onClick:async()=>{await (0,m.w7)(c.I),await (0,d.signOut)({callbackUrl:u.WG})},children:"Sign out"})})]})}},47:function(e,a,n){var l=n(5893);n(7294);var i=n(8997),t=n(1801),s=n(7994);let _=e=>{let{content:a}=e;return(0,l.jsx)(i.D,{allowedElements:s.t7,remarkPlugins:[t.Z],children:a})};a.Z=_},3149:function(e,a,n){var l=n(5893);n(7294);var i=n(1163),t=n(9008),s=n.n(t);let _=e=>{let{title:a="nanameue, Inc.",description:n="We hope to create the new future where people can smile, have joyful experiences and be themselves. Create a place one can call oneâs own for everyone â by connecting people to people in the ânanameueâ way.",image:t="https://nanameue.jp/images/sh
1are-image-3.png"}=e,_=(0,i.useRouter)(),r="".concat(a," | Community maker"),o="https://nanameue.jp".concat(_.pathname);return(0,l.jsxs)(s(),{children:[(0,l.jsx)("title",{children:r}),(0,l.jsx)("meta",{name:"title",content:r},"title"),(0,l.jsx)("meta",{name:"description",content:n},"description"),!1,(0,l.jsx)("meta",{property:"og:type",content:"website"},"og:type"),(0,l.jsx)("meta",{property:"og:url",content:o},"og:url"),(0,l.jsx)("meta",{property:"og:title",content:r},"og:title"),(0,l.jsx)("meta",{property:"og:description",content:n},"og:description"),(0,l.jsx)("meta",{property:"og:image",content:t},"og:image"),(0,l.jsx)("meta",{property:"twitter:card",content:"summary_large_image"},"twitter:card"),(0,l.jsx)("meta",{property:"twitter:url",content:o},"twitter:url"),(0,l.jsx)("meta",{property:"twitter:title",content:r},"twitter:title"),(0,l.jsx)("meta",{property:"twitter:description",content:n},"twitter:description"),(0,l.jsx)("meta",{property:"twitter:image",content:t},"twitter:image")]})};a.Z=_},3306:function(e,a,n){n.d(a,{I:function(){return o},db:function(){return r},t:function(){return d}});var l=n(3977),i=n(9828),t=n(6650),s=n(7927);let _=(0,l.ZF)({apiKey:"AIzaSyCTUEnEiyNMrpOIW0FR7K9cUFrcNNgzz_Y",authDomain:"nanameue-web.firebaseapp.com",projectId:"nanameue-web",storageBucket:"nanameue-web.appspot.com",messagingSenderId:"76403797442",appId:"1:76403797442:web:7f9246c0a4ec327d877a5b"}),r=(0,i.ad)(_),o=(0,s.v0)(_),d=(0,t.cF)(_)}}]);
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.