PageSourceSearch

https://de.serlo-staging.dev/_next/static/chunks/pages/taxonomy/te…/[parent_id]/[id]-490f406fdee041dd.js

js serlo-staging.dev collected 2026-09-25 22:46:30 UTC 8,415 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4250],{1480:function(t,e,n){"use strict";var r=n(32408);e.DF={prefix:r.prefix,iconName:r.iconName,icon:[r.width,r.height,r.aliases,r.unicode,r.svgPathData]},e.e7=e.DF,r.prefix,r.iconName,r.width,r.height,r.aliases,r.unicode,r.svgPathData,r.aliases},82090:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/taxonomy/term/create/[parent_id]/[id]",function(){return n(74821)}])},55436:function(t,e,n){"use strict";n.r(e),n.d(e,{fetchAndPersistAuthSession:function(){return o}});var r=n(88507),i=n(99674);async function o(t,e){try{let n=void 0===e?(await i.A.toSession()).data:e;return r.D.set(n),t&&t(n),n}catch(e){return r.D.remove(),t&&t(null),null}}},99674:function(t,e,n){"use strict";n.d(e,{A:function(){return a}});var r=n(68962),i=n(35474);let o=new r.V({basePath:"/api/.ory"}),a=new i.eR(o)},19812:function(t,e,n){"use strict";n.d(e,{c:function(){return l}});var r=n(52322),i=n(97729),o=n.n(i),a=n(5632),s=n(31668),u=n(59540),c=n(88520);function l(t){let{data:e,breadcrumbsData:n,noIndex:i}=t,{title:l,contentType:d,metaDescription:m,metaImage:f,canonicalUrl:p}=e,{strings:y,lang:g}=(0,s.xN)(),h=(0,a.useRouter)(),x=null!=p?p:"https://".concat(g,".serlo.org")+h.asPath.split("?")[0];return(0,r.jsxs)(o(),{children:[(0,r.jsx)("title",{children:l}),(0,r.jsx)("link",{rel:"canonical",href:x}),d&&(0,r.jsx)("meta",{name:"content_type",content:d}),m&&(0,r.jsx)("meta",{name:"description",content:m}),(0,r.jsx)("meta",{property:"og:site_name",content:"serlo.org"}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:title",content:l}),(0,r.jsx)("meta",{property:"og:url",content:x}),(0,r.jsx)("meta",{property:"og:description",content:null!=m?m:y.header.slogan}),function(){let t=null==n?void 0:n.filter(t=>t.id===u.Z);return i||t&&t.length>0||e.title.startsWith("Testbereich")?(0,r.jsx)("meta",{name:"robots",content:"noindex"}):null}(),(0,r.jsx)("meta",{property:"og:image",name:"image",content:f||"https://".concat(g,".").concat(c.b,"/_assets/img/meta/serlo.png")}),(0,r.jsx)("meta",{property:"og:image:width",content:"1200"}),(0,r.jsx)("meta",{property:"og:image:height",content:"630"})]})}},71828:function(t,e,n){"use strict";n.d(e,{W:function(){return L}});var r=n(52322),i=n(1480),o=n(2784),a=n(58885),s=n(30675),u=n(19812),c=n(65183),l=n(51515),d=n(38719),m=n(55436),f=n(67063),p=n(31668),y=n(9063),g=n(59540),h=n(38231),x=n(94671),v=n(63830),w=n(5632),j=n(73235),_=n(2409);function T(){let t=(0,j._)(["\n  mutation setAbstractEntity($input: SetAbstractEntityInput!) {\n    entity {\n      setAbstractEntity(input: $input) {\n        __typename\n        success\n        record {\n          id\n        }\n      }\n    }\n  }\n"]);return T=function(){return t},t}let b=(0,_.Ps)(T());var P=n(62378),I=n(22428),A=n(6117),E=n(95529),N=n(85566),O=n(63092);function S(t,e,n){if(!n||!n.trim()){let n="".concat(t.errors.valueMissing,' ("').concat(e,'")');throw(0,v.U)(n,"warning"),Error(n)}return n}var D=n(84185),k=n(98041);function C(){let t=(0,j._)(["\n  mutation taxonomyTermSetNameAndDescription(\n    $input: TaxonomyTermSetNameAndDescriptionInput!\n  ) {\n    taxonomyTerm {\n      setNameAndDescription(input: $input) {\n        success\n      }\n    }\n  }\n"]);return C=function(){return t},t}function R(){let t=(0,j._)(["\n  mutation taxonomyCreate($input: TaxonomyTermCreateInput!) {\n    taxonomyTerm {\n      create(input: $input) {\n        success\n      }\n    }\n  }\n"]);return R=function(){return t},t}let $=(0,_.Ps)(C()),U=(0,_.Ps)(R());var F=n(85941);function L(t){let{initialState:e,type:n,id:j,taxonomyParentId:_,breadcrumbsData:T}=t,{strings:C}=(0,p.xN)(),R=(0,f.J)(),L=!!(T&&T.some(t=>t.id===g.Z)),V=function(){let t=(0,E.t)(),e=(0,I.K)(),n=(0,w.useRouter)(),r=(0,o.useContext)(A.Dz),i=null==r?void 0:r.entityId,a=null==r?void 0:r.metaTitle,s=null==r?void 0:r.metaDescription;if(!t)return!1;let u=t.strings.mutations;return async(t,r)=>{return await o({data:t,taxonomyParentId:r});async function o(t){let r,{data:o,taxonomyParentId:c}=t;if(!o.__typename)return console.error("no typename"),!1;if(!i)return console.error("no entityId"),!1;let l=await (0,P.A)(i),d={};try{let t=function(t,e){let{__typename:n,changes:r,content:i}=e;if(!n)return;let o=n===y.fO.Page?"Page":S(t,"changes",r);return{entityType:n,changes:o,content:S(t,"content",i),needsReview:!0,subscribeThis:!0,subscribeThisByEmail
1:!1}}(u,o);if(!t)return console.error("no generic input data"),!1;let e=function(t,e){let{title:n,url:r,content:i,description:o}=e;switch(e.__typename){case y.fO.Course:case y.fO.Article:case y.fO.Event:case y.fO.Page:return{title:S(t,"title",n)};case y.fO.Exercise:case y.fO.ExerciseGroup:break;case y.fO.Video:return{title:S(t,"title",n),url:S(t,"url",i),content:S(t,"content",o)};case y.fO.Applet:return{title:S(t,"title",n),url:S(t,"url",r)}}return{}}(u,o);d={entityId:c?null:i,...t,...e,metaTitle:a,metaDescription:s,parentId:t.entityId?void 0:c}}catch(t){return console.error("error collecting data, probably missing value?",t),!1}try{if(r=await e(b,d),!Number.isInteger(r))return console.error("no valid savedId returned"),!1}catch(t){return console.error("error saving main uuid",t),!1}(0,v.U)(u.success.saveNeedsReview,"success",7e3);let m=0===r?void 0:r,f=c?m:i||m,p=f?(0,N.e)(f):"/".concat(c);return l&&await (0,P.t)(l),setTimeout(()=>n.push(p+O.z),200),!0}}}(),z=function(){let t=(0,E.t)(),e=(0,I.K)(),n=(0,D.X)(),r=(0,w.useRouter)(),i=(0,o.useContext)(A.Dz),a=null==i?void 0:i.entityId;return async i=>{if(!t)return(0,v.U)("Please make sure you are logged in!","warning"),!1;let o=t.strings.mutations;try{let t={id:a,name:S(o,"name",i.term.name),description:S(o,"description",i.description)},[,,,,s,u]=r.asPath.split("/"),c=a?await e($,t):await e(U,{...t,parentId:parseInt(u),taxonomyType:function(t){if(!t||!parseInt(t))throw Error("invalid url -> unknown taxonomy type");let e=parseInt(t);if([4,16,33,42,48,53].includes(e))return k.Q2.Topic;if([9,19,36,45,51,56].includes(e))return k.Q2.ExerciseFolder;throw Error("unknown taxonomy type")}(s)});return n({success:c,toastKey:"save",redirectUrl:"/".concat(null!=a?a:u)})}catch(t){return console.error(t,"probably missing value?"),!1}}}(),[K,Q]=(0,o.useState)(void 0),W=n===y.fO.Page;if((0,o.useEffect)(()=>{(async function(){await (0,m.fetchAndPersistAuthSession)(),Q(!x.y||null!==R)})(),void 0===K||R||(0,v.U)(C.notices.warningLoggedOut,"warning",18e3)},[R,C]),!V||!j&&!W&&!_)return null;if(void 0===K)return(0,r.jsx)(l.T,{noText:!0});if(!1===K)return(0,r.jsxs)(c.V,{icon:i.e7,type:"failure",children:["Sorry, Something is wrong!",(0,r.jsx)("br",{}),"Please: Logout and Login again and try to edit again.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{})," If that does not work head to"," ",(0,r.jsx)(s.r,{href:a.x4,children:a.x4})," and make sure you are logged in there."]});let X=async t=>{if(n===y.fO.TaxonomyTerm)return await z(t)?Promise.resolve():Promise.reject();let e={__typename:n,...t};return await V(e,_)?Promise.resolve():Promise.reject()},Z=(0,h.g)(C,n),J="".concat(C.editOrAdd.button," | ").concat(Z).concat(j?" (".concat(j,")"):"");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.c,{data:{title:J}}),function(){if(!T)return null;let t={label:C.revisions.toContent,url:"/".concat(null!=j?j:_)};return(0,r.jsx)(d.O,{data:[...T,t]})}(),(0,r.jsx)(F.R,{onSave:X,isInTestArea:L,initialState:e})]})}},59540:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});let r=106082},85566:function(t,e,n){"use strict";function r(t){return"/entity/repository/history/".concat(t)}n.d(e,{e:function(){return r}})},74821:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSP:function(){return d}});var r=n(52322),i=n(8767),o=n(88255),a=n(23306),s=n(94626),u=n(71828),c=n(9063),l=n(53972),d=!0;e.default=(0,l.Q)(t=>{let{parent:e}=t;return(0,r.jsx)(a.V,{noContainers:!0,noIndex:!0,loadLoggedInData:!0,children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(s.P,{children:(0,r.jsx)("main",{children:(0,r.jsx)(u.W,{type:c.fO.TaxonomyTerm,id:e,initialState:{...(0,i.J)("serlo-org"),document:{plugin:o.k.Taxonomy,state:{term:{name:""},description:'{"plugin":"rows"}'}}},errorType:"none"})})})," "]})})})}},function(t){t.O(0,[4786,5089,4856,6760,2941,2409,8870,4233,2627,3998,8834,9989,8384,3306,9692,440,2944,6179,2888,9774,179],function(){return t(t.s=82090)}),_N_E=t.O()}]);
2//# sourceMappingURL=[id]-490f406fdee041dd.js.map

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.