@vanelsas/baredom 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +7 -5
- package/dist/base.js +397 -362
- package/dist/x-alert.js +19 -19
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +6 -0
- package/dist/x-bento-item.js +5 -0
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +16 -16
- package/dist/x-cancel-dialogue.js +17 -17
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +48 -48
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.js +12 -12
- package/dist/x-command-palette.js +31 -31
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +19 -19
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +41 -41
- package/dist/x-divider.js +13 -13
- package/dist/x-drawer.js +12 -12
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +19 -32
- package/dist/x-grid.js +6 -7
- package/dist/x-kinetic-font.js +29 -0
- package/dist/x-kinetic-typography.js +39 -61
- package/dist/x-liquid-dock.js +40 -0
- package/dist/x-liquid-fill.js +45 -0
- package/dist/x-liquid-glass.js +48 -0
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +11 -11
- package/dist/x-metaball-cursor.js +29 -0
- package/dist/x-modal.js +13 -13
- package/dist/x-morph-stack.js +41 -0
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +35 -0
- package/dist/x-notification-center.js +9 -10
- package/dist/x-organic-divider.js +19 -19
- package/dist/x-organic-progress.js +40 -0
- package/dist/x-organic-shape.js +14 -14
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +15 -15
- package/dist/x-progress-circle.js +9 -9
- package/dist/x-progress.js +10 -10
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +12 -13
- package/dist/x-scroll-parallax.js +19 -19
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +36 -36
- package/dist/x-scroll-timeline.js +50 -50
- package/dist/x-scroll.js +41 -41
- package/dist/x-search-field.js +14 -14
- package/dist/x-select.js +9 -9
- package/dist/x-sidebar.js +16 -16
- package/dist/x-skeleton.js +6 -6
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +22 -0
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +15 -0
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.js +22 -23
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +16 -16
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-timeline-item.js +24 -24
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +24 -24
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +8 -8
- package/package.json +50 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
+
var OA=function(a){if(typeof a==="string"){a=parseInt(a.trim(),10);var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?15:Math.min(50,Math.max(3,a))}return 15},PA=function(a,b){return typeof a==="string"&&a.trim().length>0?a.trim():b},QA=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?1:Math.min(5,Math.max(.1,a))}return 1},RA=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?4:Math.min(10,
|
|
3
|
+
Math.max(1,a))}return 4},SA=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?.15:Math.min(.5,Math.max(.05,a))}return.15},TA=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.r($APP.r(b)?b:!(a>0))?40:Math.min(200,Math.max(10,a))}return 40},UA=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.8:Math.min(1,Math.max(0,a))):.8},VA=function(a){return a==null?!0:$APP.O("false",a.trim().toLowerCase())},
|
|
4
|
+
WA=function(a,b,c){return a+(b-a)*c},XA=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},ZA=function(a,b){a=$APP.l(a,"__xNeuralColorCache");var c=$APP.l(a,b);if($APP.r(c))return c;YA.fillStyle="#000000";YA.fillStyle=b;c=YA.fillStyle;if(typeof c==="string"&&$APP.D.i(c[0],"#")){var d=c.substring(1);c=parseInt(d.substring(0,2),16);var e=parseInt(d.substring(2,4),16);d=parseInt(d.substring(4,6),16);c=[c/255,e/255,d/255]}else d=c.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/),
|
|
5
|
+
$APP.r(d)?(c=parseInt(d[1],10),e=parseInt(d[2],10),d=parseInt(d[3],10),c=[c/255,e/255,d/255]):c=[0,0,0];return a[b]=c},$A=function(a,b,c){b=a.createShader(b);a.shaderSource(b,c);a.compileShader(b);if($APP.r(a.getShaderParameter(b,a.COMPILE_STATUS)))return b;console.warn("x-neural-glow shader error:",a.getShaderInfoLog(b));a.deleteShader(b);return null},sB=function(a){a=$APP.Q([aB,bB,cB,dB,eB,fB,gB,hB,iB,jB],[a.getAttribute("rest-rate"),a.getAttribute("pulse-speed"),a.getAttribute("color-secondary"),
|
|
6
|
+
a.getAttribute("opacity"),a.getAttribute("orb-count"),a.getAttribute("orb-size"),a.getAttribute("color-background"),a.getAttribute("interactive"),a.getAttribute("color-primary"),a.getAttribute("connection-distance")]);var b=$APP.N(a);a=$APP.G(b,iB);var c=$APP.G(b,jB),d=$APP.G(b,aB),e=$APP.G(b,bB),g=$APP.G(b,dB),h=$APP.G(b,cB),k=$APP.G(b,eB),m=$APP.G(b,fB),p=$APP.G(b,gB);b=$APP.G(b,hB);return $APP.Q([kB,lB,mB,nB,$APP.Mk,oB,$APP.Ph,pB,qB,rB],[TA(m),OA(k),PA(a,"#4f8bff"),PA(h,"#00e5cc"),VA(b),SA(c),
|
|
7
|
+
UA(g),QA(e),PA(p,"#050a18"),RA(d)])},tB=function(a,b,c){return Math.sin(a*1.7+c*.3)*Math.cos(b*2.3+c*.5)*.5+Math.sin(a*3.1-c*.7)*Math.cos(b*1.3+c*.2)*.25+Math.sin(a*5.3+c*.4)*Math.cos(b*4.7-c*.6)*.125},vB=function(a,b,c){var d=$APP.l(a,"__xNeuralUniforms"),e=uB.g($APP.l(a,"__xNeuralRefs")),g=e.width,h=e.height,k=$APP.l(a,"__xNeuralTime"),m=$APP.l(a,"__xNeuralActivity");e=$APP.l(a,"__xNeuralOrbPos");var p=$APP.l(a,"__xNeuralOrbPhases"),q=lB.g(c),w=ZA(a,mB.g(c)),x=ZA(a,nB.g(c));a=ZA(a,qB.g(c));b.uniform2f($APP.l(d,
|
|
8
|
+
"u_resolution"),g,h);b.uniform1f($APP.l(d,"u_time"),k);b.uniform1f($APP.l(d,"u_activity"),m);b.uniform1f($APP.l(d,"u_pulse_speed"),pB.g(c));b.uniform1f($APP.l(d,"u_rest_rate"),rB.g(c));b.uniform1i($APP.l(d,"u_orb_count"),q);b.uniform1f($APP.l(d,"u_orb_size"),kB.g(c));b.uniform1f($APP.l(d,"u_connection_dist"),oB.g(c));b.uniform3f($APP.l(d,"u_color_primary"),w[0],w[1],w[2]);b.uniform3f($APP.l(d,"u_color_secondary"),x[0],x[1],x[2]);b.uniform3f($APP.l(d,"u_color_background"),a[0],a[1],a[2]);b.uniform1f($APP.l(d,
|
|
9
|
+
"u_opacity"),$APP.Ph.g(c));for(c=0;;)if(c<q)g=e[c],b.uniform2f($APP.l(d,"u_orb_positions["+$APP.S.g(c)+"]"),g[0],g[1]),b.uniform1f($APP.l(d,"u_orb_phases["+$APP.S.g(c)+"]"),p[c]),c+=1;else break},xB=function(a){a.__xNeuralTime=0;$APP.n(a,"__xNeuralLastFrame",performance.now());a.__xNeuralActivity=0;a.__xNeuralImpulse=0;$APP.n(a,"__xNeuralRaf",requestAnimationFrame(function(){return wB(a)}))},yB=function(a){if($APP.r($APP.Mk.g($APP.l(a,"__xNeuralModel")))){var b=function(){var g=window.scrollY,h=$APP.l(a,
|
|
10
|
+
"__xNeuralLastScroll");a.__xNeuralLastScroll=g;h!=null&&(a.__xNeuralImpulse=Math.min(1,$APP.l(a,"__xNeuralImpulse")+Math.min(1,Math.abs(g-h)/100)));return null},c=function(g){var h=$APP.l(a,"__xNeuralLastPtr"),k=g.clientX;g=g.clientY;if($APP.r(h)){var m=k-$APP.l(h,"x"),p=g-$APP.l(h,"y");a.__xNeuralImpulse=Math.min(1,$APP.l(a,"__xNeuralImpulse")+Math.min(1,Math.sqrt(m*m+p*p)/50));h.x=k;h.y=g}else a.__xNeuralLastPtr={x:k,y:g};return null},d=function(){a.__xNeuralImpulse=Math.min(1,$APP.l(a,"__xNeuralImpulse")+
|
|
11
|
+
.3);return null},e={scroll:b,pointer:c,key:d};window.addEventListener("scroll",b,{passive:!0});window.addEventListener("pointermove",c,{passive:!0});window.addEventListener("keydown",d,{passive:!0});a.__xNeuralHandlers=e}return null},zB=function(a){var b=$APP.l(a,"__xNeuralHandlers");if($APP.r(b)){var c=$APP.l(b,"scroll");$APP.r(c)&&window.removeEventListener("scroll",c);c=$APP.l(b,"pointer");$APP.r(c)&&window.removeEventListener("pointermove",c);b=$APP.l(b,"key");$APP.r(b)&&window.removeEventListener("keydown",
|
|
12
|
+
b);a.__xNeuralHandlers=null}},AB=function(a){Object.defineProperty(a,"orbCount",{get:function(){return OA(this.getAttribute("orb-count"))},set:function(b){return b==null?this.removeAttribute("orb-count"):this.setAttribute("orb-count",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"colorPrimary",{get:function(){var b=this.getAttribute("color-primary");return PA(b,"#4f8bff")},set:function(b){return b==null?this.removeAttribute("color-primary"):this.setAttribute("color-primary",
|
|
13
|
+
""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"colorSecondary",{get:function(){var b=this.getAttribute("color-secondary");return PA(b,"#00e5cc")},set:function(b){return b==null?this.removeAttribute("color-secondary"):this.setAttribute("color-secondary",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"colorBackground",{get:function(){var b=this.getAttribute("color-background");return PA(b,"#050a18")},set:function(b){return b==null?this.removeAttribute("color-background"):
|
|
14
|
+
this.setAttribute("color-background",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"pulseSpeed",{get:function(){return QA(this.getAttribute("pulse-speed"))},set:function(b){return b==null?this.removeAttribute("pulse-speed"):this.setAttribute("pulse-speed",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"restRate",{get:function(){return RA(this.getAttribute("rest-rate"))},set:function(b){return b==null?this.removeAttribute("rest-rate"):this.setAttribute("rest-rate",
|
|
15
|
+
""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"connectionDistance",{get:function(){return SA(this.getAttribute("connection-distance"))},set:function(b){return b==null?this.removeAttribute("connection-distance"):this.setAttribute("connection-distance",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orbSize",{get:function(){return TA(this.getAttribute("orb-size"))},set:function(b){return b==null?this.removeAttribute("orb-size"):this.setAttribute("orb-size",
|
|
16
|
+
""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"opacity",{get:function(){return UA(this.getAttribute("opacity"))},set:function(b){return b==null?this.removeAttribute("opacity"):this.setAttribute("opacity",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"interactive",{get:function(){return VA(this.getAttribute("interactive"))},set:function(b){return $APP.r(b)?this.removeAttribute("interactive"):this.setAttribute("interactive","false")},enumerable:!0,
|
|
17
|
+
configurable:!0})},FB=function(){var a=class extends HTMLElement{};a.observedAttributes=BB;a.prototype.connectedCallback=function(){var b=sB(this);this.__xNeuralModel=b;this.__xNeuralColorCache={};this.__xNeuralDriftTime=0;this.__xNeuralLastScroll=this.__xNeuralLastPtr=null;if(!$APP.r($APP.l(this,"__xNeuralRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("canvas");d.textContent=CB;e.setAttribute("part","canvas");c.appendChild(d);c.appendChild(e);
|
|
18
|
+
b:{d=e.getContext("webgl",{alpha:!0,premultipliedAlpha:!1});d=$APP.r(d)?d:e.getContext("experimental-webgl",{alpha:!0,premultipliedAlpha:!1});if($APP.r(d)){var g=$A(d,d.VERTEX_SHADER,"attribute vec2 a_position;\nvoid main() {\n gl_Position \x3d vec4(a_position, 0.0, 1.0);\n}"),h=$A(d,d.FRAGMENT_SHADER,DB);if($APP.r($APP.r(g)?h:g)){var k=d.createProgram();d.attachShader(k,g);d.attachShader(k,h);d.linkProgram(k);$APP.r(d.getProgramParameter(k,d.LINK_STATUS))?g=k:(console.warn("x-neural-glow link error:",
|
|
19
|
+
d.getProgramInfoLog(k)),d.deleteProgram(k),g=null);if($APP.r(g)){d.useProgram(g);h=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,h);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),d.STATIC_DRAW);h=d.getAttribLocation(g,"a_position");d.enableVertexAttribArray(h);d.vertexAttribPointer(h,2,d.FLOAT,!1,0,0);h={};k=$APP.u(new $APP.ve(null,12,5,$APP.we,"u_resolution u_time u_activity u_pulse_speed u_rest_rate u_orb_count u_orb_size u_connection_dist u_color_primary u_color_secondary u_color_background u_opacity".split(" "),
|
|
20
|
+
null));for(var m=null,p=0,q=0;;)if(q<p){var w=m.G(null,q);h[w]=d.getUniformLocation(g,w);q+=1}else if(k=$APP.u(k))m=k,$APP.Pc(m)?(k=$APP.yb(m),q=$APP.zb(m),m=k,p=$APP.B(k),k=q):(k=$APP.v(m),h[k]=d.getUniformLocation(g,k),k=$APP.z(m),m=null,p=0),q=0;else break;for(k=0;;)if(k<50)m="u_orb_positions["+$APP.S.g(k)+"]",p="u_orb_phases["+$APP.S.g(k)+"]",h[m]=d.getUniformLocation(g,m),h[p]=d.getUniformLocation(g,p),k+=1;else break;this.__xNeuralUniforms=h;this.__xNeuralProgram=g;d.enable(d.BLEND);d.blendFunc(d.SRC_ALPHA,
|
|
21
|
+
d.ONE_MINUS_SRC_ALPHA);break b}}}d=null}this.__xNeuralRefs=new $APP.P(null,3,[$APP.bi,c,uB,e,EB,d],null)}b=lB.g(b);c=[];for(e=0;;)if(e<b)c.push([Math.random(),Math.random()]),e+=1;else break;e=[];d=2*Math.PI;for(g=0;;)if(g<b)e.push(Math.random()*d),g+=1;else break;d=[];for(g=0;;)if(g<b)h=c[g],d.push([h[0],h[1]]),g+=1;else break;this.__xNeuralOrbBase=c;this.__xNeuralOrbPhases=e;this.__xNeuralOrbPos=d;this.setAttribute("aria-hidden","true");this.setAttribute("role","presentation");zB(this);yB(this);
|
|
22
|
+
xB(this);return null};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xNeuralRaf");$APP.r(b)&&(cancelAnimationFrame(b),this.__xNeuralRaf=null);zB(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){if($APP.O(c,d)&&(this.__xNeuralModel=b=sB(this),this.__xNeuralColorCache={},$APP.r($APP.l(this,"__xNeuralRefs")))){var e=lB.g(b);b=$APP.l(this,"__xNeuralOrbBase");c=$APP.l(this,"__xNeuralOrbPhases");d=$APP.l(this,"__xNeuralOrbPos");var g=b.length,h=2*Math.PI;if($APP.O(g,
|
|
23
|
+
e))if(e>g)for(e-=g,g=0;;)if(g<e){var k=Math.random(),m=Math.random();b.push([k,m]);d.push([k,m]);c.push(Math.random()*h);g+=1}else break;else b.length=e,d.length=e,c.length=e;zB(this);return $APP.r(this.isConnected)?yB(this):null}return null};AB(a.prototype);return a},GB=function(){$APP.r(customElements.get("x-neural-glow"))||customElements.define("x-neural-glow",FB());return null},dB=new $APP.M(null,"opacity-raw","opacity-raw",-1373906448),oB=new $APP.M(null,"connection-distance","connection-distance",
|
|
24
|
+
-2128794414),bB=new $APP.M(null,"pulse-speed-raw","pulse-speed-raw",-665433726),iB=new $APP.M(null,"color-primary-raw","color-primary-raw",392476156),qB=new $APP.M(null,"color-background","color-background",1347240536),pB=new $APP.M(null,"pulse-speed","pulse-speed",828613109),cB=new $APP.M(null,"color-secondary-raw","color-secondary-raw",1212293328),eB=new $APP.M(null,"orb-count-raw","orb-count-raw",-930142286),jB=new $APP.M(null,"connection-distance-raw","connection-distance-raw",1368898143),hB=
|
|
25
|
+
new $APP.M(null,"interactive-raw","interactive-raw",1874525367),rB=new $APP.M(null,"rest-rate","rest-rate",1350607737),nB=new $APP.M(null,"color-secondary","color-secondary",-556141879),EB=new $APP.M(null,"gl","gl",-246422634),kB=new $APP.M(null,"orb-size","orb-size",83267072),fB=new $APP.M(null,"orb-size-raw","orb-size-raw",925656307),lB=new $APP.M(null,"orb-count","orb-count",1055126048),gB=new $APP.M(null,"color-background-raw","color-background-raw",2063778805),mB=new $APP.M(null,"color-primary",
|
|
26
|
+
"color-primary",1415907910),uB=new $APP.M(null,"canvas","canvas",-1798817489),aB=new $APP.M(null,"rest-rate-raw","rest-rate-raw",-206808800);var BB="orb-count color-primary color-secondary color-background pulse-speed rest-rate connection-distance orb-size opacity interactive".split(" ");
|
|
27
|
+
$APP.Q([new $APP.M(null,"colorBackground","colorBackground",-167638842),$APP.Gi,new $APP.M(null,"orbCount","orbCount",-2006864213),new $APP.M(null,"restRate","restRate",-272422548),new $APP.M(null,"colorPrimary","colorPrimary",-611817233),new $APP.M(null,"orbSize","orbSize",1744279571),$APP.Ph,new $APP.M(null,"colorSecondary","colorSecondary",1906906102),new $APP.M(null,"pulseSpeed","pulseSpeed",1297932542),new $APP.M(null,"connectionDistance","connectionDistance",1241773439)],[new $APP.P(null,1,
|
|
28
|
+
[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null)]);
|
|
29
|
+
var DB="precision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform float u_activity;\nuniform float u_pulse_speed;\nuniform float u_rest_rate;\nuniform int u_orb_count;\nuniform vec2 u_orb_positions["+$APP.S.g(50)+"];\nuniform float u_orb_phases["+$APP.S.g(50)+"];\nuniform float u_orb_size;\nuniform float u_connection_dist;\nuniform vec3 u_color_primary;\nuniform vec3 u_color_secondary;\nuniform vec3 u_color_background;\nuniform float u_opacity;\n\nfloat distToSegment(vec2 p, vec2 a, vec2 b) {\n vec2 pa \x3d p - a;\n vec2 ba \x3d b - a;\n float t \x3d clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);\n return length(pa - ba * t);\n}\n\nvoid main() {\n vec2 uv \x3d gl_FragCoord.xy / u_resolution;\n float aspect \x3d u_resolution.x / u_resolution.y;\n\n // Auto-detect light vs dark background\n float bg_lum \x3d dot(u_color_background, vec3(0.2126, 0.7152, 0.0722));\n float is_light \x3d smoothstep(0.3, 0.6, bg_lum);\n\n // Pulse speed interpolates between rest and active rate\n float active_speed \x3d u_pulse_speed * 3.0;\n float speed \x3d mix(6.2831853 / u_rest_rate, active_speed, u_activity);\n\n // Start with background\n vec3 color \x3d u_color_background;\n\n // Orb glow layer\n float radius \x3d u_orb_size / min(u_resolution.x, u_resolution.y);\n float softness \x3d 2.5;\n\n for (int i \x3d 0; i \x3c "+
|
|
30
|
+
$APP.S.g(50)+"; i++) {\n if (i \x3e\x3d u_orb_count) break;\n\n vec2 orbPos \x3d u_orb_positions[i];\n vec2 diff \x3d uv - orbPos;\n diff.x *\x3d aspect;\n\n float dist \x3d length(diff);\n float pulse \x3d 0.5 + 0.5 * sin(u_time * speed + u_orb_phases[i]);\n float glow_strength \x3d (0.4 + 0.6 * pulse) * (0.5 + 0.5 * u_activity + 0.5);\n float glow \x3d exp(-dist * dist / (radius * radius * softness)) * glow_strength;\n\n // Alternate primary/secondary by index\n vec3 orb_color \x3d mix(u_color_primary, u_color_secondary, step(1.0, mod(float(i), 2.0)));\n vec3 additive \x3d color + orb_color * glow;\n vec3 multiply \x3d color * mix(vec3(1.0), orb_color, glow);\n color \x3d mix(additive, multiply, is_light);\n }\n\n // Connection line layer\n float line_width \x3d 0.003;\n for (int i \x3d 0; i \x3c "+
|
|
31
|
+
$APP.S.g(50)+"; i++) {\n if (i \x3e\x3d u_orb_count) break;\n for (int j \x3d 0; j \x3c "+$APP.S.g(50)+"; j++) {\n if (j \x3e\x3d u_orb_count) break;\n if (j \x3c\x3d i) continue;\n\n vec2 pi_pos \x3d u_orb_positions[i];\n vec2 pj_pos \x3d u_orb_positions[j];\n\n vec2 diff_ij \x3d pi_pos - pj_pos;\n diff_ij.x *\x3d aspect;\n float orb_dist \x3d length(diff_ij);\n\n if (orb_dist \x3c u_connection_dist) {\n vec2 uv_a \x3d vec2(uv.x * aspect, uv.y);\n vec2 pa \x3d vec2(pi_pos.x * aspect, pi_pos.y);\n vec2 pb \x3d vec2(pj_pos.x * aspect, pj_pos.y);\n\n float d \x3d distToSegment(uv_a, pa, pb);\n float fade \x3d 1.0 - (orb_dist / u_connection_dist);\n float avg_phase \x3d (u_orb_phases[i] + u_orb_phases[j]) * 0.5;\n float line_pulse \x3d 0.3 + 0.7 * sin(u_time * speed + avg_phase);\n float line_glow \x3d exp(-d * d / (line_width * line_width)) * fade * line_pulse;\n line_glow *\x3d (0.3 + 0.7 * u_activity + 0.3);\n\n vec3 line_color \x3d mix(u_color_primary, u_color_secondary, 0.5);\n float line_str \x3d line_glow * 0.4;\n vec3 line_add \x3d color + line_color * line_str;\n vec3 line_mul \x3d color * mix(vec3(1.0), line_color, line_str);\n color \x3d mix(line_add, line_mul, is_light);\n }\n }\n }\n\n gl_FragColor \x3d vec4(color, u_opacity);\n}";var CB=":host{display:block;position:relative;width:100%;height:100%;min-height:200px;overflow:hidden;z-index:var("+$APP.S.g("--x-neural-glow-z-index")+",0);inset:var("+$APP.S.g("--x-neural-glow-inset")+",auto);}canvas{display:block;width:100%;height:100%;opacity:var("+$APP.S.g("--x-neural-glow-opacity")+",0.8);mix-blend-mode:var("+$APP.S.g("--x-neural-glow-blend-mode")+",normal);}@media(prefers-reduced-motion:reduce){canvas{opacity:var("+$APP.S.g("--x-neural-glow-opacity")+",0.6);}}",YA,HB=document.createElement("canvas");
|
|
32
|
+
HB.width=1;HB.height=1;YA=HB.getContext("2d");
|
|
33
|
+
var wB=function wB(a){if($APP.r(a.isConnected)){var c=$APP.l(a,"__xNeuralRefs"),d=EB.g(c);if($APP.r(d)){c=uB.g(c);var e=$APP.l(a,"__xNeuralModel"),g=performance.now(),h=Math.min((g-$APP.l(a,"__xNeuralLastFrame"))/1E3,.1);a.__xNeuralLastFrame=g;XA()||(a.__xNeuralTime=$APP.l(a,"__xNeuralTime")+h);g=$APP.l(a,"__xNeuralImpulse");a.__xNeuralActivity=WA($APP.l(a,"__xNeuralActivity"),g>.01?1:0,Math.min(1,(g>.01?8:2)*h));a.__xNeuralImpulse=g*Math.max(0,1-5*h);if(!XA()){g=$APP.l(a,"__xNeuralOrbBase");var k=
|
|
34
|
+
$APP.l(a,"__xNeuralOrbPos"),m=lB.g(e);h=$APP.l(a,"__xNeuralDriftTime")+h*(.3+.7*$APP.l(a,"__xNeuralActivity"));a.__xNeuralDriftTime=h;for(var p=0;;)if(p<m){var q=g[p],w=q[0],x=q[1];q=w*3+p*1.37;var y=x*3+p*2.41;x=Math.min(1,Math.max(0,x+tB(y+100,q,h)*.08));var A=k[p];A[0]=Math.min(1,Math.max(0,w+tB(q,y,h)*.08));A[1]=x;p+=1}else break}h=Math.min(2,devicePixelRatio);g=a.clientWidth;k=a.clientHeight;m=Math.max(1,Math.floor(g*h));h=Math.max(1,Math.floor(k*h));if($APP.O(c.width,m)||$APP.O(c.height,h))c.width=
|
|
35
|
+
m,c.height=h,d.viewport(0,0,m,h);g>0&&k>0&&(vB(a,d,e),d.drawArrays(d.TRIANGLE_STRIP,0,4))}$APP.n(a,"__xNeuralRaf",requestAnimationFrame(function(){return wB.g?wB.g(a):wB.call(null,a)}))}return null};$APP.ka("baredom.exports.x_neural_glow.init",GB);export const init=GB;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d.setAttribute("part","container");d.setAttribute("role","log");d.setAttribute("aria-live","polite");b.appendChild(c);b.appendChild(d);a.__xNcRefs={root:b,container:d};return $APP.l(a,"__xNcRefs")},
|
|
4
|
-
g=g.querySelectorAll("x-alert").length-1;h=h.getAttribute("type");var k=d.detail.reason;d=d.detail.text;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
$APP.zd(["x-notification-center-push",new $APP.Q(null,2,[$APP.Y,new $APP.Q(null,2,[$APP.xi,$APP.X,$APP.Yg,$APP.U],null),$APP.Dj,!1],null),"x-notification-center-dismiss",new $APP.Q(null,2,[$APP.Y,new $APP.Q(null,5,[$APP.xi,$APP.X,$APP.Z,$APP.X,$APP.hi,$APP.X,$APP.Di,$APP.X,$APP.Yg,$APP.U],null),$APP.Dj,!1],null),"x-notification-center-empty",new $APP.Q(null,2,[$APP.Y,$APP.Ad,$APP.Dj,!1],null)]);var im={v:0};$APP.ja("baredom.exports.x_notification_center.init",nm);export const init=nm;
|
|
2
|
+
var on=function(a){return typeof a==="string"&&$APP.J(nn,a.toLowerCase())?a.toLowerCase():"top-right"},pn=function(a){if(a==null)return 5;a=parseInt(""+$APP.S.g(a),10);return typeof a==="number"&&$APP.t(isNaN(a))&&a>0?a:5},qn=function(a){var b=$APP.l(a,"__xNcRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;position:fixed;z-index:var(--x-notification-center-z-index,9999);--x-notification-center-width:360px;--x-notification-center-gap:8px;--x-notification-center-offset-x:16px;--x-notification-center-offset-y:16px;--x-notification-center-z-index:9999;pointer-events:none;}:host([data-position\x3d'top-right']){top:var(--x-notification-center-offset-y);right:var(--x-notification-center-offset-x);}:host([data-position\x3d'top-left']){top:var(--x-notification-center-offset-y);left:var(--x-notification-center-offset-x);}:host([data-position\x3d'bottom-right']){bottom:var(--x-notification-center-offset-y);right:var(--x-notification-center-offset-x);}:host([data-position\x3d'bottom-left']){bottom:var(--x-notification-center-offset-y);left:var(--x-notification-center-offset-x);}:host([data-position\x3d'top-center']){top:var(--x-notification-center-offset-y);left:50%;transform:translateX(-50%);}:host([data-position\x3d'bottom-center']){bottom:var(--x-notification-center-offset-y);left:50%;transform:translateX(-50%);}[part\x3dcontainer]{display:flex;flex-direction:column;gap:var(--x-notification-center-gap);width:var(--x-notification-center-width);pointer-events:auto;}:host([data-position\x3d'bottom-right']) [part\x3dcontainer],:host([data-position\x3d'bottom-left']) [part\x3dcontainer],:host([data-position\x3d'bottom-center']) [part\x3dcontainer]{flex-direction:column-reverse;}";
|
|
3
|
+
d.setAttribute("part","container");d.setAttribute("role","log");d.setAttribute("aria-live","polite");b.appendChild(c);b.appendChild(d);a.__xNcRefs={root:b,container:d};return $APP.l(a,"__xNcRefs")},rn=function(a){var b=a.getAttribute("position");b=on(b);a.setAttribute("data-position",b)},sn=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1}))},tn=function(a){function b(d){var e=qn(a),g=$APP.l(e,"container"),h=d.target;e=h.getAttribute("data-notification-id");
|
|
4
|
+
g=g.querySelectorAll("x-alert").length-1;h=h.getAttribute("type");var k=d.detail.reason;d=d.detail.text;sn(a,"x-notification-center-dismiss",new $APP.P(null,5,[$APP.Dk,e,$APP.Z,$APP.r(h)?h:"info",$APP.ji,$APP.r(k)?k:"",$APP.Gk,$APP.r(d)?d:"",$APP.vh,g],null));g===0&&sn(a,"x-notification-center-empty",$APP.Td);return null}var c=qn(a);$APP.l(c,"root").addEventListener("x-alert-dismiss",b,{capture:!1});$APP.n(a,"__xNcHandlers",{dismiss:b})},Cn=function(a){var b=$APP.l(a,"__xNcHandlers"),c=$APP.l(a,"__xNcRefs");
|
|
5
|
+
$APP.r($APP.r(b)?c:b)&&(c=$APP.l(c,"root"),b=$APP.l(b,"dismiss"),$APP.r(b)&&c.removeEventListener("x-alert-dismiss",b,{capture:!1}));a.__xNcHandlers=null},En=function(a,b){var c=qn(a);c=$APP.l(c,"container");if(c.querySelectorAll("x-alert").length<function(){var q=$APP.l(a,"__xNcMax");return $APP.r(q)?q:5}()){var d=document.createElement("x-alert"),e=function(){var q=$APP.l(b,"id");$APP.r(q)||(q=Dn.v,Dn.v=q+1,q="xnc-"+$APP.S.g(q));return q}(),g=$APP.l(b,"type"),h=$APP.l(b,"text"),k=$APP.l(b,"icon"),
|
|
6
|
+
m=$APP.l(b,"timeoutMs"),p=$APP.l(b,"dismissible");d.setAttribute("data-notification-id",e);$APP.r(g)&&d.setAttribute("type",g);$APP.r(h)&&d.setAttribute("text",h);$APP.r(k)&&d.setAttribute("icon",k);$APP.r(m)&&d.setAttribute("timeout-ms",""+$APP.S.g(m|0));p===!1&&d.setAttribute("dismissible","false");c.appendChild(d);sn(a,"x-notification-center-push",new $APP.P(null,2,[$APP.Dk,e,$APP.vh,c.querySelectorAll("x-alert").length],null));return e}return null},Fn=function(a){Object.defineProperty(a,"position",
|
|
7
|
+
{get:function(){return on(this.getAttribute("position"))},set:function(b){return $APP.r(b)?this.setAttribute("position",""+$APP.S.g(b)):this.removeAttribute("position")},enumerable:!0,configurable:!0});Object.defineProperty(a,"max",{get:function(){return pn(this.getAttribute("max"))},set:function(b){return $APP.r(b)?this.setAttribute("max",""+$APP.S.g(b|0)):this.removeAttribute("max")},enumerable:!0,configurable:!0});Object.defineProperty(a,"count",{get:function(){var b=$APP.l(this,"__xNcRefs");return $APP.r(b)?
|
|
8
|
+
$APP.l(b,"container").querySelectorAll("x-alert").length:0},enumerable:!0,configurable:!0})},Hn=function(){var a=class extends HTMLElement{};a.observedAttributes=Gn;a.prototype.connectedCallback=function(){qn(this);Cn(this);tn(this);rn(this);return null};a.prototype.disconnectedCallback=function(){Cn(this);return null};a.prototype.attributeChangedCallback=function(b){$APP.D.i(b,"position")?rn(this):$APP.D.i(b,"max")&&(this.__xNcMax=pn(this.getAttribute("max")));return null};Fn(a.prototype);a.prototype.push=
|
|
9
|
+
function(b){return En(this,b)};a.prototype.clear=function(){var b=qn(this);b=$APP.u($APP.wc($APP.l(b,"container").querySelectorAll("x-alert")));for(var c=null,d=0,e=0;;)if(e<d)c.G(null,e).remove(),e+=1;else if(b=$APP.u(b))c=b,$APP.Pc(c)?(b=$APP.yb(c),e=$APP.zb(c),c=b,d=$APP.B(b),b=e):($APP.v(c).remove(),b=$APP.z(c),c=null,d=0),e=0;else break;return null};return a},In=function(){$APP.r(customElements.get("x-notification-center"))||customElements.define("x-notification-center",Hn());return null};var Gn=["position","max"],nn=new $APP.R(null,new $APP.P(null,6,["top-center",null,"bottom-center",null,"top-right",null,"bottom-right",null,"top-left",null,"bottom-left",null],null),null);
|
|
10
|
+
$APP.Sd(["x-notification-center-push",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.Dk,$APP.Y,$APP.vh,$APP.V],null),$APP.kl,!1],null),"x-notification-center-dismiss",new $APP.P(null,2,[$APP.U,new $APP.P(null,5,[$APP.Dk,$APP.Y,$APP.Z,$APP.Y,$APP.ji,$APP.Y,$APP.Gk,$APP.Y,$APP.vh,$APP.V],null),$APP.kl,!1],null),"x-notification-center-empty",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null)]);var Dn={v:0};$APP.ka("baredom.exports.x_notification_center.init",In);export const init=In;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
var g=$APP.
|
|
4
|
-
m==null?"none":p;g=g!=null;var
|
|
5
|
-
p=$APP.
|
|
6
|
-
")");x.setAttribute("opacity",""+$APP.S.g(k<=1?1:.3+y/(k-1)*.7));A>0||
|
|
7
|
-
a.setAttribute("data-flip",""):a.removeAttribute("data-flip");$APP.
|
|
8
|
-
"layers",{get:function(){var b=this.getAttribute("layers");return $APP.
|
|
9
|
-
"flip",{get:function(){return this.hasAttribute("flip")},set:function(b){return $APP.
|
|
10
|
-
"none"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"path",{get:function(){return this.getAttribute("path")},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("path",b):this.removeAttribute("path")},enumerable:!0,configurable:!0})},
|
|
11
|
-
"__xOrganicDividerInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElementNS("http://www.w3.org/2000/svg","svg");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;line-height:0;font-size:0;overflow:hidden;--x-organic-divider-color-1:rgba(99,102,241,0.15);--x-organic-divider-color-2:rgba(99,102,241,0.25);--x-organic-divider-color-3:rgba(99,102,241,0.40);--x-organic-divider-color-4:rgba(99,102,241,0.60);--x-organic-divider-color-5:rgba(99,102,241,0.85);--x-organic-divider-height:120px;--x-organic-divider-animate-duration:6s;--x-organic-divider-animate-timing:ease-in-out;}@media (prefers-color-scheme:dark){:host{--x-organic-divider-color-1:rgba(129,140,248,0.12);--x-organic-divider-color-2:rgba(129,140,248,0.22);--x-organic-divider-color-3:rgba(129,140,248,0.35);--x-organic-divider-color-4:rgba(129,140,248,0.50);--x-organic-divider-color-5:rgba(129,140,248,0.70);}}[part\x3dbase]{width:100%;position:relative;overflow:hidden;}[part\x3dbase] svg{display:block;width:100%;height:100%;}:host([data-flip]) [part\x3dbase]{transform:scaleY(-1);}:host([data-mirror]) [part\x3dbase]{transform:scaleX(-1);}:host([data-flip][data-mirror]) [part\x3dbase]{transform:scaleX(-1) scaleY(-1);}@keyframes x-organic-divider-drift{0%{transform:translateX(0);}100%{transform:translateX(-33.333%);}}:host([data-animation\x3ddrift]) [part\x3dbase] svg{width:150%;animation:x-organic-divider-drift var(--x-organic-divider-animate-duration) linear infinite;}@keyframes x-organic-divider-morph{0%,100%{d:var(--x-organic-divider-d);}50%{d:var(--x-organic-divider-d-alt);}}:host([data-animation\x3dmorph]) [part\x3dbase] path{animation:x-organic-divider-morph var(--x-organic-divider-animate-duration) var(--x-organic-divider-animate-timing) infinite;}@media (prefers-reduced-motion:reduce){:host([data-animation]) [part\x3dbase] svg,:host([data-animation]) [part\x3dbase] path{animation:none;}}";
|
|
12
|
-
d.setAttribute("part","base");e.setAttribute("xmlns","http://www.w3.org/2000/svg");e.setAttribute("preserveAspectRatio","none");e.setAttribute("aria-hidden","true");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.setAttribute("role","presentation");this.setAttribute("aria-hidden","true");this.__xOrganicDividerBase=d;this.__xOrganicDividerSvg=e;this.__xOrganicDividerPaths=[];this.__xOrganicDividerInit=!0}
|
|
13
|
-
function(b,c,d){$APP.O(c,d)&&$APP.
|
|
14
|
-
|
|
15
|
-
null),"waves",new $APP.
|
|
16
|
-
null),"mountain",new $APP.
|
|
17
|
-
|
|
18
|
-
[$APP.
|
|
19
|
-
|
|
20
|
-
null);$APP.
|
|
2
|
+
var QK=function(a){return typeof a==="string"&&$APP.J(PK,a)?a:"wave"},TK=function(a){return $APP.je(function(b){return new $APP.P(null,2,[RK,b*20,SK,b*8],null)},$APP.kg(0,a))},bL=function(a){var b=new $APP.P(null,7,[$APP.wj,a.getAttribute("shape"),$APP.Bi,a.getAttribute("layers"),$APP.pj,a.getAttribute("height"),UK,a.getAttribute("flip"),VK,a.getAttribute("mirror"),$APP.Oi,a.getAttribute("animation"),$APP.ak,a.getAttribute("path")],null);var c=$APP.N(b),d=$APP.G(c,$APP.wj),e=$APP.G(c,$APP.Bi);b=$APP.G(c,
|
|
3
|
+
$APP.pj);var g=$APP.G(c,UK),h=$APP.G(c,VK),k=$APP.G(c,$APP.Oi);c=$APP.G(c,$APP.ak);c=typeof c==="string"&&$APP.O("",c.trim())?c.trim():null;d=QK(d);e=typeof e==="string"?parseInt(e,10):null;var m=e==null;m||(m=isNaN(e),m=$APP.r(m)?m:e<1);e=$APP.r(m)?1:e>5?5:e;var p=typeof k==="string"&&$APP.J(WK,k)?k:"none";k=c!=null?c:$APP.ke(XK,new $APP.ve(null,2,5,$APP.we,[QK(d),$APP.ak],null));m=c==null?$APP.ke(XK,new $APP.ve(null,2,5,$APP.we,[QK(d),YK],null)):null;var q=c!=null?c:$APP.G(ZK,QK(d));p=$APP.D.i(p,
|
|
4
|
+
"morph")&&m==null?"none":p;g=g!=null;var w=TK(e);h=h!=null;b=typeof b==="string"&&$APP.O("",b.trim())?b.trim():"120px";b=$APP.Q([$APP.ak,$APP.ij,$APP.Oi,UK,$K,YK,$APP.wj,$APP.Bi,VK,$APP.pj,aL],[c,k,p,g,w,m,d,e,h,b,q]);k=$APP.N(b);b=$APP.G(k,VK);h=$APP.G(k,$APP.pj);w=$APP.G(k,aL);var x=$APP.G(k,$APP.ij);c=$APP.G(k,$APP.Oi);d=$APP.G(k,UK);g=$APP.G(k,$K);e=$APP.G(k,YK);k=$APP.G(k,$APP.Bi);m=$APP.l(a,"__xOrganicDividerBase");var y=$APP.l(a,"__xOrganicDividerSvg");q=$APP.l(a,"__xOrganicDividerPaths");
|
|
5
|
+
var A=$APP.D.i(c,"drift");p=$APP.D.i(c,"morph");w=A?w:x;y.setAttribute("viewBox",A?"0 0 1800 120":"0 0 1200 120");a:if(x=q.length,x<k)for(x=k-x,A=0;;)if(A<x){var C=document.createElementNS("http://www.w3.org/2000/svg","path");y.appendChild(C);q.push(C);A+=1}else break a;else if(x>k)for(x-=k,A=0;;)if(A<x)C=q.pop(),y.removeChild(C),A+=1;else break a;for(y=0;;)if(y<k){x=q[y];A=$APP.rc(g,y);C=$APP.N(A);A=$APP.G(C,RK);C=$APP.G(C,SK);var E=y+1;x.setAttribute("d",w);x.setAttribute("fill","var(--x-organic-divider-color-"+
|
|
6
|
+
$APP.S.g(E)+")");x.setAttribute("opacity",""+$APP.S.g(k<=1?1:.3+y/(k-1)*.7));A>0||C>0?x.setAttribute("transform","translate("+$APP.S.g(A)+","+$APP.S.g(C)+")"):x.removeAttribute("transform");p&&(x.style.setProperty("--x-organic-divider-d",'path("'+$APP.S.g(w)+'")'),$APP.r(e)&&x.style.setProperty("--x-organic-divider-d-alt",'path("'+$APP.S.g(e)+'")'));p||(x.style.removeProperty("--x-organic-divider-d"),x.style.removeProperty("--x-organic-divider-d-alt"));y+=1}else break;m.style.setProperty("height",
|
|
7
|
+
h);$APP.r(d)?a.setAttribute("data-flip",""):a.removeAttribute("data-flip");$APP.r(b)?a.setAttribute("data-mirror",""):a.removeAttribute("data-mirror");$APP.O(c,"none")?a.setAttribute("data-animation",c):a.removeAttribute("data-animation")},cL=function(a){Object.defineProperty(a,"shape",{get:function(){var b=this.getAttribute("shape");return $APP.r(b)?b:"wave"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("shape",b):this.removeAttribute("shape")},enumerable:!0,configurable:!0});
|
|
8
|
+
Object.defineProperty(a,"layers",{get:function(){var b=this.getAttribute("layers");return $APP.r(b)?b:"1"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("layers",b):this.removeAttribute("layers")},enumerable:!0,configurable:!0});Object.defineProperty(a,"height",{get:function(){var b=this.getAttribute("height");return $APP.r(b)?b:"120px"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("height",b):this.removeAttribute("height")},enumerable:!0,
|
|
9
|
+
configurable:!0});Object.defineProperty(a,"flip",{get:function(){return this.hasAttribute("flip")},set:function(b){return $APP.r(b)?this.setAttribute("flip",""):this.removeAttribute("flip")},enumerable:!0,configurable:!0});Object.defineProperty(a,"mirror",{get:function(){return this.hasAttribute("mirror")},set:function(b){return $APP.r(b)?this.setAttribute("mirror",""):this.removeAttribute("mirror")},enumerable:!0,configurable:!0});Object.defineProperty(a,"animation",{get:function(){var b=this.getAttribute("animation");
|
|
10
|
+
return $APP.r(b)?b:"none"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"path",{get:function(){return this.getAttribute("path")},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("path",b):this.removeAttribute("path")},enumerable:!0,configurable:!0})},eL=function(){var a=class extends HTMLElement{};a.observedAttributes=dL;a.prototype.connectedCallback=
|
|
11
|
+
function(){if(!$APP.r($APP.l(this,"__xOrganicDividerInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElementNS("http://www.w3.org/2000/svg","svg");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;line-height:0;font-size:0;overflow:hidden;--x-organic-divider-color-1:rgba(99,102,241,0.15);--x-organic-divider-color-2:rgba(99,102,241,0.25);--x-organic-divider-color-3:rgba(99,102,241,0.40);--x-organic-divider-color-4:rgba(99,102,241,0.60);--x-organic-divider-color-5:rgba(99,102,241,0.85);--x-organic-divider-height:120px;--x-organic-divider-animate-duration:6s;--x-organic-divider-animate-timing:ease-in-out;}@media (prefers-color-scheme:dark){:host{--x-organic-divider-color-1:rgba(129,140,248,0.12);--x-organic-divider-color-2:rgba(129,140,248,0.22);--x-organic-divider-color-3:rgba(129,140,248,0.35);--x-organic-divider-color-4:rgba(129,140,248,0.50);--x-organic-divider-color-5:rgba(129,140,248,0.70);}}[part\x3dbase]{width:100%;position:relative;overflow:hidden;}[part\x3dbase] svg{display:block;width:100%;height:100%;}:host([data-flip]) [part\x3dbase]{transform:scaleY(-1);}:host([data-mirror]) [part\x3dbase]{transform:scaleX(-1);}:host([data-flip][data-mirror]) [part\x3dbase]{transform:scaleX(-1) scaleY(-1);}@keyframes x-organic-divider-drift{0%{transform:translateX(0);}100%{transform:translateX(-33.333%);}}:host([data-animation\x3ddrift]) [part\x3dbase] svg{width:150%;animation:x-organic-divider-drift var(--x-organic-divider-animate-duration) linear infinite;}@keyframes x-organic-divider-morph{0%,100%{d:var(--x-organic-divider-d);}50%{d:var(--x-organic-divider-d-alt);}}:host([data-animation\x3dmorph]) [part\x3dbase] path{animation:x-organic-divider-morph var(--x-organic-divider-animate-duration) var(--x-organic-divider-animate-timing) infinite;}@media (prefers-reduced-motion:reduce){:host([data-animation]) [part\x3dbase] svg,:host([data-animation]) [part\x3dbase] path{animation:none;}}";
|
|
12
|
+
d.setAttribute("part","base");e.setAttribute("xmlns","http://www.w3.org/2000/svg");e.setAttribute("preserveAspectRatio","none");e.setAttribute("aria-hidden","true");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.setAttribute("role","presentation");this.setAttribute("aria-hidden","true");this.__xOrganicDividerBase=d;this.__xOrganicDividerSvg=e;this.__xOrganicDividerPaths=[];this.__xOrganicDividerInit=!0}bL(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=
|
|
13
|
+
function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xOrganicDividerInit"))&&bL(this);return null};cL(a.prototype);return a},fL=function(){$APP.r(customElements.get("x-organic-divider"))||customElements.define("x-organic-divider",eL());return null},UK=new $APP.M(null,"flip","flip",2033871302),$K=new $APP.M(null,"transforms","transforms",793344554),RK=new $APP.M(null,"x-offset","x-offset",-1499732449),YK=new $APP.M(null,"path-alt","path-alt",1724994068),SK=new $APP.M(null,"y-offset","y-offset",-1716542),
|
|
14
|
+
aL=new $APP.M(null,"drift-d","drift-d",-1241526977),VK=new $APP.M(null,"mirror","mirror",1914600218);var dL="shape layers height flip mirror animation path".split(" "),WK=new $APP.R(null,new $APP.P(null,3,["none",null,"drift",null,"morph",null],null),null),PK=new $APP.R(null,new $APP.P(null,8,["drip",null,"cloud",null,"scallop",null,"waves",null,"mountain",null,"slant",null,"blob-edge",null,"wave",null],null),null),XK=new $APP.P(null,8,["wave",new $APP.P(null,2,[$APP.ak,"M0,60 C200,20 400,100 600,60 C800,20 1000,100 1200,60 L1200,120 L0,120 Z",YK,"M0,45 C200,85 400,15 600,55 C800,90 1000,10 1200,50 L1200,120 L0,120 Z"],
|
|
15
|
+
null),"waves",new $APP.P(null,2,[$APP.ak,"M0,40 C150,80 300,0 450,40 C600,80 750,10 900,50 C1050,90 1150,30 1200,50 L1200,120 L0,120 Z",YK,"M0,55 C150,15 300,85 450,50 C600,10 750,80 900,35 C1050,5 1150,75 1200,40 L1200,120 L0,120 Z"],null),"blob-edge",new $APP.P(null,2,[$APP.ak,"M0,50 C80,30 160,70 240,45 C320,20 400,80 500,55 C600,30 680,75 780,40 C880,5 960,65 1060,50 C1120,40 1180,60 1200,45 L1200,120 L0,120 Z",YK,"M0,40 C80,65 160,25 240,60 C320,80 400,20 500,45 C600,70 680,15 780,55 C880,75 960,10 1060,35 C1120,55 1180,30 1200,55 L1200,120 L0,120 Z"],
|
|
16
|
+
null),"mountain",new $APP.P(null,2,[$APP.ak,"M0,90 C100,90 200,30 350,30 C500,30 450,85 600,85 C750,85 700,15 850,15 C1000,15 950,80 1100,80 C1150,80 1200,60 1200,60 L1200,120 L0,120 Z",YK,"M0,80 C100,80 200,45 350,45 C500,45 450,75 600,75 C750,75 700,30 850,30 C1000,30 950,70 1100,70 C1150,70 1200,50 1200,50 L1200,120 L0,120 Z"],null),"drip",new $APP.P(null,2,[$APP.ak,"M0,20 C50,20 100,20 150,20 C175,20 185,60 200,80 C215,100 225,100 240,80 C255,60 265,20 290,20 L450,20 C475,20 485,50 500,70 C515,90 525,90 540,70 C555,50 565,20 590,20 L800,20 C825,20 835,70 850,90 C865,110 875,110 890,90 C905,70 915,20 940,20 L1200,20 L1200,120 L0,120 Z",
|
|
17
|
+
YK,"M0,20 C50,20 100,20 170,20 C195,20 205,55 220,72 C235,90 245,90 260,72 C275,55 285,20 310,20 L470,20 C495,20 505,45 520,62 C535,80 545,80 560,62 C575,45 585,20 610,20 L820,20 C845,20 855,65 870,85 C885,105 895,105 910,85 C925,65 935,20 960,20 L1200,20 L1200,120 L0,120 Z"],null),"slant",new $APP.P(null,2,[$APP.ak,"M0,100 C300,90 600,30 900,10 C1000,5 1100,2 1200,0 L1200,120 L0,120 Z",YK,"M0,80 C300,70 600,50 900,30 C1000,20 1100,10 1200,20 L1200,120 L0,120 Z"],null),"scallop",new $APP.P(null,2,
|
|
18
|
+
[$APP.ak,"M0,60 Q75,0 150,60 Q225,120 300,60 Q375,0 450,60 Q525,120 600,60 Q675,0 750,60 Q825,120 900,60 Q975,0 1050,60 Q1125,120 1200,60 L1200,120 L0,120 Z",YK,"M0,50 Q75,110 150,50 Q225,-10 300,50 Q375,110 450,50 Q525,-10 600,50 Q675,110 750,50 Q825,-10 900,50 Q975,110 1050,50 Q1125,-10 1200,50 L1200,120 L0,120 Z"],null),"cloud",new $APP.P(null,2,[$APP.ak,"M0,80 C50,80 80,40 140,40 C180,40 200,60 220,60 C240,60 260,20 320,20 C380,20 400,50 440,50 C480,50 500,10 560,10 C620,10 640,40 700,40 C760,40 780,25 840,25 C900,25 920,55 960,55 C1000,55 1040,30 1100,30 C1140,30 1180,60 1200,60 L1200,120 L0,120 Z",
|
|
19
|
+
YK,"M0,70 C50,70 80,50 140,50 C180,50 200,70 220,70 C240,70 260,30 320,30 C380,30 400,60 440,60 C480,60 500,20 560,20 C620,20 640,50 700,50 C760,50 780,35 840,35 C900,35 920,65 960,65 C1000,65 1040,40 1100,40 C1140,40 1180,70 1200,70 L1200,120 L0,120 Z"],null)],null),ZK=new $APP.P(null,8,"wave;M0,60 C200,20 400,100 600,60 C800,20 1000,100 1200,60 C1400,20 1600,100 1800,60 L1800,120 L0,120 Z;waves;M0,40 C150,80 300,0 450,40 C600,80 750,10 900,50 C1050,90 1150,30 1200,50 C1350,80 1500,0 1650,40 C1800,80 1800,50 1800,50 L1800,120 L0,120 Z;blob-edge;M0,50 C80,30 160,70 240,45 C320,20 400,80 500,55 C600,30 680,75 780,40 C880,5 960,65 1060,50 C1120,40 1180,60 1200,45 C1280,30 1360,70 1440,45 C1520,20 1600,80 1700,55 C1800,30 1800,50 1800,50 L1800,120 L0,120 Z;mountain;M0,90 C100,90 200,30 350,30 C500,30 450,85 600,85 C750,85 700,15 850,15 C1000,15 950,80 1100,80 C1150,80 1200,60 1300,60 C1400,60 1400,30 1500,30 C1600,30 1550,80 1700,80 C1750,80 1800,60 1800,60 L1800,120 L0,120 Z;drip;M0,20 C50,20 100,20 150,20 C175,20 185,60 200,80 C215,100 225,100 240,80 C255,60 265,20 290,20 L450,20 C475,20 485,50 500,70 C515,90 525,90 540,70 C555,50 565,20 590,20 L800,20 C825,20 835,70 850,90 C865,110 875,110 890,90 C905,70 915,20 940,20 L1200,20 C1225,20 1235,60 1250,80 C1265,100 1275,100 1290,80 C1305,60 1315,20 1340,20 L1500,20 C1525,20 1535,50 1550,70 C1565,90 1575,90 1590,70 C1605,50 1615,20 1640,20 L1800,20 L1800,120 L0,120 Z;slant;M0,100 C300,90 600,30 900,10 C1000,5 1100,2 1200,0 C1300,2 1500,90 1800,100 L1800,120 L0,120 Z;scallop;M0,60 Q75,0 150,60 Q225,120 300,60 Q375,0 450,60 Q525,120 600,60 Q675,0 750,60 Q825,120 900,60 Q975,0 1050,60 Q1125,120 1200,60 Q1275,0 1350,60 Q1425,120 1500,60 Q1575,0 1650,60 Q1725,120 1800,60 L1800,120 L0,120 Z;cloud;M0,80 C50,80 80,40 140,40 C180,40 200,60 220,60 C240,60 260,20 320,20 C380,20 400,50 440,50 C480,50 500,10 560,10 C620,10 640,40 700,40 C760,40 780,25 840,25 C900,25 920,55 960,55 C1000,55 1040,30 1100,30 C1140,30 1180,60 1200,60 C1240,60 1260,20 1320,20 C1380,20 1400,50 1440,50 C1480,50 1500,10 1560,10 C1620,10 1640,40 1700,40 C1760,40 1780,60 1800,60 L1800,120 L0,120 Z".split(";"),
|
|
20
|
+
null);$APP.ka("baredom.exports.x_organic_divider.init",fL);export const init=fL;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
+
var mW=function(a){return typeof a==="string"&&(a=a.trim(),$APP.O(a,""))?(a=parseFloat(a),$APP.r(isNaN(a))?null:Math.min(100,Math.max(0,a))):null},oW=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(nW,a)?a:"vine"},pW=function(a){return a==null?!0:$APP.O((""+$APP.S.g(a)).trim().toLowerCase(),"false")},rW=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(qW,a)?a:"normal"},sW=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a===
|
|
3
|
+
"number"&&$APP.t(isNaN(a))&&a>0?a:42):42},tW=function(a){return typeof a==="string"?(a=a.trim(),$APP.O(a,"")?a:null):null},uW=function(a){return typeof a==="string"?(a=a.trim(),$APP.O(a,"")?a:null):null},vW=function(a){a=(typeof a==="number"&&$APP.t(isNaN(a))&&a>0?Math.floor(a):42)|0;return[a===0?1:a]},wW=function(a){var b=a[0];b^=b<<13;b^=b>>>17;b=b^b<<5|0;a[0]=b;return Math.abs(b)/2147483647},BW=function(a,b){var c=(a+b)*xW,d=Math.floor(a+c);c=Math.floor(b+c);var e=(d+c)*yW,g=a-(d-e),h=b-(c-e),
|
|
4
|
+
k=g>h?1:0,m=g>h?0:1,p=g+-k-yW,q=h+-m-yW,w=g+-1-2*yW,x=h+-1-2*yW,y=d&255,A=c&255,C=.5-g*g-h*h,E=.5-p*p-q*q,H=.5-w*w-x*x;return 70*((C<0?0:function(){var F=C*C,K=zW[AW[y+AW[A&255]&255]&11];return F*F*(K[0]*g+K[1]*h)}())+(E<0?0:function(){var F=E*E,K=zW[AW[y+k+AW[A+m&255]&255]&11];return F*F*(K[0]*p+K[1]*q)}())+(H<0?0:function(){var F=H*H,K=zW[AW[y+1+AW[A+1&255]&255]&11];return F*F*(K[0]*w+K[1]*x)}()))},CW=function(a){var b=a*17.31,c=a*31.17;return function(d,e){return BW(d+b,e+c)}},DW=function(a,b,
|
|
5
|
+
c){var d=[],e=[];c=vW(c);for(var g=[0],h=[20,100,0,0],k=a.length,m=0;;)if(m<k){switch(a.charAt(m)){case "F":var p=h[0],q=h[1],w=h[2],x=h[3],y=g[0],A=38*Math.pow(.7,x)*(.8+.4*wW(c)),C=function(){var H=y*.3;var F=x*.5;H=b.i?b.i(H,F):b.call(null,H,F);return w+.15*H}(),E=p+A*Math.cos(C);A=q+A*Math.sin(C);d.push({x1:p,y1:q,x2:E,y2:A,depth:x,index:y});h[0]=E;h[1]=A;g[0]=y+1;break;case "+":p=function(){var H=g[0]*.2;return b.i?b.i(H,100):b.call(null,H,100)}();h[2]-=.436+.1*p;break;case "-":p=function(){var H=
|
|
6
|
+
g[0]*.2;return b.i?b.i(H,200):b.call(null,H,200)}();h[2]+=.436+.1*p;break;case "[":e.push([h[0],h[1],h[2],h[3]]);h[3]+=1;break;case "]":e.length>0&&(p=e.pop(),h[0]=p[0],h[1]=p[1],h[2]=p[2],h[3]=p[3])}m+=1}else break;d.sort(function(H,F){var K=$APP.l(H,"x2")-20;H=$APP.l(H,"y2")-100;var X=$APP.l(F,"x2")-20;F=$APP.l(F,"y2")-100;return K*K+H*H-(X*X+F*F)});return[d,d.length]},EW=function(a,b,c,d){a=""+$APP.S.g(a.toFixed(1))+","+$APP.S.g(b.toFixed(1));c=""+$APP.S.g(c.toFixed(1))+","+$APP.S.g(d.toFixed(1));
|
|
7
|
+
return $APP.Tc(a,c)<0?""+$APP.S.g(a)+"-"+$APP.S.g(c):""+$APP.S.g(c)+"-"+$APP.S.g(a)},GW=function(a,b){b=$APP.Dc(FW,b,25);var c=vW(a),d=1.5*b,e=Math.sqrt(3)*b,g=Math.ceil(800/d)+4,h=Math.ceil(200/e)+4;a=[];for(var k=Math.sqrt(17E4),m=-2;;)if(m<g){for(var p=m*d,q=$APP.Xd(m)?0:e/2,w=-2;;)if(w<h){var x=w*e+q;if(p>0-b&&p<800+b&&x>0-b&&x<200+b){var y=p-400,A=x-100;y=Math.sqrt(y*y+A*A);A=y*.7+wW(c)*.3*k;a.push({cx:p,cy:x,dist:y,key:A})}w+=1}else break;m+=1}else break;a.sort(function(H,F){return $APP.l(H,
|
|
8
|
+
"key")-$APP.l(F,"key")});c={};d=[];e=[0];g=a.length;for(h=0;;)if(h<g){q=a[h];m=$APP.l(q,"cx");p=$APP.l(q,"cy");q=Math.min(2,Math.floor($APP.l(q,"dist")*3/(k+.001)));for(w=0;;)if(w<6){y=Math.PI/3*w;var C=Math.PI/3*(w+1);x=m+b*Math.cos(y);y=p+b*Math.sin(y);A=m+b*Math.cos(C);C=p+b*Math.sin(C);var E=EW(x,y,A,C);$APP.r($APP.l(c,E))||(c[E]=!0,E=e[0],d.push({x1:x,y1:y,x2:A,y2:C,depth:q,index:E}),e[0]=E+1);w+=1}else break;h+=1}else break;return[d,d.length]},HW=function(a,b,c,d){b=c+(120*(b-a)-12*c)*d;return[a+
|
|
9
|
+
b*d,b]},IW=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},PW=function(a){a=new $APP.P(null,7,[$APP.tj,a.getAttribute("progress"),$APP.Ak,a.getAttribute("variant"),$APP.Vl,a.getAttribute("color"),JW,a.getAttribute("bloom"),KW,a.getAttribute("density"),LW,a.getAttribute("seed"),$APP.Oh,a.getAttribute("label")],null);var b=$APP.N(a),c=$APP.G(b,$APP.tj);a=$APP.G(b,$APP.Ak);var d=$APP.G(b,$APP.Vl),e=$APP.G(b,JW),g=$APP.G(b,KW),h=$APP.G(b,LW);b=$APP.G(b,$APP.Oh);
|
|
10
|
+
c=mW(c);var k=c==null,m=$APP.r(c)?c:0,p=!k&&m>=100;return $APP.Q([$APP.al,$APP.fj,$APP.Fh,MW,NW,$APP.Nl,$APP.T,$APP.Qk,$APP.rk,$APP.dl,OW],[k,uW(d),oW(a),pW(e),sW(h),k?"Loading...":""+$APP.S.g(Math.round(m))+"%",tW(b),m,p,c,rW(g)])},QW=function(a,b,c){a=window.getComputedStyle(a).getPropertyValue(b).trim();return $APP.O(a,"")?a:c},RW=function(a,b){a=window.getComputedStyle(a).getPropertyValue("--x-organic-progress-branch-width").trim();return $APP.O(a,"")?(a=parseFloat(a),$APP.r(isNaN(a))?b:a):b},
|
|
11
|
+
TW=function(a,b,c){var d=$APP.N($APP.l(a,"__xOrganicProgressRefs")),e=$APP.G(d,SW);d=function(){var y=$APP.l(a,"__xOrganicProgressLines");return $APP.r(y)?y:[]}();for(var g=d.length,h=[],k=0;;)if(k<b){var m=k<g?d[k]:function(){var y=document.createElementNS("http://www.w3.org/2000/svg","line");y.setAttribute("stroke-linecap","round");e.appendChild(y);return y}(),p=c[k],q=$APP.l(p,"y1"),w=$APP.l(p,"x2"),x=$APP.l(p,"y2");m.setAttribute("x1",""+$APP.S.g($APP.l(p,"x1")));m.setAttribute("y1",""+$APP.S.g(q));
|
|
12
|
+
m.setAttribute("x2",""+$APP.S.g(w));m.setAttribute("y2",""+$APP.S.g(x));m.setAttribute("opacity","0");h.push(m);k+=1}else break;for(;;)if(b<g)e.removeChild(d[b]),b+=1;else break;a.__xOrganicProgressLines=h;a.__xOrganicProgressPV=-1},UW=function(a){var b=$APP.l(a,"__xOrganicProgressLines"),c=$APP.l(a,"__xOrganicProgressSegs"),d=$APP.l(a,"__xOrganicProgressSegN"),e=$APP.l(a,"__xOrganicProgressModel"),g=$APP.D.i($APP.Fh.g(e),"honeycomb"),h=function(){var A=$APP.fj.g(e);return $APP.r(A)?A:QW(a,"--x-organic-progress-color-primary",
|
|
13
|
+
g?"#818cf8":"#22c55e")}(),k=QW(a,"--x-organic-progress-color-secondary",g?"#a5b4fc":"#16a34a"),m=RW(a,g?1.5:3);if(g)for(var p=0;;)if(p<d){var q=b[p],w=$APP.l(c[p],"depth");q.setAttribute("stroke-width",""+$APP.S.g(m));q.setAttribute("stroke",function(){switch(w){case 0:return h;case 1:return k;default:return k}}());q.setAttribute("stroke-linecap","round");q.setAttribute("stroke-opacity",function(){switch(w){case 0:return"0.9";case 1:return"0.7";default:return"0.5"}}());p+=1}else break;else for(p=
|
|
14
|
+
0;;)if(p<d){q=b[p];var x=$APP.l(c[p],"depth"),y=x===0?h:k;q.setAttribute("stroke-width",""+$APP.S.g(Math.max(.5,m-x*.6)));q.setAttribute("stroke",y);q.setAttribute("stroke-linecap","round");q.setAttribute("stroke-opacity","1");p+=1}else break},VW=function(a){var b=$APP.l(a,"__xOrganicProgressSPos"),c=$APP.l(a,"__xOrganicProgressSegN"),d=Math.floor(b/100*c),e=$APP.l(a,"__xOrganicProgressPV"),g=$APP.l(a,"__xOrganicProgressLines");if($APP.O(d,e)){c=Math.max(d,e<0?c:e);for(e=Math.min(d,e<0?0:e);;)if(e<
|
|
15
|
+
c){var h=g[e];$APP.r(h)&&h.setAttribute("opacity",e<d?"1":"0");e+=1}else break;g=$APP.l(a,"__xOrganicProgressNodes");c=$APP.l(a,"__xOrganicProgressNN");c=$APP.r(c)?c:0;if($APP.r($APP.r(g)?c>0:g))for(b=Math.floor(b/100*c),e=0;;)if(e<c)h=g[e],$APP.r(h)&&h.setAttribute("opacity",e<b?"1":"0"),e+=1;else break;a.__xOrganicProgressPV=d}},XW=function(a){var b=$APP.l(a,"__xOrganicProgressSegs"),c=$APP.l(a,"__xOrganicProgressSegN"),d=$APP.N($APP.l(a,"__xOrganicProgressRefs"));d=$APP.G(d,WW);var e=$APP.l(a,
|
|
16
|
+
"__xOrganicProgressModel"),g=QW(a,"--x-organic-progress-bloom-color","#f472b6");e=vW(NW.g(e)+7);for(var h=[],k=0;;)if(k<c){var m=b[k];if($APP.l(m,"depth")>=2){var p=document.createElementNS("http://www.w3.org/2000/svg","circle"),q=$APP.l(m,"x2");m=$APP.l(m,"y2");var w=2*wW(e)-1,x=2*wW(e)-1;p.setAttribute("cx",""+$APP.S.g(q));p.setAttribute("cy",""+$APP.S.g(m));p.setAttribute("r","0");p.setAttribute("fill",g);p.setAttribute("opacity","0");p.setAttribute("class","bloom-petal");p.__dx=w;p.__dy=x;d.appendChild(p);
|
|
17
|
+
h.push(p)}k+=1}else break;a.__xOrganicProgressBEls=h;a.__xOrganicProgressBloom=!0;a.__xOrganicProgressBT=0},YW=function(a,b){b=$APP.l(a,"__xOrganicProgressBT")+b;var c=b/1.5;a.__xOrganicProgressBT=b;if(c>1){b=$APP.N($APP.l(a,"__xOrganicProgressRefs"));b=$APP.G(b,WW);c=$APP.l(a,"__xOrganicProgressBEls");if($APP.r(c))for(var d=c.length,e=0;;)if(e<d){var g=c[e];$APP.r(g.parentNode)&&b.removeChild(g);e+=1}else break;a.__xOrganicProgressBEls=null;a.__xOrganicProgressBloom=!1;a.dispatchEvent(new CustomEvent("x-organic-progress-bloom-end",
|
|
18
|
+
{bubbles:!0,composed:!0,detail:{progress:100}}))}else for(a=$APP.l(a,"__xOrganicProgressBEls"),b=1-Math.min(c,1),b=4*(1-b*b*b),c=Math.max(0,1-c*c),d=a.length,e=0;;)if(e<d){g=a[e];var h=$APP.l(g,"__dx")*b*8,k=$APP.l(g,"__dy")*b*8;g.setAttribute("r",""+$APP.S.g(b*2.5));g.setAttribute("opacity",""+$APP.S.g(c));g.setAttribute("transform","translate("+$APP.S.g(h)+","+$APP.S.g(k)+")");e+=1}else break},$W=function(a){a.__xOrganicProgressTime=0;a.__xOrganicProgressSPos=0;a.__xOrganicProgressSVel=0;$APP.n(a,
|
|
19
|
+
"__xOrganicProgressLF",performance.now());a.__xOrganicProgressDone=!1;a.__xOrganicProgressBloom=!1;a.__xOrganicProgressPV=-1;$APP.n(a,"__xOrganicProgressRaf",requestAnimationFrame(function(){return ZW(a)}))},aX=function(a){for(var b=$APP.l(a,"__xOrganicProgressModel"),c=$APP.l(a,"__xOrganicProgressSegN"),d=$APP.r($APP.al.g(b))?50:$APP.Qk.g(b),e=Math.floor(d/100*c),g=$APP.l(a,"__xOrganicProgressLines"),h=0;;)if(h<c){var k=g[h];$APP.r(k)&&k.setAttribute("opacity",h<e?"1":"0");h+=1}else break;c=$APP.l(a,
|
|
20
|
+
"__xOrganicProgressNodes");g=function(){var m=$APP.l(a,"__xOrganicProgressNN");return $APP.r(m)?m:0}();if($APP.r($APP.r(c)?g>0:c))for(d=Math.floor(d/100*g),h=0;;)if(h<g)k=c[h],$APP.r(k)&&k.setAttribute("opacity",h<d?"1":"0"),h+=1;else break;a.__xOrganicProgressPV=e;$APP.r(function(){var m=$APP.rk.g(b);return $APP.r(m)?$APP.t($APP.l(a,"__xOrganicProgressDone")):m}())&&(a.__xOrganicProgressDone=!0,a.dispatchEvent(new CustomEvent("x-organic-progress-complete",{bubbles:!0,composed:!0,detail:{progress:100}})))},
|
|
21
|
+
eX=function(a,b){var c=PW(a);a.__xOrganicProgressModel=c;a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin","0");a.setAttribute("aria-valuemax","100");$APP.r($APP.al.g(c))?(a.removeAttribute("aria-valuenow"),a.setAttribute("aria-busy","true"),a.setAttribute("aria-valuetext","Loading...")):(a.setAttribute("aria-valuenow",""+$APP.S.g(Math.round($APP.Qk.g(c)))),a.removeAttribute("aria-busy"),a.setAttribute("aria-valuetext",$APP.Nl.g(c)));var d=$APP.T.g(c);$APP.r(d)?a.setAttribute("aria-label",
|
|
22
|
+
d):a.removeAttribute("aria-label");if(b==null||$APP.J(bX,b)){b=$APP.D.i($APP.Fh.g(c),"honeycomb");d=$APP.Dc(cX,OW.g(c),3);if(b)c=GW(NW.g(c),OW.g(c));else{a:{for(var e=new $APP.P(null,1,["F","F[+F]F[-F]F"],null),g="F",h=0;;){if(h>=d){d=g;break a}for(var k=[],m=g.length,p=0;;)if(p<m){var q=g.charAt(p),w=$APP.G(e,q);$APP.r(w)?k.push(w):k.push(q);p+=1}else break;h+=1;g=k.join("")}d=void 0}e=CW(NW.g(c));c=DW(d,e,NW.g(c))}d=c;c=d[0];d=d[1];a.__xOrganicProgressSegs=c;a.__xOrganicProgressSegN=d;TW(a,d,c);
|
|
23
|
+
d=$APP.N($APP.l(a,"__xOrganicProgressRefs"));c=$APP.G(d,SW);d=$APP.G(d,$APP.Ii);$APP.r(c)&&($APP.r(b)?c.removeAttribute("filter"):c.setAttribute("filter","url(#x-organic-progress-gooey)"));$APP.r($APP.r(d)?$APP.t(b):d)&&d.setAttribute("stdDeviation","2");b=$APP.N($APP.l(a,"__xOrganicProgressRefs"));b=$APP.G(b,dX);c=$APP.l(a,"__xOrganicProgressNodes");if($APP.r($APP.r(b)?c:b))for(d=c.length,e=0;;)if(e<d)g=c[e],$APP.r(g.parentNode)&&b.removeChild(g),e+=1;else break;a.__xOrganicProgressNodes=null;a.__xOrganicProgressND=
|
|
24
|
+
null;a.__xOrganicProgressNN=0;UW(a);a.__xOrganicProgressPV=-1;IW()&&aX(a)}},fX=function(a){Object.defineProperty(a,"progress",{get:function(){return mW(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){return oW(this.getAttribute("variant"))},set:function(b){return b==null?this.removeAttribute("variant"):this.setAttribute("variant",
|
|
25
|
+
""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"color",{get:function(){return uW(this.getAttribute("color"))},set:function(b){return b==null?this.removeAttribute("color"):this.setAttribute("color",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"bloom",{get:function(){return pW(this.getAttribute("bloom"))},set:function(b){return $APP.r(b)?this.removeAttribute("bloom"):this.setAttribute("bloom","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
26
|
+
"density",{get:function(){return rW(this.getAttribute("density"))},set:function(b){return b==null?this.removeAttribute("density"):this.setAttribute("density",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"seed",{get:function(){return sW(this.getAttribute("seed"))},set:function(b){return b==null?this.removeAttribute("seed"):this.setAttribute("seed",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){return tW(this.getAttribute("label"))},
|
|
27
|
+
set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.S.g(b))},enumerable:!0,configurable:!0})},iX=function(){var a=class extends HTMLElement{};a.observedAttributes=gX;a.prototype.connectedCallback=function(){this.__xOrganicProgressModel=PW(this);if(!$APP.r($APP.l(this,"__xOrganicProgressRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg",
|
|
28
|
+
"defs"),g=document.createElementNS("http://www.w3.org/2000/svg","g"),h=document.createElementNS("http://www.w3.org/2000/svg","g"),k=document.createElementNS("http://www.w3.org/2000/svg","g");c.textContent=hX;d.setAttribute("part","svg");d.setAttribute("viewBox","0 0 800 200");d.setAttribute("preserveAspectRatio","xMidYMid slice");d.setAttribute("aria-hidden","true");g.setAttribute("part","branches");g.setAttribute("filter","url(#"+$APP.S.g("x-organic-progress-gooey")+")");h.setAttribute("part","nodes");
|
|
29
|
+
k.setAttribute("part","blooms");var m=document.createElementNS("http://www.w3.org/2000/svg","filter");var p=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),q=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix");m.setAttribute("id","x-organic-progress-gooey");m.setAttribute("x","-10%");m.setAttribute("y","-10%");m.setAttribute("width","120%");m.setAttribute("height","120%");p.setAttribute("in","SourceGraphic");p.setAttribute("stdDeviation",""+$APP.S.g(2));
|
|
30
|
+
p.setAttribute("result","blur");q.setAttribute("in","blur");q.setAttribute("type","matrix");q.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7");m.appendChild(p);m.appendChild(q);e.appendChild(m);m=new $APP.P(null,3,[$APP.qk,m,$APP.Ii,p,$APP.Kl,q],null);d.appendChild(e);d.appendChild(g);d.appendChild(h);d.appendChild(k);b.appendChild(c);b.appendChild(d);this.__xOrganicProgressRefs=$APP.Vf($APP.wc([m,new $APP.P(null,5,[$APP.bi,b,$APP.xj,d,SW,g,dX,h,WW,k],null)]))}eX(this,null);UW(this);
|
|
31
|
+
IW()?aX(this):$W(this);return null};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xOrganicProgressRaf");$APP.r(b)&&(cancelAnimationFrame(b),this.__xOrganicProgressRaf=null);if($APP.r($APP.l(this,"__xOrganicProgressBloom"))){b=$APP.N($APP.l(this,"__xOrganicProgressRefs"));b=$APP.G(b,WW);var c=$APP.l(this,"__xOrganicProgressBEls");if($APP.r(c))for(var d=c.length,e=0;;)if(e<d){var g=c[e];$APP.r(g.parentNode)&&b.removeChild(g);e+=1}else break;this.__xOrganicProgressBEls=null;this.__xOrganicProgressBloom=
|
|
32
|
+
!1}return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xOrganicProgressRefs"))&&(eX(this,b),$APP.J(bX,b)||UW(this));return null};fX(a.prototype);return a},jX=function(){$APP.r(customElements.get("x-organic-progress"))||customElements.define("x-organic-progress",iX());return null},dX=new $APP.M(null,"nodes-g","nodes-g",89420858),KW=new $APP.M(null,"density-raw","density-raw",1719413082),SW=new $APP.M(null,"branches-g","branches-g",548989635),MW=new $APP.M(null,
|
|
33
|
+
"bloom?","bloom?",-326837587),JW=new $APP.M(null,"bloom-attr","bloom-attr",-1778398039),OW=new $APP.M(null,"density","density",-1664155941),NW=new $APP.M(null,"seed","seed",68613327),LW=new $APP.M(null,"seed-raw","seed-raw",2146438207),WW=new $APP.M(null,"blooms-g","blooms-g",-1476393864);var gX="progress variant color bloom density seed label".split(" ");$APP.Sd(["x-organic-progress-complete",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-organic-progress-bloom-end",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.dl,$APP.V],null),$APP.kl,!1],null)]);
|
|
34
|
+
var nW=new $APP.R(null,new $APP.P(null,2,["honeycomb",null,"vine",null],null),null),qW=new $APP.R(null,new $APP.P(null,3,["dense",null,"normal",null,"sparse",null],null),null),cX=new $APP.P(null,3,["sparse",2,"normal",3,"dense",4],null),AW=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,
|
|
35
|
+
83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,
|
|
36
|
+
107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],zW=[[1,1],[-1,1],[1,-1],[-1,-1],[1,0],[-1,0],[0,1],[0,-1],[1,1],[-1,1],[1,-1],[-1,-1]],xW=(Math.sqrt(3)-1)/2,yW=(3-Math.sqrt(3))/6,FW=new $APP.P(null,3,["sparse",40,"normal",25,"dense",16],null);var hX=":host{display:block;position:relative;min-height:60px;width:100%;overflow:hidden;"+$APP.S.g("--x-organic-progress-color-primary")+":#22c55e;"+$APP.S.g("--x-organic-progress-color-secondary")+":#16a34a;"+$APP.S.g("--x-organic-progress-bloom-color")+":#f472b6;"+$APP.S.g("--x-organic-progress-bg")+":transparent;"+$APP.S.g("--x-organic-progress-branch-width")+":3;"+$APP.S.g("--x-organic-progress-glow")+":2;"+$APP.S.g("--x-organic-progress-opacity")+":1;background:var("+$APP.S.g("--x-organic-progress-bg")+
|
|
37
|
+
",transparent);opacity:var("+$APP.S.g("--x-organic-progress-opacity")+",1);}[part\x3dsvg]{display:block;width:100%;height:100%;}@media(prefers-color-scheme:dark){:host{--x-organic-progress-color-primary:#4ade80;--x-organic-progress-color-secondary:#22c55e;--x-organic-progress-bloom-color:#f9a8d4;}}@media(prefers-reduced-motion:reduce){[part\x3dsvg]{transition:none!important;}.bloom-petal{transition:none!important;animation:none!important;}}",ZW=function ZW(a){if($APP.r(a.isConnected)){var c=$APP.l(a,
|
|
38
|
+
"__xOrganicProgressModel"),d=performance.now(),e=Math.min(d-$APP.l(a,"__xOrganicProgressLF"),100)/1E3;a.__xOrganicProgressLF=d;a.__xOrganicProgressTime=$APP.l(a,"__xOrganicProgressTime")+e;d=$APP.r($APP.al.g(c))?50+20*Math.sin($APP.l(a,"__xOrganicProgressTime")*1.5):$APP.Qk.g(c);d=HW($APP.l(a,"__xOrganicProgressSPos"),d,$APP.l(a,"__xOrganicProgressSVel"),e);a.__xOrganicProgressSPos=d[0];a.__xOrganicProgressSVel=d[1];VW(a);$APP.r(function(){var g=$APP.rk.g(c);return $APP.r(g)?$APP.t($APP.l(a,"__xOrganicProgressDone")):
|
|
39
|
+
g}())&&(a.__xOrganicProgressDone=!0,a.dispatchEvent(new CustomEvent("x-organic-progress-complete",{bubbles:!0,composed:!0,detail:{progress:100}})),$APP.r(MW.g(c))&&XW(a));$APP.r(function(){var g=$APP.t($APP.rk.g(c));return g?(g=$APP.l(a,"__xOrganicProgressDone"),$APP.r(g)?$APP.t($APP.l(a,"__xOrganicProgressBloom")):g):g}())&&(a.__xOrganicProgressDone=!1);$APP.r($APP.l(a,"__xOrganicProgressBloom"))&&YW(a,e);$APP.n(a,"__xOrganicProgressRaf",requestAnimationFrame(function(){return ZW.g?ZW.g(a):ZW.call(null,
|
|
40
|
+
a)}))}return null},bX=$APP.Yf(["variant","density","seed"]);$APP.ka("baredom.exports.x_organic_progress.init",jX);export const init=jX;
|
package/dist/x-organic-shape.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d.setAttribute("part","shape");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xOrganicShapeBase=d;a.__xOrganicShapeSlot=e;a.__xOrganicShapeInit=!0},
|
|
4
|
-
|
|
5
|
-
"morph")&&m==null?"none":k;h=typeof h==="string"&&$APP.O("",h.trim())?h.trim():"1/1";b=new $APP.
|
|
6
|
-
m.style.setProperty("clip-path",b);m.style.setProperty("aspect-ratio",e);$APP.
|
|
7
|
-
b);
|
|
8
|
-
Object.defineProperty(a,"animation",{get:function(){var b=this.getAttribute("animation");return $APP.
|
|
9
|
-
configurable:!0});Object.defineProperty(a,"width",{get:function(){var b=this.getAttribute("width");return $APP.
|
|
10
|
-
configurable:!0})},
|
|
11
|
-
return a},
|
|
12
|
-
null),"blob-2",new $APP.
|
|
13
|
-
|
|
14
|
-
null),"cloud",new $APP.
|
|
15
|
-
|
|
2
|
+
var lE=function(a){return typeof a==="string"&&$APP.J(kE,a)?a:"blob-1"},mE=function(a){return typeof a==="string"&&$APP.O("",a)?a:null},nE=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-organic-shape-fill:rgba(99,102,241,0.12);--x-organic-shape-stroke:transparent;--x-organic-shape-stroke-width:0;--x-organic-shape-opacity:1;--x-organic-shape-shadow:none;--x-organic-shape-animate-duration:8s;--x-organic-shape-animate-timing:ease-in-out;--x-organic-shape-animate-direction:normal;--x-organic-shape-animate-delay:0s;}@media (prefers-color-scheme:dark){:host{--x-organic-shape-fill:rgba(129,140,248,0.18);}}[part\x3dshape]{width:100%;height:100%;position:relative;overflow:hidden;background:var(--x-organic-shape-fill);outline:var(--x-organic-shape-stroke-width) solid var(--x-organic-shape-stroke);outline-offset:calc(-1 * var(--x-organic-shape-stroke-width));opacity:var(--x-organic-shape-opacity);filter:var(--x-organic-shape-shadow);display:flex;align-items:center;justify-content:center;transition:clip-path 0.3s ease,opacity 0.3s ease;}@keyframes x-organic-shape-morph{0%,100%{clip-path:var(--x-organic-shape-clip);}50%{clip-path:var(--x-organic-shape-clip-alt);}}@keyframes x-organic-shape-pulse{0%,100%{transform:scale(1);}50%{transform:scale(1.06);}}@keyframes x-organic-shape-float{0%,100%{transform:translateY(0);}50%{transform:translateY(-6%);}}@keyframes x-organic-shape-spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}:host([data-animation\x3dmorph]) [part\x3dshape]{animation:x-organic-shape-morph var(--x-organic-shape-animate-duration) var(--x-organic-shape-animate-timing) var(--x-organic-shape-animate-delay) infinite var(--x-organic-shape-animate-direction);}:host([data-animation\x3dpulse]) [part\x3dshape]{animation:x-organic-shape-pulse var(--x-organic-shape-animate-duration) var(--x-organic-shape-animate-timing) var(--x-organic-shape-animate-delay) infinite var(--x-organic-shape-animate-direction);}:host([data-animation\x3dfloat]) [part\x3dshape]{animation:x-organic-shape-float var(--x-organic-shape-animate-duration) var(--x-organic-shape-animate-timing) var(--x-organic-shape-animate-delay) infinite var(--x-organic-shape-animate-direction);}:host([data-animation\x3dspin]) [part\x3dshape]{animation:x-organic-shape-spin var(--x-organic-shape-animate-duration) linear var(--x-organic-shape-animate-delay) infinite var(--x-organic-shape-animate-direction);}@media (prefers-reduced-motion:reduce){:host([data-animation]) [part\x3dshape]{animation:none;}}";
|
|
3
|
+
d.setAttribute("part","shape");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xOrganicShapeBase=d;a.__xOrganicShapeSlot=e;a.__xOrganicShapeInit=!0},oE=function(a,b){if($APP.r($APP.r(b)?b.assignedNodes().length>0:null))return a.removeAttribute("role"),a.removeAttribute("aria-hidden");a.setAttribute("role","presentation");return a.setAttribute("aria-hidden","true")},uE=function(a){var b=new $APP.P(null,6,[$APP.wj,a.getAttribute("shape"),$APP.ak,a.getAttribute("path"),$APP.Oi,a.getAttribute("animation"),
|
|
4
|
+
pE,a.getAttribute("ratio"),$APP.Lj,a.getAttribute("width"),$APP.pj,a.getAttribute("height")],null);var c=$APP.N(b),d=$APP.G(c,$APP.wj),e=$APP.G(c,$APP.ak),g=$APP.G(c,$APP.Oi),h=$APP.G(c,pE);b=$APP.G(c,$APP.Lj);c=$APP.G(c,$APP.pj);e=typeof e==="string"&&$APP.O("",e.trim())?e.trim():null;d=lE(d);var k=typeof g==="string"&&$APP.J(qE,g)?g:"none";g=e!=null?e:$APP.ke(rE,new $APP.ve(null,2,5,$APP.we,[lE(d),sE],null));var m=e==null?$APP.ke(rE,new $APP.ve(null,2,5,$APP.we,[lE(d),tE],null)):null;k=$APP.D.i(k,
|
|
5
|
+
"morph")&&m==null?"none":k;h=typeof h==="string"&&$APP.O("",h.trim())?h.trim():"1/1";b=new $APP.P(null,8,[$APP.wj,d,$APP.ak,e,sE,g,tE,m,$APP.Oi,k,pE,h,$APP.Lj,mE(b),$APP.pj,mE(c)],null);g=$APP.N(b);b=$APP.G(g,sE);h=$APP.G(g,tE);c=$APP.G(g,$APP.Oi);e=$APP.G(g,pE);d=$APP.G(g,$APP.Lj);g=$APP.G(g,$APP.pj);m=$APP.l(a,"__xOrganicShapeBase");k=$APP.l(a,"__xOrganicShapeSlot");m.style.setProperty("--x-organic-shape-clip",b);$APP.r(h)?m.style.setProperty("--x-organic-shape-clip-alt",h):m.style.removeProperty("--x-organic-shape-clip-alt");
|
|
6
|
+
m.style.setProperty("clip-path",b);m.style.setProperty("aspect-ratio",e);$APP.r(d)?m.style.setProperty("width",d):m.style.removeProperty("width");$APP.r(g)?m.style.setProperty("height",g):m.style.removeProperty("height");$APP.O(c,"none")?a.setAttribute("data-animation",c):a.removeAttribute("data-animation");oE(a,k)},vE=function(a){function b(){return oE(a,c)}$APP.r($APP.l(a,"__xOrganicShapeInit"))||nE(a);var c=$APP.l(a,"__xOrganicShapeSlot");a.__xOrganicShapeSlotHandler=b;c.addEventListener("slotchange",
|
|
7
|
+
b);uE(a)},wE=function(a){Object.defineProperty(a,"shape",{get:function(){var b=this.getAttribute("shape");return $APP.r(b)?b:"blob-1"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("shape",b):this.removeAttribute("shape")},enumerable:!0,configurable:!0});Object.defineProperty(a,"path",{get:function(){return this.getAttribute("path")},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("path",b):this.removeAttribute("path")},enumerable:!0,configurable:!0});
|
|
8
|
+
Object.defineProperty(a,"animation",{get:function(){var b=this.getAttribute("animation");return $APP.r(b)?b:"none"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"ratio",{get:function(){var b=this.getAttribute("ratio");return $APP.r(b)?b:"1/1"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("ratio",b):this.removeAttribute("ratio")},enumerable:!0,
|
|
9
|
+
configurable:!0});Object.defineProperty(a,"width",{get:function(){var b=this.getAttribute("width");return $APP.r(b)?b:""},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("width",b):this.removeAttribute("width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"height",{get:function(){var b=this.getAttribute("height");return $APP.r(b)?b:""},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("height",b):this.removeAttribute("height")},enumerable:!0,
|
|
10
|
+
configurable:!0})},yE=function(){var a=class extends HTMLElement{};a.observedAttributes=xE;a.prototype.connectedCallback=function(){vE(this);return null};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xOrganicShapeSlot"),c=$APP.l(this,"__xOrganicShapeSlotHandler");return $APP.r($APP.r(b)?c:b)?b.removeEventListener("slotchange",c):null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xOrganicShapeInit"))&&uE(this);return null};wE(a.prototype);
|
|
11
|
+
return a},zE=function(){$APP.r(customElements.get("x-organic-shape"))||customElements.define("x-organic-shape",yE());return null},pE=new $APP.M(null,"ratio","ratio",-926560044),sE=new $APP.M(null,"clip","clip",830998499),tE=new $APP.M(null,"clip-alt","clip-alt",-684562835);var xE="shape path animation ratio width height".split(" "),qE=new $APP.R(null,new $APP.P(null,5,["float",null,"none",null,"pulse",null,"spin",null,"morph",null],null),null),kE=new $APP.R(null,new $APP.P(null,8,["cloud",null,"blob-3",null,"leaf",null,"pebble",null,"blob-1",null,"blob-2",null,"wave",null,"droplet",null],null),null),rE=new $APP.P(null,8,["blob-1",new $APP.P(null,2,[sE,"polygon(30% 0%, 70% 0%, 100% 30%, 95% 70%, 70% 100%, 30% 95%, 0% 70%, 5% 30%)",tE,"polygon(25% 5%, 75% 0%, 95% 25%, 100% 65%, 75% 95%, 25% 100%, 0% 65%, 5% 25%)"],
|
|
12
|
+
null),"blob-2",new $APP.P(null,2,[sE,"polygon(50% 0%, 80% 10%, 100% 40%, 95% 75%, 70% 100%, 30% 100%, 5% 75%, 0% 40%, 20% 10%)",tE,"polygon(50% 5%, 85% 15%, 100% 45%, 90% 80%, 65% 95%, 35% 95%, 10% 80%, 0% 45%, 15% 15%)"],null),"blob-3",new $APP.P(null,2,[sE,"polygon(20% 0%, 80% 0%, 100% 20%, 100% 50%, 90% 80%, 70% 100%, 30% 100%, 10% 80%, 0% 50%, 0% 20%)",tE,"polygon(25% 5%, 75% 5%, 95% 25%, 100% 55%, 85% 85%, 65% 95%, 35% 95%, 15% 85%, 0% 55%, 5% 25%)"],null),"pebble",new $APP.P(null,2,[sE,"polygon(50% 2%, 78% 8%, 96% 30%, 98% 60%, 85% 88%, 55% 98%, 25% 92%, 4% 65%, 2% 35%, 22% 8%)",
|
|
13
|
+
tE,"polygon(50% 5%, 75% 12%, 93% 32%, 96% 58%, 82% 85%, 52% 96%, 28% 90%, 8% 62%, 5% 38%, 25% 12%)"],null),"leaf",new $APP.P(null,2,[sE,"polygon(50% 0%, 80% 15%, 98% 45%, 90% 75%, 65% 98%, 50% 100%, 35% 98%, 10% 75%, 2% 45%, 20% 15%)",tE,"polygon(50% 3%, 78% 18%, 95% 42%, 88% 72%, 62% 95%, 50% 97%, 38% 95%, 12% 72%, 5% 42%, 22% 18%)"],null),"droplet",new $APP.P(null,2,[sE,"polygon(50% 0%, 72% 20%, 90% 50%, 95% 72%, 80% 92%, 50% 100%, 20% 92%, 5% 72%, 10% 50%, 28% 20%)",tE,"polygon(50% 5%, 70% 22%, 88% 48%, 92% 70%, 78% 90%, 50% 97%, 22% 90%, 8% 70%, 12% 48%, 30% 22%)"],
|
|
14
|
+
null),"cloud",new $APP.P(null,2,[sE,"polygon(10% 60%, 0% 45%, 5% 30%, 18% 20%, 32% 15%, 45% 8%, 58% 12%, 72% 8%, 85% 18%, 95% 32%, 100% 50%, 95% 65%, 80% 75%, 55% 80%, 30% 78%, 15% 72%)",tE,"polygon(12% 58%, 2% 43%, 8% 28%, 20% 18%, 35% 12%, 48% 10%, 60% 14%, 75% 10%, 88% 20%, 97% 35%, 98% 52%, 92% 68%, 78% 78%, 52% 82%, 28% 80%, 13% 70%)"],null),"wave",new $APP.P(null,2,[sE,"polygon(0% 35%, 15% 20%, 30% 30%, 50% 15%, 70% 28%, 85% 18%, 100% 30%, 100% 75%, 85% 85%, 70% 72%, 50% 85%, 30% 75%, 15% 82%, 0% 70%)",
|
|
15
|
+
tE,"polygon(0% 30%, 15% 25%, 30% 35%, 50% 20%, 70% 32%, 85% 22%, 100% 35%, 100% 70%, 85% 80%, 70% 68%, 50% 80%, 30% 70%, 15% 78%, 0% 65%)"],null)],null);$APP.ka("baredom.exports.x_organic_shape.init",zE);export const init=zE;
|
package/dist/x-pagination.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
var g=document.createElement("li");var h=document.createElement("button"),k=document.createElement("slot");g.setAttribute("part","item item-prev");h.setAttribute("part","button button-prev");h.setAttribute("aria-label","Previous page");k.setAttribute("name","prev");k.textContent="Prev";h.appendChild(k);g.appendChild(h);g=new $APP.
|
|
4
|
-
k.setAttribute("part","button button-next");k.setAttribute("aria-label","Next page");m.setAttribute("name","next");m.textContent="Next";k.appendChild(m);h.appendChild(k);h=new $APP.
|
|
5
|
-
d.setAttribute("part","nav");e.setAttribute("part","list");e.appendChild(
|
|
6
|
-
"button button-page");e.setAttribute("aria-label","Page "+$APP.S.g(a));e.setAttribute("data-page",""+$APP.S.g(a));$APP.
|
|
7
|
-
"…";a.appendChild(b);return a}
|
|
8
|
-
parseInt(e,10);var k=isFinite(e);e=$APP.
|
|
9
|
-
|
|
10
|
-
[$APP.Z,
|
|
11
|
-
c.appendChild(
|
|
12
|
-
d=0;;)if(d<c){var e=b[d];if($APP.
|
|
13
|
-
d)}var c=
|
|
14
|
-
""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},
|
|
15
|
-
configurable:!0})},
|
|
16
|
-
c,d){$APP.O(c,d)&&
|
|
17
|
-
|
|
2
|
+
var dH=function(a){for(var b=[],c=arguments.length,d=0;;)if(d<c)b.push(arguments[d]),d+=1;else break;return $APP.Zc($APP.Aa,$APP.lh,0<b.length?new $APP.Vb(b.slice(0),0,null):null)},eH=function(a){if(typeof a==="string"){a=parseInt(a,10);var b=isFinite(a);return $APP.r($APP.r(b)?a>0:b)?a:1}return 1},jH=function(a){var b=$APP.l(a,"__xPaginationRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("nav"),e=document.createElement("ol");
|
|
3
|
+
var g=document.createElement("li");var h=document.createElement("button"),k=document.createElement("slot");g.setAttribute("part","item item-prev");h.setAttribute("part","button button-prev");h.setAttribute("aria-label","Previous page");k.setAttribute("name","prev");k.textContent="Prev";h.appendChild(k);g.appendChild(h);g=new $APP.P(null,2,[fH,g,gH,h],null);h=document.createElement("li");k=document.createElement("button");var m=document.createElement("slot");h.setAttribute("part","item item-next");
|
|
4
|
+
k.setAttribute("part","button button-next");k.setAttribute("aria-label","Next page");m.setAttribute("name","next");m.textContent="Next";k.appendChild(m);h.appendChild(k);h=new $APP.P(null,2,[fH,h,gH,k],null);c.textContent=":host{display:block;color-scheme:light dark;--x-pagination-gap:0.25rem;--x-pagination-button-size:2rem;--x-pagination-button-radius:0.375rem;--x-pagination-button-bg:transparent;--x-pagination-button-color:rgba(0,0,0,0.75);--x-pagination-button-border:1px solid rgba(0,0,0,0.15);--x-pagination-button-hover-bg:rgba(0,0,0,0.06);--x-pagination-button-hover-color:rgba(0,0,0,0.9);--x-pagination-current-bg:rgba(0,0,0,0.88);--x-pagination-current-color:#fff;--x-pagination-current-border:1px solid transparent;--x-pagination-disabled-opacity:0.4;--x-pagination-font-size:0.875rem;--x-pagination-ellipsis-color:rgba(0,0,0,0.45);}@media (prefers-color-scheme:dark){:host{--x-pagination-button-color:rgba(255,255,255,0.75);--x-pagination-button-border:1px solid rgba(255,255,255,0.15);--x-pagination-button-hover-bg:rgba(255,255,255,0.08);--x-pagination-button-hover-color:rgba(255,255,255,0.95);--x-pagination-current-bg:rgba(255,255,255,0.90);--x-pagination-current-color:#000;--x-pagination-ellipsis-color:rgba(255,255,255,0.40);}}:host([data-size\x3d'sm']){--x-pagination-button-size:1.75rem;--x-pagination-font-size:0.75rem;}:host([data-size\x3d'lg']){--x-pagination-button-size:2.5rem;--x-pagination-font-size:1rem;}[part~\x3d'nav']{display:block;}[part~\x3d'list']{display:flex;flex-wrap:wrap;align-items:center;list-style:none;margin:0;padding:0;gap:var(--x-pagination-gap);}[part~\x3d'button']{display:inline-flex;align-items:center;justify-content:center;min-width:var(--x-pagination-button-size);height:var(--x-pagination-button-size);padding:0 0.5rem;border:var(--x-pagination-button-border);border-radius:var(--x-pagination-button-radius);background:var(--x-pagination-button-bg);color:var(--x-pagination-button-color);font:inherit;font-size:var(--x-pagination-font-size);cursor:pointer;user-select:none;box-sizing:border-box;transition:background 0.15s,color 0.15s;}[part~\x3d'button']:hover:not(:disabled){background:var(--x-pagination-button-hover-bg);color:var(--x-pagination-button-hover-color);}[part~\x3d'button'][data-current]{background:var(--x-pagination-current-bg);color:var(--x-pagination-current-color);border:var(--x-pagination-current-border);font-weight:600;cursor:default;}[part~\x3d'button']:disabled{opacity:var(--x-pagination-disabled-opacity);cursor:not-allowed;}[part~\x3d'ellipsis']{display:inline-flex;align-items:center;justify-content:center;min-width:var(--x-pagination-button-size);height:var(--x-pagination-button-size);color:var(--x-pagination-ellipsis-color);font-size:var(--x-pagination-font-size);user-select:none;}@media (prefers-reduced-motion:reduce){[part~\x3d'button']{transition:none !important;}}";
|
|
5
|
+
d.setAttribute("part","nav");e.setAttribute("part","list");e.appendChild(fH.g(g));e.appendChild(fH.g(h));d.appendChild(e);b.appendChild(c);b.appendChild(d);b=new $APP.P(null,6,[$APP.Xh,d,$APP.lk,e,hH,fH.g(g),$APP.Ci,gH.g(g),iH,fH.g(h),$APP.wh,gH.g(h)],null);a.__xPaginationRefs=b;return $APP.l(a,"__xPaginationRefs")},kH=function(a,b,c){var d=document.createElement("li"),e=document.createElement("button");d.setAttribute("part","item item-page");d.setAttribute("data-page",""+$APP.S.g(a));e.setAttribute("part",
|
|
6
|
+
"button button-page");e.setAttribute("aria-label","Page "+$APP.S.g(a));e.setAttribute("data-page",""+$APP.S.g(a));$APP.r(b)&&(e.setAttribute("aria-current","page"),e.setAttribute("data-current",""));$APP.r(c)&&e.setAttribute("disabled","");e.textContent=""+$APP.S.g(a);d.appendChild(e);return d},lH=function(){var a=document.createElement("li"),b=document.createElement("span");a.setAttribute("part","item item-ellipsis");b.setAttribute("part","ellipsis");b.setAttribute("aria-hidden","true");b.textContent=
|
|
7
|
+
"…";a.appendChild(b);return a},vH=function(a){a=new $APP.P(null,7,[mH,a.getAttribute("page"),nH,a.getAttribute("total-pages"),oH,a.getAttribute("sibling-count"),pH,a.getAttribute("boundary-count"),$APP.Yk,a.getAttribute("size"),$APP.Rk,a.hasAttribute("disabled"),$APP.Oh,a.getAttribute("label")],null);var b=$APP.N(a),c=$APP.G(b,mH),d=$APP.G(b,nH),e=$APP.G(b,oH),g=$APP.G(b,pH),h=$APP.G(b,$APP.Yk);a=$APP.G(b,$APP.Rk);b=$APP.G(b,$APP.Oh);d=eH(d);c=$APP.Yg.i(1,$APP.Zg.i(eH(c),d));if(typeof e==="string"){e=
|
|
8
|
+
parseInt(e,10);var k=isFinite(e);e=$APP.r($APP.r(k)?e>=0:k)?e:1}else e=1;typeof g==="string"?(g=parseInt(g,10),k=isFinite(g),k=$APP.r($APP.r(k)?g>=0:k)?g:1):k=1;g=e;e=k;h=typeof h==="string"?h.trim().toLowerCase():null;h=$APP.J(qH,h)?h:"md";return new $APP.P(null,7,[rH,c,sH,d,tH,g,uH,e,$APP.rh,h,$APP.gj,$APP.I(a),$APP.T,$APP.r(b)?b:"Pagination"],null)},yH=function(a){var b=jH(a),c=$APP.lk.g(b),d=$APP.Xh.g(b),e=$APP.Ci.g(b),g=$APP.wh.g(b),h=hH.g(b);b=iH.g(b);var k=vH(a),m=$APP.N(k),p=$APP.G(m,rH),
|
|
9
|
+
q=$APP.G(m,sH),w=$APP.G(m,tH),x=$APP.G(m,uH),y=$APP.G(m,$APP.rh);m=$APP.G(m,$APP.T);a:if(q<=0)q=$APP.ie;else{var A=$APP.Zg.i(x,q);x=$APP.Yg.i(q-x- -1,1);var C=$APP.Yg.i(1,p-w);w=$APP.Zg.i(q,p+w);q=$APP.af.i($APP.af.i($APP.af.i(dH(),$APP.kg(1,A+1)),$APP.kg(x,q+1)),$APP.kg(C,w+1));q=$APP.Be(q);C=$APP.ie;for(w=0;;){if(w>=$APP.B(q)){q=C;break a}A=$APP.rc(q,w);var E=x=w>0?$APP.rc(q,w-1):null;x=$APP.r($APP.r(E)?A>x+1:E)?$APP.od.i(C,new $APP.P(null,1,[$APP.Z,wH],null)):C;A=$APP.od.i(x,new $APP.P(null,2,
|
|
10
|
+
[$APP.Z,rH,xH,A],null));w+=1;C=A}q=void 0}d.setAttribute("aria-label",m);a.setAttribute("data-size",y);d=$APP.N(k);a=$APP.G(d,rH);d=$APP.G(d,$APP.gj);$APP.r($APP.r(d)?d:a<=1)?e.setAttribute("disabled",""):e.removeAttribute("disabled");d=$APP.N(k);e=$APP.G(d,rH);a=$APP.G(d,sH);d=$APP.G(d,$APP.gj);$APP.r($APP.r(d)?d:e>=a)?g.setAttribute("disabled",""):g.removeAttribute("disabled");c.innerHTML="";c.appendChild(h);g=$APP.u(q);h=null;for(a=e=0;;)if(a<e)d=h.G(null,a),$APP.D.i(wH,$APP.Z.g(d))?c.appendChild(lH()):
|
|
11
|
+
c.appendChild(kH(xH.g(d),$APP.D.i(xH.g(d),p),$APP.gj.g(k))),a+=1;else if(g=$APP.u(g))h=g,$APP.Pc(h)?(g=$APP.yb(h),a=$APP.zb(h),h=g,e=$APP.B(g),g=a):(g=$APP.v(h),$APP.D.i(wH,$APP.Z.g(g))?c.appendChild(lH()):c.appendChild(kH(xH.g(g),$APP.D.i(xH.g(g),p),$APP.gj.g(k))),g=$APP.z(h),h=null,e=0),a=0;else break;c.appendChild(b)},zH=function(a,b){return a.dispatchEvent(new CustomEvent("page-change",{detail:{page:b},bubbles:!0,composed:!0,cancelable:!1}))},AH=function(a,b){a:{b=b.composedPath();for(var c=b.length,
|
|
12
|
+
d=0;;)if(d<c){var e=b[d];if($APP.D.i("BUTTON",$APP.r(e)?e.tagName:null)){b=e;break a}d+=1}else{b=null;break a}b=void 0}if($APP.r($APP.r(b)?$APP.t(b.hasAttribute("disabled")):b)){d=$APP.l(a,"__xPaginationRefs");c=$APP.Ci.g(d);d=$APP.wh.g(d);e=b.getAttribute("data-page");if(b===c)return c=vH(a),b=rH.g(c),b>1?zH(a,b-1):null;if(b===d)return c=vH(a),b=rH.g(c),c=sH.g(c),b<c?zH(a,b+1):null;if(e!=null)return b=parseInt(e,10),$APP.r(isFinite(b))?zH(a,b):null}return null},BH=function(a){function b(d){return AH(a,
|
|
13
|
+
d)}var c=jH(a);$APP.lk.g(c).addEventListener("click",b);$APP.n(a,"__xPaginationHandlers",{click:b})},CH=function(a){var b=$APP.l(a,"__xPaginationHandlers");if($APP.r(b)){var c=$APP.l(a,"__xPaginationRefs");$APP.r(c)&&(c=$APP.lk.g(c),b=$APP.l(b,"click"),$APP.r($APP.r(c)?b:c)&&c.removeEventListener("click",b))}a.__xPaginationHandlers=null},DH=function(a){Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",
|
|
14
|
+
""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},EH=function(a,b,c){Object.defineProperty(a,b,{get:function(){return eH(this.getAttribute(c))},set:function(d){return d!=null?this.setAttribute(c,""+$APP.S.g(d)):this.removeAttribute(c)},enumerable:!0,configurable:!0})},FH=function(a,b,c,d){Object.defineProperty(a,b,{get:function(){var e=this.getAttribute(c);return $APP.r(e)?e:d},set:function(e){return e!=null?this.setAttribute(c,""+$APP.S.g(e)):this.removeAttribute(c)},enumerable:!0,
|
|
15
|
+
configurable:!0})},GH=function(a){EH(a,"page","page");EH(a,"total-pages","total-pages");EH(a,"sibling-count","sibling-count");EH(a,"boundary-count","boundary-count");FH(a,"size","size","md");DH(a);FH(a,"label","label","Pagination")},IH=function(){var a=class extends HTMLElement{};a.observedAttributes=HH;a.prototype.connectedCallback=function(){jH(this);CH(this);BH(this);yH(this);return null};a.prototype.disconnectedCallback=function(){CH(this);return null};a.prototype.attributeChangedCallback=function(b,
|
|
16
|
+
c,d){$APP.O(c,d)&&yH(this);return null};GH(a.prototype);return a},JH=function(){$APP.r(customElements.get("x-pagination"))||customElements.define("x-pagination",IH());return null},nH=new $APP.M(null,"total-pages-raw","total-pages-raw",430880208),uH=new $APP.M(null,"boundary-count","boundary-count",1637925987),pH=new $APP.M(null,"boundary-count-raw","boundary-count-raw",410083250),sH=new $APP.M(null,"total-pages","total-pages",685894112),rH=new $APP.M(null,"page","page",849072397),iH=new $APP.M(null,
|
|
17
|
+
"next-li","next-li",648524823),gH=new $APP.M(null,"btn","btn",1978294651),hH=new $APP.M(null,"prev-li","prev-li",940258334),mH=new $APP.M(null,"page-raw","page-raw",-1198808870),fH=new $APP.M(null,"li","li",723558921),wH=new $APP.M(null,"ellipsis","ellipsis",998505738),xH=new $APP.M(null,"n","n",562130025),oH=new $APP.M(null,"sibling-count-raw","sibling-count-raw",-620117200),tH=new $APP.M(null,"sibling-count","sibling-count",1756034573);var HH="page total-pages sibling-count boundary-count size disabled label".split(" "),qH=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null);$APP.ka("baredom.exports.x_pagination.init",JH);export const init=JH;
|