(this["webpackJsonpprofile-picture-generator"]=this["webpackJsonpprofile-picture-generator"]||[]).push([[0],{38:function(e,t,n){},42:function(e,t,n){var a={"./0xSOM.png":[50,13],"./2xSOM-Blue-Green.png":[51,14],"./2xSOM-Red-Yellow.png":[52,15],"./4xSOM-Blue-Red-Yellow-Green.png":[53,16],"./5xSOM-Blue.png":[54,17],"./5xSOM-Green.png":[55,18],"./5xSOM-Pride.png":[56,19],"./5xSOM-Red.png":[57,20],"./5xSOM-White.png":[58,21],"./5xSOM-Yellow.png":[59,22],"./Volt-Stars.png":[60,23],"./btw_Meine_Stimme_Balken.png":[61,24],"./btw_Meine_Stimme_Sterne_bunt.png":[62,25],"./btw_Meine_Stimme_Sterne_lila.png":[63,26],"./btw_VoteVolt_Balken.png":[64,27],"./btw_VoteVolt_Sterne_bunt.png":[65,28],"./btw_VoteVolt_Sterne_lila.png":[66,29]};function c(e){if(!n.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],c=t[0];return n.e(t[1]).then((function(){return n(c)}))}c.keys=function(){return Object.keys(a)},c.id=42,e.exports=c},43:function(e,t,n){var a={"./#DeineWahl.png":[67,30],"./#EUReform.png":[68,31],"./#Europa.png":[69,32],"./#EuropeCares.png":[70,33],"./#European.png":[71,34],"./#FutureMadeInEurope.png":[72,35],"./#GenerationEuropa.png":[73,36],"./#IkStemVolt.png":[74,37],"./#JetztBistDuDran.png":[75,38],"./#JoinTheChange.png":[76,39],"./#RejoinEU.png":[77,40],"./#ValuesOverPower.png":[78,41],"./#Volt.png":[79,42],"./#Volt21.png":[80,43],"./#VoltEuropa.png":[81,44],"./#VoltForLGBTIAQ.png":[82,45],"./#VoltRLP.png":[83,46],"./#VoteVolt.png":[84,47],"./#ZukunftMadeInEurope.png":[85,48],"./#democracy.png":[86,49],"./#paneurop\xe4isch.png":[87,50],"./#pragmatisch.png":[88,51],"./#progressiv.png":[89,52],"./stemvolt.nl.png":[90,53]};function c(e){if(!n.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],c=t[0];return n.e(t[1]).then((function(){return n(c)}))}c.keys=function(){return Object.keys(a)},c.id=43,e.exports=c},48:function(e,t,n){var a={"./de.ftl":[91,3],"./en.ftl":[92,4],"./es.ftl":[93,5],"./fr.ftl":[94,6],"./it.ftl":[95,7],"./nl.ftl":[96,8],"./pl.ftl":[97,9],"./pt.ftl":[98,10],"./ru.ftl":[99,11]};function c(e){if(!n.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],c=t[0];return n.e(t[1]).then((function(){return n(c)}))}c.keys=function(){return Object.keys(a)},c.id=48,e.exports=c},49:function(e,t,n){"use strict";n.r(t);var a=n(5),c=n(2),r=n(1),o=n(0),s=n.n(o),i=n(25),u=n.n(i),O=n(13),l=n(6),h=n(32),d=(n(38),n(30)),j=n(27),b=n(4),p=n.n(b),f=n(9);var g=function(e){var t=e.onChange,a=Object(o.useState)([]),s=Object(c.a)(a,2),i=s[0],u=s[1],O=Object(o.useState)(null),l=Object(c.a)(O,2),h=l[0],d=l[1],j=h?h.src:null;Object(o.useEffect)((function(){function e(){return(e=Object(f.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Promise.all(["btw_VoteVolt_Balken","btw_Meine_Stimme_Balken","4xSOM-Blue-Red-Yellow-Green","btw_VoteVolt_Sterne_bunt","btw_Meine_Stimme_Sterne_bunt","Volt-Stars","btw_VoteVolt_Sterne_lila","btw_Meine_Stimme_Sterne_lila","0xSOM","5xSOM-Blue","5xSOM-Green","5xSOM-Red","5xSOM-Yellow"].map(function(){var e=Object(f.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,n(42)("./".concat(t,".png"));case 3:return e.t1=e.sent.default,e.abrupt("return",{name:e.t0,src:e.t1});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){u(e),d(e[0])}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]);var b=Object(o.useCallback)((function(e){d(e)}),[d]);return Object(o.useEffect)((function(){t(h)}),[t,h]),Object(r.jsx)("div",{className:"FrameChooser",children:i.map((function(e){var t=e.src,n=j===t;return Object(r.jsx)("div",{"data-src":t,className:n?"frame choosen":"frame",onClick:function(){return b(e)},children:Object(r.jsx)("img",{alt:e.name,src:t})},t)}))})},w=n(17),m=n(10),x=function(e){return Object(r.jsx)(w.b,Object(l.a)(Object(l.a)({},e),{},{elems:Object(l.a)({br:Object(r.jsx)("br",{})},e.elems),children:Object(r.jsx)(s.a.Fragment,{children:e.children})}),e.id)};function v(e){return function(t){var n=s.a.useContext(m.a);return s.a.createElement(e,Object(l.a)({getString:function(e,t,a){return n.getString(e,t,a||" ")}},t))}}var A=v((function(e){var t=e.onChange,a=e.getString,s=Object(o.useState)([]),i=Object(c.a)(s,2),u=i[0],l=i[1],h=Object(o.useState)(null),d=Object(c.a)(h,2),j=d[0],b=d[1],g=j?j.src:null,w=a("hashtags");Object(o.useEffect)((function(){function e(){return(e=Object(f.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Promise.all([""].concat(Object(O.a)(w.split("\n").map((function(e){return e.trim()})).filter((function(e){return e.length>0})))).map(function(){var e=Object(f.a)(p.a.mark((function e(t){var a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t,""===t){e.next=5;break}return e.next=4,n(43)("./".concat(t,".png"));case 4:a=e.sent.default;case 5:return e.abrupt("return",{name:t,src:a});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){l(e),b(e[0])}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[w]);var m=Object(o.useCallback)((function(e){b(e)}),[b]);return Object(o.useEffect)((function(){t(j)}),[t,j]),Object(r.jsx)("div",{className:"HashtagChooser",children:u.map((function(e){var t=e.src,n=g===t;return Object(r.jsx)("button",{"data-src":t,className:n?"isInRow choosen":"isInRow",onClick:function(){return m(e)},children:""===e.name?a("button_no_hashtag"):e.name},e.name)}))})})),C=n(28),D=n.n(C),Q=n(29),H=n.n(Q);function T(e,t,n){return Math.min(Math.max(t,e),n)}var _=function(e){var t=e.onChange,n=e.backgroundURL,a=e.backgroundRatio,s=e.frameURL,i=e.hashtagURL,u=Object(o.useRef)(null),O=Object(o.useRef)(null),l=Object(o.useState)(!1),h=Object(c.a)(l,2),d=h[0],j=h[1],b=Object(o.useState)(null),p=Object(c.a)(b,2),f=p[0],g=p[1],w=Object(o.useState)(null),m=Object(c.a)(w,2),x=m[0],v=m[1],A=Object(o.useState)(0),C=Object(c.a)(A,2),Q=C[0],_=C[1],S=Object(o.useState)(0),U=Object(c.a)(S,2),N=U[0],k=U[1],F=Object(o.useState)(0),E=Object(c.a)(F,2),M=E[0],y=E[1],K=Object(o.useState)(0),B=Object(c.a)(K,2),R=B[0],L=B[1],I=Object(o.useState)(1),V=Object(c.a)(I,2),P=V[0],Y=V[1],G=Object(o.useState)(300),z=Object(c.a)(G,2),J=z[0],X=z[1],W=Object(o.useState)(300),q=Object(c.a)(W,2),Z=q[0],$=q[1],ee=Object(o.useState)(300),te=Object(c.a)(ee,2),ne=te[0],ae=te[1],ce=Object(o.useState)(300),re=Object(c.a)(ce,2),oe=re[0],se=re[1],ie=Object(o.useState)(0),ue=Object(c.a)(ie,2),Oe=ue[0],le=ue[1],he=Object(o.useState)(0),de=Object(c.a)(he,2),je=de[0],be=de[1],pe=Object(o.useState)(0),fe=Object(c.a)(pe,2),ge=fe[0],we=fe[1],me=Object(o.useState)(0),xe=Object(c.a)(me,2),ve=xe[0],Ae=xe[1];Object(o.useEffect)((function(){t&&t({x:Q,y:N,scale:P})}),[t,Q,N,P]),Object(o.useEffect)((function(){if(u&&u.current){var e=u.current.offsetWidth,t=u.current.offsetHeight;se(t),ae(e);var n=1,c=1;a<1?n=1/a:a>1&&(c=1*a),X(n),$(c)}}),[a]),Object(o.useEffect)((function(){var e=function(e,t,n,a,c){var r=Math.max(0,e*n-a)/2,o=Math.max(0,t*n-c)/2;return{rangeMaxX:r,rangeMinX:0-r,rangeMaxY:o,rangeMinY:0-o}}(J*ne,Z*oe,P,ne,oe),t=e.rangeMinX,n=e.rangeMinY,a=e.rangeMaxX,c=e.rangeMaxY;le(t),be(n),we(a),Ae(c)}),[J,Z,ne,oe,P]),Object(o.useEffect)((function(){_(0),k(0),y(0),L(0),Y(1)}),[n]);var Ce=Object(o.useCallback)((function(e){var t=1*e.target.dataset.x,n=1*e.target.dataset.y,a=T(t+e.deltaX,Oe,ge),c=T(n+e.deltaY,je,ve);e.isFinal?(_(a||0),k(c||0),y(0),L(0)):(y(a-t||0),L(c-n||0))}),[Oe,je,ge,ve]),De=Object(o.useCallback)((function(e,t,n,a){e.preventDefault();var c=T(1*e.target.dataset.scale+t/200,1,8);Y(c||1);var r=1*e.target.dataset.x,o=1*e.target.dataset.y;_(T(r,Oe,ge)||0),k(T(o,je,ve)||0)}),[Oe,je,ge,ve]);return Object(o.useEffect)((function(){if(!d&&u&&u.current){var e=u.current;e.addEventListener("mousedown",(function(e){e.preventDefault()}),!1),e.addEventListener("touchstart",(function(e){e.preventDefault()}),!1),e.addEventListener("touchend",(function(e){e.preventDefault()}),!1),e.addEventListener("touchmove",(function(e){e.preventDefault()}),!1),g(new D.a(e,{direction:"DIRECTION_ALL"})),v(H()(e)),j(!0)}}),[u,d]),Object(o.useEffect)((function(){if(f&&x&&d&&u&&u.current)return f.on("pan",Ce),x.wheel(De),function(){f.off("pan",Ce),x.unwheel()}}),[u,Ce,De,d,f,x]),Object(r.jsxs)("div",{className:"Editor",ref:u,"data-x":Q,"data-y":N,"data-scale":P,children:[Object(r.jsx)("img",{src:n,ref:O,alt:"",className:"background",style:{width:100*J+"%",height:100*Z+"%",transform:"translate3d(calc(-50% + ".concat(Q+M,"px), calc(-50% + ").concat(N+R,"px), 0) scale(").concat(P,",").concat(P,")")}}),Object(r.jsx)("img",{src:s,alt:"",className:"foreground"}),Object(r.jsx)("img",{src:i,alt:"",className:"hashtag"})]})},S=n.p+"static/media/VoltLogoPurple.125355f6.svg",U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAQ4AgMAAACRfoQcAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJUExURVAjeFAjeE8jd3Yl3xwAAAADdFJOU//+/Q3dsqEAAATsSURBVHgB7dAxAQAABAAwQtI/ipMCvi3CgiMV6NChQ4cOHTp06NChQ4cOHTp06NChAx06dOjQoUOHDh06dOjQoUOHDh06dOhAhw4dOnTo0KFDhw4dOnTo0KFDhw4dOtChQ4cOHTp06NChQ4cOHTp06NChQ4cOdOjQoUOHDh06dOjQoUOHDh06dOjQoQMdOnTo0KFDhw4dOnTo0KFDhw4dOnToQIcOHTp06NChQ4cOHTp06NChQ4cOHejQoUOHDh06dOjQoUOHDh06dOjQoUMHOnTo0KFDhw4dOnTo0KFDhw4dOnTo0IEOHTp06NChQ4cOHTp06NChQ4cOHTp0oEOHDh06dOjQoUOHDh06dOjQoUOHDh3o0KFDhw4dOnTo0KFDhw4dOnTo0KFDBzp06NChQ4cOHTp06NChQ4cOHTp06NChQIcOHTp06NChQ4cOHTp06NChQ4cOHejQoUOHDh06dOjQoUOHDh06dOjQoUMHOnTo0KFDhw4dOnTo0KFDhw4dOnTo0IEOHTp06NChQ4cOHTp06NChQ4cOHTp0oEOHDh06dOjQoUOHDh06dOjQoUOHDh3o0KFDhw4dOnTo0KFDhw4dOnTo0KFDBzp06NChQ4cOHTp06NChQ4cOHTp06ECHDh06dOjQoUOHDh06dOjQoUOHDh060KFDhw4dOnTo0KFDhw4dOnTo0KFDhw506NChQ4cOHTp06NChQ4cO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AARnQU1BAACxjwv8YQUAAAALSURBVHgBY2BgAAAAAwABjPg5OgAAAABJRU5ErkJggg==",k=1080;function F(e){var t=e.href,n=e.name,a=e.target,c=e.children,s=Object(h.a)(e,["href","name","target","children"]),i=Object(o.useCallback)((function(e){return window.umami&&n&&window.umami.trackEvent("A: "+n),a?window.open(t,a):setTimeout((function(){window.location=t}),200),e.preventDefault(),!1}),[t,n,a]);return Object(r.jsx)("a",Object(l.a)(Object(l.a)({},s),{},{href:t,onClick:i,children:c}))}var E=v((function(e){var t=e.getString,n=e.locales,a=e.currentLocale,s=e.onLanguageChange,i=Object(o.useState)(null),u=Object(c.a)(i,2),h=u[0],b=u[1],p=Object(o.useState)(null),f=Object(c.a)(p,2),w=f[0],m=f[1],v=Object(o.useState)(null),C=Object(c.a)(v,2),D=C[0],Q=C[1],H=Object(o.useState)(1),T=Object(c.a)(H,2),E=T[0],M=T[1],y=Object(o.useState)(null),K=Object(c.a)(y,2),B=K[0],R=K[1],L=h?h.src:null,I=w?w.src:null,V=Object(o.useState)(0),P=Object(c.a)(V,2),Y=P[0],G=P[1],z=Object(o.useState)(0),J=Object(c.a)(z,2),X=J[0],W=J[1],q=Object(o.useState)({x:0,y:0,scale:1}),Z=Object(c.a)(q,2),$=Z[0],ee=Z[1],te=Object(o.useCallback)((function(e){b(e)}),[b]),ne=Object(o.useCallback)((function(e){m(e)}),[m]),ae=Object(o.useCallback)((function(e){var t=e.x,n=e.y,a=e.scale;ee({x:t,y:n,scale:a})}),[]),ce=Object(o.useCallback)((function(e){if(e){var t=new FileReader;t.onload=function(t){var n=new Image;n.onload=function(){var a,c;n.width0?e[0]:"")}),[l]);return Object(r.jsx)(G,{userLocales:n,onLocaleChange:d,children:Object(r.jsx)(E,{locales:R,currentLocale:O,onLanguageChange:h})},"AppLocalizationProvider")}u.a.render(Object(r.jsx)(s.a.StrictMode,{children:Object(r.jsx)(z,{})}),document.getElementById("root")),M()}},[[49,1,2]]]); //# sourceMappingURL=main.6d275b14.chunk.js.map