jclic 2.1.21 → 2.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/jclic-node.js +9 -8
- package/dist/jclic-node.js.map +1 -1
- package/dist/jclic.min.js +2 -2
- package/dist/jclic.min.js.map +1 -1
- package/package.json +4 -4
- package/src/GlobalData.js +1 -1
- package/src/JClicPlayer.js +2 -2
- package/src/bags/MediaBag.js +6 -5
- package/dist/1078.jclic-node.js +0 -282
- package/dist/1078.jclic-node.js.map +0 -1
- package/dist/1196.jclic-node.js +0 -808
- package/dist/1196.jclic-node.js.map +0 -1
- package/dist/1253.jclic-node.js +0 -1432
- package/dist/1253.jclic-node.js.map +0 -1
- package/dist/13.jclic-node.js +0 -103
- package/dist/13.jclic-node.js.map +0 -1
- package/dist/1567.jclic-node.js +0 -2313
- package/dist/1567.jclic-node.js.map +0 -1
- package/dist/1588.jclic-node.js +0 -602
- package/dist/1588.jclic-node.js.map +0 -1
- package/dist/1725.jclic-node.js +0 -836
- package/dist/1725.jclic-node.js.map +0 -1
- package/dist/1731.jclic-node.js +0 -438
- package/dist/1731.jclic-node.js.map +0 -1
- package/dist/1842.jclic-node.js +0 -651
- package/dist/1842.jclic-node.js.map +0 -1
- package/dist/2160.jclic-node.js +0 -1016
- package/dist/2160.jclic-node.js.map +0 -1
- package/dist/222.jclic-node.js +0 -129
- package/dist/222.jclic-node.js.map +0 -1
- package/dist/2316.jclic-node.js +0 -949
- package/dist/2316.jclic-node.js.map +0 -1
- package/dist/2355.jclic-node.js +0 -371
- package/dist/2355.jclic-node.js.map +0 -1
- package/dist/2366.jclic-node.js +0 -431
- package/dist/2366.jclic-node.js.map +0 -1
- package/dist/2379.jclic-node.js +0 -202
- package/dist/2379.jclic-node.js.map +0 -1
- package/dist/2437.jclic-node.js +0 -450
- package/dist/2437.jclic-node.js.map +0 -1
- package/dist/2531.jclic-node.js +0 -869
- package/dist/2531.jclic-node.js.map +0 -1
- package/dist/2608.jclic-node.js +0 -160
- package/dist/2608.jclic-node.js.map +0 -1
- package/dist/2715.jclic-node.js +0 -554
- package/dist/2715.jclic-node.js.map +0 -1
- package/dist/277.jclic-node.js +0 -22
- package/dist/277.jclic-node.js.map +0 -1
- package/dist/2921.jclic-node.js +0 -660
- package/dist/2921.jclic-node.js.map +0 -1
- package/dist/2952.jclic-node.js +0 -101
- package/dist/2952.jclic-node.js.map +0 -1
- package/dist/3018.jclic-node.js +0 -421
- package/dist/3018.jclic-node.js.map +0 -1
- package/dist/3019.jclic-node.js +0 -682
- package/dist/3019.jclic-node.js.map +0 -1
- package/dist/3231.jclic-node.js +0 -274
- package/dist/3231.jclic-node.js.map +0 -1
- package/dist/331.jclic-node.js +0 -115
- package/dist/331.jclic-node.js.map +0 -1
- package/dist/3391.jclic-node.js +0 -276
- package/dist/3391.jclic-node.js.map +0 -1
- package/dist/3502.jclic-node.js +0 -671
- package/dist/3502.jclic-node.js.map +0 -1
- package/dist/3653.jclic-node.js +0 -982
- package/dist/3653.jclic-node.js.map +0 -1
- package/dist/371.jclic.min.js +0 -2
- package/dist/371.jclic.min.js.map +0 -1
- package/dist/3856.jclic-node.js +0 -575
- package/dist/3856.jclic-node.js.map +0 -1
- package/dist/4112.jclic-node.js +0 -659
- package/dist/4112.jclic-node.js.map +0 -1
- package/dist/4123.jclic-node.js +0 -910
- package/dist/4123.jclic-node.js.map +0 -1
- package/dist/427.jclic-node.js +0 -894
- package/dist/427.jclic-node.js.map +0 -1
- package/dist/4483.jclic-node.js +0 -327
- package/dist/4483.jclic-node.js.map +0 -1
- package/dist/4548.jclic-node.js +0 -1078
- package/dist/4548.jclic-node.js.map +0 -1
- package/dist/466.jclic-node.js +0 -99
- package/dist/466.jclic-node.js.map +0 -1
- package/dist/485.jclic-node.js +0 -783
- package/dist/485.jclic-node.js.map +0 -1
- package/dist/4921.jclic-node.js +0 -500
- package/dist/4921.jclic-node.js.map +0 -1
- package/dist/5091.jclic-node.js +0 -239
- package/dist/5091.jclic-node.js.map +0 -1
- package/dist/520.jclic-node.js +0 -550
- package/dist/520.jclic-node.js.map +0 -1
- package/dist/5312.jclic-node.js +0 -1126
- package/dist/5312.jclic-node.js.map +0 -1
- package/dist/5338.jclic-node.js +0 -212
- package/dist/5338.jclic-node.js.map +0 -1
- package/dist/5344.jclic-node.js +0 -229
- package/dist/5344.jclic-node.js.map +0 -1
- package/dist/5550.jclic-node.js +0 -238
- package/dist/5550.jclic-node.js.map +0 -1
- package/dist/5626.jclic-node.js +0 -614
- package/dist/5626.jclic-node.js.map +0 -1
- package/dist/5977.jclic-node.js +0 -1081
- package/dist/5977.jclic-node.js.map +0 -1
- package/dist/6148.jclic-node.js +0 -345
- package/dist/6148.jclic-node.js.map +0 -1
- package/dist/6176.jclic-node.js +0 -481
- package/dist/6176.jclic-node.js.map +0 -1
- package/dist/6221.jclic-node.js +0 -1072
- package/dist/6221.jclic-node.js.map +0 -1
- package/dist/6238.jclic-node.js +0 -718
- package/dist/6238.jclic-node.js.map +0 -1
- package/dist/6454.jclic-node.js +0 -1413
- package/dist/6454.jclic-node.js.map +0 -1
- package/dist/6565.jclic-node.js +0 -294
- package/dist/6565.jclic-node.js.map +0 -1
- package/dist/6579.jclic-node.js +0 -719
- package/dist/6579.jclic-node.js.map +0 -1
- package/dist/6715.jclic-node.js +0 -148
- package/dist/6715.jclic-node.js.map +0 -1
- package/dist/6777.jclic-node.js +0 -171
- package/dist/6777.jclic-node.js.map +0 -1
- package/dist/6782.jclic-node.js +0 -1611
- package/dist/6782.jclic-node.js.map +0 -1
- package/dist/6847.jclic-node.js +0 -601
- package/dist/6847.jclic-node.js.map +0 -1
- package/dist/6856.jclic-node.js +0 -252
- package/dist/6856.jclic-node.js.map +0 -1
- package/dist/696.jclic-node.js +0 -1821
- package/dist/696.jclic-node.js.map +0 -1
- package/dist/698.jclic-node.js +0 -583
- package/dist/698.jclic-node.js.map +0 -1
- package/dist/704.jclic-node.js +0 -80
- package/dist/704.jclic-node.js.map +0 -1
- package/dist/7046.jclic-node.js +0 -735
- package/dist/7046.jclic-node.js.map +0 -1
- package/dist/7220.jclic-node.js +0 -156
- package/dist/7220.jclic-node.js.map +0 -1
- package/dist/7257.jclic-node.js +0 -931
- package/dist/7257.jclic-node.js.map +0 -1
- package/dist/743.jclic-node.js +0 -583
- package/dist/743.jclic-node.js.map +0 -1
- package/dist/757.jclic-node.js +0 -1072
- package/dist/757.jclic-node.js.map +0 -1
- package/dist/7781.jclic-node.js +0 -202
- package/dist/7781.jclic-node.js.map +0 -1
- package/dist/7912.jclic-node.js +0 -2103
- package/dist/7912.jclic-node.js.map +0 -1
- package/dist/827.jclic-node.js +0 -708
- package/dist/827.jclic-node.js.map +0 -1
- package/dist/8276.jclic-node.js +0 -409
- package/dist/8276.jclic-node.js.map +0 -1
- package/dist/8322.jclic-node.js +0 -498
- package/dist/8322.jclic-node.js.map +0 -1
- package/dist/8641.jclic-node.js +0 -360
- package/dist/8641.jclic-node.js.map +0 -1
- package/dist/8837.jclic-node.js +0 -651
- package/dist/8837.jclic-node.js.map +0 -1
- package/dist/8895.jclic-node.js +0 -151
- package/dist/8895.jclic-node.js.map +0 -1
- package/dist/9072.jclic-node.js +0 -1285
- package/dist/9072.jclic-node.js.map +0 -1
- package/dist/9078.jclic-node.js +0 -935
- package/dist/9078.jclic-node.js.map +0 -1
- package/dist/9103.jclic-node.js +0 -718
- package/dist/9103.jclic-node.js.map +0 -1
- package/dist/9359.jclic-node.js +0 -145
- package/dist/9359.jclic-node.js.map +0 -1
- package/dist/9409.jclic-node.js +0 -921
- package/dist/9409.jclic-node.js.map +0 -1
- package/dist/9513.jclic-node.js +0 -720
- package/dist/9513.jclic-node.js.map +0 -1
- package/dist/9704.jclic-node.js +0 -81
- package/dist/9704.jclic-node.js.map +0 -1
- package/dist/9950.jclic-node.js +0 -827
- package/dist/9950.jclic-node.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"4548.jclic-node.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEuB;AACqC;AACH;AACd;AACY;AACP;AACR;;AAExC;AACA,kBAAkB,yCAAyC;AAC3D,IAAI,kDAAkD,oCAAoC,uEAAuE;AACjK;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACO,gCAAgC,2DAAQ;AAC/C;AACA;AACA,aAAa,0CAA0C;AACvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA,CAAC;;AAED;AACA,QAAQ,mDAAmD,OAAO,4FAA4F;AAC9J;AACA;AACO,qCAAqC,gEAAa;AACzD;AACA;AACA,aAAa,0BAA0B,WAAW,yCAAyC;AAC3F,aAAa,gCAAgC;AAC7C;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,6CAAC;AAC9B,uCAAuC,qBAAqB;AAC5D;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA,8BAA8B,6CAAC;AAC/B,uCAAuC,qBAAqB;AAC5D;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,+DAAa;AAC9B,iBAAiB,+DAAa;;AAE9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gCAAgC,2DAAM;AACtC,gCAAgC,2DAAM;;AAEtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,mCAAmC;AACzE;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wDAAS;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC,eAAe;AACf;AACA;AACA;AACA;AACA,MAAM,wDAAM;AACZ;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,6CAAC,mBAAmB,eAAe,YAAY,gBAAgB;AACpF;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iBAAiB,KAAK,kBAAkB;AACxE,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB,KAAK,mBAAmB;AAC1E,SAAS;AACT;AACA;;AAEA;AACA,oBAAoB,8DAAY;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B,eAAe,SAAS;AACxB,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,oDAAK;AAC7D;AACA;AACA;AACA;AACA;AACA,gBAAgB,oDAAK;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,2DAA2D;AACrE;AACA,YAAY,wCAAwC;AACpD;AACA;AACA,UAAU,2DAA2D;AACrE;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA,YAAY,UAAU;AACtB;AACA,CAAC;;AAED;AACA,qDAAqD;AACrD,UAAU,OAAO;AACjB;;AAEA;AACA,iEAAe,2DAAQ,oEAAoE,EAAC;;;;;;;;;;;;;;;;ACtgB5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE6C;AACN;AACiB;AACR;;AAEhD;AACA,uBAAuB,2DAA2D;AAClF,IAAI,2CAA2C,uBAAuB,iDAAiD;AACvH;AACA;AACA;AACA;AACO,4BAA4B,wDAAY;AAC/C;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,sBAAsB;AACnC,aAAa,sBAAsB;AACnC,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,wDAAS;AAC3B,UAAU,oDAAK;AACf,UAAU,wDAAS;AACnB;AACA;;AAEA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qDAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,uEAAuE;AAC7E,aAAa,sCAAsC;AACnD,aAAa,sBAAsB;AACnC,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,gDAAgD;AAC7D,aAAa,8BAA8B;AAC3C,aAAa,8BAA8B;AAC3C;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe,wDAAS;AACxB,MAAM,yDAAQ;AACd,MAAM,yDAAQ;AACd;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA,eAAe,wDAAS;AACxB,MAAM,4DAAO;AACb,MAAM,4DAAO;AACb;;AAEA;AACA,sDAAsD,iDAAiD;AACvG;AACA;AACA,aAAa,kCAAkC;AAC/C,eAAe;AACf;AACA;AACA,eAAe,oDAAK;AACpB;;AAEA;AACA,kDAAkD,kDAAkD;AACpG;AACA;AACA,aAAa,kCAAkC;AAC/C,aAAa,kCAAkC;AAC/C,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,eAAe,oDAAK;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,CAAC;;AAED,iEAAe,aAAa,EAAC;;;;;;;;;;;;;AClL7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEwD;;AAExD;;AAEA;AACA,sDAAsD,kDAAkD;AACxG,IAAI,kDAAkD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,aAAa,sBAAsB;AACnC,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA,kDAAkD,0BAA0B;AAC5E,mBAAmB,wDAAS;AAC5B,sBAAsB,oDAAK;AAC3B,oBAAoB,oDAAK;AACzB,2BAA2B,oDAAK;AAChC;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA,gBAAgB,wDAAK;AACrB;;AAEA;AACA;AACA,aAAa,kBAAkB;AAC/B,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,oDAAK;AACzB,sBAAsB,wDAAS,kCAAkC,wDAAS;AAC1E;AACA,oBAAoB,oDAAK;AACzB,wBAAwB,wDAAS,kCAAkC,wDAAS;AAC5E;AACA;;AAEA;AACA;AACA,yBAAyB,oDAAK;AAC9B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,kBAAkB;AAC/B,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,oDAAK;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,2BAA2B;AACvC;AACA;AACA,uBAAuB,mDAAmD;AAC1E;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,YAAY,QAAQ;AACpB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,CAAC;;AAED,iEAAe,YAAY,EAAC","sources":["webpack://jclic/./src/activities/associations/SimpleAssociation.js","webpack://jclic/./src/boxes/ActiveBoxGrid.js","webpack://jclic/./src/boxes/BoxConnector.js"],"sourcesContent":["/**\n * File : activities/associations/SimpleAssociation.js\n * Created : 02/06/2015\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\nimport $ from 'jquery';\nimport { Activity, ActivityPanel } from '../../Activity.js';\nimport ActiveBoxGrid from '../../boxes/ActiveBoxGrid.js';\nimport BoxBag from '../../boxes/BoxBag.js';\nimport BoxConnector from '../../boxes/BoxConnector.js';\nimport { Rectangle, Point } from '../../AWT.js';\nimport { getMsg } from '../../Utils.js';\n\n/**\n * This class of {@link module:Activity.Activity Activity} uses two panels (`primary` and `secondary`) formed by\n * {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects filled with data stored in {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent} repositories.\n *\n * Both panels have the same number of elements, associated one-to-one. A third {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent}\n * can be used as alternative content, that will be revealed in the `primary` panel as the pairings\n * of its cells are solved.\n * @extends module:Activity.Activity\n */\nexport class SimpleAssociation extends Activity {\n /**\n * SimpleAssociation constructor\n * @param {module:project/JClicProject.JClicProject} project - The JClic project to which this activity belongs\n */\n constructor(project) {\n super(project);\n }\n\n /**\n * Retrieves the minimum number of actions needed to solve this activity.\n * @override\n * @returns {number}\n */\n getMinNumActions() {\n return this.abc.primary.getNumCells();\n }\n\n /**\n * Whether or not the activity uses random to shuffle internal components\n * @override\n * @returns {boolean}\n */\n hasRandom() {\n return true;\n }\n\n /**\n * When `true`, the activity must always be shuffled\n * @override\n * @returns {boolean}\n */\n shuffleAlways() {\n return true;\n }\n\n /**\n * Whether the activity allows the user to request help.\n * @override\n * @returns {boolean}\n */\n helpSolutionAllowed() {\n return true;\n }\n}\n\nObject.assign(SimpleAssociation.prototype, {\n /**\n * When `true`, the cell's `idAss` field will be used to check pairing matches.\n * @name module:activities/associations/SimpleAssociation.SimpleAssociation#useIdAss\n * @type {boolean} */\n useIdAss: false,\n});\n\n/**\n * The {@link module:Activity.ActivityPanel ActivityPanel} where {@link module:activities/associations/SimpleAssociation.SimpleAssociation SimpleAssociation} activities are played.\n * @extends module:Activity.ActivityPanel ActivityPanel\n */\nexport class SimpleAssociationPanel extends ActivityPanel {\n /**\n * SimpleAssociationPanel constructor\n * @param {module:Activity.Activity} act - The {@link module:Activity.Activity Activity} to which this Panel belongs\n * @param {module:JClicPlayer.JClicPlayer} ps - Any object implementing the methods defined in the\n * [PlayStation](http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/PlayStation.html) Java interface.\n * @param {external:jQuery} [$div] - The jQuery DOM element where this Panel will deploy\n */\n constructor(act, ps, $div) {\n super(act, ps, $div);\n }\n\n /**\n * Performs miscellaneous cleaning operations\n * @override\n */\n clear() {\n if (this.bgA) {\n this.bgA.end();\n this.bgA = null;\n }\n if (this.bgB) {\n this.bgB.end();\n this.bgB = null;\n }\n }\n\n /**\n * Prepares the visual components of the activity\n * @override\n */\n buildVisualComponents() {\n if (this.firstRun)\n super.buildVisualComponents();\n\n this.clear();\n\n const\n abcA = this.act.abc['primary'],\n abcB = this.act.abc['secondary'],\n solved = this.act.abc['solvedPrimary'];\n\n if (abcA && abcB) {\n if (abcA.image) {\n abcA.setImgContent(this.act.project.mediaBag, null, false);\n if (abcA.animatedGifFile && !abcA.shaper.rectangularShapes && !this.act.shuffleA)\n this.$animatedBg = $('<span/>').css({\n 'background-image': `url(${abcA.animatedGifFile})`,\n 'background-position': 'center',\n 'background-repeat': 'no-repeat',\n position: 'absolute'\n }).appendTo(this.$div);\n }\n\n if (abcB.image) {\n abcB.setImgContent(this.act.project.mediaBag, null, false);\n if (abcB.animatedGifFile && !abcB.shaper.rectangularShapes && !this.act.shuffleB)\n this.$animatedBgB = $('<span/>').css({\n 'background-image': `url(${abcB.animatedGifFile})`,\n 'background-position': 'center',\n 'background-repeat': 'no-repeat',\n position: 'absolute'\n }).appendTo(this.$div);\n }\n\n if (solved && solved.image)\n solved.setImgContent(this.act.project.mediaBag, null, false);\n\n if (this.act.acp !== null) {\n const contentKit = [abcA, abcB];\n if (solved)\n contentKit.push(solved);\n this.act.acp.generateContent(abcA.nch, abcA.ncw, contentKit, false);\n }\n\n this.bgA = ActiveBoxGrid.createEmptyGrid(null, this, this.act.margin, this.act.margin, abcA);\n this.bgB = ActiveBoxGrid.createEmptyGrid(null, this, this.act.margin, this.act.margin, abcB);\n\n this.bgA.setContent(abcA, solved ? solved : null);\n if (this.$animatedBg)\n this.bgA.setCellAttr('tmpTrans', true);\n\n this.bgB.setContent(abcB);\n if (this.$animatedBgB)\n this.bgB.setCellAttr('tmpTrans', true);\n\n this.bgA.accessibleText = getMsg('source');\n this.bgB.accessibleText = getMsg('target');\n\n this.bgA.setVisible(true);\n this.bgB.setVisible(true);\n }\n }\n\n /**\n * Basic initialization procedure\n * @override\n */\n initActivity() {\n super.initActivity();\n if (!this.firstRun)\n this.buildVisualComponents();\n else\n this.firstRun = false;\n\n if (this.bgA && this.bgB) {\n // Scramble cells\n const shuffleArray = [];\n if (this.act.shuffleA)\n shuffleArray.push(this.bgA);\n if (this.act.shuffleB)\n shuffleArray.push(this.bgB);\n if (shuffleArray.length > 0) {\n this.shuffle(shuffleArray, true, true);\n }\n\n if (this.useOrder)\n this.currentItem = this.bgA.getNextItem(-1);\n\n this.invalidate().update();\n this.setAndPlayMsg('initial', 'start');\n this.playing = true;\n }\n }\n\n /**\n * Updates the graphic content of this panel.\n * This method will be called from {@link module:AWT.Container#update} when needed.\n * @override\n * @param {module:AWT.Rectangle} dirtyRegion - Specifies the area to be updated. When `null`,\n * it's the whole panel.\n */\n updateContent(dirtyRegion) {\n super.updateContent(dirtyRegion);\n if (this.bgA && this.bgB && this.$canvas) {\n const\n canvas = this.$canvas.get(-1),\n ctx = canvas.getContext('2d');\n if (!dirtyRegion)\n dirtyRegion = new Rectangle(0, 0, canvas.width, canvas.height);\n ctx.clearRect(dirtyRegion.pos.x, dirtyRegion.pos.y, dirtyRegion.dim.width, dirtyRegion.dim.height);\n this.bgA.update(ctx, dirtyRegion);\n this.bgB.update(ctx, dirtyRegion);\n }\n return this;\n }\n\n /**\n * Sets the real dimension of this panel.\n * @override\n * @param {module:AWT.Dimension} preferredMaxSize - The maximum surface available for the activity panel\n * @returns {module:AWT.Dimension}\n */\n setDimension(preferredMaxSize) {\n return !this.bgA || !this.bgB || this.getBounds().equals(preferredMaxSize) ?\n preferredMaxSize :\n BoxBag.layoutDouble(preferredMaxSize, this.bgA, this.bgB, this.act.boxGridPos, this.act.margin);\n }\n\n /**\n * Sets the size and position of this activity panel\n * @override\n * @param {module:AWT.Rectangle} rect\n */\n setBounds(rect) {\n if (this.$canvas)\n this.$canvas.remove();\n\n super.setBounds(rect);\n if (this.bgA || this.bgB) {\n // Create the main canvas\n this.$canvas = $(`<canvas width=\"${rect.dim.width}\" height=\"${rect.dim.height}\"/>`).css({\n position: 'absolute',\n top: 0,\n left: 0\n });\n // Resize animated gif background A\n if (this.$animatedBg && this.bgA) {\n const bgRect = this.bgA.getBounds();\n this.$animatedBg.css({\n left: bgRect.pos.x,\n top: bgRect.pos.y,\n width: bgRect.dim.width + 'px',\n height: bgRect.dim.height + 'px',\n 'background-size': `${bgRect.dim.width}px ${bgRect.dim.height}px`\n });\n }\n // Resize animated gif background B\n if (this.$animatedBgB && this.bgB) {\n const bgRectB = this.bgB.getBounds();\n this.$animatedBgB.css({\n left: bgRectB.pos.x,\n top: bgRectB.pos.y,\n width: bgRectB.dim.width + 'px',\n height: bgRectB.dim.height + 'px',\n 'background-size': `${bgRectB.dim.width}px ${bgRectB.dim.height}px`\n });\n }\n this.$div.append(this.$canvas);\n\n // Create a [BoxConnector](BoxConnector.html) and attach it to the canvas context\n this.bc = new BoxConnector(this, this.$canvas);\n\n // Repaint all\n this.invalidate().update();\n }\n }\n\n /**\n * Builds the accessible components needed for this ActivityPanel\n * This method is called when all main elements are placed and visible, when the activity is ready\n * to start or when resized.\n * @override\n */\n buildAccessibleComponents() {\n if (this.$canvas && this.accessibleCanvas) {\n super.buildAccessibleComponents();\n if (this.bgA)\n this.bgA.buildAccessibleElements(this.$canvas, this.$div, 'mousedown');\n if (this.bgB)\n this.bgB.buildAccessibleElements(this.$canvas, this.$div, 'mousedown');\n }\n }\n\n /**\n * Main handler used to process mouse, touch, keyboard and edit events\n * @override\n * @param {external:Event} event - The HTML event to be processed\n * @returns {boolean} - When this event handler returns `false`, jQuery will stop its\n * propagation through the DOM tree. See: {@link http://api.jquery.com/on}\n */\n processEvent(event) {\n if (this.bc && this.playing) {\n //\n // The [AWT.Point](AWT.html#Point) where the mouse or touch event has been originated\n // and two [ActiveBox](ActiveBox.html) pointers used for the [BoxConnector](BoxConnector.html)\n // `origin` and `dest` points.\n let p = null, bx1, bx2;\n //\n // _touchend_ event don't provide pageX nor pageY information\n if (event.type === 'touchend')\n p = this.bc.active ? this.bc.dest.clone() : new Point();\n else {\n // Touch events can have more than one touch, so `pageX` must be obtained from `touches[0]`\n const\n x = event.originalEvent && event.originalEvent.touches ? event.originalEvent.touches[0].pageX : event.pageX,\n y = event.originalEvent && event.originalEvent.touches ? event.originalEvent.touches[0].pageY : event.pageY;\n p = new Point(x - this.$div.offset().left, y - this.$div.offset().top);\n }\n\n // Flag for tracking `mouseup` events\n let up = false,\n // Flag for assuring that only one media plays per event (avoid event sounds overlapping\n // cell's media sounds)\n m = false,\n // Flag for tracking clicks on the background of grid A\n clickOnBg0 = false,\n // Array to be filled with actions to be executed at the end of event processing\n delayedActions = [];\n\n switch (event.type) {\n case 'touchcancel':\n // Canvel movement\n if (this.bc.active)\n this.bc.end();\n break;\n\n case 'mouseup':\n // Don't consider drag moves below 3 pixels. Can be a \"trembling click\"\n if (this.bc.active && p.distanceTo(this.bc.origin) <= 3) {\n break;\n }\n up = true;\n /* falls through */\n case 'touchend':\n case 'touchstart':\n case 'mousedown':\n if (!this.bc.active) {\n // A new pairing starts\n //\n // Pairings can never start with a `mouseup` event\n if (up)\n break;\n\n this.ps.stopMedia(1);\n //\n // Determine if click was done on panel A or panel B\n bx1 = this.bgA ? this.bgA.findActiveBox(p) : null;\n bx2 = this.bgB ? this.bgB.findActiveBox(p) : null;\n if (bx1 && (!this.act.useOrder || bx1.idOrder === this.currentItem) ||\n !this.act.useOrder && bx2 && bx2.idAss !== -1) {\n // Start the [BoxConnector](BoxConnector.html)\n if (this.act.dragCells)\n this.bc.begin(p, bx1 || bx2);\n else\n this.bc.begin(p);\n // Play cell media or event sound\n m = m || (bx1 || bx2).playMedia(this.ps, delayedActions);\n if (!m)\n this.playEvent('click');\n\n // Move the focus to the opposite accessible group\n let bg = bx1 ? this.bgA : this.bgB;\n if (bg && bg.$accessibleDiv) {\n bg = bx1 ? this.bgB : this.bgA;\n if (bg && bg.$accessibleDiv)\n bg.$accessibleDiv.focus();\n }\n }\n } else {\n this.ps.stopMedia(1);\n // Pairing completed\n //\n // Find the active boxes behind `bc.origin` and `p`\n const origin = this.bc.origin;\n this.bc.end();\n bx1 = this.bgA ? this.bgA.findActiveBox(origin) : null;\n if (bx1) {\n bx2 = this.bgB ? this.bgB.findActiveBox(p) : null;\n } else {\n bx2 = this.bgB ? this.bgB.findActiveBox(origin) : null;\n if (bx2) {\n bx1 = this.bgA ? this.bgA.findActiveBox(p) : null;\n clickOnBg0 = true;\n }\n }\n // Check if the pairing was correct\n if (bx1 && bx2 && bx1.idAss !== -1 && bx2.idAss !== -1 && this.act.abc['secondary']) {\n let ok = false;\n const\n src = bx1.getDescription(),\n dest = bx2.getDescription(),\n matchingDest = this.act.abc['secondary'].getActiveBoxContent(bx1.idOrder);\n if (bx1.idOrder === bx2.idOrder || bx2.getContent().isEquivalent(matchingDest, true)) {\n // Pairing is OK. Play media and disable involved cells\n ok = true;\n bx1.idAss = -1;\n bx2.idAss = -1;\n if (this.act.abc['solvedPrimary']) {\n bx1.switchToAlt(this.ps);\n m = m || bx1.playMedia(this.ps, delayedActions);\n } else {\n if (clickOnBg0)\n m = m || bx1.playMedia(this.ps, delayedActions);\n else\n m = m || bx2.playMedia(this.ps, delayedActions);\n bx1.clear();\n }\n bx2.clear();\n\n if (this.act.useOrder && this.bgA)\n // Load next item\n this.currentItem = this.bgA.getNextItem(this.currentItem);\n }\n // Check results and notify action\n const cellsPlaced = this.bgB ? this.bgB.countCellsWithIdAss(-1) : 0;\n this.ps.reportNewAction(this.act, 'MATCH', src, dest, ok, cellsPlaced);\n // End activity or play event sound\n if (ok && cellsPlaced === this.bgB.getNumCells())\n this.finishActivity(true);\n else if (!m)\n this.playEvent(ok ? 'actionOk' : 'actionError');\n }\n this.update();\n\n // Move the focus to the `source` accessible group\n if (this.bgA && this.bgA.$accessibleDiv)\n this.bgA.$accessibleDiv.focus();\n }\n break;\n\n case 'mousemove':\n case 'touchmove':\n this.bc.moveTo(p);\n break;\n }\n delayedActions.forEach(action => action());\n event.preventDefault();\n }\n }\n}\n\nObject.assign(SimpleAssociationPanel.prototype, {\n /**\n * The {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} object containing the information to be displayed in the `primary` panel\n * @name module:activities/associations/SimpleAssociation.SimpleAssociationPanel#bgA\n * @type {module:boxes/ActiveBoxBag.ActiveBoxBag} */\n bgA: null,\n /**\n * The {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} object containing the information to be displayed in the `secondary` panel\n * @name module:activities/associations/SimpleAssociation.SimpleAssociationPanel#bgB\n * @type {module:boxes/ActiveBoxBag.ActiveBoxBag} */\n bgB: null,\n /**\n * The box connector\n * @name module:activities/associations/SimpleAssociation.SimpleAssociationPanel#bc\n * @type {module:boxes/BoxConnector.BoxConnector} */\n bc: null,\n /**\n * List of mouse, touch and keyboard events intercepted by this panel\n * @override\n * @name module:activities/associations/SimpleAssociation.SimpleAssociationPanel#events\n * @type {string[]} */\n events: ['mousedown', 'mouseup', 'mousemove', 'touchstart', 'touchend', 'touchmove', 'touchcancel'],\n});\n\n/**\n * Panel class associated to this type of activity: {@link module:activities/associations/SimpleAssociation.SimpleAssociationPanel SimpleAssociationPanel}\n * @type {class} */\nSimpleAssociation.Panel = SimpleAssociationPanel;\n\n// Register activity class\nexport default Activity.registerClass('@associations.SimpleAssociation', SimpleAssociation);\n","/**\n * File : boxes/ActiveBoxGrid.js\n * Created : 19/05/2015\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\nimport ActiveBoxBag from './ActiveBoxBag.js';\nimport ActiveBox from './ActiveBox.js';\nimport { Rectangle, Dimension, Point } from '../AWT.js';\nimport { settings, roundTo } from '../Utils.js';\n\n/**\n * This class extends {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} with constructors that take an argument of type\n * {@link module:shapers/Shaper.Shaper Shaper} used to build all its {@link module:boxes/ActiveBox.ActiveBox ActiveBox}components. It also maintains information\n * about the number of \"rows\" and \"columns\", useful to compute valid (integer) values when\n * resizing or moving its components.\n * @extends module:boxes/ActiveBoxBag.ActiveBoxBag\n */\nexport class ActiveBoxGrid extends ActiveBoxBag {\n /**\n * ActiveBxGrid constructor\n * @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs\n * @param {module:AWT.Container} container - The container where this box grid is placed.\n * @param {module:boxes/BoxBase} boxBase - The object where colors, fonts, border and other graphic properties\n * @param {number} px - `X` coordinate of the upper left corner of this box grid\n * @param {number} py - `Y` coordinate of the upper left corner of this box grid\n * @param {number} setWidth - Total width of the box grid\n * @param {number} setHeight - Total height of the box grid\n * @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects\n */\n constructor(parent, container, boxBase, px, py, setWidth, setHeight, sh) {\n // ActiveBoxGrid derives from ActiveBoxBag\n super(parent, container, boxBase);\n\n this.nCols = sh.nCols;\n this.nRows = sh.nRows;\n\n // This will be the enclosing rectangle of this ActiveBox bag\n const r = new Rectangle(\n new Point(px, py),\n new Dimension(\n Math.round(setWidth / this.nCols) * this.nCols,\n Math.round(setHeight / this.nRows) * this.nRows));\n\n // Create all the [ActiveBox](ActiveBox.html) objects based on the\n // shapes provided by the [Shaper](Shaper.html)\n for (let i = 0; i < sh.nCells; i++) {\n const\n tmpSh = sh.getShape(i, r),\n bx = new ActiveBox(this, container, boxBase, i, tmpSh.getBounds());\n if (!sh.rectangularShapes)\n bx.setShape(tmpSh);\n this.addActiveBox(bx);\n }\n\n // If the Shaper has `remainder` (extra space), set the background box of this\n // [BoxBag](BoxBag.html)\n if (sh.hasRemainder) {\n const\n tmpSh = sh.getRemainderShape(r),\n bx = new ActiveBox(this, container, boxBase, 0, tmpSh.getBounds());\n bx.setShape(tmpSh);\n this.setBackgroundBox(bx);\n }\n }\n\n /**\n * This factory constructor creates a new empty grid with the number of cells indicated by the\n * {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent} `abc`, not filling the cells with any content.\n * @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs\n * @param {module:AWT.Container} container - The container where this box grid is placed.\n * @param {number} px - `X` coordinate of the upper left corner of this box grid\n * @param {number} py - `Y` coordinate of the upper left corner of this box grid\n * @param {module:boxes/ActiveBagContent.ActiveBagContent} abc - Used only to get the number of cells and the shaper (when `sh` is `null`)\n * @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects\n * @param {module:boxes/BoxBase.BoxBase} boxBase - The object where colors, fonts, border and other graphic properties\n * of this box grid are defined.\n * @returns {module:boxes/ActiveBoxGrid.ActiveBoxGrid}\n */\n static createEmptyGrid(parent, container, px, py, abc, sh, boxBase) {\n const result = abc ? new ActiveBoxGrid(parent, container,\n boxBase || abc.style,\n px, py,\n abc.getTotalWidth(), abc.getTotalHeight(),\n sh || abc.getShaper()) : null;\n\n if (result)\n result.setBorder(abc.border);\n\n return result;\n }\n\n /**\n * Gets the minimum size of this grid\n * @returns {module:AWT.Dimension}\n */\n getMinimumSize() {\n return new Dimension(\n settings.MIN_CELL_SIZE * this.nCols,\n settings.MIN_CELL_SIZE * this.nRows);\n }\n\n /**\n * Gets a scaled size of this grid, rounded to the nearest integer values\n * @param {number} scale - The scale factor\n * @returns {module:AWT.Dimension}\n */\n getScaledSize(scale) {\n return new Dimension(\n roundTo(scale * this.preferredBounds.dim.width, this.nCols),\n roundTo(scale * this.preferredBounds.dim.height, this.nRows));\n }\n\n /**\n * Returns the logical coordinates of the provided {@link module:boxes/ActiveBox.ActiveBox ActiveBox}.\n * The units of the result are not pixels, but ordinal numbers (relative positions) of columns\n * and rows in the grid.\n * @param {module:boxes/ActiveBox.ActiveBox} bx - The box to process\n * @returns {module:AWT.Point}\n */\n getCoord(bx) {\n return new Point(bx.idLoc % this.nCols, Math.floor(bx.idLoc / this.nCols));\n }\n\n /**\n * Calculates the logical distance between two {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects.\n * Resulting units are not pixels, but ordinal numbers (relative positions) of columns and rows\n * in the grid.\n * @param {module:boxes/ActiveBox.ActiveBox} src - First box\n * @param {module:boxes/ActiveBox.ActiveBox} dest - Second box\n * @returns {module:AWT.Point}\n */\n getCoordDist(src, dest) {\n const\n ptSrc = this.getCoord(src),\n ptDest = this.getCoord(dest);\n return new Point(ptDest.x - ptSrc.x, ptDest.y - ptSrc.y);\n }\n}\n\nObject.assign(ActiveBoxGrid.prototype, {\n /**\n * Number of columns of this box grid\n * @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nCols\n * @type {number} */\n nCols: 1,\n /**\n * Number of rows of this box grid\n * @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nRows\n * @type {number} */\n nRows: 1,\n});\n\nexport default ActiveBoxGrid;\n","/**\n * File : boxes/BoxConnector.js\n * Created : 26/05/2015\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\nimport { Point, Dimension, Rectangle } from '../AWT.js';\n\nconst DEFAULT_COMPOSITE_OP = 'source-over';\n\n/**\n * BoxConnector allows users to visually connect two {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects of an\n * {@link module:Activity.ActivityPanel ActivityPanel}. There are two modes of operation:\n *\n * - Drawing a line between an origin point (usually the point where the user clicks on) and a\n * destination point.\n * - Dragging the ActiveBox from one location to another.\n *\n * The connecting lines can have arrowheads at its endings.\n */\nexport class BoxConnector {\n /**\n * BoxConnector constructor\n * @param {module:AWT.Container} parent - The Container to which this BoxConnector belongs\n * @param {external:jQuery} $canvas - The HTML `canvas` element where this BoxConnector will draw.\n */\n constructor(parent, $canvas) {\n this.parent = parent;\n this.ctx = $canvas.get(-1).getContext('2d', { willReadFrequently: true });\n this.dim = new Dimension(this.ctx.canvas.width, this.ctx.canvas.height);\n this.origin = new Point();\n this.dest = new Point();\n this.relativePos = new Point();\n }\n\n /**\n * Displaces the ending point of the connector\n * @param {number} dx - Displacement on the X axis\n * @param {number} dy - Displacement on the Y axis\n */\n moveBy(dx, dy) {\n this.moveTo(Point(this.dest.x + dx, this.dest.y + dy));\n }\n\n /**\n * Moves the ending point of the connector to a new position\n * @param {module:AWT.Point} pt - The new position\n * @param {boolean} forcePaint - When `true`, forces the repaint of all the area also if there is\n * no movement at all.\n */\n moveTo(pt, forcePaint) {\n if (!this.active || !forcePaint && this.dest.equals(pt))\n return;\n\n // Restore the background\n if (this.bgRect) {\n if (this.bgImg) {\n this.ctx.putImageData(\n this.bgImg,\n 0, 0,\n this.bgRect.pos.x, this.bgRect.pos.y,\n this.bgRect.dim.width, this.bgRect.dim.height);\n } else if (this.parent)\n this.parent.updateContent();\n }\n\n this.dest.moveTo(pt);\n\n // Calculate the bounds of the invalidated area after the move:\n // Start with the origin point or box area\n const pt1 = new Point(this.origin.x - this.relativePos.x, this.origin.y - this.relativePos.y);\n this.bgRect = new Rectangle(pt1, this.bx ? this.bx.dim : new Dimension());\n // Add the destination point or box area\n const pt2 = new Point(pt.x - this.relativePos.x, pt.y - this.relativePos.y);\n this.bgRect.add(new Rectangle(pt2, this.bx ? this.bx.dim : new Dimension()));\n // Add a generous border around the area\n this.bgRect.grow(10, 10);\n\n if (this.bx !== null) {\n // Move the ActiveBox\n this.bx.moveTo(new Point(pt.x - this.relativePos.x, pt.y - this.relativePos.y));\n this.bx.setTemporaryHidden(false);\n this.bx.update(this.ctx, null);\n this.bx.setTemporaryHidden(true);\n } else {\n // Draw the connecting line\n this.drawLine();\n this.linePainted = true;\n }\n }\n\n /**\n * Starts the box connector operation\n * @param {module:AWT.Point} pt - Starting point\n * @param {module:boxes/ActiveBox.ActiveBox} [box] - Passed only when the BoxConnector runs in drag&drop mode\n */\n begin(pt, box) {\n if (this.active)\n this.end();\n this.origin.moveTo(pt);\n this.dest.moveTo(pt);\n this.linePainted = false;\n this.active = true;\n\n if (box) {\n // Remember what box will be moved, hide it from the panel and repaint all\n this.bx = box;\n this.relativePos.moveTo(pt.x - box.pos.x, pt.y - box.pos.y);\n this.bx.setFocused(true);\n this.bx.setTemporaryHidden(true);\n this.linePainted = false;\n this.parent.invalidate().update();\n }\n\n // Save the full image currently displayed on the panel (with the box hidden)\n try {\n this.bgImg = this.ctx.getImageData(0, 0, this.dim.width, this.dim.height);\n } catch (_ex) {\n // Avoid \"canvas tainted by cross-origin data\" errors\n // Setting bgImg to null is less efficient, but works\n this.bgImg = null;\n }\n this.bgRect = null;\n\n // Make a first movement to make the box appear\n if (box)\n this.moveTo(pt, true);\n }\n\n /**\n * Finalizes the operation of this box connector until a new call to `begin`\n */\n end() {\n if (!this.active)\n return;\n\n this.active = false;\n this.linePainted = false;\n this.bgRect = null;\n this.bgImg = null;\n\n if (this.bx) {\n // Restore the original position and attributes of the box\n this.bx.setFocused(false);\n this.bx.moveTo(this.origin.x - this.relativePos.x, this.origin.y - this.relativePos.y);\n this.bx.setTemporaryHidden(false);\n this.bx = null;\n this.relativePos.moveTo(0, 0);\n }\n\n // Repaint all\n this.ctx.clearRect(0, 0, this.dim.width, this.dim.height);\n this.parent.invalidate().update();\n }\n\n /**\n * Strokes a line between `origin` and `dest`, optionally ended with an arrowhead.\n */\n drawLine() {\n if (this.compositeOp !== DEFAULT_COMPOSITE_OP) {\n this.ctx.strokeStyle = this.xorColor;\n this.ctx.globalCompositeOperation = this.compositeOp;\n } else\n this.ctx.strokeStyle = this.lineColor;\n\n this.ctx.lineWidth = this.lineWidth;\n\n this.ctx.beginPath();\n this.ctx.moveTo(this.origin.x, this.origin.y);\n this.ctx.lineTo(this.dest.x, this.dest.y);\n this.ctx.stroke();\n\n if (this.arrow) {\n // Draws the arrow head\n const\n beta = Math.atan2(this.origin.x - this.dest.x, this.dest.x - this.origin.x),\n arp = new Point(this.dest.x - this.arrowLength * Math.cos(beta + this.arrowAngle),\n this.dest.y + this.arrowLength * Math.sin(beta + this.arrowAngle));\n this.ctx.beginPath();\n this.ctx.moveTo(this.dest.x, this.dest.y);\n this.ctx.lineTo(arp.x, arp.y);\n this.ctx.stroke();\n\n arp.moveTo(this.dest.x - this.arrowLength * Math.cos(beta - this.arrowAngle),\n this.dest.y + this.arrowLength * Math.sin(beta - this.arrowAngle));\n this.ctx.beginPath();\n this.ctx.moveTo(this.dest.x, this.dest.y);\n this.ctx.lineTo(arp.x, arp.y);\n this.ctx.stroke();\n }\n if (this.compositeOp !== DEFAULT_COMPOSITE_OP) {\n // reset default settings\n this.ctx.globalCompositeOperation = DEFAULT_COMPOSITE_OP;\n }\n }\n}\n\nObject.assign(BoxConnector.prototype, {\n /**\n * The background image, saved and redrawn on each movement\n * @name module:boxes/BoxConnector.BoxConnector#bgImg\n * @type {external:HTMLImageElement} */\n bgImg: null,\n /**\n * The rectangle of {@link module:Activity.ActivityPanel ActivityPanel} saved in `bgImg`\n * @name module:boxes/BoxConnector.BoxConnector#bgRect\n * @type {module:AWT.Rectangle} */\n bgRect: null,\n /**\n * Initial position of the connector\n * @name module:boxes/BoxConnector.BoxConnector#origin\n * @type {module:AWT.Point} */\n origin: null,\n /**\n * Current (while moving) and final position of the connector\n * @name module:boxes/BoxConnector.BoxConnector#dest\n * @type {module:AWT.Point} */\n dest: null,\n /**\n * When `true`, the connector must end on arrowhead\n * @name module:boxes/BoxConnector.BoxConnector#arrow\n * @type {boolean} */\n arrow: false,\n /**\n * `true` while the connector is active\n * @name module:boxes/BoxConnector.BoxConnector#active\n * @type {boolean} */\n active: false,\n /**\n * `true` while the line has already been painted (used for XOR expressions)\n * @name module:boxes/BoxConnector.BoxConnector#linePainted\n * @type {boolean} */\n linePainted: false,\n /**\n * The arrowhead length (in pixels)\n * @name module:boxes/BoxConnector.BoxConnector#arrowLength\n * @type {number} */\n arrowLength: 10,\n /**\n * The arrowhead angle\n * @name module:boxes/BoxConnector.BoxConnector#arrowAngle\n * @type {number} */\n arrowAngle: Math.PI / 6,\n /**\n * The main color used in XOR operations\n * @name module:boxes/BoxConnector.BoxConnector#lineColor\n * @type {string} */\n lineColor: 'black',\n /**\n * The complementary color used in XOR operations\n * @name module:boxes/BoxConnector.BoxConnector#xorColor\n * @type {string} */\n xorColor: 'white',\n /**\n * The global composite operator used when drawing in XOR mode. Default is \"difference\".\n * For a list of possible values see:\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation}\n * @name module:boxes/BoxConnector.BoxConnector#compositeOp\n * @type {string} */\n compositeOp: 'difference',\n /**\n * The default {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation composite operator}\n * (\"source-over\").\n * @name module:boxes/BoxConnector.BoxConnector#DEFAULT_COMPOSITE_OP\n * @static\n * @type {string} */\n DEFAULT_COMPOSITE_OP: DEFAULT_COMPOSITE_OP,\n /**\n * Relative position of point B regarding A\n * @name module:boxes/BoxConnector.BoxConnector#relativePos\n * @type {module:AWT.Point} */\n relativePos: null,\n /**\n * The ActiveBox to connect or move\n * @name module:boxes/BoxConnector.BoxConnector#bx\n * @type {module:boxes/ActiveBox.ActiveBox} */\n bx: null,\n /**\n * The Graphics context where the BoxConnector will paint\n * @name module:boxes/BoxConnector.BoxConnector#ctx\n * @type {external:CanvasRenderingContext2D} */\n ctx: null,\n /**\n * The dimension of the HTML canvas where to draw\n * @name module:boxes/BoxConnector.BoxConnector#dim\n * @type {module:AWT.Dimension} */\n dim: null,\n /**\n * The container to which this connector belongs\n * @name module:boxes/BoxConnector.BoxConnector#parent\n * @type {module:AWT.Container} */\n parent: null,\n /**\n * Width of the connector line\n * @name module:boxes/BoxConnector.BoxConnector#lineWidth\n * @type {number} */\n lineWidth: 1.5,\n});\n\nexport default BoxConnector;\n"],"names":[],"sourceRoot":""}
|
package/dist/466.jclic-node.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 466;
|
|
3
|
-
exports.ids = [466];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 466:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11
|
-
/* harmony export */ });
|
|
12
|
-
/* unused harmony export OrangeSkin */
|
|
13
|
-
/* harmony import */ var _Skin_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(757);
|
|
14
|
-
/* harmony import */ var _DefaultSkin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1588);
|
|
15
|
-
/**
|
|
16
|
-
* File : skins/OrangeSkin.js
|
|
17
|
-
* Created : 04/07/2016
|
|
18
|
-
* By : Francesc Busquets <francesc@gmail.com>
|
|
19
|
-
*
|
|
20
|
-
* JClic.js
|
|
21
|
-
* An HTML5 player of JClic activities
|
|
22
|
-
* https://projectestac.github.io/jclic.js
|
|
23
|
-
*
|
|
24
|
-
* @source https://github.com/projectestac/jclic.js
|
|
25
|
-
*
|
|
26
|
-
* @license EUPL-1.2
|
|
27
|
-
* @licstart
|
|
28
|
-
* (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
|
|
29
|
-
*
|
|
30
|
-
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
31
|
-
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
32
|
-
* You may not use this work except in compliance with the Licence.
|
|
33
|
-
*
|
|
34
|
-
* You may obtain a copy of the Licence at:
|
|
35
|
-
* https://joinup.ec.europa.eu/software/page/eupl
|
|
36
|
-
*
|
|
37
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
38
|
-
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
39
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
40
|
-
* Licence for the specific language governing permissions and limitations
|
|
41
|
-
* under the Licence.
|
|
42
|
-
* @licend
|
|
43
|
-
* @module
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* This is a variant of the default {@link module:skins/Skin.Skin Skin} used by JClic.js
|
|
51
|
-
* It differs from {@link module:skins/DefaultSkin.DefaultSkin DefaultSkin} only in some colors
|
|
52
|
-
* @extends module:skins/DefaultSkin.DefaultSkin
|
|
53
|
-
*/
|
|
54
|
-
class OrangeSkin extends _DefaultSkin_js__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
55
|
-
/**
|
|
56
|
-
* OrangeSkin constructor
|
|
57
|
-
* @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and
|
|
58
|
-
* realize the media objects meeded tot build the Skin.
|
|
59
|
-
* @param {string} [name] - The skin class name
|
|
60
|
-
* @param {object} [options] - Optional parameter with additional options
|
|
61
|
-
*/
|
|
62
|
-
constructor(ps, name = null, options = {}) {
|
|
63
|
-
// OrangeSkin extends [DefaultSkin](DefaultSkin.html)
|
|
64
|
-
super(ps, name, options);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Returns the CSS styles used by this skin. This method should be called only from
|
|
69
|
-
* the `Skin` constructor, and overridded by subclasses if needed.
|
|
70
|
-
* @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'
|
|
71
|
-
* @returns {string}
|
|
72
|
-
*/
|
|
73
|
-
_getStyleSheets(media = 'default') {
|
|
74
|
-
return super._getStyleSheets(media) + (media === 'default' ? this.skinCSS : '');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
Object.assign(OrangeSkin.prototype, {
|
|
79
|
-
/**
|
|
80
|
-
* Class name of this skin. It will be used as a base selector in the definition of all CSS styles.
|
|
81
|
-
* @name module:skins/OrangeSkin.OrangeSkin#skinId
|
|
82
|
-
* @override
|
|
83
|
-
* @type {string} */
|
|
84
|
-
skinId: 'JClicOrangeSkin',
|
|
85
|
-
/**
|
|
86
|
-
* Styles used in this skin
|
|
87
|
-
* @name module:skins/OrangeSkin.OrangeSkin#skinCSS
|
|
88
|
-
* @type {string} */
|
|
89
|
-
skinCSS: '.ID {background-color:#FF8B19;}'
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Skin_js__WEBPACK_IMPORTED_MODULE_0__["default"].registerClass('orange', OrangeSkin));
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/***/ })
|
|
96
|
-
|
|
97
|
-
};
|
|
98
|
-
;
|
|
99
|
-
//# sourceMappingURL=466.jclic-node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"466.jclic-node.js","mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE6B;AACc;;AAE3C;AACA,qCAAqC,mCAAmC;AACxE,oBAAoB,wDAAwD;AAC5E;AACA;AACO,yBAAyB,uDAAW;AAC3C;AACA;AACA,aAAa,gCAAgC,mCAAmC,iDAAiD;AACjI;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,2CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,iBAAiB,0BAA0B;AAC3C,CAAC;;AAED,iEAAe,gDAAI,oCAAoC,EAAC","sources":["webpack://jclic/./src/skins/OrangeSkin.js"],"sourcesContent":["/**\n * File : skins/OrangeSkin.js\n * Created : 04/07/2016\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\nimport Skin from './Skin.js';\nimport DefaultSkin from './DefaultSkin.js';\n\n/**\n * This is a variant of the default {@link module:skins/Skin.Skin Skin} used by JClic.js\n * It differs from {@link module:skins/DefaultSkin.DefaultSkin DefaultSkin} only in some colors\n * @extends module:skins/DefaultSkin.DefaultSkin\n */\nexport class OrangeSkin extends DefaultSkin {\n /**\n * OrangeSkin constructor\n * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and\n * realize the media objects meeded tot build the Skin.\n * @param {string} [name] - The skin class name\n * @param {object} [options] - Optional parameter with additional options\n */\n constructor(ps, name = null, options = {}) {\n // OrangeSkin extends [DefaultSkin](DefaultSkin.html)\n super(ps, name, options);\n }\n\n /**\n * Returns the CSS styles used by this skin. This method should be called only from\n * the `Skin` constructor, and overridded by subclasses if needed.\n * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'\n * @returns {string}\n */\n _getStyleSheets(media = 'default') {\n return super._getStyleSheets(media) + (media === 'default' ? this.skinCSS : '');\n }\n}\n\nObject.assign(OrangeSkin.prototype, {\n /**\n * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.\n * @name module:skins/OrangeSkin.OrangeSkin#skinId\n * @override\n * @type {string} */\n skinId: 'JClicOrangeSkin',\n /**\n * Styles used in this skin\n * @name module:skins/OrangeSkin.OrangeSkin#skinCSS\n * @type {string} */\n skinCSS: '.ID {background-color:#FF8B19;}'\n});\n\nexport default Skin.registerClass('orange', OrangeSkin);\n"],"names":[],"sourceRoot":""}
|