(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],"./pride-2022-1.png":[67,30],"./pride-2022-2.png":[68,31],"./ukraine.png":[69,32]};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":[70,33],"./#EUReform.png":[71,34],"./#Europa.png":[72,35],"./#EuropeCares.png":[73,36],"./#European.png":[74,37],"./#FutureMadeInEurope.png":[75,38],"./#GeneratieEuropa.png":[76,39],"./#GeneratieVolt.png":[77,40],"./#GenerationEuropa.png":[78,41],"./#IkStemVolt.png":[79,42],"./#JetztBistDuDran.png":[80,43],"./#JoinTheChange.png":[81,44],"./#RejoinEU.png":[82,45],"./#ValuesOverPower.png":[83,46],"./#Volt.png":[84,47],"./#Volt21.png":[85,48],"./#VoltEuropa.png":[86,49],"./#VoltForLGBTIAQ.png":[87,50],"./#VoltRLP.png":[88,51],"./#VoteVolt.png":[89,52],"./#WirWerdenLaut.png":[90,53],"./#ZukunftMadeInEurope.png":[91,54],"./#ZweitstimmeVolt.png":[92,55],"./#democracy.png":[93,56],"./#paneurop\xe4isch.png":[94,57],"./#pragmatisch.png":[95,58],"./#progressiv.png":[96,59],"./FriedenInEuropa.png":[97,60],"./PeaceInEurope.png":[98,61],"./stemvolt.nl.png":[99,62]};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":[100,3],"./en.ftl":[101,4],"./es.ftl":[102,5],"./fr.ftl":[103,6],"./it.ftl":[104,7],"./nl.ftl":[105,8],"./pl.ftl":[106,9],"./pt.ftl":[107,10],"./ru.ftl":[108,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),p=n(4),b=n.n(p),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)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Promise.all(["pride-2022-1","pride-2022-2","5xSOM-Pride","ukraine","Volt-Stars","0xSOM","5xSOM-Blue","5xSOM-Green","5xSOM-Red","5xSOM-Yellow","4xSOM-Blue-Red-Yellow-Green"].map(function(){var e=Object(f.a)(b.a.mark((function e(t){return b.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 p=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 p(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],p=d[1],g=j?j.src:null,w=a("hashtags");Object(o.useEffect)((function(){function e(){return(e=Object(f.a)(b.a.mark((function e(){return b.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)(b.a.mark((function e(t){var a;return b.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),p(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){p(e)}),[p]);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 U=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],p=Object(o.useState)(null),b=Object(c.a)(p,2),f=b[0],g=b[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],U=C[1],N=Object(o.useState)(0),k=Object(c.a)(N,2),S=k[0],E=k[1],F=Object(o.useState)(0),_=Object(c.a)(F,2),M=_[0],y=_[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),Z=Object(c.a)(W,2),q=Z[0],$=Z[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],pe=de[1],be=Object(o.useState)(0),fe=Object(c.a)(be,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:S,scale:P})}),[t,Q,S,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,q*oe,P,ne,oe),t=e.rangeMinX,n=e.rangeMinY,a=e.rangeMaxX,c=e.rangeMaxY;le(t),pe(n),we(a),Ae(c)}),[J,q,ne,oe,P]),Object(o.useEffect)((function(){U(0),E(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?(U(a||0),E(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;U(T(r,Oe,ge)||0),E(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":S,"data-scale":P,children:[Object(r.jsx)("img",{src:n,ref:O,alt:"",className:"background",style:{width:100*J+"%",height:100*q+"%",transform:"translate3d(calc(-50% + ".concat(Q+M,"px), calc(-50% + ").concat(S+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"})]})},N=n.p+"static/media/VoltLogoPurple.125355f6.svg",k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAQ4AgMAAACRfoQcAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJUExURVAjeFAjeE8jd3Yl3xwAAAADdFJOU//+/Q3dsqEAAATsSURBVHgB7dAxAQAABAAwQtI/ipMCvi3CgiMV6NChQ4cOHTp06NChQ4cOHTp06NChAx06dOjQoUOHDh06dOjQoUOHDh06dOhAhw4dOnTo0KFDhw4dOnTo0KFDhw4dOtChQ4cOHTp06NChQ4cOHTp06NChQ4cOdOjQoUOHDh06dOjQoUOHDh06dOjQoQMdOnTo0KFDhw4dOnTo0KFDhw4dOnToQIcOHTp06NChQ4cOHTp06NChQ4cOHejQoUOHDh06dOjQoUOHDh06dOjQoUMHOnTo0KFDhw4dOnTo0KFDhw4dOnTo0IEOHTp06NChQ4cOHTp06NChQ4cOHTp0oEOHDh06dOjQoUOHDh06dOjQoUOHDh3o0KFDhw4dOnTo0KFDhw4dOnTo0KFDBzp06NChQ4cOHTp06NChQ4cOHTp06NChQIcOHTp06NChQ4cOHTp06NChQ4cOHejQoUOHDh06dOjQoUOHDh06dOjQoUMHOnTo0KFDhw4dOnTo0KFDhw4dOnTo0IEOHTp06NChQ4cOHTp06NChQ4cOHTp0oEOHDh06dOjQoUOHDh06dOjQoUOHDh3o0KFDhw4dOnTo0KFDhw4dOnTo0KFDBzp06NChQ4cOHTp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64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAALSURBVHgBY2BgAAAAAwABjPg5OgAAAABJRU5ErkJggg==",E=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 _=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],p=u[1],b=Object(o.useState)(null),f=Object(c.a)(b,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),_=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],Z=Object(o.useState)({x:0,y:0,scale:1}),q=Object(c.a)(Z,2),$=q[0],ee=q[1],te=Object(o.useCallback)((function(e){p(e)}),[p]),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)(_,{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.dc167eb4.chunk.js.map