{"version":3,"sources":["webpack://mcjs/webpack/bootstrap","webpack://mcjs/./Scripts/components/ajax.js","webpack://mcjs/./Scripts/components/general.js","webpack://mcjs/./Scripts/components/ratingBar.js","webpack://mcjs/./Scripts/main.js","webpack://mcjs/./node_modules/progressbar.js/src/circle.js","webpack://mcjs/./node_modules/progressbar.js/src/line.js","webpack://mcjs/./node_modules/progressbar.js/src/main.js","webpack://mcjs/./node_modules/progressbar.js/src/path.js","webpack://mcjs/./node_modules/progressbar.js/src/semicircle.js","webpack://mcjs/./node_modules/progressbar.js/src/shape.js","webpack://mcjs/./node_modules/progressbar.js/src/utils.js","webpack://mcjs/./node_modules/shifty/dist/shifty.js"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,+BAA+B,8BAA8B;;AAE7D;AACA;AACA;AACA;AACA,gCAAgC,8BAA8B;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,wBAAwB;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;AC/DA,mBAAmB,mBAAO,CAAC,iEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,mBAAmB,6BAA6B;AAChD,iBAAiB,6BAA6B;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,mBAAmB,mBAAmB;AACtC,iBAAiB,mBAAmB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;;AAET,2BAA2B;AAC3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,mBAAmB,mBAAmB;AACtC,iBAAiB,mBAAmB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;;AAET,2BAA2B;AAC3B;AACA;;;;;;;;;;;;;;ACpNA,CAAC,mBAAO,CAAC,uDAAmB;AAC5B,mBAAO,CAAC,6DAAsB;AAC9B,mBAAO,CAAC,iEAAwB;;;;;;;;;;;;;;;;;;;ACFhC;;AAEA,YAAY,mBAAO,CAAC,2DAAS;AAC7B,YAAY,mBAAO,CAAC,2DAAS;;AAE7B;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B,aAAa,OAAO,EAAE,OAAO,UAAU,QAAQ;AAC/C,aAAa,OAAO,EAAE,OAAO,WAAW,QAAQ;;AAEhD;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvCA;;AAEA,YAAY,mBAAO,CAAC,2DAAS;AAC7B,YAAY,mBAAO,CAAC,2DAAS;;AAE7B;AACA,+BAA+B,OAAO,QAAQ,OAAO;AACrD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA,UAAU,mBAAO,CAAC,yDAAQ;AAC1B,YAAY,mBAAO,CAAC,6DAAU;AAC9B,gBAAgB,mBAAO,CAAC,qEAAc;;AAEtC;AACA,UAAU,mBAAO,CAAC,yDAAQ;;AAE1B;AACA;AACA;AACA,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;AACA,WAAW,mBAAO,CAAC,2DAAS;AAC5B;;;;;;;;;;;;AChBA;;AAEA,gBAAgB,mBAAO,CAAC,oDAAQ;AAChC,YAAY,mBAAO,CAAC,2DAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,cAAc;AACd;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oCAAoC;;AAEpC;AACA,qCAAqC;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C,0BAA0B,oBAAoB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3KA;;AAEA,YAAY,mBAAO,CAAC,2DAAS;AAC7B,aAAa,mBAAO,CAAC,6DAAU;AAC/B,YAAY,mBAAO,CAAC,2DAAS;;AAE7B;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B,aAAa,OAAO,EAAE,OAAO,QAAQ,QAAQ;;AAE7C;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/CA;;AAEA,WAAW,mBAAO,CAAC,yDAAQ;AAC3B,YAAY,mBAAO,CAAC,2DAAS;;AAE7B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,cAAc;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7TA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA,mBAAmB,QAAQ,KAAK,iBAAiB;AACjD;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,gCAAgC;;AAEhC,mBAAmB,qBAAqB;AACxC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,2BAA2B;AAC3D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C,WAAW;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxIA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;;AAEtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA,aAAa,OAAO;AACpB;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,UAAU;AACvB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,4BAA4B;AACzC,aAAa,2BAA2B;AACxC,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,aAAa,yBAAyB;AACtC,aAAa,uBAAuB;AACpC,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,uDAAuD;AACvD,iCAAiC,YAAY,QAAQ;AACrD,qCAAqC,YAAY;AACjD,aAAa,QAAQ;AACrB,QAAQ,2CAA2C,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,QAAQ,2CAA2C,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,gEAAgE;AAChE,+BAA+B,OAAO,YAAY;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,+BAA+B,OAAO,YAAY;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA,yBAAyB;AACzB;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C,gCAAgC,YAAY;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;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;;AAEA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,IAA2B;AACjC;AACA;AACA,GAAG,MAAM,EAMN;;AAEH;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA,6BAA6B;AAC7B;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA,6BAA6B;AAC7B;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA,6BAA6B;AAC7B;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA,6BAA6B;AAC7B;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA,sBAAsB;AACtB,sBAAsB;AACtB,6BAA6B;AAC7B;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA,6BAA6B;AAC7B;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA,6BAA6B;AAC7B;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,GAAG;;AAEH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,+BAA+B;AAChE;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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO;AAChC;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,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yDAAyD;AACzD,mCAAmC,mBAAmB,YAAY;AAClE;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,2BAA2B;AAC3B,mCAAmC,mBAAmB,YAAY;AAClE;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,yCAAyC;AACzC,mCAAmC,mBAAmB,YAAY;AAClE;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc;AACd;AACA;AACA;AACA;;AAEA,CAAC;;AAED,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC;AACzC,iCAAiC,YAAY;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,0CAA0C;AAC1C;AACA;AACA;;AAEA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gCAAgC;AAChD,cAAc;AACd,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,gBAAgB,gCAAgC;AAChD,cAAc,gCAAgC;AAC9C;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC,cAAc,0BAA0B;AACxC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D,cAAc,qDAAqD;AACnE,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D,cAAc,qDAAqD;AACnE,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,IAAI;AAClC;;AAEA;;AAEA;AACA,aAAa,aAAa;AAC1B,aAAa,OAAO;AACpB;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA,eAAe,qBAAqB;AACpC;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,iBAAiB;AAC9B;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,qBAAqB;AAC1C;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,eAAe;AAC5B;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,eAAe;AAC5B;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,eAAe;AAC5B;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,iBAAiB;AACpC;AACA;;AAEA,OAAO;AACP,mBAAmB,iBAAiB;AACpC;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED,CAAC","file":"main-bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","//ajax\r\nfunction loadDoc(page, lang, region, path) {\r\n var xhttp = new XMLHttpRequest();\r\n xhttp.onreadystatechange = function () {\r\n if (this.readyState === 4 && this.status === 200) {\r\n document.getElementById(\"movie-listing\").innerHTML =\r\n this.responseText;\r\n }\r\n };\r\n xhttp.open(\"GET\", \"components/movielisting?page=\" + page + \"&lang=\" + lang + \"®ion=\" + region + \"&path=\" + path, true);\r\n xhttp.send();\r\n}","//Read more button for long texts\r\nreadMore = function () {\r\n var dots = document.getElementById(\"dots\");\r\n var moreText = document.getElementsByClassName(\"more\")[0];\r\n var btnText = document.getElementById(\"readMoreBtn\");\r\n\r\n if (dots.style.display === \"none\") {\r\n dots.style.display = \"inline\";\r\n btnText.innerHTML = \"Read more\";\r\n moreText.style.display = \"none\";\r\n } else {\r\n dots.style.display = \"none\";\r\n btnText.innerHTML = \"Read less\";\r\n moreText.style.display = \"inline\";\r\n }\r\n};\r\n\r\n\r\n//// Picture Modal\r\n\r\n// Get the image and insert it inside the modal - use its \"alt\" text as a caption\r\nconst imgForModal = document.getElementsByClassName('img-clickable');\r\n\r\nif (imgForModal) {\r\n\r\n var div = document.createElement('div');\r\n div.setAttribute('id', 'imageModal');\r\n div.setAttribute('class', 'image-modal');\r\n div.onclick = function () { modal.style.display = \"none\"; };\r\n\r\n var span = document.createElement('span');\r\n span.setAttribute('id', 'imgModalClose');\r\n span.setAttribute('class', 'image-modal-close');\r\n span.innerHTML = 'X';\r\n span.onclick = function () { modal.style.display = \"none\"; };\r\n\r\n var image = document.createElement('img');\r\n image.setAttribute('id', 'imageModalContent');\r\n image.setAttribute('class', 'image-modal-content');\r\n\r\n var modalImgCaption = document.createElement('div');\r\n modalImgCaption.setAttribute('id', 'imageModalCaption');\r\n modalImgCaption.setAttribute('class', 'image-modal-caption');\r\n\r\n div.appendChild(span);\r\n div.appendChild(image);\r\n div.appendChild(modalImgCaption);\r\n var body = document.getElementsByTagName('body')[0];\r\n body.appendChild(div);\r\n\r\n var modal = document.getElementById('imageModal');\r\n var modalImage = document.getElementById('imageModalContent');\r\n var modalImageCaption = document.getElementById('imageModalCaption');\r\n\r\n for (var a = 0; a < imgForModal.length; a++) {\r\n\r\n imgForModal.item(a).onclick = function () {\r\n\r\n modal.style.display = \"block\";\r\n modalImage.src = this.src;\r\n modalImageCaption.innerHTML = this.alt;\r\n };\r\n }\r\n}","var ProgressBar = require('progressbar.js');\r\n\r\n//circle loader\r\n// progressbar.js@1.0.0 version is used\r\n// Docs: http://progressbarjs.readthedocs.org/en/1.0.0/\r\nloadProgressBar = function (id, value, totalValue, isDecimal) {\r\n if (true) {\r\n var elem = '#' + id;\r\n ratingBar = new ProgressBar.SemiCircle(elem, {\r\n strokeWidth: 5,\r\n color: '#FFEA82',\r\n trailColor: '#eee',\r\n trailWidth: 0.1,\r\n easing: 'easeInOut',\r\n duration: 10,\r\n svgStyle: null,\r\n text: {\r\n value: '',\r\n alignToBottom: true\r\n },\r\n from: { color: '#fe323b', width: 1 },\r\n to: { color: '#00fb00', width: 5 },\r\n // Set default step function for all animate calls\r\n step: (state, bar) => {\r\n\r\n var value = Number.parseFloat(bar.value() * 100).toPrecision(2);\r\n if (isDecimal) value = Number.parseFloat(bar.value() * 10).toPrecision(2);\r\n if (value === 0) {\r\n bar.setText('');\r\n } else {\r\n if (value < 1) {\r\n bar.setText('N/A');\r\n } else {\r\n bar.setText(value + totalValue);\r\n }\r\n }\r\n if (bar.value() <= 0.2) {\r\n bar.path.setAttribute('stroke', '#fe323b');\r\n bar.text.style.color = '#fe323b';\r\n } else if (bar.value() > 0.2 && bar.value() <= 0.4) {\r\n bar.path.setAttribute('stroke', '#fa814d');\r\n bar.text.style.color = '#fa814d';\r\n } else if (bar.value() > 0.4 && bar.value() <= 0.6) {\r\n bar.path.setAttribute('stroke', '#f9ea1d');\r\n bar.text.style.color = '#f9ea1d';\r\n } else if (bar.value() > 0.6 && bar.value() <= 0.8) {\r\n bar.path.setAttribute('stroke', '#acf546');\r\n bar.text.style.color = '#acf546';\r\n } else {\r\n bar.path.setAttribute('stroke', '#00fb00');\r\n bar.text.style.color = '#00fb00';\r\n }\r\n bar.path.setAttribute('stroke-width', state.width);\r\n //bar.text.style.fontSize = '1.5rem';\r\n }\r\n });\r\n //ratingBar.text.style.fontFamily = '\"Raleway\", Helvetica, sans-serif';\r\n //ratingBar.text.style.fontSize = '1rem';\r\n ratingBar.animate(value);// Number from 0.0 to 1.0\r\n }\r\n};\r\n\r\nloadBudgetProgressBar = function (id, value) {\r\n if (true) {\r\n var elem = '#' + id;\r\n value = value / 500000000.0;\r\n\r\n var bar = new ProgressBar.Line(elem, {\r\n strokeWidth: 1,\r\n color: '#FFEA82',\r\n easing: 'easeInOut',\r\n duration: 1400,\r\n trailColor: '#eee',\r\n trailWidth: 0.1,\r\n svgStyle: {},\r\n from: { color: '#00fb00' },\r\n to: { color: '#fe323b' },\r\n text: {\r\n style: {\r\n // Text color.\r\n // Default: same as stroke color (options.color)\r\n position: 'absolute',\r\n top: '-13px',\r\n padding: 0,\r\n margin: 0,\r\n transform: null\r\n },\r\n autoStyleContainer: false\r\n },\r\n step: (state, bar) => {\r\n let barValue = Number.parseFloat(bar.value() * 500.0).toPrecision(4);\r\n if (bar.value() * 500.0 < 100 && bar.value() * 500.0 > 9) {\r\n barValue = Number.parseFloat(bar.value() * 500.0).toPrecision(3);\r\n } else if (bar.value() * 500.0 < 10) {\r\n barValue = Number.parseFloat(bar.value() * 500.0).toPrecision(2);\r\n }\r\n if (value < 0.01) {\r\n bar.setText('Budget: N/A');\r\n } else {\r\n bar.setText('Budget: $' + barValue + 'M');\r\n }\r\n if (bar.value() <= 0.2) {\r\n bar.path.setAttribute('stroke', '#00fb00');\r\n bar.text.style.color = '#00fb00';\r\n } else if (bar.value() > 0.2 && bar.value() <= 0.4) {\r\n bar.path.setAttribute('stroke', '#acf546');\r\n bar.text.style.color = '#acf546';\r\n } else if (bar.value() > 0.4 && bar.value() <= 0.6) {\r\n bar.path.setAttribute('stroke', '#f9ea1d');\r\n bar.text.style.color = '#f9ea1d';\r\n } else if (bar.value() > 0.6 && bar.value() <= 0.8) {\r\n bar.path.setAttribute('stroke', '#fa814d');\r\n bar.text.style.color = '#fa814d';\r\n } else {\r\n bar.path.setAttribute('stroke', '#fe323b');\r\n bar.text.style.color = '#fe323b';\r\n }\r\n }\r\n });\r\n\r\n bar.animate(value); // Number from 0.0 to 1.0\r\n }\r\n};\r\n\r\nloadRevenueProgressBar = function (id, value) {\r\n if (true) {\r\n var elem = '#' + id;\r\n var mark = 'M';\r\n var type = 1;\r\n value = value / 1000000.0;\r\n if (value < 500) {\r\n value = value / 500.0;\r\n } else if (value < 1000 && value >= 500) {\r\n value = value / 1000.0;\r\n type = 2;\r\n } else if (value >= 1000 && value < 2000) {\r\n value = value / 3000.0;\r\n mark = 'B';\r\n type = 3;\r\n } else {\r\n value = value / 3000.0;\r\n mark = 'B';\r\n type = 4;\r\n }\r\n var bar = new ProgressBar.Line(elem, {\r\n strokeWidth: 1,\r\n color: '#FFEA82',\r\n easing: 'easeInOut',\r\n duration: 1400,\r\n trailColor: '#eee',\r\n trailWidth: 0.1,\r\n svgStyle: {},\r\n from: { color: '#fe323b' },//#6fd57f #ED6A5A #FFEA82\r\n to: { color: '#00fb00' },\r\n text: {\r\n style: {\r\n // Text color.\r\n // Default: same as stroke color (options.color)\r\n position: 'absolute',\r\n top: '-13px',\r\n padding: 0,\r\n margin: 0,\r\n transform: null\r\n },\r\n autoStyleContainer: false\r\n },\r\n step: (state, bar) => {\r\n let barValue = Number.parseFloat(bar.value() * 500.0).toPrecision(4);\r\n if (type === 2) {\r\n barValue = Number.parseFloat(bar.value() * 1000.0).toPrecision(4);\r\n } else if (type === 3 || type === 4) {\r\n barValue = Number.parseFloat(bar.value() * 3.0).toPrecision(3);\r\n }\r\n bar.path.setAttribute('stroke', state.color);\r\n if (value < 0.01) {\r\n bar.setText('Revenue: N/A');\r\n } else {\r\n bar.setText('Revenue: $' + barValue + mark);\r\n }\r\n if (bar.value() <= 0.2) {\r\n bar.path.setAttribute('stroke', '#fe323b');\r\n bar.text.style.color = '#fe323b';\r\n } else if (bar.value() > 0.2 && bar.value() <= 0.4) {\r\n bar.path.setAttribute('stroke', '#fa814d');\r\n bar.text.style.color = '#fa814d';\r\n if (mark == 'B') {\r\n bar.path.setAttribute('stroke', '#00fb00');\r\n bar.text.style.color = '#00fb00';\r\n }\r\n } else if (bar.value() > 0.4 && bar.value() <= 0.6) {\r\n bar.path.setAttribute('stroke', '#f9ea1d');\r\n bar.text.style.color = '#f9ea1d';\r\n if (mark == 'B') {\r\n bar.path.setAttribute('stroke', '#00fb00');\r\n bar.text.style.color = '#00fb00';\r\n }\r\n } else if (bar.value() > 0.6 && bar.value() <= 0.8) {\r\n bar.path.setAttribute('stroke', '#acf546');\r\n bar.text.style.color = '#acf546';\r\n if (mark == 'B') {\r\n bar.path.setAttribute('stroke', '#00fb00');\r\n bar.text.style.color = '#00fb00';\r\n }\r\n } else {\r\n bar.path.setAttribute('stroke', '#00fb00');\r\n bar.text.style.color = '#00fb00';\r\n }\r\n }\r\n });\r\n\r\n bar.animate(value); // Number from 0.0 to 1.0\r\n }\r\n};\r\n\r\n\r\n","require('./components/ajax');\r\nrequire('./components/general');\r\nrequire('./components/ratingBar');\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","// Circle shaped progress bar\n\nvar Shape = require('./shape');\nvar utils = require('./utils');\n\nvar Circle = function Circle(container, options) {\n // Use two arcs to form a circle\n // See this answer http://stackoverflow.com/a/10477334/1446092\n this._pathTemplate =\n 'M 50,50 m 0,-{radius}' +\n ' a {radius},{radius} 0 1 1 0,{2radius}' +\n ' a {radius},{radius} 0 1 1 0,-{2radius}';\n\n this.containerAspectRatio = 1;\n\n Shape.apply(this, arguments);\n};\n\nCircle.prototype = new Shape();\nCircle.prototype.constructor = Circle;\n\nCircle.prototype._pathString = function _pathString(opts) {\n var widthOfWider = opts.strokeWidth;\n if (opts.trailWidth && opts.trailWidth > opts.strokeWidth) {\n widthOfWider = opts.trailWidth;\n }\n\n var r = 50 - widthOfWider / 2;\n\n return utils.render(this._pathTemplate, {\n radius: r,\n '2radius': r * 2\n });\n};\n\nCircle.prototype._trailString = function _trailString(opts) {\n return this._pathString(opts);\n};\n\nmodule.exports = Circle;\n","// Line shaped progress bar\n\nvar Shape = require('./shape');\nvar utils = require('./utils');\n\nvar Line = function Line(container, options) {\n this._pathTemplate = 'M 0,{center} L 100,{center}';\n Shape.apply(this, arguments);\n};\n\nLine.prototype = new Shape();\nLine.prototype.constructor = Line;\n\nLine.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n svg.setAttribute('viewBox', '0 0 100 ' + opts.strokeWidth);\n svg.setAttribute('preserveAspectRatio', 'none');\n};\n\nLine.prototype._pathString = function _pathString(opts) {\n return utils.render(this._pathTemplate, {\n center: opts.strokeWidth / 2\n });\n};\n\nLine.prototype._trailString = function _trailString(opts) {\n return this._pathString(opts);\n};\n\nmodule.exports = Line;\n","module.exports = {\n // Higher level API, different shaped progress bars\n Line: require('./line'),\n Circle: require('./circle'),\n SemiCircle: require('./semicircle'),\n\n // Lower level API to use any SVG path\n Path: require('./path'),\n\n // Base-class for creating new custom shapes\n // to be in line with the API of built-in shapes\n // Undocumented.\n Shape: require('./shape'),\n\n // Internal utils, undocumented.\n utils: require('./utils')\n};\n","// Lower level API to animate any kind of svg path\n\nvar Tweenable = require('shifty');\nvar utils = require('./utils');\n\nvar EASING_ALIASES = {\n easeIn: 'easeInCubic',\n easeOut: 'easeOutCubic',\n easeInOut: 'easeInOutCubic'\n};\n\nvar Path = function Path(path, opts) {\n // Throw a better error if not initialized with `new` keyword\n if (!(this instanceof Path)) {\n throw new Error('Constructor was called without new keyword');\n }\n\n // Default parameters for animation\n opts = utils.extend({\n duration: 800,\n easing: 'linear',\n from: {},\n to: {},\n step: function() {}\n }, opts);\n\n var element;\n if (utils.isString(path)) {\n element = document.querySelector(path);\n } else {\n element = path;\n }\n\n // Reveal .path as public attribute\n this.path = element;\n this._opts = opts;\n this._tweenable = null;\n\n // Set up the starting positions\n var length = this.path.getTotalLength();\n this.path.style.strokeDasharray = length + ' ' + length;\n this.set(0);\n};\n\nPath.prototype.value = function value() {\n var offset = this._getComputedDashOffset();\n var length = this.path.getTotalLength();\n\n var progress = 1 - offset / length;\n // Round number to prevent returning very small number like 1e-30, which\n // is practically 0\n return parseFloat(progress.toFixed(6), 10);\n};\n\nPath.prototype.set = function set(progress) {\n this.stop();\n\n this.path.style.strokeDashoffset = this._progressToOffset(progress);\n\n var step = this._opts.step;\n if (utils.isFunction(step)) {\n var easing = this._easing(this._opts.easing);\n var values = this._calculateTo(progress, easing);\n var reference = this._opts.shape || this;\n step(values, reference, this._opts.attachment);\n }\n};\n\nPath.prototype.stop = function stop() {\n this._stopTween();\n this.path.style.strokeDashoffset = this._getComputedDashOffset();\n};\n\n// Method introduced here:\n// http://jakearchibald.com/2013/animated-line-drawing-svg/\nPath.prototype.animate = function animate(progress, opts, cb) {\n opts = opts || {};\n\n if (utils.isFunction(opts)) {\n cb = opts;\n opts = {};\n }\n\n var passedOpts = utils.extend({}, opts);\n\n // Copy default opts to new object so defaults are not modified\n var defaultOpts = utils.extend({}, this._opts);\n opts = utils.extend(defaultOpts, opts);\n\n var shiftyEasing = this._easing(opts.easing);\n var values = this._resolveFromAndTo(progress, shiftyEasing, passedOpts);\n\n this.stop();\n\n // Trigger a layout so styles are calculated & the browser\n // picks up the starting position before animating\n this.path.getBoundingClientRect();\n\n var offset = this._getComputedDashOffset();\n var newOffset = this._progressToOffset(progress);\n\n var self = this;\n this._tweenable = new Tweenable();\n this._tweenable.tween({\n from: utils.extend({ offset: offset }, values.from),\n to: utils.extend({ offset: newOffset }, values.to),\n duration: opts.duration,\n easing: shiftyEasing,\n step: function(state) {\n self.path.style.strokeDashoffset = state.offset;\n var reference = opts.shape || self;\n opts.step(state, reference, opts.attachment);\n },\n finish: function(state) {\n if (utils.isFunction(cb)) {\n cb();\n }\n }\n });\n};\n\nPath.prototype._getComputedDashOffset = function _getComputedDashOffset() {\n var computedStyle = window.getComputedStyle(this.path, null);\n return parseFloat(computedStyle.getPropertyValue('stroke-dashoffset'), 10);\n};\n\nPath.prototype._progressToOffset = function _progressToOffset(progress) {\n var length = this.path.getTotalLength();\n return length - progress * length;\n};\n\n// Resolves from and to values for animation.\nPath.prototype._resolveFromAndTo = function _resolveFromAndTo(progress, easing, opts) {\n if (opts.from && opts.to) {\n return {\n from: opts.from,\n to: opts.to\n };\n }\n\n return {\n from: this._calculateFrom(easing),\n to: this._calculateTo(progress, easing)\n };\n};\n\n// Calculate `from` values from options passed at initialization\nPath.prototype._calculateFrom = function _calculateFrom(easing) {\n return Tweenable.interpolate(this._opts.from, this._opts.to, this.value(), easing);\n};\n\n// Calculate `to` values from options passed at initialization\nPath.prototype._calculateTo = function _calculateTo(progress, easing) {\n return Tweenable.interpolate(this._opts.from, this._opts.to, progress, easing);\n};\n\nPath.prototype._stopTween = function _stopTween() {\n if (this._tweenable !== null) {\n this._tweenable.stop();\n this._tweenable = null;\n }\n};\n\nPath.prototype._easing = function _easing(easing) {\n if (EASING_ALIASES.hasOwnProperty(easing)) {\n return EASING_ALIASES[easing];\n }\n\n return easing;\n};\n\nmodule.exports = Path;\n","// Semi-SemiCircle shaped progress bar\n\nvar Shape = require('./shape');\nvar Circle = require('./circle');\nvar utils = require('./utils');\n\nvar SemiCircle = function SemiCircle(container, options) {\n // Use one arc to form a SemiCircle\n // See this answer http://stackoverflow.com/a/10477334/1446092\n this._pathTemplate =\n 'M 50,50 m -{radius},0' +\n ' a {radius},{radius} 0 1 1 {2radius},0';\n\n this.containerAspectRatio = 2;\n\n Shape.apply(this, arguments);\n};\n\nSemiCircle.prototype = new Shape();\nSemiCircle.prototype.constructor = SemiCircle;\n\nSemiCircle.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n svg.setAttribute('viewBox', '0 0 100 50');\n};\n\nSemiCircle.prototype._initializeTextContainer = function _initializeTextContainer(\n opts,\n container,\n textContainer\n) {\n if (opts.text.style) {\n // Reset top style\n textContainer.style.top = 'auto';\n textContainer.style.bottom = '0';\n\n if (opts.text.alignToBottom) {\n utils.setStyle(textContainer, 'transform', 'translate(-50%, 0)');\n } else {\n utils.setStyle(textContainer, 'transform', 'translate(-50%, 50%)');\n }\n }\n};\n\n// Share functionality with Circle, just have different path\nSemiCircle.prototype._pathString = Circle.prototype._pathString;\nSemiCircle.prototype._trailString = Circle.prototype._trailString;\n\nmodule.exports = SemiCircle;\n","// Base object for different progress bar shapes\n\nvar Path = require('./path');\nvar utils = require('./utils');\n\nvar DESTROYED_ERROR = 'Object is destroyed';\n\nvar Shape = function Shape(container, opts) {\n // Throw a better error if progress bars are not initialized with `new`\n // keyword\n if (!(this instanceof Shape)) {\n throw new Error('Constructor was called without new keyword');\n }\n\n // Prevent calling constructor without parameters so inheritance\n // works correctly. To understand, this is how Shape is inherited:\n //\n // Line.prototype = new Shape();\n //\n // We just want to set the prototype for Line.\n if (arguments.length === 0) {\n return;\n }\n\n // Default parameters for progress bar creation\n this._opts = utils.extend({\n color: '#555',\n strokeWidth: 1.0,\n trailColor: null,\n trailWidth: null,\n fill: null,\n text: {\n style: {\n color: null,\n position: 'absolute',\n left: '50%',\n top: '50%',\n padding: 0,\n margin: 0,\n transform: {\n prefix: true,\n value: 'translate(-50%, -50%)'\n }\n },\n autoStyleContainer: true,\n alignToBottom: true,\n value: null,\n className: 'progressbar-text'\n },\n svgStyle: {\n display: 'block',\n width: '100%'\n },\n warnings: false\n }, opts, true); // Use recursive extend\n\n // If user specifies e.g. svgStyle or text style, the whole object\n // should replace the defaults to make working with styles easier\n if (utils.isObject(opts) && opts.svgStyle !== undefined) {\n this._opts.svgStyle = opts.svgStyle;\n }\n if (utils.isObject(opts) && utils.isObject(opts.text) && opts.text.style !== undefined) {\n this._opts.text.style = opts.text.style;\n }\n\n var svgView = this._createSvgView(this._opts);\n\n var element;\n if (utils.isString(container)) {\n element = document.querySelector(container);\n } else {\n element = container;\n }\n\n if (!element) {\n throw new Error('Container does not exist: ' + container);\n }\n\n this._container = element;\n this._container.appendChild(svgView.svg);\n if (this._opts.warnings) {\n this._warnContainerAspectRatio(this._container);\n }\n\n if (this._opts.svgStyle) {\n utils.setStyles(svgView.svg, this._opts.svgStyle);\n }\n\n // Expose public attributes before Path initialization\n this.svg = svgView.svg;\n this.path = svgView.path;\n this.trail = svgView.trail;\n this.text = null;\n\n var newOpts = utils.extend({\n attachment: undefined,\n shape: this\n }, this._opts);\n this._progressPath = new Path(svgView.path, newOpts);\n\n if (utils.isObject(this._opts.text) && this._opts.text.value !== null) {\n this.setText(this._opts.text.value);\n }\n};\n\nShape.prototype.animate = function animate(progress, opts, cb) {\n if (this._progressPath === null) {\n throw new Error(DESTROYED_ERROR);\n }\n\n this._progressPath.animate(progress, opts, cb);\n};\n\nShape.prototype.stop = function stop() {\n if (this._progressPath === null) {\n throw new Error(DESTROYED_ERROR);\n }\n\n // Don't crash if stop is called inside step function\n if (this._progressPath === undefined) {\n return;\n }\n\n this._progressPath.stop();\n};\n\nShape.prototype.destroy = function destroy() {\n if (this._progressPath === null) {\n throw new Error(DESTROYED_ERROR);\n }\n\n this.stop();\n this.svg.parentNode.removeChild(this.svg);\n this.svg = null;\n this.path = null;\n this.trail = null;\n this._progressPath = null;\n\n if (this.text !== null) {\n this.text.parentNode.removeChild(this.text);\n this.text = null;\n }\n};\n\nShape.prototype.set = function set(progress) {\n if (this._progressPath === null) {\n throw new Error(DESTROYED_ERROR);\n }\n\n this._progressPath.set(progress);\n};\n\nShape.prototype.value = function value() {\n if (this._progressPath === null) {\n throw new Error(DESTROYED_ERROR);\n }\n\n if (this._progressPath === undefined) {\n return 0;\n }\n\n return this._progressPath.value();\n};\n\nShape.prototype.setText = function setText(newText) {\n if (this._progressPath === null) {\n throw new Error(DESTROYED_ERROR);\n }\n\n if (this.text === null) {\n // Create new text node\n this.text = this._createTextContainer(this._opts, this._container);\n this._container.appendChild(this.text);\n }\n\n // Remove previous text and add new\n if (utils.isObject(newText)) {\n utils.removeChildren(this.text);\n this.text.appendChild(newText);\n } else {\n this.text.innerHTML = newText;\n }\n};\n\nShape.prototype._createSvgView = function _createSvgView(opts) {\n var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n this._initializeSvg(svg, opts);\n\n var trailPath = null;\n // Each option listed in the if condition are 'triggers' for creating\n // the trail path\n if (opts.trailColor || opts.trailWidth) {\n trailPath = this._createTrail(opts);\n svg.appendChild(trailPath);\n }\n\n var path = this._createPath(opts);\n svg.appendChild(path);\n\n return {\n svg: svg,\n path: path,\n trail: trailPath\n };\n};\n\nShape.prototype._initializeSvg = function _initializeSvg(svg, opts) {\n svg.setAttribute('viewBox', '0 0 100 100');\n};\n\nShape.prototype._createPath = function _createPath(opts) {\n var pathString = this._pathString(opts);\n return this._createPathElement(pathString, opts);\n};\n\nShape.prototype._createTrail = function _createTrail(opts) {\n // Create path string with original passed options\n var pathString = this._trailString(opts);\n\n // Prevent modifying original\n var newOpts = utils.extend({}, opts);\n\n // Defaults for parameters which modify trail path\n if (!newOpts.trailColor) {\n newOpts.trailColor = '#eee';\n }\n if (!newOpts.trailWidth) {\n newOpts.trailWidth = newOpts.strokeWidth;\n }\n\n newOpts.color = newOpts.trailColor;\n newOpts.strokeWidth = newOpts.trailWidth;\n\n // When trail path is set, fill must be set for it instead of the\n // actual path to prevent trail stroke from clipping\n newOpts.fill = null;\n\n return this._createPathElement(pathString, newOpts);\n};\n\nShape.prototype._createPathElement = function _createPathElement(pathString, opts) {\n var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n path.setAttribute('d', pathString);\n path.setAttribute('stroke', opts.color);\n path.setAttribute('stroke-width', opts.strokeWidth);\n\n if (opts.fill) {\n path.setAttribute('fill', opts.fill);\n } else {\n path.setAttribute('fill-opacity', '0');\n }\n\n return path;\n};\n\nShape.prototype._createTextContainer = function _createTextContainer(opts, container) {\n var textContainer = document.createElement('div');\n textContainer.className = opts.text.className;\n\n var textStyle = opts.text.style;\n if (textStyle) {\n if (opts.text.autoStyleContainer) {\n container.style.position = 'relative';\n }\n\n utils.setStyles(textContainer, textStyle);\n // Default text color to progress bar's color\n if (!textStyle.color) {\n textContainer.style.color = opts.color;\n }\n }\n\n this._initializeTextContainer(opts, container, textContainer);\n return textContainer;\n};\n\n// Give custom shapes possibility to modify text element\nShape.prototype._initializeTextContainer = function(opts, container, element) {\n // By default, no-op\n // Custom shapes should respect API options, such as text.style\n};\n\nShape.prototype._pathString = function _pathString(opts) {\n throw new Error('Override this function for each progress bar');\n};\n\nShape.prototype._trailString = function _trailString(opts) {\n throw new Error('Override this function for each progress bar');\n};\n\nShape.prototype._warnContainerAspectRatio = function _warnContainerAspectRatio(container) {\n if (!this.containerAspectRatio) {\n return;\n }\n\n var computedStyle = window.getComputedStyle(container, null);\n var width = parseFloat(computedStyle.getPropertyValue('width'), 10);\n var height = parseFloat(computedStyle.getPropertyValue('height'), 10);\n if (!utils.floatEquals(this.containerAspectRatio, width / height)) {\n console.warn(\n 'Incorrect aspect ratio of container',\n '#' + container.id,\n 'detected:',\n computedStyle.getPropertyValue('width') + '(width)',\n '/',\n computedStyle.getPropertyValue('height') + '(height)',\n '=',\n width / height\n );\n\n console.warn(\n 'Aspect ratio of should be',\n this.containerAspectRatio\n );\n }\n};\n\nmodule.exports = Shape;\n","// Utility functions\n\nvar PREFIXES = 'Webkit Moz O ms'.split(' ');\nvar FLOAT_COMPARISON_EPSILON = 0.001;\n\n// Copy all attributes from source object to destination object.\n// destination object is mutated.\nfunction extend(destination, source, recursive) {\n destination = destination || {};\n source = source || {};\n recursive = recursive || false;\n\n for (var attrName in source) {\n if (source.hasOwnProperty(attrName)) {\n var destVal = destination[attrName];\n var sourceVal = source[attrName];\n if (recursive && isObject(destVal) && isObject(sourceVal)) {\n destination[attrName] = extend(destVal, sourceVal, recursive);\n } else {\n destination[attrName] = sourceVal;\n }\n }\n }\n\n return destination;\n}\n\n// Renders templates with given variables. Variables must be surrounded with\n// braces without any spaces, e.g. {variable}\n// All instances of variable placeholders will be replaced with given content\n// Example:\n// render('Hello, {message}!', {message: 'world'})\nfunction render(template, vars) {\n var rendered = template;\n\n for (var key in vars) {\n if (vars.hasOwnProperty(key)) {\n var val = vars[key];\n var regExpString = '\\\\{' + key + '\\\\}';\n var regExp = new RegExp(regExpString, 'g');\n\n rendered = rendered.replace(regExp, val);\n }\n }\n\n return rendered;\n}\n\nfunction setStyle(element, style, value) {\n var elStyle = element.style; // cache for performance\n\n for (var i = 0; i < PREFIXES.length; ++i) {\n var prefix = PREFIXES[i];\n elStyle[prefix + capitalize(style)] = value;\n }\n\n elStyle[style] = value;\n}\n\nfunction setStyles(element, styles) {\n forEachObject(styles, function(styleValue, styleName) {\n // Allow disabling some individual styles by setting them\n // to null or undefined\n if (styleValue === null || styleValue === undefined) {\n return;\n }\n\n // If style's value is {prefix: true, value: '50%'},\n // Set also browser prefixed styles\n if (isObject(styleValue) && styleValue.prefix === true) {\n setStyle(element, styleName, styleValue.value);\n } else {\n element.style[styleName] = styleValue;\n }\n });\n}\n\nfunction capitalize(text) {\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\nfunction isString(obj) {\n return typeof obj === 'string' || obj instanceof String;\n}\n\nfunction isFunction(obj) {\n return typeof obj === 'function';\n}\n\nfunction isArray(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n}\n\n// Returns true if `obj` is object as in {a: 1, b: 2}, not if it's function or\n// array\nfunction isObject(obj) {\n if (isArray(obj)) {\n return false;\n }\n\n var type = typeof obj;\n return type === 'object' && !!obj;\n}\n\nfunction forEachObject(object, callback) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n var val = object[key];\n callback(val, key);\n }\n }\n}\n\nfunction floatEquals(a, b) {\n return Math.abs(a - b) < FLOAT_COMPARISON_EPSILON;\n}\n\n// https://coderwall.com/p/nygghw/don-t-use-innerhtml-to-empty-dom-elements\nfunction removeChildren(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n}\n\nmodule.exports = {\n extend: extend,\n render: render,\n setStyle: setStyle,\n setStyles: setStyles,\n capitalize: capitalize,\n isString: isString,\n isFunction: isFunction,\n isObject: isObject,\n forEachObject: forEachObject,\n floatEquals: floatEquals,\n removeChildren: removeChildren\n};\n","/* shifty - v1.5.3 - 2016-11-29 - http://jeremyckahn.github.io/shifty */\n;(function () {\n var root = this || Function('return this')();\n\n/**\n * Shifty Core\n * By Jeremy Kahn - jeremyckahn@gmail.com\n */\n\nvar Tweenable = (function () {\n\n 'use strict';\n\n // Aliases that get defined later in this function\n var formula;\n\n // CONSTANTS\n var DEFAULT_SCHEDULE_FUNCTION;\n var DEFAULT_EASING = 'linear';\n var DEFAULT_DURATION = 500;\n var UPDATE_TIME = 1000 / 60;\n\n var _now = Date.now\n ? Date.now\n : function () {return +new Date();};\n\n var now = typeof SHIFTY_DEBUG_NOW !== 'undefined' ? SHIFTY_DEBUG_NOW : _now;\n\n if (typeof window !== 'undefined') {\n // requestAnimationFrame() shim by Paul Irish (modified for Shifty)\n // http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n DEFAULT_SCHEDULE_FUNCTION = window.requestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.oRequestAnimationFrame\n || window.msRequestAnimationFrame\n || (window.mozCancelRequestAnimationFrame\n && window.mozRequestAnimationFrame)\n || setTimeout;\n } else {\n DEFAULT_SCHEDULE_FUNCTION = setTimeout;\n }\n\n function noop () {\n // NOOP!\n }\n\n /**\n * Handy shortcut for doing a for-in loop. This is not a \"normal\" each\n * function, it is optimized for Shifty. The iterator function only receives\n * the property name, not the value.\n * @param {Object} obj\n * @param {Function(string)} fn\n * @private\n */\n function each (obj, fn) {\n var key;\n for (key in obj) {\n if (Object.hasOwnProperty.call(obj, key)) {\n fn(key);\n }\n }\n }\n\n /**\n * Perform a shallow copy of Object properties.\n * @param {Object} targetObject The object to copy into\n * @param {Object} srcObject The object to copy from\n * @return {Object} A reference to the augmented `targetObj` Object\n * @private\n */\n function shallowCopy (targetObj, srcObj) {\n each(srcObj, function (prop) {\n targetObj[prop] = srcObj[prop];\n });\n\n return targetObj;\n }\n\n /**\n * Copies each property from src onto target, but only if the property to\n * copy to target is undefined.\n * @param {Object} target Missing properties in this Object are filled in\n * @param {Object} src\n * @private\n */\n function defaults (target, src) {\n each(src, function (prop) {\n if (typeof target[prop] === 'undefined') {\n target[prop] = src[prop];\n }\n });\n }\n\n /**\n * Calculates the interpolated tween values of an Object for a given\n * timestamp.\n * @param {Number} forPosition The position to compute the state for.\n * @param {Object} currentState Current state properties.\n * @param {Object} originalState: The original state properties the Object is\n * tweening from.\n * @param {Object} targetState: The destination state properties the Object\n * is tweening to.\n * @param {number} duration: The length of the tween in milliseconds.\n * @param {number} timestamp: The UNIX epoch time at which the tween began.\n * @param {Object} easing: This Object's keys must correspond to the keys in\n * targetState.\n * @private\n */\n function tweenProps (forPosition, currentState, originalState, targetState,\n duration, timestamp, easing) {\n var normalizedPosition =\n forPosition < timestamp ? 0 : (forPosition - timestamp) / duration;\n\n\n var prop;\n var easingObjectProp;\n var easingFn;\n for (prop in currentState) {\n if (currentState.hasOwnProperty(prop)) {\n easingObjectProp = easing[prop];\n easingFn = typeof easingObjectProp === 'function'\n ? easingObjectProp\n : formula[easingObjectProp];\n\n currentState[prop] = tweenProp(\n originalState[prop],\n targetState[prop],\n easingFn,\n normalizedPosition\n );\n }\n }\n\n return currentState;\n }\n\n /**\n * Tweens a single property.\n * @param {number} start The value that the tween started from.\n * @param {number} end The value that the tween should end at.\n * @param {Function} easingFunc The easing curve to apply to the tween.\n * @param {number} position The normalized position (between 0.0 and 1.0) to\n * calculate the midpoint of 'start' and 'end' against.\n * @return {number} The tweened value.\n * @private\n */\n function tweenProp (start, end, easingFunc, position) {\n return start + (end - start) * easingFunc(position);\n }\n\n /**\n * Applies a filter to Tweenable instance.\n * @param {Tweenable} tweenable The `Tweenable` instance to call the filter\n * upon.\n * @param {String} filterName The name of the filter to apply.\n * @private\n */\n function applyFilter (tweenable, filterName) {\n var filters = Tweenable.prototype.filter;\n var args = tweenable._filterArgs;\n\n each(filters, function (name) {\n if (typeof filters[name][filterName] !== 'undefined') {\n filters[name][filterName].apply(tweenable, args);\n }\n });\n }\n\n var timeoutHandler_endTime;\n var timeoutHandler_currentTime;\n var timeoutHandler_isEnded;\n var timeoutHandler_offset;\n /**\n * Handles the update logic for one step of a tween.\n * @param {Tweenable} tweenable\n * @param {number} timestamp\n * @param {number} delay\n * @param {number} duration\n * @param {Object} currentState\n * @param {Object} originalState\n * @param {Object} targetState\n * @param {Object} easing\n * @param {Function(Object, *, number)} step\n * @param {Function(Function,number)}} schedule\n * @param {number=} opt_currentTimeOverride Needed for accurate timestamp in\n * Tweenable#seek.\n * @private\n */\n function timeoutHandler (tweenable, timestamp, delay, duration, currentState,\n originalState, targetState, easing, step, schedule,\n opt_currentTimeOverride) {\n\n timeoutHandler_endTime = timestamp + delay + duration;\n\n timeoutHandler_currentTime =\n Math.min(opt_currentTimeOverride || now(), timeoutHandler_endTime);\n\n timeoutHandler_isEnded =\n timeoutHandler_currentTime >= timeoutHandler_endTime;\n\n timeoutHandler_offset = duration - (\n timeoutHandler_endTime - timeoutHandler_currentTime);\n\n if (tweenable.isPlaying()) {\n if (timeoutHandler_isEnded) {\n step(targetState, tweenable._attachment, timeoutHandler_offset);\n tweenable.stop(true);\n } else {\n tweenable._scheduleId =\n schedule(tweenable._timeoutHandler, UPDATE_TIME);\n\n applyFilter(tweenable, 'beforeTween');\n\n // If the animation has not yet reached the start point (e.g., there was\n // delay that has not yet completed), just interpolate the starting\n // position of the tween.\n if (timeoutHandler_currentTime < (timestamp + delay)) {\n tweenProps(1, currentState, originalState, targetState, 1, 1, easing);\n } else {\n tweenProps(timeoutHandler_currentTime, currentState, originalState,\n targetState, duration, timestamp + delay, easing);\n }\n\n applyFilter(tweenable, 'afterTween');\n\n step(currentState, tweenable._attachment, timeoutHandler_offset);\n }\n }\n }\n\n\n /**\n * Creates a usable easing Object from a string, a function or another easing\n * Object. If `easing` is an Object, then this function clones it and fills\n * in the missing properties with `\"linear\"`.\n * @param {Object.} fromTweenParams\n * @param {Object|string|Function} easing\n * @return {Object.}\n * @private\n */\n function composeEasingObject (fromTweenParams, easing) {\n var composedEasing = {};\n var typeofEasing = typeof easing;\n\n if (typeofEasing === 'string' || typeofEasing === 'function') {\n each(fromTweenParams, function (prop) {\n composedEasing[prop] = easing;\n });\n } else {\n each(fromTweenParams, function (prop) {\n if (!composedEasing[prop]) {\n composedEasing[prop] = easing[prop] || DEFAULT_EASING;\n }\n });\n }\n\n return composedEasing;\n }\n\n /**\n * Tweenable constructor.\n * @class Tweenable\n * @param {Object=} opt_initialState The values that the initial tween should\n * start at if a `from` object is not provided to `{{#crossLink\n * \"Tweenable/tween:method\"}}{{/crossLink}}` or `{{#crossLink\n * \"Tweenable/setConfig:method\"}}{{/crossLink}}`.\n * @param {Object=} opt_config Configuration object to be passed to\n * `{{#crossLink \"Tweenable/setConfig:method\"}}{{/crossLink}}`.\n * @module Tweenable\n * @constructor\n */\n function Tweenable (opt_initialState, opt_config) {\n this._currentState = opt_initialState || {};\n this._configured = false;\n this._scheduleFunction = DEFAULT_SCHEDULE_FUNCTION;\n\n // To prevent unnecessary calls to setConfig do not set default\n // configuration here. Only set default configuration immediately before\n // tweening if none has been set.\n if (typeof opt_config !== 'undefined') {\n this.setConfig(opt_config);\n }\n }\n\n /**\n * Configure and start a tween.\n * @method tween\n * @param {Object=} opt_config Configuration object to be passed to\n * `{{#crossLink \"Tweenable/setConfig:method\"}}{{/crossLink}}`.\n * @chainable\n */\n Tweenable.prototype.tween = function (opt_config) {\n if (this._isTweening) {\n return this;\n }\n\n // Only set default config if no configuration has been set previously and\n // none is provided now.\n if (opt_config !== undefined || !this._configured) {\n this.setConfig(opt_config);\n }\n\n this._timestamp = now();\n this._start(this.get(), this._attachment);\n return this.resume();\n };\n\n /**\n * Configure a tween that will start at some point in the future.\n *\n * @method setConfig\n * @param {Object} config The following values are valid:\n * - __from__ (_Object=_): Starting position. If omitted, `{{#crossLink\n * \"Tweenable/get:method\"}}get(){{/crossLink}}` is used.\n * - __to__ (_Object=_): Ending position.\n * - __duration__ (_number=_): How many milliseconds to animate for.\n * - __delay__ (_delay=_): How many milliseconds to wait before starting the\n * tween.\n * - __start__ (_Function(Object, *)_): Function to execute when the tween\n * begins. Receives the state of the tween as the first parameter and\n * `attachment` as the second parameter.\n * - __step__ (_Function(Object, *, number)_): Function to execute on every\n * tick. Receives `{{#crossLink\n * \"Tweenable/get:method\"}}get(){{/crossLink}}` as the first parameter,\n * `attachment` as the second parameter, and the time elapsed since the\n * start of the tween as the third. This function is not called on the\n * final step of the animation, but `finish` is.\n * - __finish__ (_Function(Object, *)_): Function to execute upon tween\n * completion. Receives the state of the tween as the first parameter and\n * `attachment` as the second parameter.\n * - __easing__ (_Object.|string|Function=_): Easing curve\n * name(s) or function(s) to use for the tween.\n * - __attachment__ (_*_): Cached value that is passed to the\n * `step`/`start`/`finish` methods.\n * @chainable\n */\n Tweenable.prototype.setConfig = function (config) {\n config = config || {};\n this._configured = true;\n\n // Attach something to this Tweenable instance (e.g.: a DOM element, an\n // object, a string, etc.);\n this._attachment = config.attachment;\n\n // Init the internal state\n this._pausedAtTime = null;\n this._scheduleId = null;\n this._delay = config.delay || 0;\n this._start = config.start || noop;\n this._step = config.step || noop;\n this._finish = config.finish || noop;\n this._duration = config.duration || DEFAULT_DURATION;\n this._currentState = shallowCopy({}, config.from || this.get());\n this._originalState = this.get();\n this._targetState = shallowCopy({}, config.to || this.get());\n\n var self = this;\n this._timeoutHandler = function () {\n timeoutHandler(self,\n self._timestamp,\n self._delay,\n self._duration,\n self._currentState,\n self._originalState,\n self._targetState,\n self._easing,\n self._step,\n self._scheduleFunction\n );\n };\n\n // Aliases used below\n var currentState = this._currentState;\n var targetState = this._targetState;\n\n // Ensure that there is always something to tween to.\n defaults(targetState, currentState);\n\n this._easing = composeEasingObject(\n currentState, config.easing || DEFAULT_EASING);\n\n this._filterArgs =\n [currentState, this._originalState, targetState, this._easing];\n\n applyFilter(this, 'tweenCreated');\n return this;\n };\n\n /**\n * @method get\n * @return {Object} The current state.\n */\n Tweenable.prototype.get = function () {\n return shallowCopy({}, this._currentState);\n };\n\n /**\n * @method set\n * @param {Object} state The current state.\n */\n Tweenable.prototype.set = function (state) {\n this._currentState = state;\n };\n\n /**\n * Pause a tween. Paused tweens can be resumed from the point at which they\n * were paused. This is different from `{{#crossLink\n * \"Tweenable/stop:method\"}}{{/crossLink}}`, as that method\n * causes a tween to start over when it is resumed.\n * @method pause\n * @chainable\n */\n Tweenable.prototype.pause = function () {\n this._pausedAtTime = now();\n this._isPaused = true;\n return this;\n };\n\n /**\n * Resume a paused tween.\n * @method resume\n * @chainable\n */\n Tweenable.prototype.resume = function () {\n if (this._isPaused) {\n this._timestamp += now() - this._pausedAtTime;\n }\n\n this._isPaused = false;\n this._isTweening = true;\n\n this._timeoutHandler();\n\n return this;\n };\n\n /**\n * Move the state of the animation to a specific point in the tween's\n * timeline. If the animation is not running, this will cause the `step`\n * handlers to be called.\n * @method seek\n * @param {millisecond} millisecond The millisecond of the animation to seek\n * to. This must not be less than `0`.\n * @chainable\n */\n Tweenable.prototype.seek = function (millisecond) {\n millisecond = Math.max(millisecond, 0);\n var currentTime = now();\n\n if ((this._timestamp + millisecond) === 0) {\n return this;\n }\n\n this._timestamp = currentTime - millisecond;\n\n if (!this.isPlaying()) {\n this._isTweening = true;\n this._isPaused = false;\n\n // If the animation is not running, call timeoutHandler to make sure that\n // any step handlers are run.\n timeoutHandler(this,\n this._timestamp,\n this._delay,\n this._duration,\n this._currentState,\n this._originalState,\n this._targetState,\n this._easing,\n this._step,\n this._scheduleFunction,\n currentTime\n );\n\n this.pause();\n }\n\n return this;\n };\n\n /**\n * Stops and cancels a tween.\n * @param {boolean=} gotoEnd If `false` or omitted, the tween just stops at\n * its current state, and the `finish` handler is not invoked. If `true`,\n * the tweened object's values are instantly set to the target values, and\n * `finish` is invoked.\n * @method stop\n * @chainable\n */\n Tweenable.prototype.stop = function (gotoEnd) {\n this._isTweening = false;\n this._isPaused = false;\n this._timeoutHandler = noop;\n\n (root.cancelAnimationFrame ||\n root.webkitCancelAnimationFrame ||\n root.oCancelAnimationFrame ||\n root.msCancelAnimationFrame ||\n root.mozCancelRequestAnimationFrame ||\n root.clearTimeout)(this._scheduleId);\n\n if (gotoEnd) {\n applyFilter(this, 'beforeTween');\n tweenProps(\n 1,\n this._currentState,\n this._originalState,\n this._targetState,\n 1,\n 0,\n this._easing\n );\n applyFilter(this, 'afterTween');\n applyFilter(this, 'afterTweenEnd');\n this._finish.call(this, this._currentState, this._attachment);\n }\n\n return this;\n };\n\n /**\n * @method isPlaying\n * @return {boolean} Whether or not a tween is running.\n */\n Tweenable.prototype.isPlaying = function () {\n return this._isTweening && !this._isPaused;\n };\n\n /**\n * Set a custom schedule function.\n *\n * If a custom function is not set,\n * [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame)\n * is used if available, otherwise\n * [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/Window.setTimeout)\n * is used.\n * @method setScheduleFunction\n * @param {Function(Function,number)} scheduleFunction The function to be\n * used to schedule the next frame to be rendered.\n */\n Tweenable.prototype.setScheduleFunction = function (scheduleFunction) {\n this._scheduleFunction = scheduleFunction;\n };\n\n /**\n * `delete` all \"own\" properties. Call this when the `Tweenable` instance\n * is no longer needed to free memory.\n * @method dispose\n */\n Tweenable.prototype.dispose = function () {\n var prop;\n for (prop in this) {\n if (this.hasOwnProperty(prop)) {\n delete this[prop];\n }\n }\n };\n\n /**\n * Filters are used for transforming the properties of a tween at various\n * points in a Tweenable's life cycle. See the README for more info on this.\n * @private\n */\n Tweenable.prototype.filter = {};\n\n /**\n * This object contains all of the tweens available to Shifty. It is\n * extensible - simply attach properties to the `Tweenable.prototype.formula`\n * Object following the same format as `linear`.\n *\n * `pos` should be a normalized `number` (between 0 and 1).\n * @property formula\n * @type {Object(function)}\n */\n Tweenable.prototype.formula = {\n linear: function (pos) {\n return pos;\n }\n };\n\n formula = Tweenable.prototype.formula;\n\n shallowCopy(Tweenable, {\n 'now': now\n ,'each': each\n ,'tweenProps': tweenProps\n ,'tweenProp': tweenProp\n ,'applyFilter': applyFilter\n ,'shallowCopy': shallowCopy\n ,'defaults': defaults\n ,'composeEasingObject': composeEasingObject\n });\n\n // `root` is provided in the intro/outro files.\n\n // A hook used for unit testing.\n if (typeof SHIFTY_DEBUG_NOW === 'function') {\n root.timeoutHandler = timeoutHandler;\n }\n\n // Bootstrap Tweenable appropriately for the environment.\n if (typeof exports === 'object') {\n // CommonJS\n module.exports = Tweenable;\n } else if (typeof define === 'function' && define.amd) {\n // AMD\n define(function () {return Tweenable;});\n } else if (typeof root.Tweenable === 'undefined') {\n // Browser: Make `Tweenable` globally accessible.\n root.Tweenable = Tweenable;\n }\n\n return Tweenable;\n\n} ());\n\n/*!\n * All equations are adapted from Thomas Fuchs'\n * [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js).\n *\n * Based on Easing Equations (c) 2003 [Robert\n * Penner](http://www.robertpenner.com/), all rights reserved. This work is\n * [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html).\n */\n\n/*!\n * TERMS OF USE - EASING EQUATIONS\n * Open source under the BSD License.\n * Easing Equations (c) 2003 Robert Penner, all rights reserved.\n */\n\n;(function () {\n\n Tweenable.shallowCopy(Tweenable.prototype.formula, {\n easeInQuad: function (pos) {\n return Math.pow(pos, 2);\n },\n\n easeOutQuad: function (pos) {\n return -(Math.pow((pos - 1), 2) - 1);\n },\n\n easeInOutQuad: function (pos) {\n if ((pos /= 0.5) < 1) {return 0.5 * Math.pow(pos,2);}\n return -0.5 * ((pos -= 2) * pos - 2);\n },\n\n easeInCubic: function (pos) {\n return Math.pow(pos, 3);\n },\n\n easeOutCubic: function (pos) {\n return (Math.pow((pos - 1), 3) + 1);\n },\n\n easeInOutCubic: function (pos) {\n if ((pos /= 0.5) < 1) {return 0.5 * Math.pow(pos,3);}\n return 0.5 * (Math.pow((pos - 2),3) + 2);\n },\n\n easeInQuart: function (pos) {\n return Math.pow(pos, 4);\n },\n\n easeOutQuart: function (pos) {\n return -(Math.pow((pos - 1), 4) - 1);\n },\n\n easeInOutQuart: function (pos) {\n if ((pos /= 0.5) < 1) {return 0.5 * Math.pow(pos,4);}\n return -0.5 * ((pos -= 2) * Math.pow(pos,3) - 2);\n },\n\n easeInQuint: function (pos) {\n return Math.pow(pos, 5);\n },\n\n easeOutQuint: function (pos) {\n return (Math.pow((pos - 1), 5) + 1);\n },\n\n easeInOutQuint: function (pos) {\n if ((pos /= 0.5) < 1) {return 0.5 * Math.pow(pos,5);}\n return 0.5 * (Math.pow((pos - 2),5) + 2);\n },\n\n easeInSine: function (pos) {\n return -Math.cos(pos * (Math.PI / 2)) + 1;\n },\n\n easeOutSine: function (pos) {\n return Math.sin(pos * (Math.PI / 2));\n },\n\n easeInOutSine: function (pos) {\n return (-0.5 * (Math.cos(Math.PI * pos) - 1));\n },\n\n easeInExpo: function (pos) {\n return (pos === 0) ? 0 : Math.pow(2, 10 * (pos - 1));\n },\n\n easeOutExpo: function (pos) {\n return (pos === 1) ? 1 : -Math.pow(2, -10 * pos) + 1;\n },\n\n easeInOutExpo: function (pos) {\n if (pos === 0) {return 0;}\n if (pos === 1) {return 1;}\n if ((pos /= 0.5) < 1) {return 0.5 * Math.pow(2,10 * (pos - 1));}\n return 0.5 * (-Math.pow(2, -10 * --pos) + 2);\n },\n\n easeInCirc: function (pos) {\n return -(Math.sqrt(1 - (pos * pos)) - 1);\n },\n\n easeOutCirc: function (pos) {\n return Math.sqrt(1 - Math.pow((pos - 1), 2));\n },\n\n easeInOutCirc: function (pos) {\n if ((pos /= 0.5) < 1) {return -0.5 * (Math.sqrt(1 - pos * pos) - 1);}\n return 0.5 * (Math.sqrt(1 - (pos -= 2) * pos) + 1);\n },\n\n easeOutBounce: function (pos) {\n if ((pos) < (1 / 2.75)) {\n return (7.5625 * pos * pos);\n } else if (pos < (2 / 2.75)) {\n return (7.5625 * (pos -= (1.5 / 2.75)) * pos + 0.75);\n } else if (pos < (2.5 / 2.75)) {\n return (7.5625 * (pos -= (2.25 / 2.75)) * pos + 0.9375);\n } else {\n return (7.5625 * (pos -= (2.625 / 2.75)) * pos + 0.984375);\n }\n },\n\n easeInBack: function (pos) {\n var s = 1.70158;\n return (pos) * pos * ((s + 1) * pos - s);\n },\n\n easeOutBack: function (pos) {\n var s = 1.70158;\n return (pos = pos - 1) * pos * ((s + 1) * pos + s) + 1;\n },\n\n easeInOutBack: function (pos) {\n var s = 1.70158;\n if ((pos /= 0.5) < 1) {\n return 0.5 * (pos * pos * (((s *= (1.525)) + 1) * pos - s));\n }\n return 0.5 * ((pos -= 2) * pos * (((s *= (1.525)) + 1) * pos + s) + 2);\n },\n\n elastic: function (pos) {\n // jshint maxlen:90\n return -1 * Math.pow(4,-8 * pos) * Math.sin((pos * 6 - 1) * (2 * Math.PI) / 2) + 1;\n },\n\n swingFromTo: function (pos) {\n var s = 1.70158;\n return ((pos /= 0.5) < 1) ?\n 0.5 * (pos * pos * (((s *= (1.525)) + 1) * pos - s)) :\n 0.5 * ((pos -= 2) * pos * (((s *= (1.525)) + 1) * pos + s) + 2);\n },\n\n swingFrom: function (pos) {\n var s = 1.70158;\n return pos * pos * ((s + 1) * pos - s);\n },\n\n swingTo: function (pos) {\n var s = 1.70158;\n return (pos -= 1) * pos * ((s + 1) * pos + s) + 1;\n },\n\n bounce: function (pos) {\n if (pos < (1 / 2.75)) {\n return (7.5625 * pos * pos);\n } else if (pos < (2 / 2.75)) {\n return (7.5625 * (pos -= (1.5 / 2.75)) * pos + 0.75);\n } else if (pos < (2.5 / 2.75)) {\n return (7.5625 * (pos -= (2.25 / 2.75)) * pos + 0.9375);\n } else {\n return (7.5625 * (pos -= (2.625 / 2.75)) * pos + 0.984375);\n }\n },\n\n bouncePast: function (pos) {\n if (pos < (1 / 2.75)) {\n return (7.5625 * pos * pos);\n } else if (pos < (2 / 2.75)) {\n return 2 - (7.5625 * (pos -= (1.5 / 2.75)) * pos + 0.75);\n } else if (pos < (2.5 / 2.75)) {\n return 2 - (7.5625 * (pos -= (2.25 / 2.75)) * pos + 0.9375);\n } else {\n return 2 - (7.5625 * (pos -= (2.625 / 2.75)) * pos + 0.984375);\n }\n },\n\n easeFromTo: function (pos) {\n if ((pos /= 0.5) < 1) {return 0.5 * Math.pow(pos,4);}\n return -0.5 * ((pos -= 2) * Math.pow(pos,3) - 2);\n },\n\n easeFrom: function (pos) {\n return Math.pow(pos,4);\n },\n\n easeTo: function (pos) {\n return Math.pow(pos,0.25);\n }\n });\n\n}());\n\n// jshint maxlen:100\n/**\n * The Bezier magic in this file is adapted/copied almost wholesale from\n * [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/cubic-bezier.js),\n * which was adapted from Apple code (which probably came from\n * [here](http://opensource.apple.com/source/WebCore/WebCore-955.66/platform/graphics/UnitBezier.h)).\n * Special thanks to Apple and Thomas Fuchs for much of this code.\n */\n\n/**\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder(s) nor the names of any\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n;(function () {\n // port of webkit cubic bezier handling by http://www.netzgesta.de/dev/\n function cubicBezierAtTime(t,p1x,p1y,p2x,p2y,duration) {\n var ax = 0,bx = 0,cx = 0,ay = 0,by = 0,cy = 0;\n function sampleCurveX(t) {\n return ((ax * t + bx) * t + cx) * t;\n }\n function sampleCurveY(t) {\n return ((ay * t + by) * t + cy) * t;\n }\n function sampleCurveDerivativeX(t) {\n return (3.0 * ax * t + 2.0 * bx) * t + cx;\n }\n function solveEpsilon(duration) {\n return 1.0 / (200.0 * duration);\n }\n function solve(x,epsilon) {\n return sampleCurveY(solveCurveX(x, epsilon));\n }\n function fabs(n) {\n if (n >= 0) {\n return n;\n } else {\n return 0 - n;\n }\n }\n function solveCurveX(x, epsilon) {\n var t0,t1,t2,x2,d2,i;\n for (t2 = x, i = 0; i < 8; i++) {\n x2 = sampleCurveX(t2) - x;\n if (fabs(x2) < epsilon) {\n return t2;\n }\n d2 = sampleCurveDerivativeX(t2);\n if (fabs(d2) < 1e-6) {\n break;\n }\n t2 = t2 - x2 / d2;\n }\n t0 = 0.0;\n t1 = 1.0;\n t2 = x;\n if (t2 < t0) {\n return t0;\n }\n if (t2 > t1) {\n return t1;\n }\n while (t0 < t1) {\n x2 = sampleCurveX(t2);\n if (fabs(x2 - x) < epsilon) {\n return t2;\n }\n if (x > x2) {\n t0 = t2;\n }else {\n t1 = t2;\n }\n t2 = (t1 - t0) * 0.5 + t0;\n }\n return t2; // Failure.\n }\n cx = 3.0 * p1x;\n bx = 3.0 * (p2x - p1x) - cx;\n ax = 1.0 - cx - bx;\n cy = 3.0 * p1y;\n by = 3.0 * (p2y - p1y) - cy;\n ay = 1.0 - cy - by;\n return solve(t, solveEpsilon(duration));\n }\n /**\n * getCubicBezierTransition(x1, y1, x2, y2) -> Function\n *\n * Generates a transition easing function that is compatible\n * with WebKit's CSS transitions `-webkit-transition-timing-function`\n * CSS property.\n *\n * The W3C has more information about CSS3 transition timing functions:\n * http://www.w3.org/TR/css3-transitions/#transition-timing-function_tag\n *\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @return {function}\n * @private\n */\n function getCubicBezierTransition (x1, y1, x2, y2) {\n return function (pos) {\n return cubicBezierAtTime(pos,x1,y1,x2,y2,1);\n };\n }\n // End ported code\n\n /**\n * Create a Bezier easing function and attach it to `{{#crossLink\n * \"Tweenable/formula:property\"}}Tweenable#formula{{/crossLink}}`. This\n * function gives you total control over the easing curve. Matthew Lein's\n * [Ceaser](http://matthewlein.com/ceaser/) is a useful tool for visualizing\n * the curves you can make with this function.\n * @method setBezierFunction\n * @param {string} name The name of the easing curve. Overwrites the old\n * easing function on `{{#crossLink\n * \"Tweenable/formula:property\"}}Tweenable#formula{{/crossLink}}` if it\n * exists.\n * @param {number} x1\n * @param {number} y1\n * @param {number} x2\n * @param {number} y2\n * @return {function} The easing function that was attached to\n * Tweenable.prototype.formula.\n */\n Tweenable.setBezierFunction = function (name, x1, y1, x2, y2) {\n var cubicBezierTransition = getCubicBezierTransition(x1, y1, x2, y2);\n cubicBezierTransition.displayName = name;\n cubicBezierTransition.x1 = x1;\n cubicBezierTransition.y1 = y1;\n cubicBezierTransition.x2 = x2;\n cubicBezierTransition.y2 = y2;\n\n return Tweenable.prototype.formula[name] = cubicBezierTransition;\n };\n\n\n /**\n * `delete` an easing function from `{{#crossLink\n * \"Tweenable/formula:property\"}}Tweenable#formula{{/crossLink}}`. Be\n * careful with this method, as it `delete`s whatever easing formula matches\n * `name` (which means you can delete standard Shifty easing functions).\n * @method unsetBezierFunction\n * @param {string} name The name of the easing function to delete.\n * @return {function}\n */\n Tweenable.unsetBezierFunction = function (name) {\n delete Tweenable.prototype.formula[name];\n };\n\n})();\n\n;(function () {\n\n function getInterpolatedValues (\n from, current, targetState, position, easing, delay) {\n return Tweenable.tweenProps(\n position, current, from, targetState, 1, delay, easing);\n }\n\n // Fake a Tweenable and patch some internals. This approach allows us to\n // skip uneccessary processing and object recreation, cutting down on garbage\n // collection pauses.\n var mockTweenable = new Tweenable();\n mockTweenable._filterArgs = [];\n\n /**\n * Compute the midpoint of two Objects. This method effectively calculates a\n * specific frame of animation that `{{#crossLink\n * \"Tweenable/tween:method\"}}{{/crossLink}}` does many times over the course\n * of a full tween.\n *\n * var interpolatedValues = Tweenable.interpolate({\n * width: '100px',\n * opacity: 0,\n * color: '#fff'\n * }, {\n * width: '200px',\n * opacity: 1,\n * color: '#000'\n * }, 0.5);\n *\n * console.log(interpolatedValues);\n * // {opacity: 0.5, width: \"150px\", color: \"rgb(127,127,127)\"}\n *\n * @static\n * @method interpolate\n * @param {Object} from The starting values to tween from.\n * @param {Object} targetState The ending values to tween to.\n * @param {number} position The normalized position value (between `0.0` and\n * `1.0`) to interpolate the values between `from` and `to` for. `from`\n * represents `0` and `to` represents `1`.\n * @param {Object.|string|Function} easing The easing\n * curve(s) to calculate the midpoint against. You can reference any easing\n * function attached to `Tweenable.prototype.formula`, or provide the easing\n * function(s) directly. If omitted, this defaults to \"linear\".\n * @param {number=} opt_delay Optional delay to pad the beginning of the\n * interpolated tween with. This increases the range of `position` from (`0`\n * through `1`) to (`0` through `1 + opt_delay`). So, a delay of `0.5` would\n * increase all valid values of `position` to numbers between `0` and `1.5`.\n * @return {Object}\n */\n Tweenable.interpolate = function (\n from, targetState, position, easing, opt_delay) {\n\n var current = Tweenable.shallowCopy({}, from);\n var delay = opt_delay || 0;\n var easingObject = Tweenable.composeEasingObject(\n from, easing || 'linear');\n\n mockTweenable.set({});\n\n // Alias and reuse the _filterArgs array instead of recreating it.\n var filterArgs = mockTweenable._filterArgs;\n filterArgs.length = 0;\n filterArgs[0] = current;\n filterArgs[1] = from;\n filterArgs[2] = targetState;\n filterArgs[3] = easingObject;\n\n // Any defined value transformation must be applied\n Tweenable.applyFilter(mockTweenable, 'tweenCreated');\n Tweenable.applyFilter(mockTweenable, 'beforeTween');\n\n var interpolatedValues = getInterpolatedValues(\n from, current, targetState, position, easingObject, delay);\n\n // Transform values back into their original format\n Tweenable.applyFilter(mockTweenable, 'afterTween');\n\n return interpolatedValues;\n };\n\n}());\n\n/**\n * This module adds string interpolation support to Shifty.\n *\n * The Token extension allows Shifty to tween numbers inside of strings. Among\n * other things, this allows you to animate CSS properties. For example, you\n * can do this:\n *\n * var tweenable = new Tweenable();\n * tweenable.tween({\n * from: { transform: 'translateX(45px)' },\n * to: { transform: 'translateX(90xp)' }\n * });\n *\n * `translateX(45)` will be tweened to `translateX(90)`. To demonstrate:\n *\n * var tweenable = new Tweenable();\n * tweenable.tween({\n * from: { transform: 'translateX(45px)' },\n * to: { transform: 'translateX(90px)' },\n * step: function (state) {\n * console.log(state.transform);\n * }\n * });\n *\n * The above snippet will log something like this in the console:\n *\n * translateX(60.3px)\n * ...\n * translateX(76.05px)\n * ...\n * translateX(90px)\n *\n * Another use for this is animating colors:\n *\n * var tweenable = new Tweenable();\n * tweenable.tween({\n * from: { color: 'rgb(0,255,0)' },\n * to: { color: 'rgb(255,0,255)' },\n * step: function (state) {\n * console.log(state.color);\n * }\n * });\n *\n * The above snippet will log something like this:\n *\n * rgb(84,170,84)\n * ...\n * rgb(170,84,170)\n * ...\n * rgb(255,0,255)\n *\n * This extension also supports hexadecimal colors, in both long (`#ff00ff`)\n * and short (`#f0f`) forms. Be aware that hexadecimal input values will be\n * converted into the equivalent RGB output values. This is done to optimize\n * for performance.\n *\n * var tweenable = new Tweenable();\n * tweenable.tween({\n * from: { color: '#0f0' },\n * to: { color: '#f0f' },\n * step: function (state) {\n * console.log(state.color);\n * }\n * });\n *\n * This snippet will generate the same output as the one before it because\n * equivalent values were supplied (just in hexadecimal form rather than RGB):\n *\n * rgb(84,170,84)\n * ...\n * rgb(170,84,170)\n * ...\n * rgb(255,0,255)\n *\n * ## Easing support\n *\n * Easing works somewhat differently in the Token extension. This is because\n * some CSS properties have multiple values in them, and you might need to\n * tween each value along its own easing curve. A basic example:\n *\n * var tweenable = new Tweenable();\n * tweenable.tween({\n * from: { transform: 'translateX(0px) translateY(0px)' },\n * to: { transform: 'translateX(100px) translateY(100px)' },\n * easing: { transform: 'easeInQuad' },\n * step: function (state) {\n * console.log(state.transform);\n * }\n * });\n *\n * The above snippet will create values like this:\n *\n * translateX(11.56px) translateY(11.56px)\n * ...\n * translateX(46.24px) translateY(46.24px)\n * ...\n * translateX(100px) translateY(100px)\n *\n * In this case, the values for `translateX` and `translateY` are always the\n * same for each step of the tween, because they have the same start and end\n * points and both use the same easing curve. We can also tween `translateX`\n * and `translateY` along independent curves:\n *\n * var tweenable = new Tweenable();\n * tweenable.tween({\n * from: { transform: 'translateX(0px) translateY(0px)' },\n * to: { transform: 'translateX(100px) translateY(100px)' },\n * easing: { transform: 'easeInQuad bounce' },\n * step: function (state) {\n * console.log(state.transform);\n * }\n * });\n *\n * The above snippet will create values like this:\n *\n * translateX(10.89px) translateY(82.35px)\n * ...\n * translateX(44.89px) translateY(86.73px)\n * ...\n * translateX(100px) translateY(100px)\n *\n * `translateX` and `translateY` are not in sync anymore, because `easeInQuad`\n * was specified for `translateX` and `bounce` for `translateY`. Mixing and\n * matching easing curves can make for some interesting motion in your\n * animations.\n *\n * The order of the space-separated easing curves correspond the token values\n * they apply to. If there are more token values than easing curves listed,\n * the last easing curve listed is used.\n * @submodule Tweenable.token\n */\n\n// token function is defined above only so that dox-foundation sees it as\n// documentation and renders it. It is never used, and is optimized away at\n// build time.\n\n;(function (Tweenable) {\n\n /**\n * @typedef {{\n * formatString: string\n * chunkNames: Array.\n * }}\n * @private\n */\n var formatManifest;\n\n // CONSTANTS\n\n var R_NUMBER_COMPONENT = /(\\d|\\-|\\.)/;\n var R_FORMAT_CHUNKS = /([^\\-0-9\\.]+)/g;\n var R_UNFORMATTED_VALUES = /[0-9.\\-]+/g;\n var R_RGB = new RegExp(\n 'rgb\\\\(' + R_UNFORMATTED_VALUES.source +\n (/,\\s*/.source) + R_UNFORMATTED_VALUES.source +\n (/,\\s*/.source) + R_UNFORMATTED_VALUES.source + '\\\\)', 'g');\n var R_RGB_PREFIX = /^.*\\(/;\n var R_HEX = /#([0-9]|[a-f]){3,6}/gi;\n var VALUE_PLACEHOLDER = 'VAL';\n\n // HELPERS\n\n /**\n * @param {Array.number} rawValues\n * @param {string} prefix\n *\n * @return {Array.}\n * @private\n */\n function getFormatChunksFrom (rawValues, prefix) {\n var accumulator = [];\n\n var rawValuesLength = rawValues.length;\n var i;\n\n for (i = 0; i < rawValuesLength; i++) {\n accumulator.push('_' + prefix + '_' + i);\n }\n\n return accumulator;\n }\n\n /**\n * @param {string} formattedString\n *\n * @return {string}\n * @private\n */\n function getFormatStringFrom (formattedString) {\n var chunks = formattedString.match(R_FORMAT_CHUNKS);\n\n if (!chunks) {\n // chunks will be null if there were no tokens to parse in\n // formattedString (for example, if formattedString is '2'). Coerce\n // chunks to be useful here.\n chunks = ['', ''];\n\n // If there is only one chunk, assume that the string is a number\n // followed by a token...\n // NOTE: This may be an unwise assumption.\n } else if (chunks.length === 1 ||\n // ...or if the string starts with a number component (\".\", \"-\", or a\n // digit)...\n formattedString.charAt(0).match(R_NUMBER_COMPONENT)) {\n // ...prepend an empty string here to make sure that the formatted number\n // is properly replaced by VALUE_PLACEHOLDER\n chunks.unshift('');\n }\n\n return chunks.join(VALUE_PLACEHOLDER);\n }\n\n /**\n * Convert all hex color values within a string to an rgb string.\n *\n * @param {Object} stateObject\n *\n * @return {Object} The modified obj\n * @private\n */\n function sanitizeObjectForHexProps (stateObject) {\n Tweenable.each(stateObject, function (prop) {\n var currentProp = stateObject[prop];\n\n if (typeof currentProp === 'string' && currentProp.match(R_HEX)) {\n stateObject[prop] = sanitizeHexChunksToRGB(currentProp);\n }\n });\n }\n\n /**\n * @param {string} str\n *\n * @return {string}\n * @private\n */\n function sanitizeHexChunksToRGB (str) {\n return filterStringChunks(R_HEX, str, convertHexToRGB);\n }\n\n /**\n * @param {string} hexString\n *\n * @return {string}\n * @private\n */\n function convertHexToRGB (hexString) {\n var rgbArr = hexToRGBArray(hexString);\n return 'rgb(' + rgbArr[0] + ',' + rgbArr[1] + ',' + rgbArr[2] + ')';\n }\n\n var hexToRGBArray_returnArray = [];\n /**\n * Convert a hexadecimal string to an array with three items, one each for\n * the red, blue, and green decimal values.\n *\n * @param {string} hex A hexadecimal string.\n *\n * @returns {Array.} The converted Array of RGB values if `hex` is a\n * valid string, or an Array of three 0's.\n * @private\n */\n function hexToRGBArray (hex) {\n\n hex = hex.replace(/#/, '');\n\n // If the string is a shorthand three digit hex notation, normalize it to\n // the standard six digit notation\n if (hex.length === 3) {\n hex = hex.split('');\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n\n hexToRGBArray_returnArray[0] = hexToDec(hex.substr(0, 2));\n hexToRGBArray_returnArray[1] = hexToDec(hex.substr(2, 2));\n hexToRGBArray_returnArray[2] = hexToDec(hex.substr(4, 2));\n\n return hexToRGBArray_returnArray;\n }\n\n /**\n * Convert a base-16 number to base-10.\n *\n * @param {Number|String} hex The value to convert\n *\n * @returns {Number} The base-10 equivalent of `hex`.\n * @private\n */\n function hexToDec (hex) {\n return parseInt(hex, 16);\n }\n\n /**\n * Runs a filter operation on all chunks of a string that match a RegExp\n *\n * @param {RegExp} pattern\n * @param {string} unfilteredString\n * @param {function(string)} filter\n *\n * @return {string}\n * @private\n */\n function filterStringChunks (pattern, unfilteredString, filter) {\n var pattenMatches = unfilteredString.match(pattern);\n var filteredString = unfilteredString.replace(pattern, VALUE_PLACEHOLDER);\n\n if (pattenMatches) {\n var pattenMatchesLength = pattenMatches.length;\n var currentChunk;\n\n for (var i = 0; i < pattenMatchesLength; i++) {\n currentChunk = pattenMatches.shift();\n filteredString = filteredString.replace(\n VALUE_PLACEHOLDER, filter(currentChunk));\n }\n }\n\n return filteredString;\n }\n\n /**\n * Check for floating point values within rgb strings and rounds them.\n *\n * @param {string} formattedString\n *\n * @return {string}\n * @private\n */\n function sanitizeRGBChunks (formattedString) {\n return filterStringChunks(R_RGB, formattedString, sanitizeRGBChunk);\n }\n\n /**\n * @param {string} rgbChunk\n *\n * @return {string}\n * @private\n */\n function sanitizeRGBChunk (rgbChunk) {\n var numbers = rgbChunk.match(R_UNFORMATTED_VALUES);\n var numbersLength = numbers.length;\n var sanitizedString = rgbChunk.match(R_RGB_PREFIX)[0];\n\n for (var i = 0; i < numbersLength; i++) {\n sanitizedString += parseInt(numbers[i], 10) + ',';\n }\n\n sanitizedString = sanitizedString.slice(0, -1) + ')';\n\n return sanitizedString;\n }\n\n /**\n * @param {Object} stateObject\n *\n * @return {Object} An Object of formatManifests that correspond to\n * the string properties of stateObject\n * @private\n */\n function getFormatManifests (stateObject) {\n var manifestAccumulator = {};\n\n Tweenable.each(stateObject, function (prop) {\n var currentProp = stateObject[prop];\n\n if (typeof currentProp === 'string') {\n var rawValues = getValuesFrom(currentProp);\n\n manifestAccumulator[prop] = {\n 'formatString': getFormatStringFrom(currentProp)\n ,'chunkNames': getFormatChunksFrom(rawValues, prop)\n };\n }\n });\n\n return manifestAccumulator;\n }\n\n /**\n * @param {Object} stateObject\n * @param {Object} formatManifests\n * @private\n */\n function expandFormattedProperties (stateObject, formatManifests) {\n Tweenable.each(formatManifests, function (prop) {\n var currentProp = stateObject[prop];\n var rawValues = getValuesFrom(currentProp);\n var rawValuesLength = rawValues.length;\n\n for (var i = 0; i < rawValuesLength; i++) {\n stateObject[formatManifests[prop].chunkNames[i]] = +rawValues[i];\n }\n\n delete stateObject[prop];\n });\n }\n\n /**\n * @param {Object} stateObject\n * @param {Object} formatManifests\n * @private\n */\n function collapseFormattedProperties (stateObject, formatManifests) {\n Tweenable.each(formatManifests, function (prop) {\n var currentProp = stateObject[prop];\n var formatChunks = extractPropertyChunks(\n stateObject, formatManifests[prop].chunkNames);\n var valuesList = getValuesList(\n formatChunks, formatManifests[prop].chunkNames);\n currentProp = getFormattedValues(\n formatManifests[prop].formatString, valuesList);\n stateObject[prop] = sanitizeRGBChunks(currentProp);\n });\n }\n\n /**\n * @param {Object} stateObject\n * @param {Array.} chunkNames\n *\n * @return {Object} The extracted value chunks.\n * @private\n */\n function extractPropertyChunks (stateObject, chunkNames) {\n var extractedValues = {};\n var currentChunkName, chunkNamesLength = chunkNames.length;\n\n for (var i = 0; i < chunkNamesLength; i++) {\n currentChunkName = chunkNames[i];\n extractedValues[currentChunkName] = stateObject[currentChunkName];\n delete stateObject[currentChunkName];\n }\n\n return extractedValues;\n }\n\n var getValuesList_accumulator = [];\n /**\n * @param {Object} stateObject\n * @param {Array.} chunkNames\n *\n * @return {Array.}\n * @private\n */\n function getValuesList (stateObject, chunkNames) {\n getValuesList_accumulator.length = 0;\n var chunkNamesLength = chunkNames.length;\n\n for (var i = 0; i < chunkNamesLength; i++) {\n getValuesList_accumulator.push(stateObject[chunkNames[i]]);\n }\n\n return getValuesList_accumulator;\n }\n\n /**\n * @param {string} formatString\n * @param {Array.} rawValues\n *\n * @return {string}\n * @private\n */\n function getFormattedValues (formatString, rawValues) {\n var formattedValueString = formatString;\n var rawValuesLength = rawValues.length;\n\n for (var i = 0; i < rawValuesLength; i++) {\n formattedValueString = formattedValueString.replace(\n VALUE_PLACEHOLDER, +rawValues[i].toFixed(4));\n }\n\n return formattedValueString;\n }\n\n /**\n * Note: It's the duty of the caller to convert the Array elements of the\n * return value into numbers. This is a performance optimization.\n *\n * @param {string} formattedString\n *\n * @return {Array.|null}\n * @private\n */\n function getValuesFrom (formattedString) {\n return formattedString.match(R_UNFORMATTED_VALUES);\n }\n\n /**\n * @param {Object} easingObject\n * @param {Object} tokenData\n * @private\n */\n function expandEasingObject (easingObject, tokenData) {\n Tweenable.each(tokenData, function (prop) {\n var currentProp = tokenData[prop];\n var chunkNames = currentProp.chunkNames;\n var chunkLength = chunkNames.length;\n\n var easing = easingObject[prop];\n var i;\n\n if (typeof easing === 'string') {\n var easingChunks = easing.split(' ');\n var lastEasingChunk = easingChunks[easingChunks.length - 1];\n\n for (i = 0; i < chunkLength; i++) {\n easingObject[chunkNames[i]] = easingChunks[i] || lastEasingChunk;\n }\n\n } else {\n for (i = 0; i < chunkLength; i++) {\n easingObject[chunkNames[i]] = easing;\n }\n }\n\n delete easingObject[prop];\n });\n }\n\n /**\n * @param {Object} easingObject\n * @param {Object} tokenData\n * @private\n */\n function collapseEasingObject (easingObject, tokenData) {\n Tweenable.each(tokenData, function (prop) {\n var currentProp = tokenData[prop];\n var chunkNames = currentProp.chunkNames;\n var chunkLength = chunkNames.length;\n\n var firstEasing = easingObject[chunkNames[0]];\n var typeofEasings = typeof firstEasing;\n\n if (typeofEasings === 'string') {\n var composedEasingString = '';\n\n for (var i = 0; i < chunkLength; i++) {\n composedEasingString += ' ' + easingObject[chunkNames[i]];\n delete easingObject[chunkNames[i]];\n }\n\n easingObject[prop] = composedEasingString.substr(1);\n } else {\n easingObject[prop] = firstEasing;\n }\n });\n }\n\n Tweenable.prototype.filter.token = {\n 'tweenCreated': function (currentState, fromState, toState, easingObject) {\n sanitizeObjectForHexProps(currentState);\n sanitizeObjectForHexProps(fromState);\n sanitizeObjectForHexProps(toState);\n this._tokenData = getFormatManifests(currentState);\n },\n\n 'beforeTween': function (currentState, fromState, toState, easingObject) {\n expandEasingObject(easingObject, this._tokenData);\n expandFormattedProperties(currentState, this._tokenData);\n expandFormattedProperties(fromState, this._tokenData);\n expandFormattedProperties(toState, this._tokenData);\n },\n\n 'afterTween': function (currentState, fromState, toState, easingObject) {\n collapseFormattedProperties(currentState, this._tokenData);\n collapseFormattedProperties(fromState, this._tokenData);\n collapseFormattedProperties(toState, this._tokenData);\n collapseEasingObject(easingObject, this._tokenData);\n }\n };\n\n} (Tweenable));\n\n}).call(null);\n"],"sourceRoot":""}