zds-pickers 4.1.0 → 4.1.3
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/dist/index.cjs.js +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +56 -57
- package/dist/index.es.js.map +1 -1
- package/dist/other/SoundFontProvider.js +5 -4
- package/dist/pickers/KeyPicker.js +1 -2
- package/dist/types/other/SoundFontProvider.d.ts +1 -1
- package/dist/types/pickers/KeyPicker.d.ts +1 -4
- package/lib/soundfonts/acoustic_grand_piano-mp3.js +107 -0
- package/package.json +5 -1
- package/.editorconfig +0 -19
- package/.github/workflows/codeql-analysis.yml +0 -67
- package/.nvmrc +0 -1
- package/.prettierignore +0 -0
- package/.prettierrc +0 -13
- package/.storybook/main.ts +0 -42
- package/.storybook/manager.ts +0 -12
- package/.storybook/preview.tsx +0 -26
- package/.vscode/extensions.json +0 -32
- package/.vscode/javascript.code-snippets +0 -229
- package/.vscode/settings.json +0 -358
- package/biome.jsonc +0 -158
- package/lib/@types/nebiru-react-rotary-knob.d.ts +0 -20
- package/lib/@types/react-svgmt.d.ts +0 -74
- package/lib/@types/zds-mappings.d.ts +0 -55
- package/lib/@types/zds-react-piano.d.ts +0 -17
- package/lib/hooks/useComponentSize.ts +0 -52
- package/lib/hooks/useStateWithDynamicDefault.ts +0 -13
- package/lib/index.ts +0 -52
- package/lib/midi/ccValues.ts +0 -139
- package/lib/midi/export.ts +0 -88
- package/lib/other/DefaultTooltip.ts +0 -14
- package/lib/other/OctavePlayer.tsx +0 -139
- package/lib/other/SoundFontProvider.tsx +0 -213
- package/lib/other/SvgText.tsx +0 -221
- package/lib/pickers/CCPicker.tsx +0 -28
- package/lib/pickers/ChannelMappingPicker.tsx +0 -150
- package/lib/pickers/ChannelPicker.tsx +0 -84
- package/lib/pickers/KeyPicker.tsx +0 -56
- package/lib/pickers/Knob.tsx +0 -93
- package/lib/pickers/KnobPicker.tsx +0 -93
- package/lib/pickers/LatchPicker.tsx +0 -33
- package/lib/pickers/MappingPicker.tsx +0 -68
- package/lib/pickers/NotePicker.tsx +0 -95
- package/lib/pickers/PianoPicker.tsx +0 -81
- package/lib/pickers/PolarityPicker.tsx +0 -39
- package/lib/pickers/ResponseCurve.tsx +0 -251
- package/lib/pickers/ResponseCurvePicker.tsx +0 -75
- package/lib/pickers/Select.tsx +0 -268
- package/lib/pickers/StatusPicker.tsx +0 -30
- package/lib/pickers/ValuePicker.tsx +0 -67
- package/lib/pickers/knobSkin10.tsx +0 -112
- package/lib/rotaryKnob/InternalInput.tsx +0 -43
- package/lib/rotaryKnob/Types.ts +0 -6
- package/lib/rotaryKnob/helpers/DrawCircle.tsx +0 -41
- package/lib/rotaryKnob/helpers/DrawLine.tsx +0 -32
- package/lib/rotaryKnob/helpers/HelpersOverlay.tsx +0 -43
- package/lib/rotaryKnob/helpers/KnobVisualHelpers.tsx +0 -138
- package/lib/rotaryKnob/index.tsx +0 -417
- package/lib/rotaryKnob/knobdefaultskin.ts +0 -69
- package/lib/rotaryKnob/utils.ts +0 -112
- package/lib/utils.ts +0 -41
- package/stories/assets/sampleStyles.css +0 -365
- package/stories/assets/utils.js +0 -7
- package/stories/picker.stories.tsx +0 -432
- package/tsconfig.json +0 -35
- package/vite.config.ts +0 -41
- /package/{lib/temp → dist/soundfonts}/acoustic_grand_piano-mp3.js +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";var so=Object.defineProperty;var uo=(e,t,o)=>t in e?so(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var rt=(e,t,o)=>uo(e,typeof t!="symbol"?t+"":t,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),A=require("react/jsx-runtime"),Ce=require("classnames"),kt=require("react-select"),lo=require("d3-drag"),cn=require("d3-scale"),fn=require("d3-selection"),co=require("react-dom"),Fe=require("zds-mappings"),Ne=e=>Array.from(new Array(e).keys()),Ee=(e,t=127,o=0)=>{let n=typeof e=="string"?Number.parseInt(e,10):e;return(Number.isNaN(n)||n===null)&&(n=o),n>=o?n<=t?n:t:o},ar=(e,t)=>o=>o==null?void 0:o.find(n=>(n==null?void 0:n[e])===t),sr=(...e)=>t=>Object.entries(t).filter(([o])=>!e.flat().map(String).includes(o)).reduce((o,[n,r])=>Object.assign(o,{[n]:r}),{}),fo=(...e)=>t=>Object.entries(t).filter(([o])=>e.flat().map(String).includes(o)).reduce((o,[n,r])=>Object.assign(o,{[n]:r}),{}),po=(e,t)=>o=>({...o,[e]:t}),ur=["Bank Select","Modulation Wheel","Breath Controller","","Foot Control","Portamento Time","Data Entry Slider","Volume","Balance","","Pan","Expression","Effect Control 1","Effect Control 2","","","","","","","","","","","","","","","","","","","Controller 0","Controller 1","Controller 2","Controller 3","Controller 4","Controller 5","Controller 6","Controller 7","Controller 8","Controller 9","Controller 10","Controller 11","Controller 12","Controller 13","Controller 14","Controller 15","Controller 16","Controller 17","Controller 18","Controller 19","Controller 20","Controller 21","Controller 22","Controller 23","Controller 24","Controller 25","Controller 26","Controller 27","Controller 28","Controller 29","Controller 30","Controller 31","Sustain","Portamento","Sostenuto","Soft Pedal","Legato Pedal","Sustain 2","Sound Variation","Resonance/Timbre","Sound Release Time","Sound Attack Time","Frequency Cutoff","Sound Control 6","Sound Control 7","Sound Control 8","Sound Control 9","Sound Control 10","Decay or General 1","Hi-Pass or General 2","General 3","General 4","Portamento Amount","","","","","","","Reverb Level","Tremolo Depth","Chorus Level","Detune","Phaser Depth","Data Entry +1","Data Entry -1","Non-registered LSB","Non-registered MSB","Registered msb","Registered lsb","","","","","","","","","Shift 1","Shift 2","Shift 3","Shift 4","Shift 5","Shift 6","","","","","All Sound Off","All Controllers Off","Local Mode","All Notes Off","Omni Mode Off","Omni Mode On","Mono Mode On","Poly Mode"].map((e,t)=>({label:String(e).length?`${t} - ${e}`:String(t),value:t})),me={noteOff:8,noteOn:9,aftertouch:10,controlChange:11,programChange:12,channelPressure:13,pitchWheel:14},lr=15,cr=240,fr=[{value:me.noteOn,label:"Note On"},{value:me.noteOff,label:"Note Stack"},{value:me.controlChange,label:"Control Change"},{value:me.programChange,label:"Program Change"},{value:me.aftertouch,label:"Aftertouch"},{value:me.channelPressure,label:"Channel Pressure"},{value:me.pitchWheel,label:"Pitch Wheel"}],ho=e=>{var t;return((t=fr.filter(({value:o})=>o===e)[0])==null?void 0:t.label)||"???"},mo=(e,t)=>e|t<<4,vo=e=>({status:(e&cr)>>4|8,channel:e&lr}),yo=0,go=1,bo=2,Po=3,Mo=4,So=5,wo=6,Ao=7,It={[yo]:"Linear, no change",[go]:"A little less sensitive",[bo]:"Even less sensitive",[Po]:"Least sensitive",[Mo]:"A little sensitive",[So]:"Moderately sensitive",[wo]:"Most sensitive",[Ao]:"Always maxed out"},Gt=Object.keys(It).map(Number).map(e=>({value:e,label:It[e]})),Ut=({children:e})=>O.createElement(O.Fragment,null,e);function dr(e){return e!==null&&typeof e=="object"&&"name"in e&&typeof e.name=="string"}function pr(e){return e!==null&&typeof e=="object"&&"step"in e&&typeof e.step=="number"&&"alt"in e&&typeof e.alt=="number"&&!isNaN(e.step)&&!isNaN(e.alt)}var hr=[0,2,4,-1,1,3,5],mr=hr.map(e=>Math.floor(e*7/12));function vr(e){const{step:t,alt:o,oct:n,dir:r=1}=e,a=hr[t]+7*o;if(n===void 0)return[r*a];const u=n-mr[t]-4*o;return[r*a,r*u]}var xo=[3,0,4,1,5,2,6];function Eo(e){const[t,o,n]=e,r=xo[Co(t)],a=Math.floor((t+1)/7);if(o===void 0)return{step:r,alt:a,dir:n};const u=o+4*a+mr[r];return{step:r,alt:a,oct:u,dir:n}}function Co(e){const t=(e+1)%7;return t<0?7+t:t}var dn=(e,t)=>Array(Math.abs(t)+1).join(e),Dt=Object.freeze({empty:!0,name:"",num:NaN,q:"",type:"",step:NaN,alt:NaN,dir:NaN,simple:NaN,semitones:NaN,chroma:NaN,coord:[],oct:NaN}),No="([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})",Oo="(AA|A|P|M|m|d|dd)([-+]?\\d+)",_o=new RegExp("^"+No+"|"+Oo+"$");function To(e){const t=_o.exec(`${e}`);return t===null?["",""]:t[1]?[t[1],t[2]]:[t[4],t[3]]}var pn={};function Be(e){return typeof e=="string"?pn[e]||(pn[e]=Ro(e)):pr(e)?Be(ko(e)):dr(e)?Be(e.name):Dt}var hn=[0,2,4,5,7,9,11],yr="PMMPPMM";function Ro(e){const t=To(e);if(t[0]==="")return Dt;const o=+t[0],n=t[1],r=(Math.abs(o)-1)%7,a=yr[r];if(a==="M"&&n==="P")return Dt;const u=a==="M"?"majorable":"perfectable",i=""+o+n,s=o<0?-1:1,c=o===8||o===-8?o:s*(r+1),h=jo(u,n),l=Math.floor((Math.abs(o)-1)/7),p=s*(hn[r]+h+12*l),f=(s*(hn[r]+h)%12+12)%12,d=vr({step:r,alt:h,oct:l,dir:s});return{empty:!1,name:i,num:o,q:n,step:r,alt:h,dir:s,type:u,simple:c,semitones:p,chroma:f,coord:d,oct:l}}function jo(e,t){return t==="M"&&e==="majorable"||t==="P"&&e==="perfectable"?0:t==="m"&&e==="majorable"?-1:/^A+$/.test(t)?t.length:/^d+$/.test(t)?-1*(e==="perfectable"?t.length:t.length+1):0}function ko(e){const{step:t,alt:o,oct:n=0,dir:r}=e;if(!r)return"";const a=t+1+7*n,u=a===0?t+1:a,i=r<0?"-":"",s=yr[t]==="M"?"majorable":"perfectable";return i+u+Io(s,o)}function Io(e,t){return t===0?e==="majorable"?"M":"P":t===-1&&e==="majorable"?"m":t>0?dn("A",t):dn("d",e==="perfectable"?t:t+1)}var mn=(e,t)=>Array(Math.abs(t)+1).join(e),gr=Object.freeze({empty:!0,name:"",letter:"",acc:"",pc:"",step:NaN,alt:NaN,chroma:NaN,height:NaN,coord:[],midi:null,freq:null}),vn=new Map,Do=e=>"CDEFGAB".charAt(e),Lo=e=>e<0?mn("b",-e):mn("#",e),qo=e=>e[0]==="b"?-e.length:e.length;function ye(e){const t=JSON.stringify(e),o=vn.get(t);if(o)return o;const n=typeof e=="string"?Go(e):pr(e)?ye(Uo(e)):dr(e)?ye(e.name):gr;return vn.set(t,n),n}var Fo=/^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/;function Bo(e){const t=Fo.exec(e);return t?[t[1].toUpperCase(),t[2].replace(/x/g,"##"),t[3],t[4]]:["","","",""]}function $o(e){return ye(Eo(e))}var Vo=(e,t)=>(e%t+t)%t,ot=[0,2,4,5,7,9,11];function Go(e){const t=Bo(e);if(t[0]===""||t[3]!=="")return gr;const o=t[0],n=t[1],r=t[2],a=(o.charCodeAt(0)+3)%7,u=qo(n),i=r.length?+r:void 0,s=vr({step:a,alt:u,oct:i}),c=o+n+r,h=o+n,l=(ot[a]+u+120)%12,p=i===void 0?Vo(ot[a]+u,12)-12*99:ot[a]+u+12*(i+1),f=p>=0&&p<=127?p:null,d=i===void 0?null:Math.pow(2,(p-69)/12)*440;return{empty:!1,acc:n,alt:u,chroma:l,coord:s,freq:d,height:p,letter:o,midi:f,name:c,oct:i,pc:h,step:a}}function Uo(e){const{step:t,alt:o,oct:n}=e,r=Do(t);if(!r)return"";const a=r+Lo(o);return n||n===0?a+n:a}function Ko(e,t){const o=ye(e),n=Array.isArray(t)?t:Be(t).coord;if(o.empty||!n||n.length<2)return"";const r=o.coord,a=r.length===1?[r[0]+n[0]]:[r[0]+n[0],r[1]+n[1]];return $o(a).name}function br(e,t){const o=t.length,n=(e%o+o)%o;return t.slice(n,o).concat(t.slice(0,n))}var ge={empty:!0,name:"",setNum:0,chroma:"000000000000",normalized:"000000000000",intervals:[]},Pr=e=>Number(e).toString(2).padStart(12,"0"),yn=e=>parseInt(e,2),Wo=/^[01]{12}$/;function Mr(e){return Wo.test(e)}var zo=e=>typeof e=="number"&&e>=0&&e<=4095,Ho=e=>e&&Mr(e.chroma),gn={[ge.chroma]:ge};function Sr(e){const t=Mr(e)?e:zo(e)?Pr(e):Array.isArray(e)?Zo(e):Ho(e)?e.chroma:ge.chroma;return gn[t]=gn[t]||Qo(t)}var Xo=["1P","2m","2M","3m","3M","4P","5d","5P","6m","6M","7m","7M"];function Yo(e){const t=[];for(let o=0;o<12;o++)e.charAt(o)==="1"&&t.push(Xo[o]);return t}function Jo(e){const t=e.split("");return t.map((o,n)=>br(n,t).join(""))}function Qo(e){const t=yn(e),o=Jo(e).map(yn).filter(a=>a>=2048).sort()[0],n=Pr(o),r=Yo(e);return{empty:!1,name:"",setNum:t,chroma:e,normalized:n,intervals:r}}function Zo(e){if(e.length===0)return ge.chroma;let t;const o=[0,0,0,0,0,0,0,0,0,0,0,0];for(let n=0;n<e.length;n++)t=ye(e[n]),t.empty&&(t=Be(e[n])),t.empty||(o[t.chroma]=1);return o.join("")}var ei=[["1P 3M 5P","major","M ^ maj"],["1P 3M 5P 7M","major seventh","maj7 Δ ma7 M7 Maj7 ^7"],["1P 3M 5P 7M 9M","major ninth","maj9 Δ9 ^9"],["1P 3M 5P 7M 9M 13M","major thirteenth","maj13 Maj13 ^13"],["1P 3M 5P 6M","sixth","6 add6 add13 M6"],["1P 3M 5P 6M 9M","sixth added ninth","6add9 6/9 69 M69"],["1P 3M 6m 7M","major seventh flat sixth","M7b6 ^7b6"],["1P 3M 5P 7M 11A","major seventh sharp eleventh","maj#4 Δ#4 Δ#11 M7#11 ^7#11 maj7#11"],["1P 3m 5P","minor","m min -"],["1P 3m 5P 7m","minor seventh","m7 min7 mi7 -7"],["1P 3m 5P 7M","minor/major seventh","m/ma7 m/maj7 mM7 mMaj7 m/M7 -Δ7 mΔ -^7 -maj7"],["1P 3m 5P 6M","minor sixth","m6 -6"],["1P 3m 5P 7m 9M","minor ninth","m9 -9"],["1P 3m 5P 7M 9M","minor/major ninth","mM9 mMaj9 -^9"],["1P 3m 5P 7m 9M 11P","minor eleventh","m11 -11"],["1P 3m 5P 7m 9M 13M","minor thirteenth","m13 -13"],["1P 3m 5d","diminished","dim ° o"],["1P 3m 5d 7d","diminished seventh","dim7 °7 o7"],["1P 3m 5d 7m","half-diminished","m7b5 ø -7b5 h7 h"],["1P 3M 5P 7m","dominant seventh","7 dom"],["1P 3M 5P 7m 9M","dominant ninth","9"],["1P 3M 5P 7m 9M 13M","dominant thirteenth","13"],["1P 3M 5P 7m 11A","lydian dominant seventh","7#11 7#4"],["1P 3M 5P 7m 9m","dominant flat ninth","7b9"],["1P 3M 5P 7m 9A","dominant sharp ninth","7#9"],["1P 3M 7m 9m","altered","alt7"],["1P 4P 5P","suspended fourth","sus4 sus"],["1P 2M 5P","suspended second","sus2"],["1P 4P 5P 7m","suspended fourth seventh","7sus4 7sus"],["1P 5P 7m 9M 11P","eleventh","11"],["1P 4P 5P 7m 9m","suspended fourth flat ninth","b9sus phryg 7b9sus 7b9sus4"],["1P 5P","fifth","5"],["1P 3M 5A","augmented","aug + +5 ^#5"],["1P 3m 5A","minor augmented","m#5 -#5 m+"],["1P 3M 5A 7M","augmented seventh","maj7#5 maj7+5 +maj7 ^7#5"],["1P 3M 5P 7M 9M 11A","major sharp eleventh (lydian)","maj9#11 Δ9#11 ^9#11"],["1P 2M 4P 5P","","sus24 sus4add9"],["1P 3M 5A 7M 9M","","maj9#5 Maj9#5"],["1P 3M 5A 7m","","7#5 +7 7+ 7aug aug7"],["1P 3M 5A 7m 9A","","7#5#9 7#9#5 7alt"],["1P 3M 5A 7m 9M","","9#5 9+"],["1P 3M 5A 7m 9M 11A","","9#5#11"],["1P 3M 5A 7m 9m","","7#5b9 7b9#5"],["1P 3M 5A 7m 9m 11A","","7#5b9#11"],["1P 3M 5A 9A","","+add#9"],["1P 3M 5A 9M","","M#5add9 +add9"],["1P 3M 5P 6M 11A","","M6#11 M6b5 6#11 6b5"],["1P 3M 5P 6M 7M 9M","","M7add13"],["1P 3M 5P 6M 9M 11A","","69#11"],["1P 3m 5P 6M 9M","","m69 -69"],["1P 3M 5P 6m 7m","","7b6"],["1P 3M 5P 7M 9A 11A","","maj7#9#11"],["1P 3M 5P 7M 9M 11A 13M","","M13#11 maj13#11 M13+4 M13#4"],["1P 3M 5P 7M 9m","","M7b9"],["1P 3M 5P 7m 11A 13m","","7#11b13 7b5b13"],["1P 3M 5P 7m 13M","","7add6 67 7add13"],["1P 3M 5P 7m 9A 11A","","7#9#11 7b5#9 7#9b5"],["1P 3M 5P 7m 9A 11A 13M","","13#9#11"],["1P 3M 5P 7m 9A 11A 13m","","7#9#11b13"],["1P 3M 5P 7m 9A 13M","","13#9"],["1P 3M 5P 7m 9A 13m","","7#9b13"],["1P 3M 5P 7m 9M 11A","","9#11 9+4 9#4"],["1P 3M 5P 7m 9M 11A 13M","","13#11 13+4 13#4"],["1P 3M 5P 7m 9M 11A 13m","","9#11b13 9b5b13"],["1P 3M 5P 7m 9m 11A","","7b9#11 7b5b9 7b9b5"],["1P 3M 5P 7m 9m 11A 13M","","13b9#11"],["1P 3M 5P 7m 9m 11A 13m","","7b9b13#11 7b9#11b13 7b5b9b13"],["1P 3M 5P 7m 9m 13M","","13b9"],["1P 3M 5P 7m 9m 13m","","7b9b13"],["1P 3M 5P 7m 9m 9A","","7b9#9"],["1P 3M 5P 9M","","Madd9 2 add9 add2"],["1P 3M 5P 9m","","Maddb9"],["1P 3M 5d","","Mb5"],["1P 3M 5d 6M 7m 9M","","13b5"],["1P 3M 5d 7M","","M7b5"],["1P 3M 5d 7M 9M","","M9b5"],["1P 3M 5d 7m","","7b5"],["1P 3M 5d 7m 9M","","9b5"],["1P 3M 7m","","7no5"],["1P 3M 7m 13m","","7b13"],["1P 3M 7m 9M","","9no5"],["1P 3M 7m 9M 13M","","13no5"],["1P 3M 7m 9M 13m","","9b13"],["1P 3m 4P 5P","","madd4"],["1P 3m 5P 6m 7M","","mMaj7b6"],["1P 3m 5P 6m 7M 9M","","mMaj9b6"],["1P 3m 5P 7m 11P","","m7add11 m7add4"],["1P 3m 5P 9M","","madd9"],["1P 3m 5d 6M 7M","","o7M7"],["1P 3m 5d 7M","","oM7"],["1P 3m 6m 7M","","mb6M7"],["1P 3m 6m 7m","","m7#5"],["1P 3m 6m 7m 9M","","m9#5"],["1P 3m 5A 7m 9M 11P","","m11A"],["1P 3m 6m 9m","","mb6b9"],["1P 2M 3m 5d 7m","","m9b5"],["1P 4P 5A 7M","","M7#5sus4"],["1P 4P 5A 7M 9M","","M9#5sus4"],["1P 4P 5A 7m","","7#5sus4"],["1P 4P 5P 7M","","M7sus4"],["1P 4P 5P 7M 9M","","M9sus4"],["1P 4P 5P 7m 9M","","9sus4 9sus"],["1P 4P 5P 7m 9M 13M","","13sus4 13sus"],["1P 4P 5P 7m 9m 13m","","7sus4b9b13 7b9b13sus4"],["1P 4P 7m 10m","","4 quartal"],["1P 5P 7m 9m 11P","","11b9"]],ti=ei;({...ge});var wr=[],qe={};function ni(e,t,o){const n=oi(e),r={...Sr(e),name:o||"",quality:n,intervals:e,aliases:t};wr.push(r),r.name&&(qe[r.name]=r),qe[r.setNum]=r,qe[r.chroma]=r,r.aliases.forEach(a=>ri(r,a))}function ri(e,t){qe[t]=e}function oi(e){const t=o=>e.indexOf(o)!==-1;return t("5A")?"Augmented":t("3M")?"Major":t("5d")?"Diminished":t("3m")?"Minor":"Unknown"}ti.forEach(([e,t,o])=>ni(e.split(" "),o.split(" "),t));wr.sort((e,t)=>e.setNum-t.setNum);var ii=[["1P 2M 3M 5P 6M","major pentatonic","pentatonic"],["1P 2M 3M 4P 5P 6M 7M","major","ionian"],["1P 2M 3m 4P 5P 6m 7m","minor","aeolian"],["1P 2M 3m 3M 5P 6M","major blues"],["1P 3m 4P 5d 5P 7m","minor blues","blues"],["1P 2M 3m 4P 5P 6M 7M","melodic minor"],["1P 2M 3m 4P 5P 6m 7M","harmonic minor"],["1P 2M 3M 4P 5P 6M 7m 7M","bebop"],["1P 2M 3m 4P 5d 6m 6M 7M","diminished","whole-half diminished"],["1P 2M 3m 4P 5P 6M 7m","dorian"],["1P 2M 3M 4A 5P 6M 7M","lydian"],["1P 2M 3M 4P 5P 6M 7m","mixolydian","dominant"],["1P 2m 3m 4P 5P 6m 7m","phrygian"],["1P 2m 3m 4P 5d 6m 7m","locrian"],["1P 3M 4P 5P 7M","ionian pentatonic"],["1P 3M 4P 5P 7m","mixolydian pentatonic","indian"],["1P 2M 4P 5P 6M","ritusen"],["1P 2M 4P 5P 7m","egyptian"],["1P 3M 4P 5d 7m","neopolitan major pentatonic"],["1P 3m 4P 5P 6m","vietnamese 1"],["1P 2m 3m 5P 6m","pelog"],["1P 2m 4P 5P 6m","kumoijoshi"],["1P 2M 3m 5P 6m","hirajoshi"],["1P 2m 4P 5d 7m","iwato"],["1P 2m 4P 5P 7m","in-sen"],["1P 3M 4A 5P 7M","lydian pentatonic","chinese"],["1P 3m 4P 6m 7m","malkos raga"],["1P 3m 4P 5d 7m","locrian pentatonic","minor seven flat five pentatonic"],["1P 3m 4P 5P 7m","minor pentatonic","vietnamese 2"],["1P 3m 4P 5P 6M","minor six pentatonic"],["1P 2M 3m 5P 6M","flat three pentatonic","kumoi"],["1P 2M 3M 5P 6m","flat six pentatonic"],["1P 2m 3M 5P 6M","scriabin"],["1P 3M 5d 6m 7m","whole tone pentatonic"],["1P 3M 4A 5A 7M","lydian #5P pentatonic"],["1P 3M 4A 5P 7m","lydian dominant pentatonic"],["1P 3m 4P 5P 7M","minor #7M pentatonic"],["1P 3m 4d 5d 7m","super locrian pentatonic"],["1P 2M 3m 4P 5P 7M","minor hexatonic"],["1P 2A 3M 5P 5A 7M","augmented"],["1P 2M 4P 5P 6M 7m","piongio"],["1P 2m 3M 4A 6M 7m","prometheus neopolitan"],["1P 2M 3M 4A 6M 7m","prometheus"],["1P 2m 3M 5d 6m 7m","mystery #1"],["1P 2m 3M 4P 5A 6M","six tone symmetric"],["1P 2M 3M 4A 5A 6A","whole tone","messiaen's mode #1"],["1P 2m 4P 4A 5P 7M","messiaen's mode #5"],["1P 2M 3M 4P 5d 6m 7m","locrian major","arabian"],["1P 2m 3M 4A 5P 6m 7M","double harmonic lydian"],["1P 2m 2A 3M 4A 6m 7m","altered","super locrian","diminished whole tone","pomeroy"],["1P 2M 3m 4P 5d 6m 7m","locrian #2","half-diminished","aeolian b5"],["1P 2M 3M 4P 5P 6m 7m","mixolydian b6","melodic minor fifth mode","hindu"],["1P 2M 3M 4A 5P 6M 7m","lydian dominant","lydian b7","overtone"],["1P 2M 3M 4A 5A 6M 7M","lydian augmented"],["1P 2m 3m 4P 5P 6M 7m","dorian b2","phrygian #6","melodic minor second mode"],["1P 2m 3m 4d 5d 6m 7d","ultralocrian","superlocrian bb7","superlocrian diminished"],["1P 2m 3m 4P 5d 6M 7m","locrian 6","locrian natural 6","locrian sharp 6"],["1P 2A 3M 4P 5P 5A 7M","augmented heptatonic"],["1P 2M 3m 4A 5P 6M 7m","dorian #4","ukrainian dorian","romanian minor","altered dorian"],["1P 2M 3m 4A 5P 6M 7M","lydian diminished"],["1P 2M 3M 4A 5A 7m 7M","leading whole tone"],["1P 2M 3M 4A 5P 6m 7m","lydian minor"],["1P 2m 3M 4P 5P 6m 7m","phrygian dominant","spanish","phrygian major"],["1P 2m 3m 4P 5P 6m 7M","balinese"],["1P 2m 3m 4P 5P 6M 7M","neopolitan major"],["1P 2M 3M 4P 5P 6m 7M","harmonic major"],["1P 2m 3M 4P 5P 6m 7M","double harmonic major","gypsy"],["1P 2M 3m 4A 5P 6m 7M","hungarian minor"],["1P 2A 3M 4A 5P 6M 7m","hungarian major"],["1P 2m 3M 4P 5d 6M 7m","oriental"],["1P 2m 3m 3M 4A 5P 7m","flamenco"],["1P 2m 3m 4A 5P 6m 7M","todi raga"],["1P 2m 3M 4P 5d 6m 7M","persian"],["1P 2m 3M 5d 6m 7m 7M","enigmatic"],["1P 2M 3M 4P 5A 6M 7M","major augmented","major #5","ionian augmented","ionian #5"],["1P 2A 3M 4A 5P 6M 7M","lydian #9"],["1P 2m 2M 4P 4A 5P 6m 7M","messiaen's mode #4"],["1P 2m 3M 4P 4A 5P 6m 7M","purvi raga"],["1P 2m 3m 3M 4P 5P 6m 7m","spanish heptatonic"],["1P 2M 3m 3M 4P 5P 6M 7m","bebop minor"],["1P 2M 3M 4P 5P 5A 6M 7M","bebop major"],["1P 2m 3m 4P 5d 5P 6m 7m","bebop locrian"],["1P 2M 3m 4P 5P 6m 7m 7M","minor bebop"],["1P 2M 3M 4P 5d 5P 6M 7M","ichikosucho"],["1P 2M 3m 4P 5P 6m 6M 7M","minor six diminished"],["1P 2m 3m 3M 4A 5P 6M 7m","half-whole diminished","dominant diminished","messiaen's mode #2"],["1P 3m 3M 4P 5P 6M 7m 7M","kafi raga"],["1P 2M 3M 4P 4A 5A 6A 7M","messiaen's mode #6"],["1P 2M 3m 3M 4P 5d 5P 6M 7m","composite blues"],["1P 2M 3m 3M 4A 5P 6m 7m 7M","messiaen's mode #3"],["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M","messiaen's mode #7"],["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M","chromatic"]],ai=ii,si={...ge,intervals:[],aliases:[]},xe={};function ui(e){return xe[e]||si}function li(e,t,o=[]){const n={...Sr(e),name:t,intervals:e,aliases:o};return xe[n.name]=n,xe[n.setNum]=n,xe[n.chroma]=n,n.aliases.forEach(r=>ci(n,r)),n}function ci(e,t){xe[t]=e}ai.forEach(([e,t,...o])=>li(e.split(" "),t,o));var fi=[[.125,"dl",["large","duplex longa","maxima","octuple","octuple whole"]],[.25,"l",["long","longa"]],[.5,"d",["double whole","double","breve"]],[1,"w",["whole","semibreve"]],[2,"h",["half","minim"]],[4,"q",["quarter","crotchet"]],[8,"e",["eighth","quaver"]],[16,"s",["sixteenth","semiquaver"]],[32,"t",["thirty-second","demisemiquaver"]],[64,"sf",["sixty-fourth","hemidemisemiquaver"]],[128,"h",["hundred twenty-eighth"]],[256,"th",["two hundred fifty-sixth"]]],di=fi;di.forEach(([e,t,o])=>void 0);function Kt(e){return+e>=0&&+e<=127}function Ar(e){if(Kt(e))return+e;const t=ye(e);return t.empty?null:t.midi}function xr(e,t=440){return Math.pow(2,(e-69)/12)*t}var pi=Math.log(2),hi=Math.log(440);function Er(e){const t=12*(Math.log(e)-hi)/pi+69;return Math.round(t*100)/100}var mi="C C# D D# E F F# G G# A A# B".split(" "),vi="C Db D Eb E F Gb G Ab A Bb B".split(" ");function Wt(e,t={}){if(isNaN(e)||e===-1/0||e===1/0)return"";e=Math.round(e);const n=(t.sharps===!0?mi:vi)[e%12];if(t.pitchClass)return n;const r=Math.floor(e/12)-1;return n+r}function Ke(e){return e%12}function yi(e){return e.split("").reduce((t,o,n)=>(n<12&&o==="1"&&t.push(n),t),[])}function gi(e){return e.map(Ke).sort((t,o)=>t-o).filter((t,o,n)=>o===0||t!==n[o-1])}function We(e){return Array.isArray(e)?gi(e):yi(e)}function Cr(e){const t=We(e);return o=>{const n=Ke(o);for(let r=0;r<12;r++){if(t.includes(n+r))return o+r;if(t.includes(n-r))return o-r}}}function zt(e,t){const o=We(e),n=o.length;return r=>{const a=r<0?(n- -r%n)%n:r%n,u=Math.floor(r/n);return o[a]+u*12+t}}function Nr(e,t){const o=zt(e,t);return n=>{if(n!==0)return o(n>0?n-1:n)}}var bi={chroma:Ke,freqToMidi:Er,isMidi:Kt,midiToFreq:xr,midiToNoteName:Wt,pcsetNearest:Cr,pcset:We,pcsetDegrees:Nr,pcsetSteps:zt,toMidi:Ar};const Pi=Object.freeze(Object.defineProperty({__proto__:null,chroma:Ke,default:bi,freqToMidi:Er,isMidi:Kt,midiToFreq:xr,midiToNoteName:Wt,pcset:We,pcsetDegrees:Nr,pcsetNearest:Cr,pcsetSteps:zt,toMidi:Ar},Symbol.toStringTag,{value:"Module"}));var Mi=ye,bn=e=>Mi(e).midi;function Si(e){return Wt(e)}var Ht=[[0,2773,0,"ionian","","Maj7","major"],[1,2902,2,"dorian","m","m7"],[2,3418,4,"phrygian","m","m7"],[3,2741,-1,"lydian","","Maj7"],[4,2774,1,"mixolydian","","7"],[5,2906,3,"aeolian","m","m7","minor"],[6,3434,5,"locrian","dim","m7b5"]],Pn={...ge,name:"",alt:0,modeNum:NaN,triad:"",seventh:"",aliases:[]},wi=Ht.map(Ai),Lt={};wi.forEach(e=>{Lt[e.name]=e,e.aliases.forEach(t=>{Lt[t]=e})});function Or(e){return typeof e=="string"?Lt[e.toLowerCase()]||Pn:e&&e.name?Or(e.name):Pn}function Ai(e){const[t,o,n,r,a,u,i]=e,s=i?[i]:[],c=Number(o).toString(2);return{empty:!1,intervals:ui(r).intervals,modeNum:t,chroma:c,normalized:c,name:r,setNum:o,alt:n,triad:a,seventh:u,aliases:s}}function _r(e){return(t,o)=>{const n=Or(t);if(n.empty)return[];const r=br(n.modeNum,e),a=n.intervals.map(u=>Ko(o,u));return r.map((u,i)=>a[i]+u)}}_r(Ht.map(e=>e[4]));_r(Ht.map(e=>e[5]));var je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xi(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var o=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),o}var it,Mn;function Ei(){if(Mn)return it;Mn=1,it=e;function e(t,o,n){if(t!=null&&typeof t!="number")throw new Error("start must be a number or null");if(o!=null&&typeof o!="number")throw new Error("stop must be a number or null");if(n!=null&&typeof n!="number")throw new Error("step must be a number or null");o==null&&(o=t||0,t=0),n==null&&(n=o>t?1:-1);for(var r=[],a=t<o;a?t<o:t>o;t+=n)r.push(t);return r}return it}var Ci=Ei();const Xt=ze(Ci);var ke={exports:{}},Ie={exports:{}},H={};/** @license React v16.13.1
|
|
1
|
+
"use strict";var ao=Object.defineProperty;var so=(e,t,o)=>t in e?ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var rt=(e,t,o)=>so(e,typeof t!="symbol"?t+"":t,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),A=require("react/jsx-runtime"),Ce=require("classnames"),kt=require("react-select"),uo=require("d3-drag"),cn=require("d3-scale"),fn=require("d3-selection"),lo=require("react-dom"),Fe=require("zds-mappings"),Ne=e=>Array.from(new Array(e).keys()),Ee=(e,t=127,o=0)=>{let n=typeof e=="string"?Number.parseInt(e,10):e;return(Number.isNaN(n)||n===null)&&(n=o),n>=o?n<=t?n:t:o},ar=(e,t)=>o=>o==null?void 0:o.find(n=>(n==null?void 0:n[e])===t),sr=(...e)=>t=>Object.entries(t).filter(([o])=>!e.flat().map(String).includes(o)).reduce((o,[n,r])=>Object.assign(o,{[n]:r}),{}),co=(...e)=>t=>Object.entries(t).filter(([o])=>e.flat().map(String).includes(o)).reduce((o,[n,r])=>Object.assign(o,{[n]:r}),{}),fo=(e,t)=>o=>({...o,[e]:t}),ur=["Bank Select","Modulation Wheel","Breath Controller","","Foot Control","Portamento Time","Data Entry Slider","Volume","Balance","","Pan","Expression","Effect Control 1","Effect Control 2","","","","","","","","","","","","","","","","","","","Controller 0","Controller 1","Controller 2","Controller 3","Controller 4","Controller 5","Controller 6","Controller 7","Controller 8","Controller 9","Controller 10","Controller 11","Controller 12","Controller 13","Controller 14","Controller 15","Controller 16","Controller 17","Controller 18","Controller 19","Controller 20","Controller 21","Controller 22","Controller 23","Controller 24","Controller 25","Controller 26","Controller 27","Controller 28","Controller 29","Controller 30","Controller 31","Sustain","Portamento","Sostenuto","Soft Pedal","Legato Pedal","Sustain 2","Sound Variation","Resonance/Timbre","Sound Release Time","Sound Attack Time","Frequency Cutoff","Sound Control 6","Sound Control 7","Sound Control 8","Sound Control 9","Sound Control 10","Decay or General 1","Hi-Pass or General 2","General 3","General 4","Portamento Amount","","","","","","","Reverb Level","Tremolo Depth","Chorus Level","Detune","Phaser Depth","Data Entry +1","Data Entry -1","Non-registered LSB","Non-registered MSB","Registered msb","Registered lsb","","","","","","","","","Shift 1","Shift 2","Shift 3","Shift 4","Shift 5","Shift 6","","","","","All Sound Off","All Controllers Off","Local Mode","All Notes Off","Omni Mode Off","Omni Mode On","Mono Mode On","Poly Mode"].map((e,t)=>({label:String(e).length?`${t} - ${e}`:String(t),value:t})),me={noteOff:8,noteOn:9,aftertouch:10,controlChange:11,programChange:12,channelPressure:13,pitchWheel:14},lr=15,cr=240,fr=[{value:me.noteOn,label:"Note On"},{value:me.noteOff,label:"Note Stack"},{value:me.controlChange,label:"Control Change"},{value:me.programChange,label:"Program Change"},{value:me.aftertouch,label:"Aftertouch"},{value:me.channelPressure,label:"Channel Pressure"},{value:me.pitchWheel,label:"Pitch Wheel"}],po=e=>{var t;return((t=fr.filter(({value:o})=>o===e)[0])==null?void 0:t.label)||"???"},ho=(e,t)=>e|t<<4,mo=e=>({status:(e&cr)>>4|8,channel:e&lr}),vo=0,yo=1,go=2,bo=3,Po=4,Mo=5,So=6,wo=7,It={[vo]:"Linear, no change",[yo]:"A little less sensitive",[go]:"Even less sensitive",[bo]:"Least sensitive",[Po]:"A little sensitive",[Mo]:"Moderately sensitive",[So]:"Most sensitive",[wo]:"Always maxed out"},Gt=Object.keys(It).map(Number).map(e=>({value:e,label:It[e]})),Ut=({children:e})=>_.createElement(_.Fragment,null,e);function dr(e){return e!==null&&typeof e=="object"&&"name"in e&&typeof e.name=="string"}function pr(e){return e!==null&&typeof e=="object"&&"step"in e&&typeof e.step=="number"&&"alt"in e&&typeof e.alt=="number"&&!isNaN(e.step)&&!isNaN(e.alt)}var hr=[0,2,4,-1,1,3,5],mr=hr.map(e=>Math.floor(e*7/12));function vr(e){const{step:t,alt:o,oct:n,dir:r=1}=e,a=hr[t]+7*o;if(n===void 0)return[r*a];const u=n-mr[t]-4*o;return[r*a,r*u]}var Ao=[3,0,4,1,5,2,6];function xo(e){const[t,o,n]=e,r=Ao[Eo(t)],a=Math.floor((t+1)/7);if(o===void 0)return{step:r,alt:a,dir:n};const u=o+4*a+mr[r];return{step:r,alt:a,oct:u,dir:n}}function Eo(e){const t=(e+1)%7;return t<0?7+t:t}var dn=(e,t)=>Array(Math.abs(t)+1).join(e),Dt=Object.freeze({empty:!0,name:"",num:NaN,q:"",type:"",step:NaN,alt:NaN,dir:NaN,simple:NaN,semitones:NaN,chroma:NaN,coord:[],oct:NaN}),Co="([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})",No="(AA|A|P|M|m|d|dd)([-+]?\\d+)",_o=new RegExp("^"+Co+"|"+No+"$");function Oo(e){const t=_o.exec(`${e}`);return t===null?["",""]:t[1]?[t[1],t[2]]:[t[4],t[3]]}var pn={};function Be(e){return typeof e=="string"?pn[e]||(pn[e]=To(e)):pr(e)?Be(jo(e)):dr(e)?Be(e.name):Dt}var hn=[0,2,4,5,7,9,11],yr="PMMPPMM";function To(e){const t=Oo(e);if(t[0]==="")return Dt;const o=+t[0],n=t[1],r=(Math.abs(o)-1)%7,a=yr[r];if(a==="M"&&n==="P")return Dt;const u=a==="M"?"majorable":"perfectable",i=""+o+n,s=o<0?-1:1,c=o===8||o===-8?o:s*(r+1),h=Ro(u,n),l=Math.floor((Math.abs(o)-1)/7),p=s*(hn[r]+h+12*l),f=(s*(hn[r]+h)%12+12)%12,d=vr({step:r,alt:h,oct:l,dir:s});return{empty:!1,name:i,num:o,q:n,step:r,alt:h,dir:s,type:u,simple:c,semitones:p,chroma:f,coord:d,oct:l}}function Ro(e,t){return t==="M"&&e==="majorable"||t==="P"&&e==="perfectable"?0:t==="m"&&e==="majorable"?-1:/^A+$/.test(t)?t.length:/^d+$/.test(t)?-1*(e==="perfectable"?t.length:t.length+1):0}function jo(e){const{step:t,alt:o,oct:n=0,dir:r}=e;if(!r)return"";const a=t+1+7*n,u=a===0?t+1:a,i=r<0?"-":"",s=yr[t]==="M"?"majorable":"perfectable";return i+u+ko(s,o)}function ko(e,t){return t===0?e==="majorable"?"M":"P":t===-1&&e==="majorable"?"m":t>0?dn("A",t):dn("d",e==="perfectable"?t:t+1)}var mn=(e,t)=>Array(Math.abs(t)+1).join(e),gr=Object.freeze({empty:!0,name:"",letter:"",acc:"",pc:"",step:NaN,alt:NaN,chroma:NaN,height:NaN,coord:[],midi:null,freq:null}),vn=new Map,Io=e=>"CDEFGAB".charAt(e),Do=e=>e<0?mn("b",-e):mn("#",e),Lo=e=>e[0]==="b"?-e.length:e.length;function ye(e){const t=JSON.stringify(e),o=vn.get(t);if(o)return o;const n=typeof e=="string"?Vo(e):pr(e)?ye(Go(e)):dr(e)?ye(e.name):gr;return vn.set(t,n),n}var qo=/^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/;function Fo(e){const t=qo.exec(e);return t?[t[1].toUpperCase(),t[2].replace(/x/g,"##"),t[3],t[4]]:["","","",""]}function Bo(e){return ye(xo(e))}var $o=(e,t)=>(e%t+t)%t,ot=[0,2,4,5,7,9,11];function Vo(e){const t=Fo(e);if(t[0]===""||t[3]!=="")return gr;const o=t[0],n=t[1],r=t[2],a=(o.charCodeAt(0)+3)%7,u=Lo(n),i=r.length?+r:void 0,s=vr({step:a,alt:u,oct:i}),c=o+n+r,h=o+n,l=(ot[a]+u+120)%12,p=i===void 0?$o(ot[a]+u,12)-12*99:ot[a]+u+12*(i+1),f=p>=0&&p<=127?p:null,d=i===void 0?null:Math.pow(2,(p-69)/12)*440;return{empty:!1,acc:n,alt:u,chroma:l,coord:s,freq:d,height:p,letter:o,midi:f,name:c,oct:i,pc:h,step:a}}function Go(e){const{step:t,alt:o,oct:n}=e,r=Io(t);if(!r)return"";const a=r+Do(o);return n||n===0?a+n:a}function Uo(e,t){const o=ye(e),n=Array.isArray(t)?t:Be(t).coord;if(o.empty||!n||n.length<2)return"";const r=o.coord,a=r.length===1?[r[0]+n[0]]:[r[0]+n[0],r[1]+n[1]];return Bo(a).name}function br(e,t){const o=t.length,n=(e%o+o)%o;return t.slice(n,o).concat(t.slice(0,n))}var ge={empty:!0,name:"",setNum:0,chroma:"000000000000",normalized:"000000000000",intervals:[]},Pr=e=>Number(e).toString(2).padStart(12,"0"),yn=e=>parseInt(e,2),Ko=/^[01]{12}$/;function Mr(e){return Ko.test(e)}var Wo=e=>typeof e=="number"&&e>=0&&e<=4095,zo=e=>e&&Mr(e.chroma),gn={[ge.chroma]:ge};function Sr(e){const t=Mr(e)?e:Wo(e)?Pr(e):Array.isArray(e)?Qo(e):zo(e)?e.chroma:ge.chroma;return gn[t]=gn[t]||Jo(t)}var Ho=["1P","2m","2M","3m","3M","4P","5d","5P","6m","6M","7m","7M"];function Xo(e){const t=[];for(let o=0;o<12;o++)e.charAt(o)==="1"&&t.push(Ho[o]);return t}function Yo(e){const t=e.split("");return t.map((o,n)=>br(n,t).join(""))}function Jo(e){const t=yn(e),o=Yo(e).map(yn).filter(a=>a>=2048).sort()[0],n=Pr(o),r=Xo(e);return{empty:!1,name:"",setNum:t,chroma:e,normalized:n,intervals:r}}function Qo(e){if(e.length===0)return ge.chroma;let t;const o=[0,0,0,0,0,0,0,0,0,0,0,0];for(let n=0;n<e.length;n++)t=ye(e[n]),t.empty&&(t=Be(e[n])),t.empty||(o[t.chroma]=1);return o.join("")}var Zo=[["1P 3M 5P","major","M ^ maj"],["1P 3M 5P 7M","major seventh","maj7 Δ ma7 M7 Maj7 ^7"],["1P 3M 5P 7M 9M","major ninth","maj9 Δ9 ^9"],["1P 3M 5P 7M 9M 13M","major thirteenth","maj13 Maj13 ^13"],["1P 3M 5P 6M","sixth","6 add6 add13 M6"],["1P 3M 5P 6M 9M","sixth added ninth","6add9 6/9 69 M69"],["1P 3M 6m 7M","major seventh flat sixth","M7b6 ^7b6"],["1P 3M 5P 7M 11A","major seventh sharp eleventh","maj#4 Δ#4 Δ#11 M7#11 ^7#11 maj7#11"],["1P 3m 5P","minor","m min -"],["1P 3m 5P 7m","minor seventh","m7 min7 mi7 -7"],["1P 3m 5P 7M","minor/major seventh","m/ma7 m/maj7 mM7 mMaj7 m/M7 -Δ7 mΔ -^7 -maj7"],["1P 3m 5P 6M","minor sixth","m6 -6"],["1P 3m 5P 7m 9M","minor ninth","m9 -9"],["1P 3m 5P 7M 9M","minor/major ninth","mM9 mMaj9 -^9"],["1P 3m 5P 7m 9M 11P","minor eleventh","m11 -11"],["1P 3m 5P 7m 9M 13M","minor thirteenth","m13 -13"],["1P 3m 5d","diminished","dim ° o"],["1P 3m 5d 7d","diminished seventh","dim7 °7 o7"],["1P 3m 5d 7m","half-diminished","m7b5 ø -7b5 h7 h"],["1P 3M 5P 7m","dominant seventh","7 dom"],["1P 3M 5P 7m 9M","dominant ninth","9"],["1P 3M 5P 7m 9M 13M","dominant thirteenth","13"],["1P 3M 5P 7m 11A","lydian dominant seventh","7#11 7#4"],["1P 3M 5P 7m 9m","dominant flat ninth","7b9"],["1P 3M 5P 7m 9A","dominant sharp ninth","7#9"],["1P 3M 7m 9m","altered","alt7"],["1P 4P 5P","suspended fourth","sus4 sus"],["1P 2M 5P","suspended second","sus2"],["1P 4P 5P 7m","suspended fourth seventh","7sus4 7sus"],["1P 5P 7m 9M 11P","eleventh","11"],["1P 4P 5P 7m 9m","suspended fourth flat ninth","b9sus phryg 7b9sus 7b9sus4"],["1P 5P","fifth","5"],["1P 3M 5A","augmented","aug + +5 ^#5"],["1P 3m 5A","minor augmented","m#5 -#5 m+"],["1P 3M 5A 7M","augmented seventh","maj7#5 maj7+5 +maj7 ^7#5"],["1P 3M 5P 7M 9M 11A","major sharp eleventh (lydian)","maj9#11 Δ9#11 ^9#11"],["1P 2M 4P 5P","","sus24 sus4add9"],["1P 3M 5A 7M 9M","","maj9#5 Maj9#5"],["1P 3M 5A 7m","","7#5 +7 7+ 7aug aug7"],["1P 3M 5A 7m 9A","","7#5#9 7#9#5 7alt"],["1P 3M 5A 7m 9M","","9#5 9+"],["1P 3M 5A 7m 9M 11A","","9#5#11"],["1P 3M 5A 7m 9m","","7#5b9 7b9#5"],["1P 3M 5A 7m 9m 11A","","7#5b9#11"],["1P 3M 5A 9A","","+add#9"],["1P 3M 5A 9M","","M#5add9 +add9"],["1P 3M 5P 6M 11A","","M6#11 M6b5 6#11 6b5"],["1P 3M 5P 6M 7M 9M","","M7add13"],["1P 3M 5P 6M 9M 11A","","69#11"],["1P 3m 5P 6M 9M","","m69 -69"],["1P 3M 5P 6m 7m","","7b6"],["1P 3M 5P 7M 9A 11A","","maj7#9#11"],["1P 3M 5P 7M 9M 11A 13M","","M13#11 maj13#11 M13+4 M13#4"],["1P 3M 5P 7M 9m","","M7b9"],["1P 3M 5P 7m 11A 13m","","7#11b13 7b5b13"],["1P 3M 5P 7m 13M","","7add6 67 7add13"],["1P 3M 5P 7m 9A 11A","","7#9#11 7b5#9 7#9b5"],["1P 3M 5P 7m 9A 11A 13M","","13#9#11"],["1P 3M 5P 7m 9A 11A 13m","","7#9#11b13"],["1P 3M 5P 7m 9A 13M","","13#9"],["1P 3M 5P 7m 9A 13m","","7#9b13"],["1P 3M 5P 7m 9M 11A","","9#11 9+4 9#4"],["1P 3M 5P 7m 9M 11A 13M","","13#11 13+4 13#4"],["1P 3M 5P 7m 9M 11A 13m","","9#11b13 9b5b13"],["1P 3M 5P 7m 9m 11A","","7b9#11 7b5b9 7b9b5"],["1P 3M 5P 7m 9m 11A 13M","","13b9#11"],["1P 3M 5P 7m 9m 11A 13m","","7b9b13#11 7b9#11b13 7b5b9b13"],["1P 3M 5P 7m 9m 13M","","13b9"],["1P 3M 5P 7m 9m 13m","","7b9b13"],["1P 3M 5P 7m 9m 9A","","7b9#9"],["1P 3M 5P 9M","","Madd9 2 add9 add2"],["1P 3M 5P 9m","","Maddb9"],["1P 3M 5d","","Mb5"],["1P 3M 5d 6M 7m 9M","","13b5"],["1P 3M 5d 7M","","M7b5"],["1P 3M 5d 7M 9M","","M9b5"],["1P 3M 5d 7m","","7b5"],["1P 3M 5d 7m 9M","","9b5"],["1P 3M 7m","","7no5"],["1P 3M 7m 13m","","7b13"],["1P 3M 7m 9M","","9no5"],["1P 3M 7m 9M 13M","","13no5"],["1P 3M 7m 9M 13m","","9b13"],["1P 3m 4P 5P","","madd4"],["1P 3m 5P 6m 7M","","mMaj7b6"],["1P 3m 5P 6m 7M 9M","","mMaj9b6"],["1P 3m 5P 7m 11P","","m7add11 m7add4"],["1P 3m 5P 9M","","madd9"],["1P 3m 5d 6M 7M","","o7M7"],["1P 3m 5d 7M","","oM7"],["1P 3m 6m 7M","","mb6M7"],["1P 3m 6m 7m","","m7#5"],["1P 3m 6m 7m 9M","","m9#5"],["1P 3m 5A 7m 9M 11P","","m11A"],["1P 3m 6m 9m","","mb6b9"],["1P 2M 3m 5d 7m","","m9b5"],["1P 4P 5A 7M","","M7#5sus4"],["1P 4P 5A 7M 9M","","M9#5sus4"],["1P 4P 5A 7m","","7#5sus4"],["1P 4P 5P 7M","","M7sus4"],["1P 4P 5P 7M 9M","","M9sus4"],["1P 4P 5P 7m 9M","","9sus4 9sus"],["1P 4P 5P 7m 9M 13M","","13sus4 13sus"],["1P 4P 5P 7m 9m 13m","","7sus4b9b13 7b9b13sus4"],["1P 4P 7m 10m","","4 quartal"],["1P 5P 7m 9m 11P","","11b9"]],ei=Zo;({...ge});var wr=[],qe={};function ti(e,t,o){const n=ri(e),r={...Sr(e),name:o||"",quality:n,intervals:e,aliases:t};wr.push(r),r.name&&(qe[r.name]=r),qe[r.setNum]=r,qe[r.chroma]=r,r.aliases.forEach(a=>ni(r,a))}function ni(e,t){qe[t]=e}function ri(e){const t=o=>e.indexOf(o)!==-1;return t("5A")?"Augmented":t("3M")?"Major":t("5d")?"Diminished":t("3m")?"Minor":"Unknown"}ei.forEach(([e,t,o])=>ti(e.split(" "),o.split(" "),t));wr.sort((e,t)=>e.setNum-t.setNum);var oi=[["1P 2M 3M 5P 6M","major pentatonic","pentatonic"],["1P 2M 3M 4P 5P 6M 7M","major","ionian"],["1P 2M 3m 4P 5P 6m 7m","minor","aeolian"],["1P 2M 3m 3M 5P 6M","major blues"],["1P 3m 4P 5d 5P 7m","minor blues","blues"],["1P 2M 3m 4P 5P 6M 7M","melodic minor"],["1P 2M 3m 4P 5P 6m 7M","harmonic minor"],["1P 2M 3M 4P 5P 6M 7m 7M","bebop"],["1P 2M 3m 4P 5d 6m 6M 7M","diminished","whole-half diminished"],["1P 2M 3m 4P 5P 6M 7m","dorian"],["1P 2M 3M 4A 5P 6M 7M","lydian"],["1P 2M 3M 4P 5P 6M 7m","mixolydian","dominant"],["1P 2m 3m 4P 5P 6m 7m","phrygian"],["1P 2m 3m 4P 5d 6m 7m","locrian"],["1P 3M 4P 5P 7M","ionian pentatonic"],["1P 3M 4P 5P 7m","mixolydian pentatonic","indian"],["1P 2M 4P 5P 6M","ritusen"],["1P 2M 4P 5P 7m","egyptian"],["1P 3M 4P 5d 7m","neopolitan major pentatonic"],["1P 3m 4P 5P 6m","vietnamese 1"],["1P 2m 3m 5P 6m","pelog"],["1P 2m 4P 5P 6m","kumoijoshi"],["1P 2M 3m 5P 6m","hirajoshi"],["1P 2m 4P 5d 7m","iwato"],["1P 2m 4P 5P 7m","in-sen"],["1P 3M 4A 5P 7M","lydian pentatonic","chinese"],["1P 3m 4P 6m 7m","malkos raga"],["1P 3m 4P 5d 7m","locrian pentatonic","minor seven flat five pentatonic"],["1P 3m 4P 5P 7m","minor pentatonic","vietnamese 2"],["1P 3m 4P 5P 6M","minor six pentatonic"],["1P 2M 3m 5P 6M","flat three pentatonic","kumoi"],["1P 2M 3M 5P 6m","flat six pentatonic"],["1P 2m 3M 5P 6M","scriabin"],["1P 3M 5d 6m 7m","whole tone pentatonic"],["1P 3M 4A 5A 7M","lydian #5P pentatonic"],["1P 3M 4A 5P 7m","lydian dominant pentatonic"],["1P 3m 4P 5P 7M","minor #7M pentatonic"],["1P 3m 4d 5d 7m","super locrian pentatonic"],["1P 2M 3m 4P 5P 7M","minor hexatonic"],["1P 2A 3M 5P 5A 7M","augmented"],["1P 2M 4P 5P 6M 7m","piongio"],["1P 2m 3M 4A 6M 7m","prometheus neopolitan"],["1P 2M 3M 4A 6M 7m","prometheus"],["1P 2m 3M 5d 6m 7m","mystery #1"],["1P 2m 3M 4P 5A 6M","six tone symmetric"],["1P 2M 3M 4A 5A 6A","whole tone","messiaen's mode #1"],["1P 2m 4P 4A 5P 7M","messiaen's mode #5"],["1P 2M 3M 4P 5d 6m 7m","locrian major","arabian"],["1P 2m 3M 4A 5P 6m 7M","double harmonic lydian"],["1P 2m 2A 3M 4A 6m 7m","altered","super locrian","diminished whole tone","pomeroy"],["1P 2M 3m 4P 5d 6m 7m","locrian #2","half-diminished","aeolian b5"],["1P 2M 3M 4P 5P 6m 7m","mixolydian b6","melodic minor fifth mode","hindu"],["1P 2M 3M 4A 5P 6M 7m","lydian dominant","lydian b7","overtone"],["1P 2M 3M 4A 5A 6M 7M","lydian augmented"],["1P 2m 3m 4P 5P 6M 7m","dorian b2","phrygian #6","melodic minor second mode"],["1P 2m 3m 4d 5d 6m 7d","ultralocrian","superlocrian bb7","superlocrian diminished"],["1P 2m 3m 4P 5d 6M 7m","locrian 6","locrian natural 6","locrian sharp 6"],["1P 2A 3M 4P 5P 5A 7M","augmented heptatonic"],["1P 2M 3m 4A 5P 6M 7m","dorian #4","ukrainian dorian","romanian minor","altered dorian"],["1P 2M 3m 4A 5P 6M 7M","lydian diminished"],["1P 2M 3M 4A 5A 7m 7M","leading whole tone"],["1P 2M 3M 4A 5P 6m 7m","lydian minor"],["1P 2m 3M 4P 5P 6m 7m","phrygian dominant","spanish","phrygian major"],["1P 2m 3m 4P 5P 6m 7M","balinese"],["1P 2m 3m 4P 5P 6M 7M","neopolitan major"],["1P 2M 3M 4P 5P 6m 7M","harmonic major"],["1P 2m 3M 4P 5P 6m 7M","double harmonic major","gypsy"],["1P 2M 3m 4A 5P 6m 7M","hungarian minor"],["1P 2A 3M 4A 5P 6M 7m","hungarian major"],["1P 2m 3M 4P 5d 6M 7m","oriental"],["1P 2m 3m 3M 4A 5P 7m","flamenco"],["1P 2m 3m 4A 5P 6m 7M","todi raga"],["1P 2m 3M 4P 5d 6m 7M","persian"],["1P 2m 3M 5d 6m 7m 7M","enigmatic"],["1P 2M 3M 4P 5A 6M 7M","major augmented","major #5","ionian augmented","ionian #5"],["1P 2A 3M 4A 5P 6M 7M","lydian #9"],["1P 2m 2M 4P 4A 5P 6m 7M","messiaen's mode #4"],["1P 2m 3M 4P 4A 5P 6m 7M","purvi raga"],["1P 2m 3m 3M 4P 5P 6m 7m","spanish heptatonic"],["1P 2M 3m 3M 4P 5P 6M 7m","bebop minor"],["1P 2M 3M 4P 5P 5A 6M 7M","bebop major"],["1P 2m 3m 4P 5d 5P 6m 7m","bebop locrian"],["1P 2M 3m 4P 5P 6m 7m 7M","minor bebop"],["1P 2M 3M 4P 5d 5P 6M 7M","ichikosucho"],["1P 2M 3m 4P 5P 6m 6M 7M","minor six diminished"],["1P 2m 3m 3M 4A 5P 6M 7m","half-whole diminished","dominant diminished","messiaen's mode #2"],["1P 3m 3M 4P 5P 6M 7m 7M","kafi raga"],["1P 2M 3M 4P 4A 5A 6A 7M","messiaen's mode #6"],["1P 2M 3m 3M 4P 5d 5P 6M 7m","composite blues"],["1P 2M 3m 3M 4A 5P 6m 7m 7M","messiaen's mode #3"],["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M","messiaen's mode #7"],["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M","chromatic"]],ii=oi,ai={...ge,intervals:[],aliases:[]},xe={};function si(e){return xe[e]||ai}function ui(e,t,o=[]){const n={...Sr(e),name:t,intervals:e,aliases:o};return xe[n.name]=n,xe[n.setNum]=n,xe[n.chroma]=n,n.aliases.forEach(r=>li(n,r)),n}function li(e,t){xe[t]=e}ii.forEach(([e,t,...o])=>ui(e.split(" "),t,o));var ci=[[.125,"dl",["large","duplex longa","maxima","octuple","octuple whole"]],[.25,"l",["long","longa"]],[.5,"d",["double whole","double","breve"]],[1,"w",["whole","semibreve"]],[2,"h",["half","minim"]],[4,"q",["quarter","crotchet"]],[8,"e",["eighth","quaver"]],[16,"s",["sixteenth","semiquaver"]],[32,"t",["thirty-second","demisemiquaver"]],[64,"sf",["sixty-fourth","hemidemisemiquaver"]],[128,"h",["hundred twenty-eighth"]],[256,"th",["two hundred fifty-sixth"]]],fi=ci;fi.forEach(([e,t,o])=>void 0);function Kt(e){return+e>=0&&+e<=127}function Ar(e){if(Kt(e))return+e;const t=ye(e);return t.empty?null:t.midi}function xr(e,t=440){return Math.pow(2,(e-69)/12)*t}var di=Math.log(2),pi=Math.log(440);function Er(e){const t=12*(Math.log(e)-pi)/di+69;return Math.round(t*100)/100}var hi="C C# D D# E F F# G G# A A# B".split(" "),mi="C Db D Eb E F Gb G Ab A Bb B".split(" ");function Wt(e,t={}){if(isNaN(e)||e===-1/0||e===1/0)return"";e=Math.round(e);const n=(t.sharps===!0?hi:mi)[e%12];if(t.pitchClass)return n;const r=Math.floor(e/12)-1;return n+r}function Ke(e){return e%12}function vi(e){return e.split("").reduce((t,o,n)=>(n<12&&o==="1"&&t.push(n),t),[])}function yi(e){return e.map(Ke).sort((t,o)=>t-o).filter((t,o,n)=>o===0||t!==n[o-1])}function We(e){return Array.isArray(e)?yi(e):vi(e)}function Cr(e){const t=We(e);return o=>{const n=Ke(o);for(let r=0;r<12;r++){if(t.includes(n+r))return o+r;if(t.includes(n-r))return o-r}}}function zt(e,t){const o=We(e),n=o.length;return r=>{const a=r<0?(n- -r%n)%n:r%n,u=Math.floor(r/n);return o[a]+u*12+t}}function Nr(e,t){const o=zt(e,t);return n=>{if(n!==0)return o(n>0?n-1:n)}}var gi={chroma:Ke,freqToMidi:Er,isMidi:Kt,midiToFreq:xr,midiToNoteName:Wt,pcsetNearest:Cr,pcset:We,pcsetDegrees:Nr,pcsetSteps:zt,toMidi:Ar};const bi=Object.freeze(Object.defineProperty({__proto__:null,chroma:Ke,default:gi,freqToMidi:Er,isMidi:Kt,midiToFreq:xr,midiToNoteName:Wt,pcset:We,pcsetDegrees:Nr,pcsetNearest:Cr,pcsetSteps:zt,toMidi:Ar},Symbol.toStringTag,{value:"Module"}));var Pi=ye,bn=e=>Pi(e).midi;function Mi(e){return Wt(e)}var Ht=[[0,2773,0,"ionian","","Maj7","major"],[1,2902,2,"dorian","m","m7"],[2,3418,4,"phrygian","m","m7"],[3,2741,-1,"lydian","","Maj7"],[4,2774,1,"mixolydian","","7"],[5,2906,3,"aeolian","m","m7","minor"],[6,3434,5,"locrian","dim","m7b5"]],Pn={...ge,name:"",alt:0,modeNum:NaN,triad:"",seventh:"",aliases:[]},Si=Ht.map(wi),Lt={};Si.forEach(e=>{Lt[e.name]=e,e.aliases.forEach(t=>{Lt[t]=e})});function _r(e){return typeof e=="string"?Lt[e.toLowerCase()]||Pn:e&&e.name?_r(e.name):Pn}function wi(e){const[t,o,n,r,a,u,i]=e,s=i?[i]:[],c=Number(o).toString(2);return{empty:!1,intervals:si(r).intervals,modeNum:t,chroma:c,normalized:c,name:r,setNum:o,alt:n,triad:a,seventh:u,aliases:s}}function Or(e){return(t,o)=>{const n=_r(t);if(n.empty)return[];const r=br(n.modeNum,e),a=n.intervals.map(u=>Uo(o,u));return r.map((u,i)=>a[i]+u)}}Or(Ht.map(e=>e[4]));Or(Ht.map(e=>e[5]));var je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ai(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var o=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),o}var it,Mn;function xi(){if(Mn)return it;Mn=1,it=e;function e(t,o,n){if(t!=null&&typeof t!="number")throw new Error("start must be a number or null");if(o!=null&&typeof o!="number")throw new Error("stop must be a number or null");if(n!=null&&typeof n!="number")throw new Error("step must be a number or null");o==null&&(o=t||0,t=0),n==null&&(n=o>t?1:-1);for(var r=[],a=t<o;a?t<o:t>o;t+=n)r.push(t);return r}return it}var Ei=xi();const Xt=ze(Ei);var ke={exports:{}},Ie={exports:{}},H={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var Sn;function
|
|
8
|
+
*/var Sn;function Ci(){if(Sn)return H;Sn=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,L=e?Symbol.for("react.scope"):60119;function x(m){if(typeof m=="object"&&m!==null){var P=m.$$typeof;switch(P){case t:switch(m=m.type,m){case s:case c:case n:case a:case r:case l:return m;default:switch(m=m&&m.$$typeof,m){case i:case h:case d:case f:case u:return m;default:return P}}case o:return P}}}function C(m){return x(m)===c}return H.AsyncMode=s,H.ConcurrentMode=c,H.ContextConsumer=i,H.ContextProvider=u,H.Element=t,H.ForwardRef=h,H.Fragment=n,H.Lazy=d,H.Memo=f,H.Portal=o,H.Profiler=a,H.StrictMode=r,H.Suspense=l,H.isAsyncMode=function(m){return C(m)||x(m)===s},H.isConcurrentMode=C,H.isContextConsumer=function(m){return x(m)===i},H.isContextProvider=function(m){return x(m)===u},H.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},H.isForwardRef=function(m){return x(m)===h},H.isFragment=function(m){return x(m)===n},H.isLazy=function(m){return x(m)===d},H.isMemo=function(m){return x(m)===f},H.isPortal=function(m){return x(m)===o},H.isProfiler=function(m){return x(m)===a},H.isStrictMode=function(m){return x(m)===r},H.isSuspense=function(m){return x(m)===l},H.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===c||m===a||m===r||m===l||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===f||m.$$typeof===u||m.$$typeof===i||m.$$typeof===h||m.$$typeof===b||m.$$typeof===D||m.$$typeof===L||m.$$typeof===v)},H.typeOf=x,H}var X={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var wn;function
|
|
15
|
+
*/var wn;function Ni(){return wn||(wn=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,L=e?Symbol.for("react.scope"):60119;function x(N){return typeof N=="string"||typeof N=="function"||N===n||N===c||N===a||N===r||N===l||N===p||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===f||N.$$typeof===u||N.$$typeof===i||N.$$typeof===h||N.$$typeof===b||N.$$typeof===D||N.$$typeof===L||N.$$typeof===v)}function C(N){if(typeof N=="object"&&N!==null){var Z=N.$$typeof;switch(Z){case t:var pe=N.type;switch(pe){case s:case c:case n:case a:case r:case l:return pe;default:var be=pe&&pe.$$typeof;switch(be){case i:case h:case d:case f:case u:return be;default:return Z}}case o:return Z}}}var m=s,P=c,g=i,M=u,O=t,I=h,V=n,U=d,ne=f,oe=o,ce=a,Q=r,ie=l,fe=!1;function re(N){return fe||(fe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),S(N)||C(N)===s}function S(N){return C(N)===c}function E(N){return C(N)===i}function B(N){return C(N)===u}function $(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function q(N){return C(N)===h}function T(N){return C(N)===n}function j(N){return C(N)===d}function F(N){return C(N)===f}function G(N){return C(N)===o}function W(N){return C(N)===a}function K(N){return C(N)===r}function J(N){return C(N)===l}X.AsyncMode=m,X.ConcurrentMode=P,X.ContextConsumer=g,X.ContextProvider=M,X.Element=O,X.ForwardRef=I,X.Fragment=V,X.Lazy=U,X.Memo=ne,X.Portal=oe,X.Profiler=ce,X.StrictMode=Q,X.Suspense=ie,X.isAsyncMode=re,X.isConcurrentMode=S,X.isContextConsumer=E,X.isContextProvider=B,X.isElement=$,X.isForwardRef=q,X.isFragment=T,X.isLazy=j,X.isMemo=F,X.isPortal=G,X.isProfiler=W,X.isStrictMode=K,X.isSuspense=J,X.isValidElementType=x,X.typeOf=C}()),X}var An;function Tr(){return An||(An=1,process.env.NODE_ENV==="production"?Ie.exports=Ci():Ie.exports=Ni()),Ie.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var at,xn;function _i(){if(xn)return at;xn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function r(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var u={},i=0;i<10;i++)u["_"+String.fromCharCode(i)]=i;var s=Object.getOwnPropertyNames(u).map(function(h){return u[h]});if(s.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return at=r()?Object.assign:function(a,u){for(var i,s=n(a),c,h=1;h<arguments.length;h++){i=Object(arguments[h]);for(var l in i)t.call(i,l)&&(s[l]=i[l]);if(e){c=e(i);for(var p=0;p<c.length;p++)o.call(i,c[p])&&(s[c[p]]=i[c[p]])}}return s},at}var st,En;function Yt(){if(En)return st;En=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return st=e,st}var ut,Cn;function Rr(){return Cn||(Cn=1,ut=Function.call.bind(Object.prototype.hasOwnProperty)),ut}var lt,Nn;function
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(S),null," "));var N=J(F,K,q,T,j+"."+K,o);if(N)return N}return null}return b(E)}function oe(S){switch(typeof S){case"number":case"string":case"undefined":return!0;case"boolean":return!S;case"object":if(Array.isArray(S))return S.every(oe);if(S===null||i(S))return!0;var E=l(S);if(E){var B=E.call(S),$;if(E!==S.entries){for(;!($=B.next()).done;)if(!oe($.value))return!1}else for(;!($=B.next()).done;){var q=$.value;if(q&&!oe(q[1]))return!1}}else return!1;return!0;default:return!1}}function ce(S,E){return S==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function Q(S){var E=typeof S;return Array.isArray(S)?"array":S instanceof RegExp?"object":ce(E,S)?"symbol":E}function ie(S){if(typeof S>"u"||S===null)return""+S;var E=Q(S);if(E==="object"){if(S instanceof Date)return"date";if(S instanceof RegExp)return"regexp"}return E}function fe(S){var E=ie(S);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function re(S){return!S.constructor||!S.constructor.name?p:S.constructor.name}return f.checkPropTypes=r,f.resetWarningCache=r.resetWarningCache,f.PropTypes=f,f},ct}var ft,_n;function ji(){if(_n)return ft;_n=1;var e=Yt();function t(){}function o(){}return o.resetWarningCache=t,ft=function(){function n(u,i,s,c,h,l){if(l!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function r(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:r,element:n,elementType:n,instanceOf:r,node:n,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:t};return a.PropTypes=a,a},ft}var Tn;function jr(){if(Tn)return ke.exports;if(Tn=1,process.env.NODE_ENV!=="production"){var e=Tr(),t=!0;ke.exports=Ri()(e.isElement,t)}else ke.exports=ji()();return ke.exports}var ki=jr();const R=ze(ki);var dt,Rn;function Ii(){if(Rn)return dt;Rn=1;var e=200,t="__lodash_hash_undefined__",o=9007199254740991,n="[object Arguments]",r="[object Function]",a="[object GeneratorFunction]",u=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=typeof je=="object"&&je&&je.Object===Object&&je,c=typeof self=="object"&&self&&self.Object===Object&&self,h=s||c||Function("return this")();function l(y,w,k){switch(k.length){case 0:return y.call(w);case 1:return y.call(w,k[0]);case 2:return y.call(w,k[0],k[1]);case 3:return y.call(w,k[0],k[1],k[2])}return y.apply(w,k)}function p(y,w){var k=y?y.length:0;return!!k&&v(y,w,0)>-1}function f(y,w){for(var k=-1,z=w.length,ae=y.length;++k<z;)y[ae+k]=w[k];return y}function d(y,w,k,z){for(var ae=y.length,ue=k+-1;++ue<ae;)if(w(y[ue],ue,y))return ue;return-1}function v(y,w,k){if(w!==w)return d(y,b,k);for(var z=k-1,ae=y.length;++z<ae;)if(y[z]===w)return z;return-1}function b(y){return y!==y}function D(y,w){return y.has(w)}function L(y,w){return y==null?void 0:y[w]}function x(y){var w=!1;if(y!=null&&typeof y.toString!="function")try{w=!!(y+"")}catch{}return w}var C=Array.prototype,m=Function.prototype,P=Object.prototype,g=h["__core-js_shared__"],M=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),_=m.toString,I=P.hasOwnProperty,V=P.toString,U=RegExp("^"+_.call(I).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=h.Symbol,oe=P.propertyIsEnumerable,ce=C.splice,Q=ne?ne.isConcatSpreadable:void 0,ie=Math.max,fe=an(h,"Map"),re=an(Object,"create");function S(y){var w=-1,k=y?y.length:0;for(this.clear();++w<k;){var z=y[w];this.set(z[0],z[1])}}function E(){this.__data__=re?re(null):{}}function B(y){return this.has(y)&&delete this.__data__[y]}function $(y){var w=this.__data__;if(re){var k=w[y];return k===t?void 0:k}return I.call(w,y)?w[y]:void 0}function q(y){var w=this.__data__;return re?w[y]!==void 0:I.call(w,y)}function T(y,w){var k=this.__data__;return k[y]=re&&w===void 0?t:w,this}S.prototype.clear=E,S.prototype.delete=B,S.prototype.get=$,S.prototype.has=q,S.prototype.set=T;function j(y){var w=-1,k=y?y.length:0;for(this.clear();++w<k;){var z=y[w];this.set(z[0],z[1])}}function F(){this.__data__=[]}function G(y){var w=this.__data__,k=we(w,y);if(k<0)return!1;var z=w.length-1;return k==z?w.pop():ce.call(w,k,1),!0}function W(y){var w=this.__data__,k=we(w,y);return k<0?void 0:w[k][1]}function K(y){return we(this.__data__,y)>-1}function J(y,w){var k=this.__data__,z=we(k,y);return z<0?k.push([y,w]):k[z][1]=w,this}j.prototype.clear=F,j.prototype.delete=G,j.prototype.get=W,j.prototype.has=K,j.prototype.set=J;function N(y){var w=-1,k=y?y.length:0;for(this.clear();++w<k;){var z=y[w];this.set(z[0],z[1])}}function Z(){this.__data__={hash:new S,map:new(fe||j),string:new S}}function pe(y){return _e(this,y).delete(y)}function be(y){return _e(this,y).get(y)}function Qe(y){return _e(this,y).has(y)}function Ze(y,w){return _e(this,y).set(y,w),this}N.prototype.clear=Z,N.prototype.delete=pe,N.prototype.get=be,N.prototype.has=Qe,N.prototype.set=Ze;function ee(y){var w=-1,k=y?y.length:0;for(this.__data__=new N;++w<k;)this.add(y[w])}function se(y){return this.__data__.set(y,t),this}function Oe(y){return this.__data__.has(y)}ee.prototype.add=ee.prototype.push=se,ee.prototype.has=Oe;function we(y,w){for(var k=y.length;k--;)if(eo(y[k][0],w))return k;return-1}function et(y,w,k,z){var ae=-1,ue=p,he=!0,Ae=y.length,Te=[],ao=w.length;if(!Ae)return Te;w.length>=e&&(ue=D,he=!1,w=new ee(w));e:for(;++ae<Ae;){var Me=y[ae],Re=Me;if(Me=Me!==0?Me:0,he&&Re===Re){for(var ln=ao;ln--;)if(w[ln]===Re)continue e;Te.push(Me)}else ue(w,Re,z)||Te.push(Me)}return Te}function Pe(y,w,k,z,ae){var ue=-1,he=y.length;for(k||(k=Xr),ae||(ae=[]);++ue<he;){var Ae=y[ue];k(Ae)&&f(ae,Ae)}return ae}function tt(y){if(!un(y)||Jr(y))return!1;var w=sn(y)||x(y)?U:i;return w.test(Qr(y))}function Hr(y,w){return w=ie(w===void 0?y.length-1:w,0),function(){for(var k=arguments,z=-1,ae=ie(k.length-w,0),ue=Array(ae);++z<ae;)ue[z]=k[w+z];z=-1;for(var he=Array(w+1);++z<w;)he[z]=k[z];return he[w]=ue,l(y,this,he)}}function _e(y,w){var k=y.__data__;return Yr(w)?k[typeof w=="string"?"string":"hash"]:k.map}function an(y,w){var k=L(y,w);return tt(k)?k:void 0}function Xr(y){return no(y)||to(y)||!!(Q&&y&&y[Q])}function Yr(y){var w=typeof y;return w=="string"||w=="number"||w=="symbol"||w=="boolean"?y!=="__proto__":y===null}function Jr(y){return!!M&&M in y}function Qr(y){if(y!=null){try{return _.call(y)}catch{}try{return y+""}catch{}}return""}var Zr=Hr(function(y,w){return nt(y)?et(y,Pe(w,1,nt)):[]});function eo(y,w){return y===w||y!==y&&w!==w}function to(y){return nt(y)&&I.call(y,"callee")&&(!oe.call(y,"callee")||V.call(y)==n)}var no=Array.isArray;function ro(y){return y!=null&&oo(y.length)&&!sn(y)}function nt(y){return io(y)&&ro(y)}function sn(y){var w=un(y)?V.call(y):"";return w==r||w==a}function oo(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=o}function un(y){var w=typeof y;return!!y&&(w=="object"||w=="function")}function io(y){return!!y&&typeof y=="object"}return dt=Zr,dt}var Di=Ii();const jn=ze(Di);function Li(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var n,r,a,u,i=[],s=!0,c=!1;try{if(a=(o=o.call(e)).next,t!==0)for(;!(s=(n=a.call(o)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(h){c=!0,r=h}finally{try{if(!s&&o.return!=null&&(u=o.return(),Object(u)!==u))return}finally{if(c)throw r}}return i}}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qi(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kr(n.key),n)}}function Xe(e,t,o){return t&&qi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y(e,t,o){return t=kr(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},qt.apply(this,arguments)}function Ye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ft(e,t)}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},$e(e)}function Ft(e,t){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ft(e,t)}function Fi(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bi(e,t){if(e==null)return{};var o={},n=Object.keys(e),r,a;for(a=0;a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function $i(e,t){if(e==null)return{};var o=Bi(e,t),n,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function te(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vi(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return te(e)}function Je(e){var t=Fi();return function(){var n=$e(e),r;if(t){var a=$e(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Vi(this,r)}}function Gi(e,t){return Ui(e)||Li(e,t)||Ki(e,t)||Wi()}function Ui(e){if(Array.isArray(e))return e}function Ki(e,t){if(e){if(typeof e=="string")return kn(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return kn(e,t)}}function kn(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function Wi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zi(e,t){if(typeof e!="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kr(e){var t=zi(e,"string");return typeof t=="symbol"?t:String(t)}var Hi=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],Xi=["Db","Eb","Gb","Ab","Bb"],Yi={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},Ve=12,Jt=Ve,Qt=127,Ji=/([a-g])([#b]?)(\d+)/,Bt=12;function Qi(e){if(!e)throw Error("Invalid note argument");var t=Ji.exec(e.toLowerCase());if(!t)throw Error("Invalid note argument");var o=Gi(t,4),n=o[1],r=o[2],a=o[3],u="".concat(n.toUpperCase()).concat(r),i=Yi[u];if(i==null)throw Error("Invalid note argument");return Ve+i+Bt*parseInt(a,10)}function Zi(e){var t=(e-Ve)%Bt,o=Math.floor((e-Ve)/Bt),n=Hi[t];return{note:"".concat(n).concat(o),pitchName:n,octave:o,midiNumber:e,isAccidental:Xi.includes(n)}}function ea(){return Xt(Jt,Qt+1).reduce(function(e,t){return e[t]=Zi(t),e},{})}var ta=ea();function Ir(e){var t=ta[e];if(!t)throw Error("Invalid MIDI number");return t}var na=Xt(Jt,Qt+1).filter(function(e){return!Ir(e).isAccidental}),Ge={fromNote:Qi,getAttributes:Ir,MIN_MIDI_NUMBER:Jt,MAX_MIDI_NUMBER:Qt,NATURAL_MIDI_NUMBERS:na},ra=60,Zt=function(e){Ye(o,e);var t=Je(o);function o(){var n;He(this,o);for(var r=arguments.length,a=new Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),Y(te(n),"onPlayNoteInput",function(){n.props.onPlayNoteInput(n.props.midiNumber)}),Y(te(n),"onStopNoteInput",function(){n.props.onStopNoteInput(n.props.midiNumber),n.props.onKeyMouseLeave&&n.props.onKeyMouseLeave(n.props.midiNumber)}),n}return Xe(o,[{key:"getAbsoluteKeyPosition",value:function(r){var a=7,u=Ge.getAttributes(r),i=u.octave,s=u.pitchName,c=this.props.pitchPositions[s],h=a*i;return c+h}},{key:"getRelativeKeyPosition",value:function(r){return this.getAbsoluteKeyPosition(r)-this.getAbsoluteKeyPosition(this.props.noteRange.first)}},{key:"render",value:function(){var r=this,a=this.props,u=a.naturalKeyWidth,i=a.accidentalWidthRatio,s=a.midiNumber,c=a.gliss,h=a.useTouchEvents,l=a.accidental,p=a.active,f=a.selected,d=a.disabled,v=a.children,b=pt(l?this.getRelativeKeyPosition(s)*u:this.getRelativeKeyPosition(s)*u),D=pt(l?i*u:u);return O.createElement("div",{"data-midinumber":s,className:Ce("ReactPiano__Key",{"ReactPiano__Key--accidental":l,"ReactPiano__Key--natural":!l,"ReactPiano__Key--disabled":d,"ReactPiano__Key--active":p,"ReactPiano__Key--selected":f,"ReactPiano__Key--middleC":s===ra}),style:{left:b,width:D},onDoubleClick:function(){r.props.onDoubleClick&&r.props.onDoubleClick(s)},onMouseDown:h?null:this.onPlayNoteInput,onMouseUp:function(){r.props.onClick&&r.props.onClick(s),h||r.onStopNoteInput()},onMouseEnter:function(){r.props.onKeyMouseEnter&&r.props.onKeyMouseEnter({accidental:l,left:b,midiNumber:s,width:D}),c&&r.onPlayNoteInput()},onMouseLeave:this.onStopNoteInput,onTouchStart:h?this.onPlayNoteInput:null,onTouchCancel:h?this.onStopNoteInput:null,onTouchEnd:h?this.onStopNoteInput:null},O.createElement("div",{className:"ReactPiano__NoteLabelContainer"},v))}}]),o}(O.Component);Y(Zt,"propTypes",{midiNumber:R.number.isRequired,naturalKeyWidth:R.number.isRequired,gliss:R.bool.isRequired,useTouchEvents:R.bool.isRequired,accidental:R.bool.isRequired,active:R.bool.isRequired,selected:R.bool,disabled:R.bool.isRequired,onKeyMouseEnter:R.func,onKeyMouseLeave:R.func,onPlayNoteInput:R.func.isRequired,onStopNoteInput:R.func.isRequired,accidentalWidthRatio:R.number.isRequired,pitchPositions:R.object.isRequired,children:R.node});Y(Zt,"defaultProps",{accidentalWidthRatio:.65,selected:!1,onKeyMouseEnter:void 0,onKeyMouseLeave:void 0,pitchPositions:{C:0,Db:.672,D:1,Eb:1.672,E:2,F:3,Gb:3.672,G:4,Ab:4.672,A:5,Bb:5.672,B:6}});function pt(e){return"".concat(e*100,"%")}var en=function(e){Ye(o,e);var t=Je(o);function o(){return He(this,o),t.apply(this,arguments)}return Xe(o,[{key:"getMidiNumbers",value:function(){return Xt(this.props.noteRange.first,this.props.noteRange.last+1)}},{key:"getNaturalKeyCount",value:function(){return this.getMidiNumbers().filter(function(r){var a=Ge.getAttributes(r),u=a.isAccidental;return!u}).length}},{key:"getNaturalKeyWidth",value:function(){return 1/this.getNaturalKeyCount()}},{key:"getWidth",value:function(){return this.props.width?this.props.width:"100%"}},{key:"getHeight",value:function(){if(!this.props.width)return"100%";var r=this.props.width*this.getNaturalKeyWidth();return"".concat(r/this.props.keyWidthToHeight,"px")}},{key:"render",value:function(){var r=this,a=this.getNaturalKeyWidth();return O.createElement("div",{className:Ce("ReactPiano__Keyboard",this.props.className),style:{width:this.getWidth(),height:this.getHeight()}},this.getMidiNumbers().map(function(u){var i=Ge.getAttributes(u);i.note;var s=i.isAccidental,c=!r.props.disabled&&r.props.activeNotes.includes(u),h=r.props.selectedNotes&&r.props.selectedNotes.includes(u);return O.createElement(Zt,{accidental:s,active:c,selected:h,disabled:r.props.disabled,gliss:r.props.gliss,key:u,midiNumber:u,naturalKeyWidth:a,noteRange:r.props.noteRange,onClick:r.props.onClick,onDoubleClick:r.props.onDoubleClick,onKeyMouseEnter:r.props.onKeyMouseEnter,onKeyMouseLeave:r.props.onKeyMouseLeave,onPlayNoteInput:r.props.onPlayNoteInput,onStopNoteInput:r.props.onStopNoteInput,useTouchEvents:r.props.useTouchEvents},r.props.disabled?null:r.props.renderNoteLabel({isActive:c,isAccidental:s,midiNumber:u}))}))}}]),o}(O.Component);Y(en,"propTypes",{noteRange:oa,activeNotes:R.arrayOf(R.number),selectedNotes:R.arrayOf(R.number),onKeyMouseEnter:R.func,onKeyMouseLeave:R.func,onPlayNoteInput:R.func.isRequired,onStopNoteInput:R.func.isRequired,renderNoteLabel:R.func.isRequired,keyWidthToHeight:R.number.isRequired,className:R.string,disabled:R.bool,gliss:R.bool,useTouchEvents:R.bool,width:R.number});Y(en,"defaultProps",{disabled:!1,gliss:!1,keyWidthToHeight:.33,onKeyMouseEnter:void 0,onKeyMouseLeave:void 0,renderNoteLabel:function(){},useTouchEvents:!1});function In(e){return typeof e!="number"?!1:Ge.NATURAL_MIDI_NUMBERS.includes(e)}function oa(e,t,o){var n=e[t],r=n.first,a=n.last;if(!r||!a)return new Error("Invalid prop ".concat(t," supplied to ").concat(o,". ").concat(t," must be an object with .first and .last values."));if(!In(r)||!In(a))return new Error("Invalid prop ".concat(t," supplied to ").concat(o,". ").concat(t," values must be valid MIDI numbers, and should not be accidentals (sharp or flat notes)."));if(r>=a)return new Error("Invalid prop ".concat(t," supplied to ").concat(o,". ").concat(t,".first must be smaller than ").concat(t,".last."))}var tn=function(e){Ye(o,e);var t=Je(o);function o(){var n;He(this,o);for(var r=arguments.length,a=new Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),Y(te(n),"state",{isMouseDown:!1,useTouchEvents:!1}),Y(te(n),"handleNoteChanges",function(i){var s=i.prevActiveNotes,c=i.nextActiveNotes;if(!n.props.disabled){var h=jn(s,c),l=jn(c,s);l.forEach(function(p){n.props.playNote(p)}),h.forEach(function(p){n.props.stopNote(p)})}}),Y(te(n),"getMidiNumberForKey",function(i){if(!n.props.keyboardShortcuts)return null;var s=n.props.keyboardShortcuts.find(function(c){return c.key===i});return s&&s.midiNumber}),Y(te(n),"getKeyForMidiNumber",function(i){if(!n.props.keyboardShortcuts)return null;var s=n.props.keyboardShortcuts.find(function(c){return c.midiNumber===i});return s&&s.key}),Y(te(n),"onKeyDown",function(i){if(!(i.ctrlKey||i.metaKey||i.shiftKey)){var s=n.getMidiNumberForKey(i.key);s&&n.onPlayNoteInput(s)}}),Y(te(n),"onKeyUp",function(i){var s=n.getMidiNumberForKey(i.key);s&&n.onStopNoteInput(s)}),Y(te(n),"onPlayNoteInput",function(i){n.props.disabled||n.props.onPlayNoteInput(i,n.props.activeNotes)}),Y(te(n),"onStopNoteInput",function(i){n.props.disabled||n.props.onStopNoteInput(i,n.props.activeNotes)}),Y(te(n),"onMouseDown",function(){n.setState({isMouseDown:!0})}),Y(te(n),"onMouseUp",function(){n.setState({isMouseDown:!1})}),Y(te(n),"onTouchStart",function(){n.setState({useTouchEvents:!0})}),Y(te(n),"renderNoteLabel",function(i){var s=i.midiNumber,c=i.isActive,h=i.isAccidental,l=n.getKeyForMidiNumber(s);return n.props.renderNoteLabel({keyboardShortcut:l,midiNumber:s,isActive:c,isAccidental:h})}),n}return Xe(o,[{key:"componentDidMount",value:function(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)}},{key:"componentDidUpdate",value:function(r,a){this.props.activeNotes!==r.activeNotes&&this.handleNoteChanges({prevActiveNotes:r.activeNotes||[],nextActiveNotes:this.props.activeNotes||[]})}},{key:"render",value:function(){return O.createElement("div",{style:{width:"100%",height:"100%"},onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,"data-testid":"container"},O.createElement(en,{activeNotes:this.props.activeNotes,selectedNotes:this.props.selectedNotes,className:this.props.className,disabled:this.props.disabled,gliss:this.state.isMouseDown,keyWidthToHeight:this.props.keyWidthToHeight,noteRange:this.props.noteRange,onClick:this.props.onClick,onDoubleClick:this.props.onDoubleClick,onKeyMouseEnter:this.props.onKeyMouseEnter,onKeyMouseLeave:this.props.onKeyMouseLeave,onPlayNoteInput:this.onPlayNoteInput,onStopNoteInput:this.onStopNoteInput,renderNoteLabel:this.renderNoteLabel,useTouchEvents:this.state.useTouchEvents,width:this.props.width}))}}]),o}(O.Component);Y(tn,"propTypes",{noteRange:R.object.isRequired,activeNotes:R.arrayOf(R.number.isRequired).isRequired,selectedNotes:R.arrayOf(R.number),playNote:R.func.isRequired,stopNote:R.func.isRequired,onClick:R.func,onDoubleClick:R.func,onKeyMouseEnter:R.func,onKeyMouseLeave:R.func,onPlayNoteInput:R.func.isRequired,onStopNoteInput:R.func.isRequired,renderNoteLabel:R.func.isRequired,className:R.string,disabled:R.bool,width:R.number,keyWidthToHeight:R.number,keyboardShortcuts:R.arrayOf(R.shape({key:R.string.isRequired,midiNumber:R.number.isRequired}))});Y(tn,"defaultProps",{onKeyMouseEnter:void 0,onKeyMouseLeave:void 0,renderNoteLabel:function(t){var o=t.keyboardShortcut;t.midiNumber;var n=t.isActive,r=t.isAccidental;return o?O.createElement("div",{className:Ce("ReactPiano__NoteLabel",{"ReactPiano__NoteLabel--active":n,"ReactPiano__NoteLabel--accidental":r,"ReactPiano__NoteLabel--natural":!r})},o):null}});var ia=["activeNotes","selectedNotes","onPlayNoteInput","onStopNoteInput"],nn=function(e){Ye(o,e);var t=Je(o);function o(){var n;He(this,o);for(var r=arguments.length,a=new Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),Y(te(n),"state",{activeNotes:n.props.activeNotes||[]}),Y(te(n),"handlePlayNoteInput",function(i){n.setState(function(s){return n.props.onPlayNoteInput&&n.props.onPlayNoteInput(i,{prevActiveNotes:s.activeNotes}),s.activeNotes.includes(i)?null:{activeNotes:s.activeNotes.concat(i)}})}),Y(te(n),"handleStopNoteInput",function(i){n.setState(function(s){return n.props.onStopNoteInput&&n.props.onStopNoteInput(i,{prevActiveNotes:n.state.activeNotes}),{activeNotes:s.activeNotes.filter(function(c){return i!==c})}})}),n}return Xe(o,[{key:"componentDidUpdate",value:function(r){r.activeNotes!==this.props.activeNotes&&this.state.activeNotes!==this.props.activeNotes&&this.setState({activeNotes:this.props.activeNotes||[]})}},{key:"render",value:function(){var r=this.props;r.activeNotes;var a=r.selectedNotes;r.onPlayNoteInput,r.onStopNoteInput;var u=$i(r,ia);return O.createElement(tn,qt({activeNotes:this.state.activeNotes,selectedNotes:a,onPlayNoteInput:this.handlePlayNoteInput,onStopNoteInput:this.handleStopNoteInput},u))}}]),o}(O.Component);Y(nn,"propTypes",{noteRange:R.object.isRequired,activeNotes:R.arrayOf(R.number.isRequired),selectedNotes:R.arrayOf(R.number),playNote:R.func.isRequired,stopNote:R.func.isRequired,onPlayNoteInput:R.func,onStopNoteInput:R.func,renderNoteLabel:R.func,className:R.string,disabled:R.bool,width:R.number,keyWidthToHeight:R.number,keyboardShortcuts:R.arrayOf(R.shape({key:R.string.isRequired,midiNumber:R.number.isRequired}))});var ht={exports:{}},mt={exports:{}},vt,Dn;function aa(){if(Dn)return vt;Dn=1;function e(o){return o>64&&o<91?o-65:o>96&&o<123?o-71:o>47&&o<58?o+4:o===43?62:o===47?63:0}function t(o,n){for(var r=o.replace(/[^A-Za-z0-9\+\/]/g,""),a=r.length,u=n?Math.ceil((a*3+1>>2)/n)*n:a*3+1>>2,i=new Uint8Array(u),s,c,h=0,l=0,p=0;p<a;p++)if(c=p&3,h|=e(r.charCodeAt(p))<<18-6*c,c===3||a-p===1){for(s=0;s<3&&l<u;s++,l++)i[l]=h>>>(16>>>s&24)&255;h=0}return i}return vt={decode:t},vt}var yt,Ln;function sa(){return Ln||(Ln=1,yt=function(e,t){return new Promise(function(o,n){var r=new XMLHttpRequest;t&&(r.responseType=t),r.open("GET",e),r.onload=function(){r.status===200?o(r.response):n(Error(r.statusText))},r.onerror=function(){n(Error("Network Error"))},r.send()})}),yt}var qn;function ua(){return qn||(qn=1,function(e){var t=aa(),o=sa();function n(g){return function(M){return typeof M=="string"&&g.test(M)}}function r(g,M){return typeof g=="string"?g+M:typeof g=="function"?g(M):M}function a(g,M,_,I){var V=u(M)?i:s(M)?c:h(M)?l:p(M)?f:d(M)?v:b(M)?D:L(M)?x:C(M)?m:null,U=_||{};return V?V(g,M,U):I?Promise.resolve(I):Promise.reject("Source not valid ("+M+")")}a.fetch=o;function u(g){return g instanceof ArrayBuffer}function i(g,M,_){return new Promise(function(I,V){g.decodeAudioData(M,function(U){I(U)},function(){V("Can't decode audio data ("+M.slice(0,30)+"...)")})})}var s=n(/\.(mp3|wav|ogg)(\?.*)?$/i);function c(g,M,_){var I=r(_.from,M);return a(g,a.fetch(I,"arraybuffer"),_)}function h(g){return g&&typeof g.then=="function"}function l(g,M,_){return M.then(function(I){return a(g,I,_)})}var p=Array.isArray;function f(g,M,_){return Promise.all(M.map(function(I){return a(g,I,_,I)}))}function d(g){return g&&typeof g=="object"}function v(g,M,_){var I={},V=Object.keys(M).map(function(U){if(_.only&&_.only.indexOf(U)===-1)return null;var ne=M[U];return a(g,ne,_,ne).then(function(oe){I[U]=oe})});return Promise.all(V).then(function(){return I})}var b=n(/\.json(\?.*)?$/i);function D(g,M,_){var I=r(_.from,M);return a(g,a.fetch(I,"text").then(JSON.parse),_)}var L=n(/^data:audio/);function x(g,M,_){var I=M.indexOf(",");return a(g,t.decode(M.slice(I+1)).buffer,_)}var C=n(/\.js(\?.*)?$/i);function m(g,M,_){var I=r(_.from,M);return a(g,a.fetch(I,"text").then(P),_)}function P(g){var M=g.indexOf("MIDI.Soundfont.");if(M<0)throw Error("Invalid MIDI.js Soundfont format");M=g.indexOf("=",M)+2;var _=g.lastIndexOf(",");return JSON.parse(g.slice(M,_)+"}")}e.exports&&(e.exports=a),typeof window<"u"&&(window.loadAudio=a)}(mt)),mt.exports}var gt={exports:{}},bt,Fn;function la(){if(Fn)return bt;Fn=1,bt=e;function e(i){var s=i.createGain(),c=s._voltage=n(i),h=r(c),l=r(c),p=r(c);return s._startAmount=r(l),s._endAmount=r(p),s._multiplier=r(h),s._multiplier.connect(s),s._startAmount.connect(s),s._endAmount.connect(s),s.value=h.gain,s.startValue=l.gain,s.endValue=p.gain,s.startValue.value=0,s.endValue.value=0,Object.defineProperties(s,t),s}var t={attack:{value:0,writable:!0},decay:{value:0,writable:!0},sustain:{value:1,writable:!0},release:{value:0,writable:!0},getReleaseDuration:{value:function(){return this.release}},start:{value:function(i){var s=this._multiplier.gain,c=this._startAmount.gain,h=this._endAmount.gain;this._voltage.start(i),this._decayFrom=this._decayFrom=i+this.attack,this._startedAt=i;var l=this.sustain;s.cancelScheduledValues(i),c.cancelScheduledValues(i),h.cancelScheduledValues(i),h.setValueAtTime(0,i),this.attack?(s.setValueAtTime(0,i),s.linearRampToValueAtTime(1,i+this.attack),c.setValueAtTime(1,i),c.linearRampToValueAtTime(0,i+this.attack)):(s.setValueAtTime(1,i),c.setValueAtTime(0,i)),this.decay&&s.setTargetAtTime(l,this._decayFrom,a(this.decay))}},stop:{value:function(i,s){s&&(i=i-this.release);var c=i+this.release;if(this.release){var h=this._multiplier.gain,l=this._startAmount.gain,p=this._endAmount.gain;h.cancelScheduledValues(i),l.cancelScheduledValues(i),p.cancelScheduledValues(i);var f=a(this.release);if(this.attack&&i<this._decayFrom){var d=u(0,1,this._startedAt,this._decayFrom,i);h.linearRampToValueAtTime(d,i),l.linearRampToValueAtTime(1-d,i),l.setTargetAtTime(0,i,f)}p.setTargetAtTime(1,i,f),h.setTargetAtTime(0,i,f)}return this._voltage.stop(c),c}},onended:{get:function(){return this._voltage.onended},set:function(i){this._voltage.onended=i}}},o=new Float32Array([1,1]);function n(i){var s=i.createBufferSource(),c=i.createBuffer(1,2,i.sampleRate);return c.getChannelData(0).set(o),s.buffer=c,s.loop=!0,s}function r(i){var s=i.context.createGain();return i.connect(s),s}function a(i){return Math.log(i+1)/Math.log(100)}function u(i,s,c,h,l){var p=s-i,f=h-c,d=l-c,v=d/f,b=i+v*p;return b<=i&&(b=i),b>=s&&(b=s),b}return bt}var Pt,Bn;function ca(){if(Bn)return Pt;Bn=1;var e=la(),t={},o={gain:1,attack:.01,decay:.1,sustain:.9,release:.3,loop:!1,cents:0,loopStart:0,loopEnd:0};function n(s,c,h){var l=!1,p=0,f={},d=s.createGain();d.gain.value=1;var v=Object.assign({},o,h),b={context:s,out:d,opts:v};return c instanceof AudioBuffer?b.buffer=c:b.buffers=c,b.start=function(x,C,m){if(b.buffer&&x!==null)return b.start(null,x,C);var P=x?b.buffers[x]:b.buffer;if(P){if(!l){console.warn("SamplePlayer not connected to any node.");return}}else{console.warn("Buffer "+x+" not found.");return}var g=m||t;C=Math.max(s.currentTime,C||0),b.emit("start",C,x,g);var M=L(x,P,g);return M.id=D(x,M),M.env.start(C),M.source.start(C),b.emit("started",C,M.id,M),g.duration&&M.stop(C+g.duration),M},b.play=function(x,C,m){return b.start(x,C,m)},b.stop=function(x,C){var m;return C=C||Object.keys(f),C.map(function(P){return m=f[P],m?(m.stop(x),m.id):null})},b.connect=function(x){return l=!0,d.connect(x),b},b.emit=function(x,C,m,P){b.onevent&&b.onevent(x,C,m,P);var g=b["on"+x];g&&g(C,m,P)},b;function D(x,C){return C.id=p++,f[C.id]=C,C.source.onended=function(){var m=s.currentTime;C.source.disconnect(),C.env.disconnect(),C.disconnect(),b.emit("ended",m,C.id,C)},C.id}function L(x,C,m){var P=s.createGain();return P.gain.value=0,P.connect(d),P.env=u(s,m,v),P.env.connect(P.gain),P.source=s.createBufferSource(),P.source.buffer=C,P.source.connect(P),P.source.loop=m.loop||v.loop,P.source.playbackRate.value=i(m.cents||v.cents),P.source.loopStart=m.loopStart||v.loopStart,P.source.loopEnd=m.loopEnd||v.loopEnd,P.stop=function(g){var M=g||s.currentTime;b.emit("stop",M,x);var _=P.env.stop(M);P.source.stop(_)},P}}function r(s){return typeof s=="number"}var a=["attack","decay","sustain","release"];function u(s,c,h){var l=e(s),p=c.adsr||h.adsr;return a.forEach(function(f,d){p?l[f]=p[d]:l[f]=c[f]||h[f]}),l.value.value=r(c.gain)?c.gain:r(h.gain)?h.gain:1,l}function i(s){return s?Math.pow(2,s/1200):1}return Pt=n,Pt}var Mt,$n;function fa(){if($n)return Mt;$n=1,Mt=function(t){return t.on=function(o,n){if(arguments.length===1&&typeof o=="function")return t.on("event",o);var r="on"+o,a=t[r];return t[r]=a?e(a,n):n,t},t};function e(t,o){return function(n,r,a,u){t(n,r,a,u),o(n,r,a,u)}}return Mt}var St,Vn;function da(){if(Vn)return St;Vn=1;var e=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/;function t(){return e}var o=[0,2,4,5,7,9,11];function n(i,s,c){if(typeof i!="string")return null;var h=e.exec(i);if(!h||!s&&h[4])return null;var l={letter:h[1].toUpperCase(),acc:h[2].replace(/x/g,"##")};return l.pc=l.letter+l.acc,l.step=(l.letter.charCodeAt(0)+3)%7,l.alt=l.acc[0]==="b"?-l.acc.length:l.acc.length,l.chroma=o[l.step]+l.alt,h[3]&&(l.oct=+h[3],l.midi=l.chroma+12*(l.oct+1),l.freq=r(l.midi,c)),s&&(l.tonicOf=h[4]),l}function r(i,s){return Math.pow(2,(i-69)/12)*(s||440)}var a={parse:n,regex:t,midiToFreq:r},u=["letter","acc","pc","step","alt","chroma","oct","midi","freq"];return u.forEach(function(i){a[i]=function(s){var c=n(s);return c&&typeof c[i]<"u"?c[i]:null}}),St=a,St}var wt,Gn;function pa(){if(Gn)return wt;Gn=1;var e=da(),t=function(r){return r!==null&&r!==[]&&r>=0&&r<129},o=function(r){return t(r)?+r:e.midi(r)};wt=function(r){if(r.buffers){var a=r.opts.map,u=typeof a=="function"?a:o,i=function(c){return c?u(c)||c:null};r.buffers=n(r.buffers,i);var s=r.start;r.start=function(c,h,l){var p=i(c),f=p%1;return f&&(p=Math.floor(p),l=Object.assign(l||{},{cents:Math.floor(f*100)})),s(p,h,l)}}return r};function n(r,a){return Object.keys(r).reduce(function(u,i){return u[a(i)]=r[i],u},{})}return wt}var At,Un;function ha(){if(Un)return At;Un=1;var e=Array.isArray,t=function(n){return n&&typeof n=="object"},o={};return At=function(n){return n.schedule=function(r,a){var u=n.context.currentTime,i=r<u?u:r;n.emit("schedule",i,a);var s,c,h,l;return a.map(function(p){if(p)e(p)?(s=p[0],c=p[1]):(s=p.time,c=p);else return null;return t(c)?(h=c.name||c.key||c.note||c.midi||null,l=c):(h=c,l=o),n.start(h,i+(s||0),l)})},n},At}function De(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xt={exports:{}},Kn;function ma(){return Kn||(Kn=1,function(e,t){(function(o){e.exports=o()})(function(){return function o(n,r,a){function u(c,h){if(!r[c]){if(!n[c]){var l=typeof De=="function"&&De;if(!h&&l)return l(c,!0);if(i)return i(c,!0);var p=new Error("Cannot find module '"+c+"'");throw p.code="MODULE_NOT_FOUND",p}var f=r[c]={exports:{}};n[c][0].call(f.exports,function(d){var v=n[c][1][d];return u(v||d)},f,f.exports,o,n,r,a)}return r[c].exports}for(var i=typeof De=="function"&&De,s=0;s<a.length;s++)u(a[s]);return u}({1:[function(o,n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(a){function u(i){if(this._event=i,this._data=i.data,this.receivedTime=i.receivedTime,this._data&&this._data.length<2){console.warn("Illegal MIDI message of length",this._data.length);return}switch(this._messageCode=i.data[0]&240,this.channel=i.data[0]&15,this._messageCode){case 128:this.messageType="noteoff",this.key=i.data[1]&127,this.velocity=i.data[2]&127;break;case 144:this.messageType="noteon",this.key=i.data[1]&127,this.velocity=i.data[2]&127;break;case 160:this.messageType="keypressure",this.key=i.data[1]&127,this.pressure=i.data[2]&127;break;case 176:this.messageType="controlchange",this.controllerNumber=i.data[1]&127,this.controllerValue=i.data[2]&127,this.controllerNumber===120&&this.controllerValue===0?this.channelModeMessage="allsoundoff":this.controllerNumber===121?this.channelModeMessage="resetallcontrollers":this.controllerNumber===122?this.controllerValue===0?this.channelModeMessage="localcontroloff":this.channelModeMessage="localcontrolon":this.controllerNumber===123&&this.controllerValue===0?this.channelModeMessage="allnotesoff":this.controllerNumber===124&&this.controllerValue===0?this.channelModeMessage="omnimodeoff":this.controllerNumber===125&&this.controllerValue===0?this.channelModeMessage="omnimodeon":this.controllerNumber===126?this.channelModeMessage="monomodeon":this.controllerNumber===127&&(this.channelModeMessage="polymodeon");break;case 192:this.messageType="programchange",this.program=i.data[1];break;case 208:this.messageType="channelpressure",this.pressure=i.data[1]&127;break;case 224:this.messageType="pitchbendchange";var s=i.data[2]&127,c=i.data[1]&127;this.pitchBend=(s<<8)+c;break}}return new u(a)},n.exports=r.default},{}]},{},[1])(1)})}(xt)),xt.exports}var Et,Wn;function va(){if(Wn)return Et;Wn=1;var e=ma();return Et=function(t){return t.listenToMidi=function(o,n){var r={},a=n||{},u=a.gain||function(i){return i/127};return o.onmidimessage=function(i){var s=i.messageType?i:e(i);if(s.messageType==="noteon"&&s.velocity===0&&(s.messageType="noteoff"),!(a.channel&&s.channel!==a.channel))switch(s.messageType){case"noteon":r[s.key]=t.play(s.key,0,{gain:u(s.velocity)});break;case"noteoff":r[s.key]&&(r[s.key].stop(),delete r[s.key]);break}},t},t},Et}var zn;function ya(){return zn||(zn=1,function(e){var t=ca(),o=fa(),n=pa(),r=ha(),a=va();function u(i,s,c){return a(r(n(o(t(i,s,c)))))}e.exports&&(e.exports=u),typeof window<"u"&&(window.SamplePlayer=u)}(gt)),gt.exports}function Hn(e,t){return Array(t+1).join(e)}function rn(e){return typeof e=="number"}function ga(e){return typeof e=="string"}function ba(e){return typeof e<"u"}function Dr(e,t){return Math.pow(2,(e-69)/12)*(t||440)}var Lr=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/;function Pa(){return Lr}var Ma=[0,2,4,5,7,9,11];function de(e,t,o){if(typeof e!="string")return null;var n=Lr.exec(e);if(!n||!t&&n[4])return null;var r={letter:n[1].toUpperCase(),acc:n[2].replace(/x/g,"##")};r.pc=r.letter+r.acc,r.step=(r.letter.charCodeAt(0)+3)%7,r.alt=r.acc[0]==="b"?-r.acc.length:r.acc.length;var a=Ma[r.step]+r.alt;return r.chroma=a<0?12+a:a%12,n[3]&&(r.oct=+n[3],r.midi=a+12*(r.oct+1),r.freq=Dr(r.midi,o)),t&&(r.tonicOf=n[4]),r}var Sa="CDEFGAB";function wa(e){return rn(e)?e<0?Hn("b",-e):Hn("#",e):""}function Aa(e){return rn(e)?""+e:""}function qr(e,t,o){return e===null||typeof e>"u"?null:e.step?qr(e.step,e.alt,e.oct):e<0||e>6?null:Sa.charAt(e)+wa(t)+Aa(o)}function Fr(e){if((rn(e)||ga(e))&&e>=0&&e<128)return+e;var t=de(e);return t&&ba(t.midi)?t.midi:null}function xa(e,t){var o=Fr(e);return o===null?null:Dr(o,t)}function Ea(e){return(de(e)||{}).letter}function Ca(e){return(de(e)||{}).acc}function Na(e){return(de(e)||{}).pc}function Oa(e){return(de(e)||{}).step}function _a(e){return(de(e)||{}).alt}function Ta(e){return(de(e)||{}).chroma}function Ra(e){return(de(e)||{}).oct}const ja=Object.freeze(Object.defineProperty({__proto__:null,acc:Ca,alt:_a,build:qr,chroma:Ta,freq:xa,letter:Ea,midi:Fr,oct:Ra,parse:de,pc:Na,regex:Pa,step:Oa},Symbol.toStringTag,{value:"Module"})),ka=xi(ja);var Ct,Xn;function Ia(){if(Xn)return Ct;Xn=1;var e=ka;function t(r,a){if(console.warn("new Soundfont() is deprected"),console.log("Please use Soundfont.instrument() instead of new Soundfont().instrument()"),!(this instanceof t))return new t(r);this.nameToUrl=a||t.nameToUrl,this.ctx=r,this.instruments={},this.promises=[]}t.prototype.onready=function(r){console.warn("deprecated API"),console.log("Please use Promise.all(Soundfont.instrument(), Soundfont.instrument()).then() instead of new Soundfont().onready()"),Promise.all(this.promises).then(r)},t.prototype.instrument=function(r,a){console.warn("new Soundfont().instrument() is deprecated."),console.log("Please use Soundfont.instrument() instead.");var u=this.ctx;if(r=r||"default",r in this.instruments)return this.instruments[r];var i={name:r,play:n(u,a)};if(this.instruments[r]=i,r!=="default"){var s=t.instrument(u,r,a).then(function(c){return i.play=c.play,i});this.promises.push(s),i.onready=function(c){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),s.then(c)}}else i.onready=function(c){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),c()};return i};function o(r,a,u){return console.warn("Soundfont.loadBuffers is deprecate."),console.log("Use Soundfont.instrument(..) and get buffers properties from the result."),t.instrument(r,a,u).then(function(i){return i.buffers})}t.loadBuffers=o;function n(r,a){return a=a||{},function(u,i,s,c){console.warn("The oscillator player is deprecated."),console.log("Starting with version 0.9.0 you will have to wait until the soundfont is loaded to play sounds.");var h=u>0&&u<129?+u:e.midi(u),l=h?e.midiToFreq(h,440):null;if(l){s=s||.2,c=c||{};var p=c.destination||a.destination||r.destination,f=c.vcoType||a.vcoType||"sine",d=c.gain||a.gain||.4,v=r.createOscillator();v.type=f,v.frequency.value=l;var b=r.createGain();return b.gain.value=d,v.connect(b),b.connect(p),v.start(i),s>0&&v.stop(i+s),v}}}return t.noteToMidi=e.midi,Ct=t,Ct}var Yn;function Da(){return Yn||(Yn=1,function(e){var t=ua(),o=ya();function n(i,s,c){if(arguments.length===1)return function(d,v){return n(i,d,v)};var h=c||{},l=h.isSoundfontURL||r,p=h.nameToUrl||a,f=l(s)?s:p(s,h.soundfont,h.format);return t(i,f,{only:h.only||h.notes}).then(function(d){var v=o(i,d,h).connect(h.destination?h.destination:i.destination);return v.url=f,v.name=s,v})}function r(i){return/\.js(\?.*)?$/i.test(i)}function a(i,s,c){return c=c==="ogg"?c:"mp3",s=s==="FluidR3_GM"?s:"MusyngKite","https://gleitz.github.io/midi-js-soundfonts/"+s+"/"+i+"-"+c+".js"}var u=Ia();u.instrument=n,u.nameToUrl=a,e.exports&&(e.exports=u),typeof window<"u"&&(window.Soundfont=u)}(ht)),ht.exports}var La=Da();const qa=ze(La);typeof window<"u"&&(window.MIDI||(window.MIDI={Soundfont:{}}));typeof globalThis<"u"&&(globalThis.MIDI||(globalThis.MIDI=window.MIDI||{Soundfont:{}}));typeof global<"u"&&(global.MIDI||(global.MIDI=window.MIDI||{Soundfont:{}}));const Jn=e=>e!=null&&!Number.isNaN(e),Br=e=>{const{audioContext:t,format:o,hostname:n,instrumentName:r,onChange:a,render:u,soundfont:i}=e,[s,c]=O.useState(!0),[h,l]=O.useState({}),[p,f]=O.useState(null),d=O.useCallback(L=>{var x,C;if(f(null),Jn(n))qa.instrument(t,L,{format:o,soundfont:i,nameToUrl:(m,P,g)=>`${n}/${P}/${m}-${g}.js`}).then(m=>{f(m)});else if(r){const m=(C=(x=window.MIDI)==null?void 0:x.Soundfont)==null?void 0:C[r];if(m){const P=M=>{const _=typeof M=="string"?Number.parseInt(M,10):M;return Si(_)};f({play:(M,_)=>{const I=P(M),V=m[I];if(V){const U=new Audio(V);return U.volume=(_||127)/127,U.play(),{stop:()=>{U.pause(),U.currentTime=0}}}return null},stop:()=>{}})}else c(!1)}else c(!1)},[t,o,n,r,i]);return O.useEffect(()=>{r&&d(r)},[r,d]),O.useEffect(()=>{Jn(r)&&c(!p)},[p,r]),u({isLoading:s,playNote:L=>{p&&t.resume().then(()=>{const x=p.play(String(L));l(C=>({...C,[L]:x}))})},stopNote:L=>{t.resume().then(()=>{if(!h[L])return;h[L].stop(),l(C=>{const{[L]:m,...P}=C;return P})}),a==null||a(L)},stopAllNotes:()=>{t.resume().then(()=>{const L=Object.values(h);for(const x of L)x&&x.stop();l(L)})}})},Nt=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Fa=12,Ba=Fa*.7,$a=new window.AudioContext,Va=({octave:e,height:t,width:o,...n})=>{const a=(o/Ba+2)/t,u=bn(Nt[0]+String(e))||0,i=bn(Nt[Nt.length-1]+String(e))||0;return A.jsx("div",{children:A.jsx(nn,{keyWidthToHeight:a,noteRange:{first:u,last:i},width:o,...n})})},$r=({format:e,height:t,hostname:o,instrumentName:n,octave:r=4,onChange:a,onClick:u,onDoubleClick:i,onKeyMouseEnter:s,onKeyMouseLeave:c,selectedNotes:h,soundfont:l,Tooltip:p,width:f})=>A.jsx(Br,{audioContext:$a,format:e,hostname:o,instrumentName:n,onChange:a,soundfont:l,render:({isLoading:d,playNote:v,stopNote:b})=>A.jsx(Va,{disabled:d,height:t,octave:r,onClick:u,onDoubleClick:i,onKeyMouseEnter:s,onKeyMouseLeave:c,playNote:v,selectedNotes:h,stopNote:b,Tooltip:p,width:f})}),$t="__react_svg_text_measurement_id",Ga=(e,t,o,n)=>{const{lineHeight:r,spaceWidth:a,wordsWithComputedWidth:u}=t;return e.split(/\s+/).reduce((i,s)=>{const c=u[s],h=i[i.length-1];if(h&&h.width+c+a<o)h.words.push(s),h.width+=c+a;else{const l={words:[s],width:c,showLine:n?r*(i.length+1)<n:!0};i.push(l)}return i},[])},Ua=(e,t,o)=>{var n;if(e&&t){Array.from(e).forEach(s=>t.style.setProperty(s,e.getPropertyValue(s),e.getPropertyPriority(s)));const a=[...new Set(String(o).split(/\s+/))].reduce((s,c)=>(t.textContent=c,{...s,[c]:t.getBBox().width}),{});t.textContent=" ";const u=((n=t==null?void 0:t.getComputedTextLength)==null?void 0:n.call(t))||8,i=t.getBBox().height;return t.setAttribute("style",""),{wordsWithComputedWidth:a,spaceWidth:u,lineHeight:i}}},Vt=e=>{const{className:t="",dx:o=0,dy:n=0,maxHeight:r=1e3,maxWidth:a=1e3,text:u="",verticalAnchor:i="start",x:s=0,y:c=0,transform:h="",...l}=e,[p,f]=O.useState(),[d,v]=O.useState([]),[b,D]=O.useState(),L=O.useRef({}),x=O.useMemo(()=>{const P=d.filter(({showLine:g})=>g);return P.length?P:u.split(/\n/).map(g=>({words:[g],width:0,showLine:!0}))},[d,u]),C=O.useCallback(P=>{D(P!==null?window.getComputedStyle(P):void 0)},[]);O.useEffect(()=>{const P=document.getElementById($t);if(P===null){const g=document.createElementNS("http://www.w3.org/2000/svg","svg");return g.setAttribute("id",$t),document.body.appendChild(g),g.appendChild(document.createElementNS("http://www.w3.org/2000/svg","text")),L.current=g,()=>{document.body.removeChild(g)}}L.current=P},[]),O.useEffect(()=>{const P=Ua(b,L.current,u);f(P)},[u,b]),O.useEffect(()=>{if(a&&p){const P=u.split(/\n/).flatMap(g=>Ga(g,p,a,r));v(P)}},[r,a,p,u]);const m=O.useMemo(()=>{if(p!=null&&p.lineHeight)switch(i){case"start":return p.lineHeight;case"middle":return-((x.length-1)*p.lineHeight/2);default:return-(x.length-1)*p.lineHeight}return 0},[x.length,i,p==null?void 0:p.lineHeight]);return A.jsx("text",{className:t,ref:C,dx:o,dy:n,x:s,y:c,transform:h,...l,children:A.jsxs(A.Fragment,{children:[x.map((P,g)=>A.jsx("tspan",{dx:s+o,dy:g===0?m+n:(p==null?void 0:p.lineHeight)||0,x:0,children:P.words.join(" ")},g)),d.length&&x.length!==d.length&&A.jsxs(A.Fragment,{children:[A.jsx("tspan",{children:"..."}),A.jsx("title",{children:u})]})]})})},ve=255,{IndicatorsContainer:Ka,Placeholder:Qn,ValueContainer:Wa}=kt.components,za={label:"--",value:ve},Zn=e=>{var r;const{children:t,...o}=e,n=(r=o.selectProps)==null?void 0:r.actionButton;return A.jsx(Ka,{...o,children:A.jsxs("div",{onMouseDown:a=>{a.stopPropagation(),a.preventDefault()},style:{display:"flex"},children:[n,t]})})},Ha=({children:e,...t})=>A.jsxs(Wa,{...t,children:[A.jsx(Qn,{...t,innerProps:t.innerProps||{},className:t.hasValue||t.selectProps.inputValue?"shrunk":"",isFocused:t.isFocused??!1,children:t.selectProps.placeholder}),O.Children.map(e,o=>O.isValidElement(o)&&o.type!==Qn?o:null)]}),le=O.forwardRef((e,t)=>{const{components:o,disabled:n,label:r,onChange:a,options:u=[],preserveMenuWidth:i,shrinkLabel:s,value:c,...h}=e,l=O.useCallback(v=>{v&&a(v.value)},[a]),p=u.reduce((v,b)=>"options"in b?v.concat(b.options):v.concat(b),[]),f=p.find(v=>c===v.value)||void 0,d=O.useMemo(()=>{const v=i?{menu:b=>sr("width")(b),menuList:b=>({...b,overflowX:"hidden"}),option:b=>({...b,whiteSpace:"nowrap",paddingRight:10})}:{};return s?{...v,container:b=>({...b,marginTop:10}),placeholder:(b,D)=>({position:"absolute",left:D.hasValue||D.selectProps.inputValue?-2:"4%",top:D.hasValue||D.selectProps.inputValue?-12:"50%",transition:"top 0.1s, font-size 0.1s, color 0.1s",fontSize:(D.hasValue||D.selectProps.inputValue)&&13}),valueContainer:b=>({...b,overflow:"visible"})}:{...v}},[i,s]);return s?A.jsx("div",{className:"zds-pickers__container",children:A.jsx(kt,{...h,classNamePrefix:"zds-pickers",components:{IndicatorsContainer:Zn,ValueContainer:Ha,...o},isDisabled:n,onChange:l,options:p,placeholder:r,ref:t,styles:d,value:f})}):A.jsxs("div",{className:"zds-pickers__container",children:[!!r&&A.jsx("span",{className:"zds-pickers__label",children:r}),A.jsx(kt,{...h,classNamePrefix:"zds-pickers",components:{IndicatorsContainer:Zn,...o},isDisabled:n,onChange:l,options:p,ref:t,styles:d,value:f})]})}),Xa=O.forwardRef((e,t)=>A.jsx(le,{...e,options:ur,ref:t})),Ya=Ne(16).map(e=>({value:e,label:e})),Ja=O.forwardRef(({channels:e,className:t,...o},n)=>{const[r,a]=O.useState([]),u=O.useCallback(({value:i,label:s},{context:c})=>{if(i==="separator")return A.jsx("span",{className:"zds-mappings-user-mapping",children:s});if(typeof i!="number")return null;const h=e[i];return h?A.jsxs("span",{className:"mapping-entry",children:[A.jsx("b",{children:i!==ve&&A.jsxs(A.Fragment,{children:[i+1,c==="value"&&" -"]})}),A.jsx("span",{className:"mapping-entry-label",children:h.label})]}):A.jsxs("span",{className:"mapping-entry empty-mapping-entry",children:[A.jsx("b",{children:i!==ve&&A.jsxs(A.Fragment,{children:[i+1,c==="value"&&" -"]})}),A.jsx("span",{className:"mapping-entry-label",children:"no mapping"})]})},[e]);return O.useEffect(()=>{const i=Ya.sort((h,l)=>typeof h.value=="number"&&typeof l.value=="number"&&e[h.value]&&!e[l.value]?-1:typeof h.value=="number"&&typeof l.value=="number"&&!e[h.value]&&e[l.value]?1:typeof h.value=="number"&&typeof l.value=="number"?h.value-l.value:0),s=i.filter(({value:h})=>typeof h=="number"&&!!e[h]||h===ve).length,c=i.some(({value:h})=>h==="separator");s&&s<16&&!c&&i.splice(s,0,{label:A.jsx("hr",{}),value:"separator"}),a(i)},[e]),A.jsx(le,{...o,className:Ce(t,"channel-mapping-picker"),formatOptionLabel:u,options:r,ref:n})}),Qa=Ne(16).map(e=>({value:e,label:`Channel ${e+1}`})),Za=(e,t)=>t?String(e.label).toLowerCase().includes(t.toLowerCase()):!0,es=O.forwardRef(({className:e,value:t=ve,...o},n)=>{const r=O.useCallback((a,{context:u})=>t===void 0?"--":u==="value"?a.label:Number.parseInt(String(a.value))+1,[t]);return A.jsx(le,{...o,className:Ce(e,"channel-picker"),filterOptions:Za,formatOptionLabel:r,options:Qa,value:t,ref:n})}),Vr=e=>{const{value:t,onChange:o,disabled:n=!1,height:r=100,width:a=300,octave:u=4,...i}=e,s=O.useCallback(p=>{n||o(p)},[n,o]),c=60+(u-4)*12,h=c+11,l=t!==ve&&t>=c&&t<=h;return A.jsx($r,{...i,selectedNotes:l?[t]:[],disabled:n,height:r,width:a,octave:u,onClick:s})};Vr.propTypes={};const on=e=>{const[t,o]=O.useState(e);return O.useEffect(()=>{o(e)},[e]),[t,o]};var Ot,er;function ts(){return er||(er=1,Ot=function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(n,r,a){o.o(n,r)||Object.defineProperty(n,r,{enumerable:!0,get:a})},o.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.t=function(n,r){if(1&r&&(n=o(n)),8&r||4&r&&typeof n=="object"&&n&&n.__esModule)return n;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:n}),2&r&&typeof n!="string")for(var u in n)o.d(a,u,(function(i){return n[i]}).bind(null,u));return a},o.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(r,"a",r),r},o.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},o.p="",o(o.s=3)}([function(e,t){e.exports=O},function(e,t){e.exports=jr()},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n,r=o(0),a=((n=r)&&n.__esModule?n:{default:n}).default.createContext(null);t.default=a},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.SvgLoader=t.SvgProxy=void 0;var n=a(o(4)),r=a(o(8));function a(u){return u&&u.__esModule?u:{default:u}}t.SvgProxy=r.default,t.SvgLoader=n.default},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(l){for(var p=1;p<arguments.length;p++){var f=arguments[p];for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d])}return l},r=function(){function l(p,f){for(var d=0;d<f.length;d++){var v=f[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}return function(p,f,d){return f&&l(p.prototype,f),d&&l(p,d),p}}(),a=c(o(0)),u=c(o(1)),i=c(o(5)),s=c(o(2));function c(l){return l&&l.__esModule?l:{default:l}}var h=function(l){function p(f){(function(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")})(this,p);var d=function(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||typeof b!="object"&&typeof b!="function"?v:b}(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,f));if(d.mounted=!1,d.state={svg:null,svgCount:0},a.default.Fragment==null)throw new Error("This version of React doesn't support Fragments, please update it");return d.onSVGReady=d.onSVGReady.bind(d),d}return function(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}(p,l),r(p,[{key:"componentDidMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"onSVGReady",value:function(f){var d=this;setTimeout(function(){d.mounted&&(d.setState(n({},d.state,{svg:f,svgCount:d.state.svgCount+1})),d.props.onSVGReady(f))},0)}},{key:"render",value:function(){var f=this.props,d=f.path,v=(f.onSVGReady,f.children,f.svgXML),b=function(L,x){var C={};for(var m in L)x.indexOf(m)>=0||Object.prototype.hasOwnProperty.call(L,m)&&(C[m]=L[m]);return C}(f,["path","onSVGReady","children","svgXML"]),D=this.state.svg!=null?this.props.children:null;return a.default.createElement(a.default.Fragment,null,a.default.createElement(i.default,n({path:d,callback:this.onSVGReady,svgXML:v},b)),a.default.createElement(s.default.Provider,{value:{path:d,svgCount:this.state.svgCount,svg:this.state.svg}},D))}}]),p}(a.default.Component);t.default=h,h.propTypes={path:u.default.string,svgXML:u.default.string,onSVGReady:u.default.func,style:u.default.object,children:u.default.any},h.defaultProps={path:null,svgXML:null,onSVGReady:function(){},style:null}},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(l){for(var p=1;p<arguments.length;p++){var f=arguments[p];for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d])}return l},r=function(){function l(p,f){for(var d=0;d<f.length;d++){var v=f[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}return function(p,f,d){return f&&l(p.prototype,f),d&&l(p,d),p}}(),a=i(o(1)),u=i(o(0));function i(l){return l&&l.__esModule?l:{default:l}}function s(l,p){var f={};for(var d in l)p.indexOf(d)>=0||Object.prototype.hasOwnProperty.call(l,d)&&(f[d]=l[d]);return f}var c=typeof window<"u"?o(6):void 0,h=function(l){function p(){(function(d,v){if(!(d instanceof v))throw new TypeError("Cannot call a class as a function")})(this,p);var f=function(d,v){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!v||typeof v!="object"&&typeof v!="function"?d:v}(this,(p.__proto__||Object.getPrototypeOf(p)).call(this));return f.refCallback=f.refCallback.bind(f),f}return function(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}(p,l),r(p,[{key:"componentDidUpdate",value:function(f){this.props.path===f.path&&this.props.svgXML===f.svgXML||(this.container&&(this.container.innerHTML=""),this.renderSVG(this.props))}},{key:"refCallback",value:function(f){f&&(this.container=f,this.renderSVG())}},{key:"renderSVG",value:function(){var f=this,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,v=this.container,b=d.callback,D=(d.path,d.svgXML),L=(d.className,s(d,["callback","path","svgXML","className"]));c(v,{each:function(x){if(x)throw new Error(x);b(f.container)},svgXML:D},function(){v&&L&&Object.keys(L).reduce(function(x,C){return C!=="style"&&x.setAttribute(C,L[C]),v},v)})}},{key:"render",value:function(){var f=this.props,d=(f.callback,f.path,f.svgXML,s(f,["callback","path","svgXML"]));return u.default.createElement("svg",n({ref:this.refCallback,"data-src":this.props.path},d))}}]),p}(u.default.Component);t.default=h,h.defaultProps={callback:function(){},path:null,svgXML:null},h.propTypes={callback:a.default.func,path:a.default.string,svgXML:a.default.string}},function(e,t,o){(function(n){var r,a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u};/**
|
|
19
|
+
*/var at,xn;function _i(){if(xn)return at;xn=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function r(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var u={},i=0;i<10;i++)u["_"+String.fromCharCode(i)]=i;var s=Object.getOwnPropertyNames(u).map(function(h){return u[h]});if(s.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return at=r()?Object.assign:function(a,u){for(var i,s=n(a),c,h=1;h<arguments.length;h++){i=Object(arguments[h]);for(var l in i)t.call(i,l)&&(s[l]=i[l]);if(e){c=e(i);for(var p=0;p<c.length;p++)o.call(i,c[p])&&(s[c[p]]=i[c[p]])}}return s},at}var st,En;function Yt(){if(En)return st;En=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return st=e,st}var ut,Cn;function Rr(){return Cn||(Cn=1,ut=Function.call.bind(Object.prototype.hasOwnProperty)),ut}var lt,Nn;function Oi(){if(Nn)return lt;Nn=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yt(),o={},n=Rr();e=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function r(a,u,i,s,c){if(process.env.NODE_ENV!=="production"){for(var h in a)if(n(a,h)){var l;try{if(typeof a[h]!="function"){var p=Error((s||"React class")+": "+i+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}l=a[h](u,h,s,i,null,t)}catch(d){l=d}if(l&&!(l instanceof Error)&&e((s||"React class")+": type specification of "+i+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in o)){o[l.message]=!0;var f=c?c():"";e("Failed "+i+" type: "+l.message+(f??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(o={})},lt=r,lt}var ct,_n;function Ti(){if(_n)return ct;_n=1;var e=Tr(),t=_i(),o=Yt(),n=Rr(),r=Oi(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}});function u(){return null}return ct=function(i,s){var c=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function l(S){var E=S&&(c&&S[c]||S[h]);if(typeof E=="function")return E}var p="<<anonymous>>",f={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:L(),arrayOf:x,element:C(),elementType:m(),instanceOf:P,node:I(),objectOf:M,oneOf:g,oneOfType:O,shape:U,exact:ne};function d(S,E){return S===E?S!==0||1/S===1/E:S!==S&&E!==E}function v(S,E){this.message=S,this.data=E&&typeof E=="object"?E:{},this.stack=""}v.prototype=Error.prototype;function b(S){if(process.env.NODE_ENV!=="production")var E={},B=0;function $(T,j,F,G,W,K,J){if(G=G||p,K=K||F,J!==o){if(s){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Z=G+":"+F;!E[Z]&&B<3&&(a("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),E[Z]=!0,B++)}}return j[F]==null?T?j[F]===null?new v("The "+W+" `"+K+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new v("The "+W+" `"+K+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:S(j,F,G,W,K)}var q=$.bind(null,!1);return q.isRequired=$.bind(null,!0),q}function D(S){function E(B,$,q,T,j,F){var G=B[$],W=Q(G);if(W!==S){var K=ie(G);return new v("Invalid "+T+" `"+j+"` of type "+("`"+K+"` supplied to `"+q+"`, expected ")+("`"+S+"`."),{expectedType:S})}return null}return b(E)}function L(){return b(u)}function x(S){function E(B,$,q,T,j){if(typeof S!="function")return new v("Property `"+j+"` of component `"+q+"` has invalid PropType notation inside arrayOf.");var F=B[$];if(!Array.isArray(F)){var G=Q(F);return new v("Invalid "+T+" `"+j+"` of type "+("`"+G+"` supplied to `"+q+"`, expected an array."))}for(var W=0;W<F.length;W++){var K=S(F,W,q,T,j+"["+W+"]",o);if(K instanceof Error)return K}return null}return b(E)}function C(){function S(E,B,$,q,T){var j=E[B];if(!i(j)){var F=Q(j);return new v("Invalid "+q+" `"+T+"` of type "+("`"+F+"` supplied to `"+$+"`, expected a single ReactElement."))}return null}return b(S)}function m(){function S(E,B,$,q,T){var j=E[B];if(!e.isValidElementType(j)){var F=Q(j);return new v("Invalid "+q+" `"+T+"` of type "+("`"+F+"` supplied to `"+$+"`, expected a single ReactElement type."))}return null}return b(S)}function P(S){function E(B,$,q,T,j){if(!(B[$]instanceof S)){var F=S.name||p,G=re(B[$]);return new v("Invalid "+T+" `"+j+"` of type "+("`"+G+"` supplied to `"+q+"`, expected ")+("instance of `"+F+"`."))}return null}return b(E)}function g(S){if(!Array.isArray(S))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),u;function E(B,$,q,T,j){for(var F=B[$],G=0;G<S.length;G++)if(d(F,S[G]))return null;var W=JSON.stringify(S,function(J,N){var Z=ie(N);return Z==="symbol"?String(N):N});return new v("Invalid "+T+" `"+j+"` of value `"+String(F)+"` "+("supplied to `"+q+"`, expected one of "+W+"."))}return b(E)}function M(S){function E(B,$,q,T,j){if(typeof S!="function")return new v("Property `"+j+"` of component `"+q+"` has invalid PropType notation inside objectOf.");var F=B[$],G=Q(F);if(G!=="object")return new v("Invalid "+T+" `"+j+"` of type "+("`"+G+"` supplied to `"+q+"`, expected an object."));for(var W in F)if(n(F,W)){var K=S(F,W,q,T,j+"."+W,o);if(K instanceof Error)return K}return null}return b(E)}function O(S){if(!Array.isArray(S))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var E=0;E<S.length;E++){var B=S[E];if(typeof B!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+fe(B)+" at index "+E+"."),u}function $(q,T,j,F,G){for(var W=[],K=0;K<S.length;K++){var J=S[K],N=J(q,T,j,F,G,o);if(N==null)return null;N.data&&n(N.data,"expectedType")&&W.push(N.data.expectedType)}var Z=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new v("Invalid "+F+" `"+G+"` supplied to "+("`"+j+"`"+Z+"."))}return b($)}function I(){function S(E,B,$,q,T){return oe(E[B])?null:new v("Invalid "+q+" `"+T+"` supplied to "+("`"+$+"`, expected a ReactNode."))}return b(S)}function V(S,E,B,$,q){return new v((S||"React class")+": "+E+" type `"+B+"."+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+q+"`.")}function U(S){function E(B,$,q,T,j){var F=B[$],G=Q(F);if(G!=="object")return new v("Invalid "+T+" `"+j+"` of type `"+G+"` "+("supplied to `"+q+"`, expected `object`."));for(var W in S){var K=S[W];if(typeof K!="function")return V(q,T,j,W,ie(K));var J=K(F,W,q,T,j+"."+W,o);if(J)return J}return null}return b(E)}function ne(S){function E(B,$,q,T,j){var F=B[$],G=Q(F);if(G!=="object")return new v("Invalid "+T+" `"+j+"` of type `"+G+"` "+("supplied to `"+q+"`, expected `object`."));var W=t({},B[$],S);for(var K in W){var J=S[K];if(n(S,K)&&typeof J!="function")return V(q,T,j,K,ie(J));if(!J)return new v("Invalid "+T+" `"+j+"` key `"+K+"` supplied to `"+q+"`.\nBad object: "+JSON.stringify(B[$],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(S),null," "));var N=J(F,K,q,T,j+"."+K,o);if(N)return N}return null}return b(E)}function oe(S){switch(typeof S){case"number":case"string":case"undefined":return!0;case"boolean":return!S;case"object":if(Array.isArray(S))return S.every(oe);if(S===null||i(S))return!0;var E=l(S);if(E){var B=E.call(S),$;if(E!==S.entries){for(;!($=B.next()).done;)if(!oe($.value))return!1}else for(;!($=B.next()).done;){var q=$.value;if(q&&!oe(q[1]))return!1}}else return!1;return!0;default:return!1}}function ce(S,E){return S==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function Q(S){var E=typeof S;return Array.isArray(S)?"array":S instanceof RegExp?"object":ce(E,S)?"symbol":E}function ie(S){if(typeof S>"u"||S===null)return""+S;var E=Q(S);if(E==="object"){if(S instanceof Date)return"date";if(S instanceof RegExp)return"regexp"}return E}function fe(S){var E=ie(S);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function re(S){return!S.constructor||!S.constructor.name?p:S.constructor.name}return f.checkPropTypes=r,f.resetWarningCache=r.resetWarningCache,f.PropTypes=f,f},ct}var ft,On;function Ri(){if(On)return ft;On=1;var e=Yt();function t(){}function o(){}return o.resetWarningCache=t,ft=function(){function n(u,i,s,c,h,l){if(l!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function r(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:r,element:n,elementType:n,instanceOf:r,node:n,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:o,resetWarningCache:t};return a.PropTypes=a,a},ft}var Tn;function jr(){if(Tn)return ke.exports;if(Tn=1,process.env.NODE_ENV!=="production"){var e=Tr(),t=!0;ke.exports=Ti()(e.isElement,t)}else ke.exports=Ri()();return ke.exports}var ji=jr();const R=ze(ji);var dt,Rn;function ki(){if(Rn)return dt;Rn=1;var e=200,t="__lodash_hash_undefined__",o=9007199254740991,n="[object Arguments]",r="[object Function]",a="[object GeneratorFunction]",u=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=typeof je=="object"&&je&&je.Object===Object&&je,c=typeof self=="object"&&self&&self.Object===Object&&self,h=s||c||Function("return this")();function l(y,w,k){switch(k.length){case 0:return y.call(w);case 1:return y.call(w,k[0]);case 2:return y.call(w,k[0],k[1]);case 3:return y.call(w,k[0],k[1],k[2])}return y.apply(w,k)}function p(y,w){var k=y?y.length:0;return!!k&&v(y,w,0)>-1}function f(y,w){for(var k=-1,z=w.length,ae=y.length;++k<z;)y[ae+k]=w[k];return y}function d(y,w,k,z){for(var ae=y.length,ue=k+-1;++ue<ae;)if(w(y[ue],ue,y))return ue;return-1}function v(y,w,k){if(w!==w)return d(y,b,k);for(var z=k-1,ae=y.length;++z<ae;)if(y[z]===w)return z;return-1}function b(y){return y!==y}function D(y,w){return y.has(w)}function L(y,w){return y==null?void 0:y[w]}function x(y){var w=!1;if(y!=null&&typeof y.toString!="function")try{w=!!(y+"")}catch{}return w}var C=Array.prototype,m=Function.prototype,P=Object.prototype,g=h["__core-js_shared__"],M=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),O=m.toString,I=P.hasOwnProperty,V=P.toString,U=RegExp("^"+O.call(I).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=h.Symbol,oe=P.propertyIsEnumerable,ce=C.splice,Q=ne?ne.isConcatSpreadable:void 0,ie=Math.max,fe=an(h,"Map"),re=an(Object,"create");function S(y){var w=-1,k=y?y.length:0;for(this.clear();++w<k;){var z=y[w];this.set(z[0],z[1])}}function E(){this.__data__=re?re(null):{}}function B(y){return this.has(y)&&delete this.__data__[y]}function $(y){var w=this.__data__;if(re){var k=w[y];return k===t?void 0:k}return I.call(w,y)?w[y]:void 0}function q(y){var w=this.__data__;return re?w[y]!==void 0:I.call(w,y)}function T(y,w){var k=this.__data__;return k[y]=re&&w===void 0?t:w,this}S.prototype.clear=E,S.prototype.delete=B,S.prototype.get=$,S.prototype.has=q,S.prototype.set=T;function j(y){var w=-1,k=y?y.length:0;for(this.clear();++w<k;){var z=y[w];this.set(z[0],z[1])}}function F(){this.__data__=[]}function G(y){var w=this.__data__,k=we(w,y);if(k<0)return!1;var z=w.length-1;return k==z?w.pop():ce.call(w,k,1),!0}function W(y){var w=this.__data__,k=we(w,y);return k<0?void 0:w[k][1]}function K(y){return we(this.__data__,y)>-1}function J(y,w){var k=this.__data__,z=we(k,y);return z<0?k.push([y,w]):k[z][1]=w,this}j.prototype.clear=F,j.prototype.delete=G,j.prototype.get=W,j.prototype.has=K,j.prototype.set=J;function N(y){var w=-1,k=y?y.length:0;for(this.clear();++w<k;){var z=y[w];this.set(z[0],z[1])}}function Z(){this.__data__={hash:new S,map:new(fe||j),string:new S}}function pe(y){return Oe(this,y).delete(y)}function be(y){return Oe(this,y).get(y)}function Qe(y){return Oe(this,y).has(y)}function Ze(y,w){return Oe(this,y).set(y,w),this}N.prototype.clear=Z,N.prototype.delete=pe,N.prototype.get=be,N.prototype.has=Qe,N.prototype.set=Ze;function ee(y){var w=-1,k=y?y.length:0;for(this.__data__=new N;++w<k;)this.add(y[w])}function se(y){return this.__data__.set(y,t),this}function _e(y){return this.__data__.has(y)}ee.prototype.add=ee.prototype.push=se,ee.prototype.has=_e;function we(y,w){for(var k=y.length;k--;)if(Zr(y[k][0],w))return k;return-1}function et(y,w,k,z){var ae=-1,ue=p,he=!0,Ae=y.length,Te=[],io=w.length;if(!Ae)return Te;w.length>=e&&(ue=D,he=!1,w=new ee(w));e:for(;++ae<Ae;){var Me=y[ae],Re=Me;if(Me=Me!==0?Me:0,he&&Re===Re){for(var ln=io;ln--;)if(w[ln]===Re)continue e;Te.push(Me)}else ue(w,Re,z)||Te.push(Me)}return Te}function Pe(y,w,k,z,ae){var ue=-1,he=y.length;for(k||(k=Hr),ae||(ae=[]);++ue<he;){var Ae=y[ue];k(Ae)&&f(ae,Ae)}return ae}function tt(y){if(!un(y)||Yr(y))return!1;var w=sn(y)||x(y)?U:i;return w.test(Jr(y))}function zr(y,w){return w=ie(w===void 0?y.length-1:w,0),function(){for(var k=arguments,z=-1,ae=ie(k.length-w,0),ue=Array(ae);++z<ae;)ue[z]=k[w+z];z=-1;for(var he=Array(w+1);++z<w;)he[z]=k[z];return he[w]=ue,l(y,this,he)}}function Oe(y,w){var k=y.__data__;return Xr(w)?k[typeof w=="string"?"string":"hash"]:k.map}function an(y,w){var k=L(y,w);return tt(k)?k:void 0}function Hr(y){return to(y)||eo(y)||!!(Q&&y&&y[Q])}function Xr(y){var w=typeof y;return w=="string"||w=="number"||w=="symbol"||w=="boolean"?y!=="__proto__":y===null}function Yr(y){return!!M&&M in y}function Jr(y){if(y!=null){try{return O.call(y)}catch{}try{return y+""}catch{}}return""}var Qr=zr(function(y,w){return nt(y)?et(y,Pe(w,1,nt)):[]});function Zr(y,w){return y===w||y!==y&&w!==w}function eo(y){return nt(y)&&I.call(y,"callee")&&(!oe.call(y,"callee")||V.call(y)==n)}var to=Array.isArray;function no(y){return y!=null&&ro(y.length)&&!sn(y)}function nt(y){return oo(y)&&no(y)}function sn(y){var w=un(y)?V.call(y):"";return w==r||w==a}function ro(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=o}function un(y){var w=typeof y;return!!y&&(w=="object"||w=="function")}function oo(y){return!!y&&typeof y=="object"}return dt=Qr,dt}var Ii=ki();const jn=ze(Ii);function Di(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var n,r,a,u,i=[],s=!0,c=!1;try{if(a=(o=o.call(e)).next,t!==0)for(;!(s=(n=a.call(o)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(h){c=!0,r=h}finally{try{if(!s&&o.return!=null&&(u=o.return(),Object(u)!==u))return}finally{if(c)throw r}}return i}}function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Li(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kr(n.key),n)}}function Xe(e,t,o){return t&&Li(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y(e,t,o){return t=kr(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},qt.apply(this,arguments)}function Ye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ft(e,t)}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},$e(e)}function Ft(e,t){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ft(e,t)}function qi(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fi(e,t){if(e==null)return{};var o={},n=Object.keys(e),r,a;for(a=0;a<n.length;a++)r=n[a],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function Bi(e,t){if(e==null)return{};var o=Fi(e,t),n,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function te(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $i(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return te(e)}function Je(e){var t=qi();return function(){var n=$e(e),r;if(t){var a=$e(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return $i(this,r)}}function Vi(e,t){return Gi(e)||Di(e,t)||Ui(e,t)||Ki()}function Gi(e){if(Array.isArray(e))return e}function Ui(e,t){if(e){if(typeof e=="string")return kn(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return kn(e,t)}}function kn(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function Ki(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wi(e,t){if(typeof e!="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kr(e){var t=Wi(e,"string");return typeof t=="symbol"?t:String(t)}var zi=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],Hi=["Db","Eb","Gb","Ab","Bb"],Xi={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},Ve=12,Jt=Ve,Qt=127,Yi=/([a-g])([#b]?)(\d+)/,Bt=12;function Ji(e){if(!e)throw Error("Invalid note argument");var t=Yi.exec(e.toLowerCase());if(!t)throw Error("Invalid note argument");var o=Vi(t,4),n=o[1],r=o[2],a=o[3],u="".concat(n.toUpperCase()).concat(r),i=Xi[u];if(i==null)throw Error("Invalid note argument");return Ve+i+Bt*parseInt(a,10)}function Qi(e){var t=(e-Ve)%Bt,o=Math.floor((e-Ve)/Bt),n=zi[t];return{note:"".concat(n).concat(o),pitchName:n,octave:o,midiNumber:e,isAccidental:Hi.includes(n)}}function Zi(){return Xt(Jt,Qt+1).reduce(function(e,t){return e[t]=Qi(t),e},{})}var ea=Zi();function Ir(e){var t=ea[e];if(!t)throw Error("Invalid MIDI number");return t}var ta=Xt(Jt,Qt+1).filter(function(e){return!Ir(e).isAccidental}),Ge={fromNote:Ji,getAttributes:Ir,MIN_MIDI_NUMBER:Jt,MAX_MIDI_NUMBER:Qt,NATURAL_MIDI_NUMBERS:ta},na=60,Zt=function(e){Ye(o,e);var t=Je(o);function o(){var n;He(this,o);for(var r=arguments.length,a=new Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),Y(te(n),"onPlayNoteInput",function(){n.props.onPlayNoteInput(n.props.midiNumber)}),Y(te(n),"onStopNoteInput",function(){n.props.onStopNoteInput(n.props.midiNumber),n.props.onKeyMouseLeave&&n.props.onKeyMouseLeave(n.props.midiNumber)}),n}return Xe(o,[{key:"getAbsoluteKeyPosition",value:function(r){var a=7,u=Ge.getAttributes(r),i=u.octave,s=u.pitchName,c=this.props.pitchPositions[s],h=a*i;return c+h}},{key:"getRelativeKeyPosition",value:function(r){return this.getAbsoluteKeyPosition(r)-this.getAbsoluteKeyPosition(this.props.noteRange.first)}},{key:"render",value:function(){var r=this,a=this.props,u=a.naturalKeyWidth,i=a.accidentalWidthRatio,s=a.midiNumber,c=a.gliss,h=a.useTouchEvents,l=a.accidental,p=a.active,f=a.selected,d=a.disabled,v=a.children,b=pt(l?this.getRelativeKeyPosition(s)*u:this.getRelativeKeyPosition(s)*u),D=pt(l?i*u:u);return _.createElement("div",{"data-midinumber":s,className:Ce("ReactPiano__Key",{"ReactPiano__Key--accidental":l,"ReactPiano__Key--natural":!l,"ReactPiano__Key--disabled":d,"ReactPiano__Key--active":p,"ReactPiano__Key--selected":f,"ReactPiano__Key--middleC":s===na}),style:{left:b,width:D},onDoubleClick:function(){r.props.onDoubleClick&&r.props.onDoubleClick(s)},onMouseDown:h?null:this.onPlayNoteInput,onMouseUp:function(){r.props.onClick&&r.props.onClick(s),h||r.onStopNoteInput()},onMouseEnter:function(){r.props.onKeyMouseEnter&&r.props.onKeyMouseEnter({accidental:l,left:b,midiNumber:s,width:D}),c&&r.onPlayNoteInput()},onMouseLeave:this.onStopNoteInput,onTouchStart:h?this.onPlayNoteInput:null,onTouchCancel:h?this.onStopNoteInput:null,onTouchEnd:h?this.onStopNoteInput:null},_.createElement("div",{className:"ReactPiano__NoteLabelContainer"},v))}}]),o}(_.Component);Y(Zt,"propTypes",{midiNumber:R.number.isRequired,naturalKeyWidth:R.number.isRequired,gliss:R.bool.isRequired,useTouchEvents:R.bool.isRequired,accidental:R.bool.isRequired,active:R.bool.isRequired,selected:R.bool,disabled:R.bool.isRequired,onKeyMouseEnter:R.func,onKeyMouseLeave:R.func,onPlayNoteInput:R.func.isRequired,onStopNoteInput:R.func.isRequired,accidentalWidthRatio:R.number.isRequired,pitchPositions:R.object.isRequired,children:R.node});Y(Zt,"defaultProps",{accidentalWidthRatio:.65,selected:!1,onKeyMouseEnter:void 0,onKeyMouseLeave:void 0,pitchPositions:{C:0,Db:.672,D:1,Eb:1.672,E:2,F:3,Gb:3.672,G:4,Ab:4.672,A:5,Bb:5.672,B:6}});function pt(e){return"".concat(e*100,"%")}var en=function(e){Ye(o,e);var t=Je(o);function o(){return He(this,o),t.apply(this,arguments)}return Xe(o,[{key:"getMidiNumbers",value:function(){return Xt(this.props.noteRange.first,this.props.noteRange.last+1)}},{key:"getNaturalKeyCount",value:function(){return this.getMidiNumbers().filter(function(r){var a=Ge.getAttributes(r),u=a.isAccidental;return!u}).length}},{key:"getNaturalKeyWidth",value:function(){return 1/this.getNaturalKeyCount()}},{key:"getWidth",value:function(){return this.props.width?this.props.width:"100%"}},{key:"getHeight",value:function(){if(!this.props.width)return"100%";var r=this.props.width*this.getNaturalKeyWidth();return"".concat(r/this.props.keyWidthToHeight,"px")}},{key:"render",value:function(){var r=this,a=this.getNaturalKeyWidth();return _.createElement("div",{className:Ce("ReactPiano__Keyboard",this.props.className),style:{width:this.getWidth(),height:this.getHeight()}},this.getMidiNumbers().map(function(u){var i=Ge.getAttributes(u);i.note;var s=i.isAccidental,c=!r.props.disabled&&r.props.activeNotes.includes(u),h=r.props.selectedNotes&&r.props.selectedNotes.includes(u);return _.createElement(Zt,{accidental:s,active:c,selected:h,disabled:r.props.disabled,gliss:r.props.gliss,key:u,midiNumber:u,naturalKeyWidth:a,noteRange:r.props.noteRange,onClick:r.props.onClick,onDoubleClick:r.props.onDoubleClick,onKeyMouseEnter:r.props.onKeyMouseEnter,onKeyMouseLeave:r.props.onKeyMouseLeave,onPlayNoteInput:r.props.onPlayNoteInput,onStopNoteInput:r.props.onStopNoteInput,useTouchEvents:r.props.useTouchEvents},r.props.disabled?null:r.props.renderNoteLabel({isActive:c,isAccidental:s,midiNumber:u}))}))}}]),o}(_.Component);Y(en,"propTypes",{noteRange:ra,activeNotes:R.arrayOf(R.number),selectedNotes:R.arrayOf(R.number),onKeyMouseEnter:R.func,onKeyMouseLeave:R.func,onPlayNoteInput:R.func.isRequired,onStopNoteInput:R.func.isRequired,renderNoteLabel:R.func.isRequired,keyWidthToHeight:R.number.isRequired,className:R.string,disabled:R.bool,gliss:R.bool,useTouchEvents:R.bool,width:R.number});Y(en,"defaultProps",{disabled:!1,gliss:!1,keyWidthToHeight:.33,onKeyMouseEnter:void 0,onKeyMouseLeave:void 0,renderNoteLabel:function(){},useTouchEvents:!1});function In(e){return typeof e!="number"?!1:Ge.NATURAL_MIDI_NUMBERS.includes(e)}function ra(e,t,o){var n=e[t],r=n.first,a=n.last;if(!r||!a)return new Error("Invalid prop ".concat(t," supplied to ").concat(o,". ").concat(t," must be an object with .first and .last values."));if(!In(r)||!In(a))return new Error("Invalid prop ".concat(t," supplied to ").concat(o,". ").concat(t," values must be valid MIDI numbers, and should not be accidentals (sharp or flat notes)."));if(r>=a)return new Error("Invalid prop ".concat(t," supplied to ").concat(o,". ").concat(t,".first must be smaller than ").concat(t,".last."))}var tn=function(e){Ye(o,e);var t=Je(o);function o(){var n;He(this,o);for(var r=arguments.length,a=new Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),Y(te(n),"state",{isMouseDown:!1,useTouchEvents:!1}),Y(te(n),"handleNoteChanges",function(i){var s=i.prevActiveNotes,c=i.nextActiveNotes;if(!n.props.disabled){var h=jn(s,c),l=jn(c,s);l.forEach(function(p){n.props.playNote(p)}),h.forEach(function(p){n.props.stopNote(p)})}}),Y(te(n),"getMidiNumberForKey",function(i){if(!n.props.keyboardShortcuts)return null;var s=n.props.keyboardShortcuts.find(function(c){return c.key===i});return s&&s.midiNumber}),Y(te(n),"getKeyForMidiNumber",function(i){if(!n.props.keyboardShortcuts)return null;var s=n.props.keyboardShortcuts.find(function(c){return c.midiNumber===i});return s&&s.key}),Y(te(n),"onKeyDown",function(i){if(!(i.ctrlKey||i.metaKey||i.shiftKey)){var s=n.getMidiNumberForKey(i.key);s&&n.onPlayNoteInput(s)}}),Y(te(n),"onKeyUp",function(i){var s=n.getMidiNumberForKey(i.key);s&&n.onStopNoteInput(s)}),Y(te(n),"onPlayNoteInput",function(i){n.props.disabled||n.props.onPlayNoteInput(i,n.props.activeNotes)}),Y(te(n),"onStopNoteInput",function(i){n.props.disabled||n.props.onStopNoteInput(i,n.props.activeNotes)}),Y(te(n),"onMouseDown",function(){n.setState({isMouseDown:!0})}),Y(te(n),"onMouseUp",function(){n.setState({isMouseDown:!1})}),Y(te(n),"onTouchStart",function(){n.setState({useTouchEvents:!0})}),Y(te(n),"renderNoteLabel",function(i){var s=i.midiNumber,c=i.isActive,h=i.isAccidental,l=n.getKeyForMidiNumber(s);return n.props.renderNoteLabel({keyboardShortcut:l,midiNumber:s,isActive:c,isAccidental:h})}),n}return Xe(o,[{key:"componentDidMount",value:function(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)}},{key:"componentDidUpdate",value:function(r,a){this.props.activeNotes!==r.activeNotes&&this.handleNoteChanges({prevActiveNotes:r.activeNotes||[],nextActiveNotes:this.props.activeNotes||[]})}},{key:"render",value:function(){return _.createElement("div",{style:{width:"100%",height:"100%"},onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,"data-testid":"container"},_.createElement(en,{activeNotes:this.props.activeNotes,selectedNotes:this.props.selectedNotes,className:this.props.className,disabled:this.props.disabled,gliss:this.state.isMouseDown,keyWidthToHeight:this.props.keyWidthToHeight,noteRange:this.props.noteRange,onClick:this.props.onClick,onDoubleClick:this.props.onDoubleClick,onKeyMouseEnter:this.props.onKeyMouseEnter,onKeyMouseLeave:this.props.onKeyMouseLeave,onPlayNoteInput:this.onPlayNoteInput,onStopNoteInput:this.onStopNoteInput,renderNoteLabel:this.renderNoteLabel,useTouchEvents:this.state.useTouchEvents,width:this.props.width}))}}]),o}(_.Component);Y(tn,"propTypes",{noteRange:R.object.isRequired,activeNotes:R.arrayOf(R.number.isRequired).isRequired,selectedNotes:R.arrayOf(R.number),playNote:R.func.isRequired,stopNote:R.func.isRequired,onClick:R.func,onDoubleClick:R.func,onKeyMouseEnter:R.func,onKeyMouseLeave:R.func,onPlayNoteInput:R.func.isRequired,onStopNoteInput:R.func.isRequired,renderNoteLabel:R.func.isRequired,className:R.string,disabled:R.bool,width:R.number,keyWidthToHeight:R.number,keyboardShortcuts:R.arrayOf(R.shape({key:R.string.isRequired,midiNumber:R.number.isRequired}))});Y(tn,"defaultProps",{onKeyMouseEnter:void 0,onKeyMouseLeave:void 0,renderNoteLabel:function(t){var o=t.keyboardShortcut;t.midiNumber;var n=t.isActive,r=t.isAccidental;return o?_.createElement("div",{className:Ce("ReactPiano__NoteLabel",{"ReactPiano__NoteLabel--active":n,"ReactPiano__NoteLabel--accidental":r,"ReactPiano__NoteLabel--natural":!r})},o):null}});var oa=["activeNotes","selectedNotes","onPlayNoteInput","onStopNoteInput"],nn=function(e){Ye(o,e);var t=Je(o);function o(){var n;He(this,o);for(var r=arguments.length,a=new Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),Y(te(n),"state",{activeNotes:n.props.activeNotes||[]}),Y(te(n),"handlePlayNoteInput",function(i){n.setState(function(s){return n.props.onPlayNoteInput&&n.props.onPlayNoteInput(i,{prevActiveNotes:s.activeNotes}),s.activeNotes.includes(i)?null:{activeNotes:s.activeNotes.concat(i)}})}),Y(te(n),"handleStopNoteInput",function(i){n.setState(function(s){return n.props.onStopNoteInput&&n.props.onStopNoteInput(i,{prevActiveNotes:n.state.activeNotes}),{activeNotes:s.activeNotes.filter(function(c){return i!==c})}})}),n}return Xe(o,[{key:"componentDidUpdate",value:function(r){r.activeNotes!==this.props.activeNotes&&this.state.activeNotes!==this.props.activeNotes&&this.setState({activeNotes:this.props.activeNotes||[]})}},{key:"render",value:function(){var r=this.props;r.activeNotes;var a=r.selectedNotes;r.onPlayNoteInput,r.onStopNoteInput;var u=Bi(r,oa);return _.createElement(tn,qt({activeNotes:this.state.activeNotes,selectedNotes:a,onPlayNoteInput:this.handlePlayNoteInput,onStopNoteInput:this.handleStopNoteInput},u))}}]),o}(_.Component);Y(nn,"propTypes",{noteRange:R.object.isRequired,activeNotes:R.arrayOf(R.number.isRequired),selectedNotes:R.arrayOf(R.number),playNote:R.func.isRequired,stopNote:R.func.isRequired,onPlayNoteInput:R.func,onStopNoteInput:R.func,renderNoteLabel:R.func,className:R.string,disabled:R.bool,width:R.number,keyWidthToHeight:R.number,keyboardShortcuts:R.arrayOf(R.shape({key:R.string.isRequired,midiNumber:R.number.isRequired}))});var ht={exports:{}},mt={exports:{}},vt,Dn;function ia(){if(Dn)return vt;Dn=1;function e(o){return o>64&&o<91?o-65:o>96&&o<123?o-71:o>47&&o<58?o+4:o===43?62:o===47?63:0}function t(o,n){for(var r=o.replace(/[^A-Za-z0-9\+\/]/g,""),a=r.length,u=n?Math.ceil((a*3+1>>2)/n)*n:a*3+1>>2,i=new Uint8Array(u),s,c,h=0,l=0,p=0;p<a;p++)if(c=p&3,h|=e(r.charCodeAt(p))<<18-6*c,c===3||a-p===1){for(s=0;s<3&&l<u;s++,l++)i[l]=h>>>(16>>>s&24)&255;h=0}return i}return vt={decode:t},vt}var yt,Ln;function aa(){return Ln||(Ln=1,yt=function(e,t){return new Promise(function(o,n){var r=new XMLHttpRequest;t&&(r.responseType=t),r.open("GET",e),r.onload=function(){r.status===200?o(r.response):n(Error(r.statusText))},r.onerror=function(){n(Error("Network Error"))},r.send()})}),yt}var qn;function sa(){return qn||(qn=1,function(e){var t=ia(),o=aa();function n(g){return function(M){return typeof M=="string"&&g.test(M)}}function r(g,M){return typeof g=="string"?g+M:typeof g=="function"?g(M):M}function a(g,M,O,I){var V=u(M)?i:s(M)?c:h(M)?l:p(M)?f:d(M)?v:b(M)?D:L(M)?x:C(M)?m:null,U=O||{};return V?V(g,M,U):I?Promise.resolve(I):Promise.reject("Source not valid ("+M+")")}a.fetch=o;function u(g){return g instanceof ArrayBuffer}function i(g,M,O){return new Promise(function(I,V){g.decodeAudioData(M,function(U){I(U)},function(){V("Can't decode audio data ("+M.slice(0,30)+"...)")})})}var s=n(/\.(mp3|wav|ogg)(\?.*)?$/i);function c(g,M,O){var I=r(O.from,M);return a(g,a.fetch(I,"arraybuffer"),O)}function h(g){return g&&typeof g.then=="function"}function l(g,M,O){return M.then(function(I){return a(g,I,O)})}var p=Array.isArray;function f(g,M,O){return Promise.all(M.map(function(I){return a(g,I,O,I)}))}function d(g){return g&&typeof g=="object"}function v(g,M,O){var I={},V=Object.keys(M).map(function(U){if(O.only&&O.only.indexOf(U)===-1)return null;var ne=M[U];return a(g,ne,O,ne).then(function(oe){I[U]=oe})});return Promise.all(V).then(function(){return I})}var b=n(/\.json(\?.*)?$/i);function D(g,M,O){var I=r(O.from,M);return a(g,a.fetch(I,"text").then(JSON.parse),O)}var L=n(/^data:audio/);function x(g,M,O){var I=M.indexOf(",");return a(g,t.decode(M.slice(I+1)).buffer,O)}var C=n(/\.js(\?.*)?$/i);function m(g,M,O){var I=r(O.from,M);return a(g,a.fetch(I,"text").then(P),O)}function P(g){var M=g.indexOf("MIDI.Soundfont.");if(M<0)throw Error("Invalid MIDI.js Soundfont format");M=g.indexOf("=",M)+2;var O=g.lastIndexOf(",");return JSON.parse(g.slice(M,O)+"}")}e.exports&&(e.exports=a),typeof window<"u"&&(window.loadAudio=a)}(mt)),mt.exports}var gt={exports:{}},bt,Fn;function ua(){if(Fn)return bt;Fn=1,bt=e;function e(i){var s=i.createGain(),c=s._voltage=n(i),h=r(c),l=r(c),p=r(c);return s._startAmount=r(l),s._endAmount=r(p),s._multiplier=r(h),s._multiplier.connect(s),s._startAmount.connect(s),s._endAmount.connect(s),s.value=h.gain,s.startValue=l.gain,s.endValue=p.gain,s.startValue.value=0,s.endValue.value=0,Object.defineProperties(s,t),s}var t={attack:{value:0,writable:!0},decay:{value:0,writable:!0},sustain:{value:1,writable:!0},release:{value:0,writable:!0},getReleaseDuration:{value:function(){return this.release}},start:{value:function(i){var s=this._multiplier.gain,c=this._startAmount.gain,h=this._endAmount.gain;this._voltage.start(i),this._decayFrom=this._decayFrom=i+this.attack,this._startedAt=i;var l=this.sustain;s.cancelScheduledValues(i),c.cancelScheduledValues(i),h.cancelScheduledValues(i),h.setValueAtTime(0,i),this.attack?(s.setValueAtTime(0,i),s.linearRampToValueAtTime(1,i+this.attack),c.setValueAtTime(1,i),c.linearRampToValueAtTime(0,i+this.attack)):(s.setValueAtTime(1,i),c.setValueAtTime(0,i)),this.decay&&s.setTargetAtTime(l,this._decayFrom,a(this.decay))}},stop:{value:function(i,s){s&&(i=i-this.release);var c=i+this.release;if(this.release){var h=this._multiplier.gain,l=this._startAmount.gain,p=this._endAmount.gain;h.cancelScheduledValues(i),l.cancelScheduledValues(i),p.cancelScheduledValues(i);var f=a(this.release);if(this.attack&&i<this._decayFrom){var d=u(0,1,this._startedAt,this._decayFrom,i);h.linearRampToValueAtTime(d,i),l.linearRampToValueAtTime(1-d,i),l.setTargetAtTime(0,i,f)}p.setTargetAtTime(1,i,f),h.setTargetAtTime(0,i,f)}return this._voltage.stop(c),c}},onended:{get:function(){return this._voltage.onended},set:function(i){this._voltage.onended=i}}},o=new Float32Array([1,1]);function n(i){var s=i.createBufferSource(),c=i.createBuffer(1,2,i.sampleRate);return c.getChannelData(0).set(o),s.buffer=c,s.loop=!0,s}function r(i){var s=i.context.createGain();return i.connect(s),s}function a(i){return Math.log(i+1)/Math.log(100)}function u(i,s,c,h,l){var p=s-i,f=h-c,d=l-c,v=d/f,b=i+v*p;return b<=i&&(b=i),b>=s&&(b=s),b}return bt}var Pt,Bn;function la(){if(Bn)return Pt;Bn=1;var e=ua(),t={},o={gain:1,attack:.01,decay:.1,sustain:.9,release:.3,loop:!1,cents:0,loopStart:0,loopEnd:0};function n(s,c,h){var l=!1,p=0,f={},d=s.createGain();d.gain.value=1;var v=Object.assign({},o,h),b={context:s,out:d,opts:v};return c instanceof AudioBuffer?b.buffer=c:b.buffers=c,b.start=function(x,C,m){if(b.buffer&&x!==null)return b.start(null,x,C);var P=x?b.buffers[x]:b.buffer;if(P){if(!l){console.warn("SamplePlayer not connected to any node.");return}}else{console.warn("Buffer "+x+" not found.");return}var g=m||t;C=Math.max(s.currentTime,C||0),b.emit("start",C,x,g);var M=L(x,P,g);return M.id=D(x,M),M.env.start(C),M.source.start(C),b.emit("started",C,M.id,M),g.duration&&M.stop(C+g.duration),M},b.play=function(x,C,m){return b.start(x,C,m)},b.stop=function(x,C){var m;return C=C||Object.keys(f),C.map(function(P){return m=f[P],m?(m.stop(x),m.id):null})},b.connect=function(x){return l=!0,d.connect(x),b},b.emit=function(x,C,m,P){b.onevent&&b.onevent(x,C,m,P);var g=b["on"+x];g&&g(C,m,P)},b;function D(x,C){return C.id=p++,f[C.id]=C,C.source.onended=function(){var m=s.currentTime;C.source.disconnect(),C.env.disconnect(),C.disconnect(),b.emit("ended",m,C.id,C)},C.id}function L(x,C,m){var P=s.createGain();return P.gain.value=0,P.connect(d),P.env=u(s,m,v),P.env.connect(P.gain),P.source=s.createBufferSource(),P.source.buffer=C,P.source.connect(P),P.source.loop=m.loop||v.loop,P.source.playbackRate.value=i(m.cents||v.cents),P.source.loopStart=m.loopStart||v.loopStart,P.source.loopEnd=m.loopEnd||v.loopEnd,P.stop=function(g){var M=g||s.currentTime;b.emit("stop",M,x);var O=P.env.stop(M);P.source.stop(O)},P}}function r(s){return typeof s=="number"}var a=["attack","decay","sustain","release"];function u(s,c,h){var l=e(s),p=c.adsr||h.adsr;return a.forEach(function(f,d){p?l[f]=p[d]:l[f]=c[f]||h[f]}),l.value.value=r(c.gain)?c.gain:r(h.gain)?h.gain:1,l}function i(s){return s?Math.pow(2,s/1200):1}return Pt=n,Pt}var Mt,$n;function ca(){if($n)return Mt;$n=1,Mt=function(t){return t.on=function(o,n){if(arguments.length===1&&typeof o=="function")return t.on("event",o);var r="on"+o,a=t[r];return t[r]=a?e(a,n):n,t},t};function e(t,o){return function(n,r,a,u){t(n,r,a,u),o(n,r,a,u)}}return Mt}var St,Vn;function fa(){if(Vn)return St;Vn=1;var e=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/;function t(){return e}var o=[0,2,4,5,7,9,11];function n(i,s,c){if(typeof i!="string")return null;var h=e.exec(i);if(!h||!s&&h[4])return null;var l={letter:h[1].toUpperCase(),acc:h[2].replace(/x/g,"##")};return l.pc=l.letter+l.acc,l.step=(l.letter.charCodeAt(0)+3)%7,l.alt=l.acc[0]==="b"?-l.acc.length:l.acc.length,l.chroma=o[l.step]+l.alt,h[3]&&(l.oct=+h[3],l.midi=l.chroma+12*(l.oct+1),l.freq=r(l.midi,c)),s&&(l.tonicOf=h[4]),l}function r(i,s){return Math.pow(2,(i-69)/12)*(s||440)}var a={parse:n,regex:t,midiToFreq:r},u=["letter","acc","pc","step","alt","chroma","oct","midi","freq"];return u.forEach(function(i){a[i]=function(s){var c=n(s);return c&&typeof c[i]<"u"?c[i]:null}}),St=a,St}var wt,Gn;function da(){if(Gn)return wt;Gn=1;var e=fa(),t=function(r){return r!==null&&r!==[]&&r>=0&&r<129},o=function(r){return t(r)?+r:e.midi(r)};wt=function(r){if(r.buffers){var a=r.opts.map,u=typeof a=="function"?a:o,i=function(c){return c?u(c)||c:null};r.buffers=n(r.buffers,i);var s=r.start;r.start=function(c,h,l){var p=i(c),f=p%1;return f&&(p=Math.floor(p),l=Object.assign(l||{},{cents:Math.floor(f*100)})),s(p,h,l)}}return r};function n(r,a){return Object.keys(r).reduce(function(u,i){return u[a(i)]=r[i],u},{})}return wt}var At,Un;function pa(){if(Un)return At;Un=1;var e=Array.isArray,t=function(n){return n&&typeof n=="object"},o={};return At=function(n){return n.schedule=function(r,a){var u=n.context.currentTime,i=r<u?u:r;n.emit("schedule",i,a);var s,c,h,l;return a.map(function(p){if(p)e(p)?(s=p[0],c=p[1]):(s=p.time,c=p);else return null;return t(c)?(h=c.name||c.key||c.note||c.midi||null,l=c):(h=c,l=o),n.start(h,i+(s||0),l)})},n},At}function De(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var xt={exports:{}},Kn;function ha(){return Kn||(Kn=1,function(e,t){(function(o){e.exports=o()})(function(){return function o(n,r,a){function u(c,h){if(!r[c]){if(!n[c]){var l=typeof De=="function"&&De;if(!h&&l)return l(c,!0);if(i)return i(c,!0);var p=new Error("Cannot find module '"+c+"'");throw p.code="MODULE_NOT_FOUND",p}var f=r[c]={exports:{}};n[c][0].call(f.exports,function(d){var v=n[c][1][d];return u(v||d)},f,f.exports,o,n,r,a)}return r[c].exports}for(var i=typeof De=="function"&&De,s=0;s<a.length;s++)u(a[s]);return u}({1:[function(o,n,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(a){function u(i){if(this._event=i,this._data=i.data,this.receivedTime=i.receivedTime,this._data&&this._data.length<2){console.warn("Illegal MIDI message of length",this._data.length);return}switch(this._messageCode=i.data[0]&240,this.channel=i.data[0]&15,this._messageCode){case 128:this.messageType="noteoff",this.key=i.data[1]&127,this.velocity=i.data[2]&127;break;case 144:this.messageType="noteon",this.key=i.data[1]&127,this.velocity=i.data[2]&127;break;case 160:this.messageType="keypressure",this.key=i.data[1]&127,this.pressure=i.data[2]&127;break;case 176:this.messageType="controlchange",this.controllerNumber=i.data[1]&127,this.controllerValue=i.data[2]&127,this.controllerNumber===120&&this.controllerValue===0?this.channelModeMessage="allsoundoff":this.controllerNumber===121?this.channelModeMessage="resetallcontrollers":this.controllerNumber===122?this.controllerValue===0?this.channelModeMessage="localcontroloff":this.channelModeMessage="localcontrolon":this.controllerNumber===123&&this.controllerValue===0?this.channelModeMessage="allnotesoff":this.controllerNumber===124&&this.controllerValue===0?this.channelModeMessage="omnimodeoff":this.controllerNumber===125&&this.controllerValue===0?this.channelModeMessage="omnimodeon":this.controllerNumber===126?this.channelModeMessage="monomodeon":this.controllerNumber===127&&(this.channelModeMessage="polymodeon");break;case 192:this.messageType="programchange",this.program=i.data[1];break;case 208:this.messageType="channelpressure",this.pressure=i.data[1]&127;break;case 224:this.messageType="pitchbendchange";var s=i.data[2]&127,c=i.data[1]&127;this.pitchBend=(s<<8)+c;break}}return new u(a)},n.exports=r.default},{}]},{},[1])(1)})}(xt)),xt.exports}var Et,Wn;function ma(){if(Wn)return Et;Wn=1;var e=ha();return Et=function(t){return t.listenToMidi=function(o,n){var r={},a=n||{},u=a.gain||function(i){return i/127};return o.onmidimessage=function(i){var s=i.messageType?i:e(i);if(s.messageType==="noteon"&&s.velocity===0&&(s.messageType="noteoff"),!(a.channel&&s.channel!==a.channel))switch(s.messageType){case"noteon":r[s.key]=t.play(s.key,0,{gain:u(s.velocity)});break;case"noteoff":r[s.key]&&(r[s.key].stop(),delete r[s.key]);break}},t},t},Et}var zn;function va(){return zn||(zn=1,function(e){var t=la(),o=ca(),n=da(),r=pa(),a=ma();function u(i,s,c){return a(r(n(o(t(i,s,c)))))}e.exports&&(e.exports=u),typeof window<"u"&&(window.SamplePlayer=u)}(gt)),gt.exports}function Hn(e,t){return Array(t+1).join(e)}function rn(e){return typeof e=="number"}function ya(e){return typeof e=="string"}function ga(e){return typeof e<"u"}function Dr(e,t){return Math.pow(2,(e-69)/12)*(t||440)}var Lr=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/;function ba(){return Lr}var Pa=[0,2,4,5,7,9,11];function de(e,t,o){if(typeof e!="string")return null;var n=Lr.exec(e);if(!n||!t&&n[4])return null;var r={letter:n[1].toUpperCase(),acc:n[2].replace(/x/g,"##")};r.pc=r.letter+r.acc,r.step=(r.letter.charCodeAt(0)+3)%7,r.alt=r.acc[0]==="b"?-r.acc.length:r.acc.length;var a=Pa[r.step]+r.alt;return r.chroma=a<0?12+a:a%12,n[3]&&(r.oct=+n[3],r.midi=a+12*(r.oct+1),r.freq=Dr(r.midi,o)),t&&(r.tonicOf=n[4]),r}var Ma="CDEFGAB";function Sa(e){return rn(e)?e<0?Hn("b",-e):Hn("#",e):""}function wa(e){return rn(e)?""+e:""}function qr(e,t,o){return e===null||typeof e>"u"?null:e.step?qr(e.step,e.alt,e.oct):e<0||e>6?null:Ma.charAt(e)+Sa(t)+wa(o)}function Fr(e){if((rn(e)||ya(e))&&e>=0&&e<128)return+e;var t=de(e);return t&&ga(t.midi)?t.midi:null}function Aa(e,t){var o=Fr(e);return o===null?null:Dr(o,t)}function xa(e){return(de(e)||{}).letter}function Ea(e){return(de(e)||{}).acc}function Ca(e){return(de(e)||{}).pc}function Na(e){return(de(e)||{}).step}function _a(e){return(de(e)||{}).alt}function Oa(e){return(de(e)||{}).chroma}function Ta(e){return(de(e)||{}).oct}const Ra=Object.freeze(Object.defineProperty({__proto__:null,acc:Ea,alt:_a,build:qr,chroma:Oa,freq:Aa,letter:xa,midi:Fr,oct:Ta,parse:de,pc:Ca,regex:ba,step:Na},Symbol.toStringTag,{value:"Module"})),ja=Ai(Ra);var Ct,Xn;function ka(){if(Xn)return Ct;Xn=1;var e=ja;function t(r,a){if(console.warn("new Soundfont() is deprected"),console.log("Please use Soundfont.instrument() instead of new Soundfont().instrument()"),!(this instanceof t))return new t(r);this.nameToUrl=a||t.nameToUrl,this.ctx=r,this.instruments={},this.promises=[]}t.prototype.onready=function(r){console.warn("deprecated API"),console.log("Please use Promise.all(Soundfont.instrument(), Soundfont.instrument()).then() instead of new Soundfont().onready()"),Promise.all(this.promises).then(r)},t.prototype.instrument=function(r,a){console.warn("new Soundfont().instrument() is deprecated."),console.log("Please use Soundfont.instrument() instead.");var u=this.ctx;if(r=r||"default",r in this.instruments)return this.instruments[r];var i={name:r,play:n(u,a)};if(this.instruments[r]=i,r!=="default"){var s=t.instrument(u,r,a).then(function(c){return i.play=c.play,i});this.promises.push(s),i.onready=function(c){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),s.then(c)}}else i.onready=function(c){console.warn("onready is deprecated. Use Soundfont.instrument().then()"),c()};return i};function o(r,a,u){return console.warn("Soundfont.loadBuffers is deprecate."),console.log("Use Soundfont.instrument(..) and get buffers properties from the result."),t.instrument(r,a,u).then(function(i){return i.buffers})}t.loadBuffers=o;function n(r,a){return a=a||{},function(u,i,s,c){console.warn("The oscillator player is deprecated."),console.log("Starting with version 0.9.0 you will have to wait until the soundfont is loaded to play sounds.");var h=u>0&&u<129?+u:e.midi(u),l=h?e.midiToFreq(h,440):null;if(l){s=s||.2,c=c||{};var p=c.destination||a.destination||r.destination,f=c.vcoType||a.vcoType||"sine",d=c.gain||a.gain||.4,v=r.createOscillator();v.type=f,v.frequency.value=l;var b=r.createGain();return b.gain.value=d,v.connect(b),b.connect(p),v.start(i),s>0&&v.stop(i+s),v}}}return t.noteToMidi=e.midi,Ct=t,Ct}var Yn;function Ia(){return Yn||(Yn=1,function(e){var t=sa(),o=va();function n(i,s,c){if(arguments.length===1)return function(d,v){return n(i,d,v)};var h=c||{},l=h.isSoundfontURL||r,p=h.nameToUrl||a,f=l(s)?s:p(s,h.soundfont,h.format);return t(i,f,{only:h.only||h.notes}).then(function(d){var v=o(i,d,h).connect(h.destination?h.destination:i.destination);return v.url=f,v.name=s,v})}function r(i){return/\.js(\?.*)?$/i.test(i)}function a(i,s,c){return c=c==="ogg"?c:"mp3",s=s==="FluidR3_GM"?s:"MusyngKite","https://gleitz.github.io/midi-js-soundfonts/"+s+"/"+i+"-"+c+".js"}var u=ka();u.instrument=n,u.nameToUrl=a,e.exports&&(e.exports=u),typeof window<"u"&&(window.Soundfont=u)}(ht)),ht.exports}var Da=Ia();const La=ze(Da);typeof window<"u"&&(window.MIDI||(window.MIDI={Soundfont:{}}));typeof globalThis<"u"&&(globalThis.MIDI||(globalThis.MIDI=window.MIDI||{Soundfont:{}}));typeof global<"u"&&(global.MIDI||(global.MIDI=window.MIDI||{Soundfont:{}}));const Jn=e=>e!=null&&!Number.isNaN(e),Br=e=>{const{audioContext:t,format:o,hostname:n,instrumentName:r,onChange:a,render:u,soundfont:i}=e,[s,c]=_.useState(!0),[h,l]=_.useState({}),[p,f]=_.useState(null),d=_.useCallback(L=>{var x,C;if(f(null),Jn(n))La.instrument(t,L,{format:o,soundfont:i,nameToUrl:(m,P,g)=>`${n}/${P}/${m}-${g}.js`}).then(m=>{f(m)});else if(r){const m=(C=(x=window.MIDI)==null?void 0:x.Soundfont)==null?void 0:C[r];if(m){const P=M=>{const O=typeof M=="string"?Number.parseInt(M,10):M;return Mi(O)};f({play:(M,O)=>{const I=P(M),V=m[I];if(V){const U=new Audio(V);return U.volume=(O||127)/127,U.play(),{stop:()=>{U.pause(),U.currentTime=0}}}return null},stop:()=>{}}),c(!1)}else c(!1)}else c(!1)},[t,o,n,r,i]);return _.useEffect(()=>{r&&d(r)},[r,d]),_.useEffect(()=>{Jn(r)&&c(!p)},[p,r]),u({isLoading:s,playNote:L=>{p&&t.resume().then(()=>{const x=p.play(String(L));l(C=>({...C,[L]:x}))})},stopNote:L=>{t.resume().then(()=>{if(!h[L])return;h[L].stop(),l(C=>{const{[L]:m,...P}=C;return P})}),a==null||a(L)},stopAllNotes:()=>{t.resume().then(()=>{const L=Object.values(h);for(const x of L)x&&x.stop();l(L)})}})},Nt=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],qa=12,Fa=qa*.7,Ba=new window.AudioContext,$a=({octave:e,height:t,width:o,...n})=>{const a=(o/Fa+2)/t,u=bn(Nt[0]+String(e))||0,i=bn(Nt[Nt.length-1]+String(e))||0;return A.jsx("div",{children:A.jsx(nn,{keyWidthToHeight:a,noteRange:{first:u,last:i},width:o,...n})})},$r=({format:e,height:t,hostname:o,instrumentName:n,octave:r=4,onChange:a,onClick:u,onDoubleClick:i,onKeyMouseEnter:s,onKeyMouseLeave:c,selectedNotes:h,soundfont:l,Tooltip:p,width:f})=>A.jsx(Br,{audioContext:Ba,format:e,hostname:o,instrumentName:n,onChange:a,soundfont:l,render:({isLoading:d,playNote:v,stopNote:b})=>A.jsx($a,{disabled:d,height:t,octave:r,onClick:u,onDoubleClick:i,onKeyMouseEnter:s,onKeyMouseLeave:c,playNote:v,selectedNotes:h,stopNote:b,Tooltip:p,width:f})}),$t="__react_svg_text_measurement_id",Va=(e,t,o,n)=>{const{lineHeight:r,spaceWidth:a,wordsWithComputedWidth:u}=t;return e.split(/\s+/).reduce((i,s)=>{const c=u[s],h=i[i.length-1];if(h&&h.width+c+a<o)h.words.push(s),h.width+=c+a;else{const l={words:[s],width:c,showLine:n?r*(i.length+1)<n:!0};i.push(l)}return i},[])},Ga=(e,t,o)=>{var n;if(e&&t){Array.from(e).forEach(s=>t.style.setProperty(s,e.getPropertyValue(s),e.getPropertyPriority(s)));const a=[...new Set(String(o).split(/\s+/))].reduce((s,c)=>(t.textContent=c,{...s,[c]:t.getBBox().width}),{});t.textContent=" ";const u=((n=t==null?void 0:t.getComputedTextLength)==null?void 0:n.call(t))||8,i=t.getBBox().height;return t.setAttribute("style",""),{wordsWithComputedWidth:a,spaceWidth:u,lineHeight:i}}},Vt=e=>{const{className:t="",dx:o=0,dy:n=0,maxHeight:r=1e3,maxWidth:a=1e3,text:u="",verticalAnchor:i="start",x:s=0,y:c=0,transform:h="",...l}=e,[p,f]=_.useState(),[d,v]=_.useState([]),[b,D]=_.useState(),L=_.useRef({}),x=_.useMemo(()=>{const P=d.filter(({showLine:g})=>g);return P.length?P:u.split(/\n/).map(g=>({words:[g],width:0,showLine:!0}))},[d,u]),C=_.useCallback(P=>{D(P!==null?window.getComputedStyle(P):void 0)},[]);_.useEffect(()=>{const P=document.getElementById($t);if(P===null){const g=document.createElementNS("http://www.w3.org/2000/svg","svg");return g.setAttribute("id",$t),document.body.appendChild(g),g.appendChild(document.createElementNS("http://www.w3.org/2000/svg","text")),L.current=g,()=>{document.body.removeChild(g)}}L.current=P},[]),_.useEffect(()=>{const P=Ga(b,L.current,u);f(P)},[u,b]),_.useEffect(()=>{if(a&&p){const P=u.split(/\n/).flatMap(g=>Va(g,p,a,r));v(P)}},[r,a,p,u]);const m=_.useMemo(()=>{if(p!=null&&p.lineHeight)switch(i){case"start":return p.lineHeight;case"middle":return-((x.length-1)*p.lineHeight/2);default:return-(x.length-1)*p.lineHeight}return 0},[x.length,i,p==null?void 0:p.lineHeight]);return A.jsx("text",{className:t,ref:C,dx:o,dy:n,x:s,y:c,transform:h,...l,children:A.jsxs(A.Fragment,{children:[x.map((P,g)=>A.jsx("tspan",{dx:s+o,dy:g===0?m+n:(p==null?void 0:p.lineHeight)||0,x:0,children:P.words.join(" ")},g)),d.length&&x.length!==d.length&&A.jsxs(A.Fragment,{children:[A.jsx("tspan",{children:"..."}),A.jsx("title",{children:u})]})]})})},ve=255,{IndicatorsContainer:Ua,Placeholder:Qn,ValueContainer:Ka}=kt.components,Wa={label:"--",value:ve},Zn=e=>{var r;const{children:t,...o}=e,n=(r=o.selectProps)==null?void 0:r.actionButton;return A.jsx(Ua,{...o,children:A.jsxs("div",{onMouseDown:a=>{a.stopPropagation(),a.preventDefault()},style:{display:"flex"},children:[n,t]})})},za=({children:e,...t})=>A.jsxs(Ka,{...t,children:[A.jsx(Qn,{...t,innerProps:t.innerProps||{},className:t.hasValue||t.selectProps.inputValue?"shrunk":"",isFocused:t.isFocused??!1,children:t.selectProps.placeholder}),_.Children.map(e,o=>_.isValidElement(o)&&o.type!==Qn?o:null)]}),le=_.forwardRef((e,t)=>{const{components:o,disabled:n,label:r,onChange:a,options:u=[],preserveMenuWidth:i,shrinkLabel:s,value:c,...h}=e,l=_.useCallback(v=>{v&&a(v.value)},[a]),p=u.reduce((v,b)=>"options"in b?v.concat(b.options):v.concat(b),[]),f=p.find(v=>c===v.value)||void 0,d=_.useMemo(()=>{const v=i?{menu:b=>sr("width")(b),menuList:b=>({...b,overflowX:"hidden"}),option:b=>({...b,whiteSpace:"nowrap",paddingRight:10})}:{};return s?{...v,container:b=>({...b,marginTop:10}),placeholder:(b,D)=>({position:"absolute",left:D.hasValue||D.selectProps.inputValue?-2:"4%",top:D.hasValue||D.selectProps.inputValue?-12:"50%",transition:"top 0.1s, font-size 0.1s, color 0.1s",fontSize:(D.hasValue||D.selectProps.inputValue)&&13}),valueContainer:b=>({...b,overflow:"visible"})}:{...v}},[i,s]);return s?A.jsx("div",{className:"zds-pickers__container",children:A.jsx(kt,{...h,classNamePrefix:"zds-pickers",components:{IndicatorsContainer:Zn,ValueContainer:za,...o},isDisabled:n,onChange:l,options:p,placeholder:r,ref:t,styles:d,value:f})}):A.jsxs("div",{className:"zds-pickers__container",children:[!!r&&A.jsx("span",{className:"zds-pickers__label",children:r}),A.jsx(kt,{...h,classNamePrefix:"zds-pickers",components:{IndicatorsContainer:Zn,...o},isDisabled:n,onChange:l,options:p,ref:t,styles:d,value:f})]})}),Ha=_.forwardRef((e,t)=>A.jsx(le,{...e,options:ur,ref:t})),Xa=Ne(16).map(e=>({value:e,label:e})),Ya=_.forwardRef(({channels:e,className:t,...o},n)=>{const[r,a]=_.useState([]),u=_.useCallback(({value:i,label:s},{context:c})=>{if(i==="separator")return A.jsx("span",{className:"zds-mappings-user-mapping",children:s});if(typeof i!="number")return null;const h=e[i];return h?A.jsxs("span",{className:"mapping-entry",children:[A.jsx("b",{children:i!==ve&&A.jsxs(A.Fragment,{children:[i+1,c==="value"&&" -"]})}),A.jsx("span",{className:"mapping-entry-label",children:h.label})]}):A.jsxs("span",{className:"mapping-entry empty-mapping-entry",children:[A.jsx("b",{children:i!==ve&&A.jsxs(A.Fragment,{children:[i+1,c==="value"&&" -"]})}),A.jsx("span",{className:"mapping-entry-label",children:"no mapping"})]})},[e]);return _.useEffect(()=>{const i=Xa.sort((h,l)=>typeof h.value=="number"&&typeof l.value=="number"&&e[h.value]&&!e[l.value]?-1:typeof h.value=="number"&&typeof l.value=="number"&&!e[h.value]&&e[l.value]?1:typeof h.value=="number"&&typeof l.value=="number"?h.value-l.value:0),s=i.filter(({value:h})=>typeof h=="number"&&!!e[h]||h===ve).length,c=i.some(({value:h})=>h==="separator");s&&s<16&&!c&&i.splice(s,0,{label:A.jsx("hr",{}),value:"separator"}),a(i)},[e]),A.jsx(le,{...o,className:Ce(t,"channel-mapping-picker"),formatOptionLabel:u,options:r,ref:n})}),Ja=Ne(16).map(e=>({value:e,label:`Channel ${e+1}`})),Qa=(e,t)=>t?String(e.label).toLowerCase().includes(t.toLowerCase()):!0,Za=_.forwardRef(({className:e,value:t=ve,...o},n)=>{const r=_.useCallback((a,{context:u})=>t===void 0?"--":u==="value"?a.label:Number.parseInt(String(a.value))+1,[t]);return A.jsx(le,{...o,className:Ce(e,"channel-picker"),filterOptions:Qa,formatOptionLabel:r,options:Ja,value:t,ref:n})}),es=e=>{const{value:t,onChange:o,disabled:n=!1,height:r=100,width:a=300,octave:u=4,...i}=e,s=_.useCallback(p=>{n||o(p)},[n,o]),c=60+(u-4)*12,h=c+11,l=t!==ve&&t>=c&&t<=h;return A.jsx($r,{...i,selectedNotes:l?[t]:[],disabled:n,height:r,width:a,octave:u,onClick:s,instrumentName:"acoustic_grand_piano"})},on=e=>{const[t,o]=_.useState(e);return _.useEffect(()=>{o(e)},[e]),[t,o]};var _t,er;function ts(){return er||(er=1,_t=function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(n,r,a){o.o(n,r)||Object.defineProperty(n,r,{enumerable:!0,get:a})},o.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.t=function(n,r){if(1&r&&(n=o(n)),8&r||4&r&&typeof n=="object"&&n&&n.__esModule)return n;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:n}),2&r&&typeof n!="string")for(var u in n)o.d(a,u,(function(i){return n[i]}).bind(null,u));return a},o.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(r,"a",r),r},o.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},o.p="",o(o.s=3)}([function(e,t){e.exports=_},function(e,t){e.exports=jr()},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n,r=o(0),a=((n=r)&&n.__esModule?n:{default:n}).default.createContext(null);t.default=a},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.SvgLoader=t.SvgProxy=void 0;var n=a(o(4)),r=a(o(8));function a(u){return u&&u.__esModule?u:{default:u}}t.SvgProxy=r.default,t.SvgLoader=n.default},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(l){for(var p=1;p<arguments.length;p++){var f=arguments[p];for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d])}return l},r=function(){function l(p,f){for(var d=0;d<f.length;d++){var v=f[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}return function(p,f,d){return f&&l(p.prototype,f),d&&l(p,d),p}}(),a=c(o(0)),u=c(o(1)),i=c(o(5)),s=c(o(2));function c(l){return l&&l.__esModule?l:{default:l}}var h=function(l){function p(f){(function(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")})(this,p);var d=function(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||typeof b!="object"&&typeof b!="function"?v:b}(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,f));if(d.mounted=!1,d.state={svg:null,svgCount:0},a.default.Fragment==null)throw new Error("This version of React doesn't support Fragments, please update it");return d.onSVGReady=d.onSVGReady.bind(d),d}return function(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}(p,l),r(p,[{key:"componentDidMount",value:function(){this.mounted=!0}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"onSVGReady",value:function(f){var d=this;setTimeout(function(){d.mounted&&(d.setState(n({},d.state,{svg:f,svgCount:d.state.svgCount+1})),d.props.onSVGReady(f))},0)}},{key:"render",value:function(){var f=this.props,d=f.path,v=(f.onSVGReady,f.children,f.svgXML),b=function(L,x){var C={};for(var m in L)x.indexOf(m)>=0||Object.prototype.hasOwnProperty.call(L,m)&&(C[m]=L[m]);return C}(f,["path","onSVGReady","children","svgXML"]),D=this.state.svg!=null?this.props.children:null;return a.default.createElement(a.default.Fragment,null,a.default.createElement(i.default,n({path:d,callback:this.onSVGReady,svgXML:v},b)),a.default.createElement(s.default.Provider,{value:{path:d,svgCount:this.state.svgCount,svg:this.state.svg}},D))}}]),p}(a.default.Component);t.default=h,h.propTypes={path:u.default.string,svgXML:u.default.string,onSVGReady:u.default.func,style:u.default.object,children:u.default.any},h.defaultProps={path:null,svgXML:null,onSVGReady:function(){},style:null}},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(l){for(var p=1;p<arguments.length;p++){var f=arguments[p];for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d])}return l},r=function(){function l(p,f){for(var d=0;d<f.length;d++){var v=f[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}return function(p,f,d){return f&&l(p.prototype,f),d&&l(p,d),p}}(),a=i(o(1)),u=i(o(0));function i(l){return l&&l.__esModule?l:{default:l}}function s(l,p){var f={};for(var d in l)p.indexOf(d)>=0||Object.prototype.hasOwnProperty.call(l,d)&&(f[d]=l[d]);return f}var c=typeof window<"u"?o(6):void 0,h=function(l){function p(){(function(d,v){if(!(d instanceof v))throw new TypeError("Cannot call a class as a function")})(this,p);var f=function(d,v){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!v||typeof v!="object"&&typeof v!="function"?d:v}(this,(p.__proto__||Object.getPrototypeOf(p)).call(this));return f.refCallback=f.refCallback.bind(f),f}return function(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}(p,l),r(p,[{key:"componentDidUpdate",value:function(f){this.props.path===f.path&&this.props.svgXML===f.svgXML||(this.container&&(this.container.innerHTML=""),this.renderSVG(this.props))}},{key:"refCallback",value:function(f){f&&(this.container=f,this.renderSVG())}},{key:"renderSVG",value:function(){var f=this,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,v=this.container,b=d.callback,D=(d.path,d.svgXML),L=(d.className,s(d,["callback","path","svgXML","className"]));c(v,{each:function(x){if(x)throw new Error(x);b(f.container)},svgXML:D},function(){v&&L&&Object.keys(L).reduce(function(x,C){return C!=="style"&&x.setAttribute(C,L[C]),v},v)})}},{key:"render",value:function(){var f=this.props,d=(f.callback,f.path,f.svgXML,s(f,["callback","path","svgXML"]));return u.default.createElement("svg",n({ref:this.refCallback,"data-src":this.props.path},d))}}]),p}(u.default.Component);t.default=h,h.defaultProps={callback:function(){},path:null,svgXML:null},h.propTypes={callback:a.default.func,path:a.default.string,svgXML:a.default.string}},function(e,t,o){(function(n){var r,a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u};/**
|
|
22
22
|
* Changes:
|
|
23
23
|
* - Don't replace the node. Justs its innerHTML
|
|
24
24
|
* Adapted from:
|
|
@@ -29,7 +29,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29
29
|
* Copyright (c) 2014-2015 Waybury <hello@waybury.com>
|
|
30
30
|
* @license MIT
|
|
31
31
|
*
|
|
32
|
-
*/(function(u,i){var s=u.location.protocol==="file:";i.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");var c=Array.prototype.forEach||function(m,P){if(this==null||typeof m!="function")throw new TypeError;var g,M=this.length>>>0;for(g=0;g<M;++g)g in this&&m.call(P,this[g],g,this)},h={},l=0,p=[],f=[],d=function(m){return m.cloneNode(!0)},v=function(m,P){f[m]=f[m]||[],f[m].push(P)},b=function(m,P){if(h[m]!==void 0)h[m]instanceof SVGSVGElement?P(d(h[m])):v(m,P);else{if(!u.XMLHttpRequest)return P("Browser does not support XMLHttpRequest"),!1;h[m]={},v(m,P);var g=new XMLHttpRequest;g.onreadystatechange=function(){if(g.readyState===4){if(g.status===404||g.responseXML===null)return P("Unable to load SVG file: "+m),s&&P("Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver."),P(),!1;if(!(g.status===200||s&&g.status===0))return P("There was a problem injecting the SVG: "+g.status+" "+g.statusText),!1;if(g.responseXML instanceof Document)h[m]=g.responseXML.documentElement;else if(DOMParser&&DOMParser instanceof Function){var M;try{M=new DOMParser().parseFromString(g.responseText,"text/xml")}catch{M=void 0}if(!M||M.getElementsByTagName("parsererror").length)return P("Unable to parse SVG file: "+m),!1;h[m]=M.documentElement}(function(_){for(var I=0,V=f[_].length;I<V;I++)(function(U){setTimeout(function(){f[_][U](d(h[_]))},0)})(I)})(m)}},g.open("GET",m),g.overrideMimeType&&g.overrideMimeType("text/xml"),g.send()}},D=function(m,P){if(P===void 0||typeof P=="string")return!1;var g=m.getAttribute("id");g&&P.setAttribute("id",g);var M=m.getAttribute("title");M&&P.setAttribute("title",M);var _=[].concat(P.getAttribute("class")||[],"injected-svg",m.getAttribute("class")||[]).join(" ");P.setAttribute("class",function(E){for(var B={},$=(E=E.split(" ")).length,q=[];$--;)B.hasOwnProperty(E[$])||(B[E[$]]=1,q.unshift(E[$]));return q.join(" ")}(_));var I=m.getAttribute("style");I&&P.setAttribute("style",I);var V=[].filter.call(m.attributes,function(E){return/^data-\w[\w\-]*$/.test(E.name)});c.call(V,function(E){E.name&&E.value&&P.setAttribute(E.name,E.value)});var U,ne,oe,ce,Q,ie={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(ie).forEach(function(E){U=E,oe=ie[E];for(var B=0,$=(ne=P.querySelectorAll("defs "+U+"[id]")).length;B<$;B++){var q;ce=ne[B].id,Q=ce+"-"+l,c.call(oe,function(T){for(var j=0,F=(q=P.querySelectorAll("["+T+'*="'+ce+'"]')).length;j<F;j++)q[j].setAttribute(T,"url(#"+Q+")")}),ne[B].id=Q}}),P.removeAttribute("xmlns:a");var fe=P.querySelectorAll("style");if(c.call(fe,function(E){E.textContent+=""}),L(m,P),P.hasAttributes())for(var re=P.attributes,S=re.length-1;S>=0;S--)re[S].name+""+re[S].value,m.setAttribute(re[S].name,re[S].value);delete p[p.indexOf(m)],m=null,l++},L=function(m,P){if(m.innerHTML=P.innerHTML||"",!m.innerHTML){var g=i.createElement("div"),M="<svg>"+function(_){var I=new XMLSerializer;return Array.prototype.slice.call(_.childNodes).map(function(V){return I.serializeToString(V)}).join("")}(P)+"</svg>";g.innerHTML=""+M,m.textContent="",Array.prototype.slice.call(g.childNodes[0].childNodes).forEach(function(_){m.appendChild(_)})}},x=function(m,P,g,M){if(g){var _;try{_=new DOMParser().parseFromString(g,"text/xml")}catch{_=void 0}if(!_||_.getElementsByTagName("parsererror").length)return M("Unable to parse SVG file: "+_.getElementsByTagName("parsererror")[0].innerHTML),!1;D(m,_.documentElement),M()}else{var I=m.getAttribute("data-src")||m.getAttribute("src");if(m.setAttribute("src",""),p.indexOf(m)!==-1)return;p.push(m),b(I,function(V){D(m,V),M()})}},C=function(m,P,g){(P=P||{}).pngFallback;var M=P.each,_=P.svgXML;if(m.length!==void 0){var I=0;c.call(m,function(V){x(V,0,_,function(){M&&typeof M=="function"&&M(),g&&m.length===++I&&g(I)})})}else m?x(m,0,_,function(){M&&typeof M=="function"&&M(),g&&g(1),m=null}):g&&g(0)};a(n)==="object"&&a(n.exports)==="object"?n.exports=t=C:(r=(function(){return C}).call(t,o,t,n))===void 0||(n.exports=r)})(window,document)}).call(this,o(7)(e))},function(e,t){e.exports=function(o){return o.webpackPolyfill||(o.deprecate=function(){},o.paths=[],o.children||(o.children=[]),Object.defineProperty(o,"loaded",{enumerable:!0,get:function(){return o.l}}),Object.defineProperty(o,"id",{enumerable:!0,get:function(){return o.i}}),o.webpackPolyfill=1),o}},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function l(p,f){for(var d=0;d<f.length;d++){var v=f[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}return function(p,f,d){return f&&l(p.prototype,f),d&&l(p,d),p}}(),r=i(o(0)),a=i(o(1)),u=i(o(2));function i(l){return l&&l.__esModule?l:{default:l}}var s=/(\w+)_(\S+)/,c={xlink:"http://www.w3.org/1999/xlink"},h=function(l){function p(f){(function(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")})(this,p);var d=function(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||typeof b!="object"&&typeof b!="function"?v:b}(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,f));return d.elemRefs=[],d.svgRef=null,d.path=null,d.originalValues={},d.onSvgUpdated=d.onSvgUpdated.bind(d),d.updateSvgElements=d.updateSvgElements.bind(d),d}return function(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}(p,l),n(p,[{key:"componentDidMount",value:function(){this.updateSvgElements(this.props)}},{key:"componentDidUpdate",value:function(f){this.props.selector!==f.selector&&(this.elemRefs=[]),this.updateSvgElements(this.props)}},{key:"onSvgUpdated",value:function(){this.updateSvgElements(this.props,!0)}},{key:"updateSvgElements",value:function(f,d){var v=this.svgRef;if(v&&(this.elemRefs.length===0||d)){var b=[].slice.apply(v.querySelectorAll(f.selector));b.length===0&&["svg","root"].indexOf(f.selector)!==-1&&b.push(v),f.onElementSelected&&b.length&&f.onElementSelected(b.length===1?b[0]:b),this.elemRefs=b}if(this.elemRefs)for(var D=Object.keys(f),L=0;L<D.length;L+=1){var x=D[L];if(["selector","onElementSelected"].indexOf(x)===-1){var C=null,m=null,P=null,g=s.exec(x);g&&g[1]?(C=g[1],m=c[C],P=C+":"+g[2]):P=x;for(var M=0;M<this.elemRefs.length;M+=1){var _=this.elemRefs[M];if(typeof f[x]=="function")_[x.toLowerCase()]=f[x];else{if(typeof f[x]!="string")return;this.originalValues[x]==null&&(this.originalValues[x]=_.getAttributeNS(m,P)||"");var I=f[x].replace("$ORIGINAL",this.originalValues[x]);_.setAttributeNS(m,P,I),typeof f.children=="string"&&f.children.trim().length&&(_.textContent=f.children)}}}}}},{key:"render",value:function(){var f=this;return r.default.createElement(u.default.Consumer,null,function(d){var v=d.path,b=d.svg,D=d.svgCount;f.svgCount&&f.svgCount!==D?f.onSvgUpdated():(f.svgRef=b,f.path=v,f.svgCount=D)})}}]),p}(r.default.Component);t.default=h,h.propTypes={selector:a.default.string.isRequired,onElementSelected:a.default.func},h.defaultProps={onElementSelected:function(){}}}])),Ot}var _t,tr;function ns(){return tr||(tr=1,_t=ts()),_t}var Tt=ns();class Gr extends O.Component{render(){const t=this.props,o={};function n(l){t.onChange(Number(l.target.value))}const{value:r,min:a,max:u,step:i,onChange:s,inputRef:c,...h}=t;return A.jsx("input",{ref:c,value:r,step:i,onChange:n,style:o,type:"range",min:a,max:u,...h})}}rt(Gr,"defaultProps",{step:1});function nr(e){return e*Math.PI/180}function rs(e,t){return e>=0&&t>=0?1:e<=0&&t>=0?2:e<=0&&t<=0?3:e>=0&&t<=0?4:1}function Rt(e,t){if(e===0&&t===0)return 0;let n=Math.atan(e/t)*180/Math.PI;const r=rs(e,t);return r===1&&(n=90-n),r===2&&(n=90-n),r===3&&(n=270-n),r===4&&(n=270-n),n}class rr extends O.Component{render(){const{r:t,borderColor:o="black",fillColor:n="transparent",borderWidth:r=2,fillOpacity:a=1,...u}=this.props;return A.jsx("circle",{stroke:o,fill:n,fillOpacity:a,r:t,...u})}}class os extends O.Component{render(){const{width:t=2,color:o="black",p1:n,p2:r,...a}=this.props;return A.jsx("line",{...a,stroke:o,strokeWidth:t,x1:n.x,y1:n.y,x2:r.x,y2:r.y})}}class is extends O.Component{render(){const{children:t,...o}=this.props,n={overlay:Object.assign({width:"100%",height:"100vh",top:0,left:0,zIndex:2147483647,margin:"0",padding:"0",boxSizing:"border-box",position:"fixed"},this.props.overlayStyle)};return co.createPortal(A.jsx("div",{style:n.overlay,...o,children:t}),document.body)}}class as extends O.Component{constructor(){super(...arguments);rt(this,"state",{centerX:0,centerY:0,valueMarkerX:0,valueMarkerY:0})}static getDerivedStateFromProps(o,n){if(!o.svgRef)return n;const r=o.svgRef.getBoundingClientRect(),a=r.width/2,u=o.radius*Math.cos(nr(o.valueAngle-90)),i=o.radius*Math.sin(nr(o.valueAngle-90));return{...n,centerX:r.left+a,centerY:r.top+a,valueMarkerX:u,valueMarkerY:i}}render(){const o=this.props.minimumDragDistance<=this.props.radius?"green":"grey",n=this.props.minimumDragDistance<=this.props.radius?"#88E22D":"#D8D8D8",r=this.props.minimumDragDistance>=this.props.radius;return A.jsx(is,{children:A.jsxs("svg",{style:{position:"absolute",top:"0",left:"0"},width:"100%",height:"100%",children:[A.jsx("defs",{children:A.jsx("marker",{id:"Triangle",viewBox:"0 0 10 10",refX:"1",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto",children:A.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z"})})}),A.jsx(rr,{borderColor:o,fillColor:n,fillOpacity:.02,r:this.props.radius,cx:this.state.centerX,cy:this.state.centerY}),r&&A.jsx(rr,{borderColor:o,fillColor:n,fillOpacity:0,r:this.props.minimumDragDistance,cx:this.state.centerX,cy:this.state.centerY}),A.jsx(os,{p1:{x:this.state.centerX,y:this.state.centerY},p2:{x:this.state.valueMarkerX+this.state.centerX,y:this.state.valueMarkerY+this.state.centerY},markerEnd:"url(#Triangle)"})]})})}}const ss={knobX:71,knobY:71,svg:`
|
|
32
|
+
*/(function(u,i){var s=u.location.protocol==="file:";i.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1");var c=Array.prototype.forEach||function(m,P){if(this==null||typeof m!="function")throw new TypeError;var g,M=this.length>>>0;for(g=0;g<M;++g)g in this&&m.call(P,this[g],g,this)},h={},l=0,p=[],f=[],d=function(m){return m.cloneNode(!0)},v=function(m,P){f[m]=f[m]||[],f[m].push(P)},b=function(m,P){if(h[m]!==void 0)h[m]instanceof SVGSVGElement?P(d(h[m])):v(m,P);else{if(!u.XMLHttpRequest)return P("Browser does not support XMLHttpRequest"),!1;h[m]={},v(m,P);var g=new XMLHttpRequest;g.onreadystatechange=function(){if(g.readyState===4){if(g.status===404||g.responseXML===null)return P("Unable to load SVG file: "+m),s&&P("Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver."),P(),!1;if(!(g.status===200||s&&g.status===0))return P("There was a problem injecting the SVG: "+g.status+" "+g.statusText),!1;if(g.responseXML instanceof Document)h[m]=g.responseXML.documentElement;else if(DOMParser&&DOMParser instanceof Function){var M;try{M=new DOMParser().parseFromString(g.responseText,"text/xml")}catch{M=void 0}if(!M||M.getElementsByTagName("parsererror").length)return P("Unable to parse SVG file: "+m),!1;h[m]=M.documentElement}(function(O){for(var I=0,V=f[O].length;I<V;I++)(function(U){setTimeout(function(){f[O][U](d(h[O]))},0)})(I)})(m)}},g.open("GET",m),g.overrideMimeType&&g.overrideMimeType("text/xml"),g.send()}},D=function(m,P){if(P===void 0||typeof P=="string")return!1;var g=m.getAttribute("id");g&&P.setAttribute("id",g);var M=m.getAttribute("title");M&&P.setAttribute("title",M);var O=[].concat(P.getAttribute("class")||[],"injected-svg",m.getAttribute("class")||[]).join(" ");P.setAttribute("class",function(E){for(var B={},$=(E=E.split(" ")).length,q=[];$--;)B.hasOwnProperty(E[$])||(B[E[$]]=1,q.unshift(E[$]));return q.join(" ")}(O));var I=m.getAttribute("style");I&&P.setAttribute("style",I);var V=[].filter.call(m.attributes,function(E){return/^data-\w[\w\-]*$/.test(E.name)});c.call(V,function(E){E.name&&E.value&&P.setAttribute(E.name,E.value)});var U,ne,oe,ce,Q,ie={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(ie).forEach(function(E){U=E,oe=ie[E];for(var B=0,$=(ne=P.querySelectorAll("defs "+U+"[id]")).length;B<$;B++){var q;ce=ne[B].id,Q=ce+"-"+l,c.call(oe,function(T){for(var j=0,F=(q=P.querySelectorAll("["+T+'*="'+ce+'"]')).length;j<F;j++)q[j].setAttribute(T,"url(#"+Q+")")}),ne[B].id=Q}}),P.removeAttribute("xmlns:a");var fe=P.querySelectorAll("style");if(c.call(fe,function(E){E.textContent+=""}),L(m,P),P.hasAttributes())for(var re=P.attributes,S=re.length-1;S>=0;S--)re[S].name+""+re[S].value,m.setAttribute(re[S].name,re[S].value);delete p[p.indexOf(m)],m=null,l++},L=function(m,P){if(m.innerHTML=P.innerHTML||"",!m.innerHTML){var g=i.createElement("div"),M="<svg>"+function(O){var I=new XMLSerializer;return Array.prototype.slice.call(O.childNodes).map(function(V){return I.serializeToString(V)}).join("")}(P)+"</svg>";g.innerHTML=""+M,m.textContent="",Array.prototype.slice.call(g.childNodes[0].childNodes).forEach(function(O){m.appendChild(O)})}},x=function(m,P,g,M){if(g){var O;try{O=new DOMParser().parseFromString(g,"text/xml")}catch{O=void 0}if(!O||O.getElementsByTagName("parsererror").length)return M("Unable to parse SVG file: "+O.getElementsByTagName("parsererror")[0].innerHTML),!1;D(m,O.documentElement),M()}else{var I=m.getAttribute("data-src")||m.getAttribute("src");if(m.setAttribute("src",""),p.indexOf(m)!==-1)return;p.push(m),b(I,function(V){D(m,V),M()})}},C=function(m,P,g){(P=P||{}).pngFallback;var M=P.each,O=P.svgXML;if(m.length!==void 0){var I=0;c.call(m,function(V){x(V,0,O,function(){M&&typeof M=="function"&&M(),g&&m.length===++I&&g(I)})})}else m?x(m,0,O,function(){M&&typeof M=="function"&&M(),g&&g(1),m=null}):g&&g(0)};a(n)==="object"&&a(n.exports)==="object"?n.exports=t=C:(r=(function(){return C}).call(t,o,t,n))===void 0||(n.exports=r)})(window,document)}).call(this,o(7)(e))},function(e,t){e.exports=function(o){return o.webpackPolyfill||(o.deprecate=function(){},o.paths=[],o.children||(o.children=[]),Object.defineProperty(o,"loaded",{enumerable:!0,get:function(){return o.l}}),Object.defineProperty(o,"id",{enumerable:!0,get:function(){return o.i}}),o.webpackPolyfill=1),o}},function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function l(p,f){for(var d=0;d<f.length;d++){var v=f[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}return function(p,f,d){return f&&l(p.prototype,f),d&&l(p,d),p}}(),r=i(o(0)),a=i(o(1)),u=i(o(2));function i(l){return l&&l.__esModule?l:{default:l}}var s=/(\w+)_(\S+)/,c={xlink:"http://www.w3.org/1999/xlink"},h=function(l){function p(f){(function(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")})(this,p);var d=function(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||typeof b!="object"&&typeof b!="function"?v:b}(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,f));return d.elemRefs=[],d.svgRef=null,d.path=null,d.originalValues={},d.onSvgUpdated=d.onSvgUpdated.bind(d),d.updateSvgElements=d.updateSvgElements.bind(d),d}return function(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}(p,l),n(p,[{key:"componentDidMount",value:function(){this.updateSvgElements(this.props)}},{key:"componentDidUpdate",value:function(f){this.props.selector!==f.selector&&(this.elemRefs=[]),this.updateSvgElements(this.props)}},{key:"onSvgUpdated",value:function(){this.updateSvgElements(this.props,!0)}},{key:"updateSvgElements",value:function(f,d){var v=this.svgRef;if(v&&(this.elemRefs.length===0||d)){var b=[].slice.apply(v.querySelectorAll(f.selector));b.length===0&&["svg","root"].indexOf(f.selector)!==-1&&b.push(v),f.onElementSelected&&b.length&&f.onElementSelected(b.length===1?b[0]:b),this.elemRefs=b}if(this.elemRefs)for(var D=Object.keys(f),L=0;L<D.length;L+=1){var x=D[L];if(["selector","onElementSelected"].indexOf(x)===-1){var C=null,m=null,P=null,g=s.exec(x);g&&g[1]?(C=g[1],m=c[C],P=C+":"+g[2]):P=x;for(var M=0;M<this.elemRefs.length;M+=1){var O=this.elemRefs[M];if(typeof f[x]=="function")O[x.toLowerCase()]=f[x];else{if(typeof f[x]!="string")return;this.originalValues[x]==null&&(this.originalValues[x]=O.getAttributeNS(m,P)||"");var I=f[x].replace("$ORIGINAL",this.originalValues[x]);O.setAttributeNS(m,P,I),typeof f.children=="string"&&f.children.trim().length&&(O.textContent=f.children)}}}}}},{key:"render",value:function(){var f=this;return r.default.createElement(u.default.Consumer,null,function(d){var v=d.path,b=d.svg,D=d.svgCount;f.svgCount&&f.svgCount!==D?f.onSvgUpdated():(f.svgRef=b,f.path=v,f.svgCount=D)})}}]),p}(r.default.Component);t.default=h,h.propTypes={selector:a.default.string.isRequired,onElementSelected:a.default.func},h.defaultProps={onElementSelected:function(){}}}])),_t}var Ot,tr;function ns(){return tr||(tr=1,Ot=ts()),Ot}var Tt=ns();class Vr extends _.Component{render(){const t=this.props,o={};function n(l){t.onChange(Number(l.target.value))}const{value:r,min:a,max:u,step:i,onChange:s,inputRef:c,...h}=t;return A.jsx("input",{ref:c,value:r,step:i,onChange:n,style:o,type:"range",min:a,max:u,...h})}}rt(Vr,"defaultProps",{step:1});function nr(e){return e*Math.PI/180}function rs(e,t){return e>=0&&t>=0?1:e<=0&&t>=0?2:e<=0&&t<=0?3:e>=0&&t<=0?4:1}function Rt(e,t){if(e===0&&t===0)return 0;let n=Math.atan(e/t)*180/Math.PI;const r=rs(e,t);return r===1&&(n=90-n),r===2&&(n=90-n),r===3&&(n=270-n),r===4&&(n=270-n),n}class rr extends _.Component{render(){const{r:t,borderColor:o="black",fillColor:n="transparent",borderWidth:r=2,fillOpacity:a=1,...u}=this.props;return A.jsx("circle",{stroke:o,fill:n,fillOpacity:a,r:t,...u})}}class os extends _.Component{render(){const{width:t=2,color:o="black",p1:n,p2:r,...a}=this.props;return A.jsx("line",{...a,stroke:o,strokeWidth:t,x1:n.x,y1:n.y,x2:r.x,y2:r.y})}}class is extends _.Component{render(){const{children:t,...o}=this.props,n={overlay:Object.assign({width:"100%",height:"100vh",top:0,left:0,zIndex:2147483647,margin:"0",padding:"0",boxSizing:"border-box",position:"fixed"},this.props.overlayStyle)};return lo.createPortal(A.jsx("div",{style:n.overlay,...o,children:t}),document.body)}}class as extends _.Component{constructor(){super(...arguments);rt(this,"state",{centerX:0,centerY:0,valueMarkerX:0,valueMarkerY:0})}static getDerivedStateFromProps(o,n){if(!o.svgRef)return n;const r=o.svgRef.getBoundingClientRect(),a=r.width/2,u=o.radius*Math.cos(nr(o.valueAngle-90)),i=o.radius*Math.sin(nr(o.valueAngle-90));return{...n,centerX:r.left+a,centerY:r.top+a,valueMarkerX:u,valueMarkerY:i}}render(){const o=this.props.minimumDragDistance<=this.props.radius?"green":"grey",n=this.props.minimumDragDistance<=this.props.radius?"#88E22D":"#D8D8D8",r=this.props.minimumDragDistance>=this.props.radius;return A.jsx(is,{children:A.jsxs("svg",{style:{position:"absolute",top:"0",left:"0"},width:"100%",height:"100%",children:[A.jsx("defs",{children:A.jsx("marker",{id:"Triangle",viewBox:"0 0 10 10",refX:"1",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto",children:A.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z"})})}),A.jsx(rr,{borderColor:o,fillColor:n,fillOpacity:.02,r:this.props.radius,cx:this.state.centerX,cy:this.state.centerY}),r&&A.jsx(rr,{borderColor:o,fillColor:n,fillOpacity:0,r:this.props.minimumDragDistance,cx:this.state.centerX,cy:this.state.centerY}),A.jsx(os,{p1:{x:this.state.centerX,y:this.state.centerY},p2:{x:this.state.valueMarkerX+this.state.centerX,y:this.state.valueMarkerY+this.state.centerY},markerEnd:"url(#Triangle)"})]})})}}const ss={knobX:71,knobY:71,svg:`
|
|
33
33
|
|
|
34
34
|
<svg width="204px" height="204px" viewBox="0 0 204 204" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
35
35
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
|
@@ -93,7 +93,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
93
93
|
</g>
|
|
94
94
|
</g>
|
|
95
95
|
</svg>
|
|
96
|
-
`},us=e=>{const{clampMax:t=360,clampMin:o=0,defaultValue:n=0,disabled:r=!1,format:a=T=>T.toFixed(0),max:u=100,min:i=0,onChange:s=()=>{},onEnd:c=()=>{},onStart:h=()=>{},preciseMode:l=!0,rotateDegrees:p=0,skin:f=ss,step:d=1,style:v,unlockDistance:b=100,value:D,...L}=e,[x,C]=
|
|
96
|
+
`},us=e=>{const{clampMax:t=360,clampMin:o=0,defaultValue:n=0,disabled:r=!1,format:a=T=>T.toFixed(0),max:u=100,min:i=0,onChange:s=()=>{},onEnd:c=()=>{},onStart:h=()=>{},preciseMode:l=!0,rotateDegrees:p=0,skin:f=ss,step:d=1,style:v,unlockDistance:b=100,value:D,...L}=e,[x,C]=_.useState(D!==void 0),m=_.useRef(null),P=_.useRef(null);let g,M;const[O,I]=_.useState({svgRef:void 0,dragging:!1,dragDistance:0,mousePos:{x:0,y:0},valueAngle:0,uncontrolledValue:0}),V=T=>T<0?T+360:T>360?T-360:T,U=T=>{const j=(oe()(T)+p)%360;return V(j)},ne=T=>{const j=T-p;return oe().invert(V(j))},oe=()=>((!M||M.min!==i||M.max!==u||M.clampMin!==o||M.clampMax!==t)&&(p<270&&p>90?g=cn.scaleLinear().domain([i,u]).range([o,t]):g=cn.scaleLinear().domain([u,i]).range([t,o]),g.clamp(!0),M={min:i,max:u,clampMin:o,clampMax:t}),g);_.useEffect(()=>{C(D!==void 0),I(T=>({...T,uncontrolledValue:D??n??0})),m.current&&(fn.select(m.current).on(".drag",null),r||fe(fn.select(m.current)))},[D,n,r]);const ce=T=>{O.svgRef||I({...O,svgRef:T})},Q=T=>{const j=ne(T);x||I(F=>({...F,uncontrolledValue:j})),r||s(j)},ie=()=>x?D??0:O.uncontrolledValue??0,fe=T=>{if(!(T!=null&&T.node()))return;const j=T.node();if(!j)return;let F=j.getBoundingClientRect();const G=F.width/2,W=F.height/2;let K,J,N,Z=!1;function pe(ee){if(!(ee!=null&&ee.sourceEvent)||!j)return;const se=ie();F=j.getBoundingClientRect(),T.classed("dragging",!0),h(),K={x:ee.x-G,y:ee.y-W},J=Rt(K.x,K.y),N=U(se),Z=!1}function be(ee){const se={x:ee.x-G,y:ee.y-W},_e=Math.sqrt(se.x**2+se.y**2);l?!Z&&_e>=b&&(K=se,J=Rt(se.x,se.y),Z=!0):Z=!0;const et=Rt(se.x,se.y)-J;let Pe=N+et;Pe=V(Pe),Z&&Q(Pe),I(tt=>({...tt,dragDistance:_e,mousePos:{x:ee.sourceEvent.clientX,y:ee.sourceEvent.clientY},valueAngle:Z?Pe:N}))}function Qe(){var ee;T.classed("dragging",!1),I(se=>({...se,dragging:!1})),c(),(ee=P.current)==null||ee.focus()}const Ze=uo.drag().container(()=>j).on("start",pe).on("drag",be).on("end",Qe);T.call(Ze)},re=T=>{x||I(j=>({...j,uncontrolledValue:T})),r||s(T)},S=ie(),E=U(S),B={container:Object.assign({},{width:"50px",height:"50px",overflow:"hidden",position:"relative",userSelect:"none",cursor:"crosshair"},v),input:{width:"50%",position:"absolute",top:"0",left:"-100%"}},$=f.updateAttributes,q=$?$.map((T,j)=>{let F=null;T.content&&(F=T.content(e,S));const G={};for(const W of T.attrs||[])G[W.name]=W.value(e,S);return A.jsx(Tt.SvgProxy,{selector:T.element,...G,children:F},j)}):null;return A.jsxs(A.Fragment,{children:[A.jsxs("div",{ref:m,style:B.container,...L,children:[A.jsx(Vr,{disabled:r,inputRef:P,style:B.input,value:S,min:i,max:u,step:d,onChange:re}),A.jsxs(Tt.SvgLoader,{height:"100%",svgXML:f.svg,width:"100%",onSVGReady:ce,children:[A.jsx(Tt.SvgProxy,{selector:"#knob",transform:`$ORIGINAL rotate(${E}, ${f.knobX}, ${f.knobY})`}),q]})]}),O.dragging&&l&&A.jsx(as,{svgRef:O.svgRef,radius:O.dragDistance,mousePos:O.mousePos,minimumDragDistance:b,valueAngle:O.valueAngle})]})},ls={knobX:71.44,knobY:71.44,svg:`
|
|
97
97
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="207px" height="207px" viewBox="0 0 207 207" version="1.1">
|
|
98
98
|
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
|
|
99
99
|
<desc>Created with Sketch.</desc>
|
|
@@ -182,5 +182,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
182
182
|
</g>
|
|
183
183
|
</g>
|
|
184
184
|
</svg>
|
|
185
|
-
`,updateAttributes:[{element:"#labeltext text tspan",content:(e,t)=>t.toFixed(0),attrs:[{name:"text-anchor",value:()=>"middle"},{name:"x",value:()=>"100"}]}]},
|
|
185
|
+
`,updateAttributes:[{element:"#labeltext text tspan",content:(e,t)=>t.toFixed(0),attrs:[{name:"text-anchor",value:()=>"middle"},{name:"x",value:()=>"100"}]}]},Gr=e=>{const{disabled:t=!1,max:o=127,min:n=0,onChange:r,value:a=0,wheelEnabled:u=!1,wheelSensitivity:i=.1,...s}=e,[c,h]=on(a),l=f=>{if(t)return;const d=Ee(Number.parseInt(String(f),10),o,n);h(d),r&&r(d)},p=_.useCallback(f=>{if(!u||t)return;f.preventDefault();const d=-f.deltaY*i,v=Ee(c+d,o,n);h(v),r&&r(v)},[u,t,i,c,o,n,r,h]);return A.jsx(us,{clampMax:320,clampMin:40,className:"zds-pickers__knob-container",disabled:t,onChange:l,onWheel:u?p:void 0,preciseMode:!1,rotateDegrees:180,skin:ls,style:{opacity:t?.4:1},unlockDistance:0,defaultValue:c,max:o,min:n,value:c,...s})},cs=_.forwardRef((e,t)=>{const{disabled:o,highToLow:n,includeLabel:r,includePicker:a,knobProps:u,label:i,max:s=127,min:c=0,onChange:h,shrinkLabel:l,value:p=0,wheelEnabled:f,wheelSensitivity:d=.1,...v}=e,b=_.useMemo(()=>{const D=Ne(s-c+1).map(L=>c+L).map(L=>({value:L,label:String(L)}));return n?D.reverse():D},[n,s,c]);return A.jsxs("div",{className:"zds-pickers__container",children:[!!(!l&&i)&&A.jsx("span",{className:"zds-pickers__label",children:i}),A.jsxs("div",{style:{display:"inline-flex",gap:10,alignItems:"center"},children:[!!a&&A.jsx(le,{...v,disabled:o,isDisabled:o,onChange:h,options:b,ref:t,value:p}),A.jsx(Gr,{disabled:o,max:s,min:c,onChange:h,value:p,wheelEnabled:f,wheelSensitivity:d,...u})]})]})}),fs=[{value:0,label:"Momentary"},{value:1,label:"Latching"}],ds=_.forwardRef((e,t)=>A.jsx(le,{...e,options:fs,ref:t})),ps=_.forwardRef(({allowClearing:e,...t},o)=>{const n=Fe.getStockNames(),r=Fe.getUserMappingNames(),a=_.useMemo(()=>[...e?[{value:"No Mapping",label:A.jsx("span",{className:"zds-mappings-clear-mapping",children:"No Mapping"})}]:[],{label:e?A.jsx("hr",{}):"",options:r.map(i=>({value:i,label:A.jsx("span",{className:"zds-mappings-user-mapping",children:i})}))},{label:r.length?A.jsx("hr",{}):e?A.jsx("hr",{}):"",options:n.map(i=>({label:i,value:i}))}],[e,n,r]);return A.jsx(le,{...t,options:a,ref:o})}),{midiToNoteName:hs}=bi,ms=({note:e,name:t})=>`${e} ${t.length?"-":""} ${t}`,or=(e,t)=>({label:e,value:t+1}),vs=_.forwardRef((e,t)=>{const{channel:o,disabled:n=!1,isMelodicMode:r=!1,mapping:a,onChange:u,value:i,...s}=e,c=_.useMemo(()=>r?Fe.emptyMapping().map(({note:f})=>`${hs(f,{sharps:!1}).replace("b","♭").replace("#","♯")} (#${f})`).map(or):(a||Fe.emptyMapping()).map(ms).map(or),[r,a]),[h,l]=on(i),p=_.useCallback(f=>{if(typeof f=="string")return;const d=Ee(f,128,0);d>0&&u(d),l(f)},[u,l]);return A.jsx(le,{...s,disabled:n,onChange:p,options:c,ref:t,value:h})}),Ur=21,Kr=108,ys=Kr-Ur-1,gs=ys*.7,bs=new window.AudioContext,Ps=({height:e,width:t,...o})=>{const r=(t/gs+2)/e;return A.jsx("div",{children:A.jsx(nn,{keyWidthToHeight:r,noteRange:{first:Ur,last:Kr},width:t,...o})})},Ms=({format:e,height:t,hostname:o,instrumentName:n,onChange:r,onClick:a,onDoubleClick:u,onKeyMouseEnter:i,onKeyMouseLeave:s,selectedNotes:c,soundfont:h,width:l})=>A.jsx(Br,{audioContext:bs,format:e,hostname:o,instrumentName:n,onChange:r,soundfont:h,render:({isLoading:p,playNote:f,stopNote:d})=>A.jsx(Ps,{disabled:p,height:t,onClick:a,onDoubleClick:u,onKeyMouseEnter:i,onKeyMouseLeave:s,playNote:f,selectedNotes:c,stopNote:d,width:l})}),Ss=_.forwardRef(({labelOff:e="Normally Off",labelOn:t="Normally On",...o},n)=>{const r=[{value:0,label:e},{value:1,label:t}];return A.jsx(le,{...o,options:r,ref:n})}),ir=e=>e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0},ws=e=>{const[t,o]=_.useState(ir(e?e.current:null)),n=_.useCallback(()=>{e.current&&o(ir(e.current))},[e]);return _.useLayoutEffect(()=>{if(e.current){if(n(),typeof ResizeObserver=="function"){const r=new ResizeObserver(()=>{n()});return r.observe(e.current),()=>{r.disconnect()}}return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}}},[e.current]),t},Ue=20,jt=15,Se=Ue,Le=Ue,Wr=e=>{const{Tooltip:t=Ut,autosize:o,disabled:n,inverted:r,onChange:a,value:u}=e,i=_.useRef(null),s=_.useRef(null),{height:c,width:h}=ws(i),l=o&&h||218,p=o&&c||150,f=l-Ue,d=p-Ue,v=l/2,b=p/2,D={ref:s},L=Gt.map(({value:x,label:C})=>{let m=0,P=0,g=Se,M=r?Le:d,O=f,I=r?d:Le,V=v,U=b;switch(x){case 0:m=v,P=b,U+=3;break;case 1:m=r?v+l*.13:v-l*.13,P=b-p*.13,V=r?v+l*.1:v-l*.1,U=b-p*.09;break;case 2:m=r?v+l*.25:v-l*.25,P=b-p*.25,V=r?v+l*.2:v-l*.2,U=b-p*.17;break;case 3:m=r?v+l*.35:v-l*.35,P=b-p*.35,V=r?v+l*.28:v-l*.28,U=b-p*.25;break;case 4:m=r?v-l*.13:v+l*.13,P=b+p*.13,V=r?v-l*.1:v+l*.1,U=b+p*.1;break;case 5:m=r?v-l*.25:v+l*.25,P=b+p*.25,V=r?v-l*.2:v+l*.2,U=b+p*.18;break;case 6:m=r?v-l*.35:v+l*.35,P=b+p*.35,V=r?v-l*.28:v+l*.28,U=b+p*.25;break;case 7:g=r?Se:f,M=Le,O=g,I=d,m=g,P=b,V=g-5,U=p-30;break}return{value:x,label:C,c1:m,c2:P,x1:g,y1:M,x2:O,y2:I,labelX:V,labelY:U}});return A.jsx("div",{className:"response-curve-picker",ref:i,children:A.jsxs("svg",{...D,children:[A.jsx("rect",{className:"container",height:p,rx:3,ry:3,width:l,x:0,y:0}),A.jsx(Vt,{className:"axis",textAnchor:"middle",transform:`translate(${Se-14} ${p/2}) rotate(90)`,x:0,y:0,text:"Applied force"}),A.jsx(Vt,{className:"axis",textAnchor:"middle",transform:`translate(${l/2} ${d+13})`,x:0,y:0,text:"Output (velocity)"}),A.jsx("line",{className:"axis",x1:Se,x2:Se,y1:Le,y2:d}),A.jsx("line",{className:"axis",x1:Se,x2:f,y1:d,y2:d}),L.map(({value:x,label:C,x1:m,y1:P,x2:g,y2:M,c1:O,c2:I,labelX:V,labelY:U})=>A.jsxs("g",{children:[A.jsx("path",{className:x===u?"curve-selected":"curve",d:`M${m} ${P} C ${O} ${I}, ${O} ${I}, ${g} ${M}`}),A.jsx(t,{placement:"left",title:C,children:A.jsx("rect",{className:x===u?"button-selected":"button",height:jt,onClick:n?ne=>ne:()=>a({target:{value:Number.parseInt(String(x))}}),transform:`translate(${V+3} ${U-jt/1.05}) rotate(45)`,width:jt})}),A.jsxs("text",{className:x===u?"button-selected":"button",transform:`translate(${V} ${U})`,children:[x,A.jsx("title",{children:C})]})]},x))]})})},As=_.forwardRef((e,t)=>{const{Tooltip:o=Ut,inverted:n=!1,onChange:r,value:a,...u}=e,i=_.useCallback(()=>{const c=ar("value",a)(Gt);return c?A.jsx("div",{className:"singleValue",children:c.label}):A.jsx("div",{className:"zds-pickers__placeholder",children:"Select..."})},[a]),s=_.useCallback(({setValue:c})=>A.jsx(Wr,{autosize:!0,inverted:n,onChange:({target:{value:h}})=>{c(h),r(h)},Tooltip:o,value:Number.parseInt(String(a))}),[o,n,r,a]);return A.jsx(le,{...u,components:{Placeholder:i,MenuList:s},isSearchable:!1,onChange:c=>c,ref:t,value:a})}),xs=_.forwardRef(({statuses:e,...t},o)=>A.jsx(le,{...t,options:e,ref:o})),Es=_.forwardRef((e,t)=>{const{disabled:o,highToLow:n,max:r=127,min:a=0,onChange:u,value:i=0,...s}=e,c=_.useMemo(()=>{const f=Ne(r-a+1).map(d=>a+d).map(d=>({value:d,label:d}));return n?f.reverse():f},[n,r,a]),[h,l]=on(i),p=_.useCallback(f=>{u(Ee(f,r,a)),l(Number.parseInt(String(f),10))},[r,a,u,l]);return A.jsx(le,{...s,disabled:o,onChange:p,options:c,ref:t,value:h})});exports.CCPicker=Ha;exports.ChannelMappingPicker=Ya;exports.ChannelPicker=Za;exports.DefaultTooltip=Ut;exports.KeyPicker=es;exports.Knob=Gr;exports.KnobPicker=cs;exports.LatchPicker=ds;exports.MASK_CHANNEL=lr;exports.MASK_STATUS=cr;exports.MEASUREMENT_ELEMENT_ID=$t;exports.MappingPicker=ps;exports.NotePicker=vs;exports.OctavePlayer=$r;exports.PianoPicker=Ms;exports.PolarityPicker=Ss;exports.ResponseCurve=Wr;exports.ResponseCurveLabels=It;exports.ResponseCurvePicker=As;exports.Select=le;exports.StatusPicker=xs;exports.Statuses=me;exports.SvgText=Vt;exports.ValuePicker=Es;exports.arraySequence=Ne;exports.assertRange=Ee;exports.changeControllerOptions=ur;exports.combineStatusWithChannel=ho;exports.extractStatusAndChannel=mo;exports.findObj=ar;exports.getStatusLabel=po;exports.noSelection=ve;exports.noSelectionOption=Wa;exports.omit=sr;exports.pick=co;exports.responseCurves=Gt;exports.set=fo;exports.statusOptions=fr;
|
|
186
186
|
//# sourceMappingURL=index.cjs.js.map
|