survey-pdf 2.3.14 → 2.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/survey.pdf.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"survey.pdf.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;ACVa;AACb;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,0DAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,yBAAyB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gCAAgC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA,kFAAkF;AAClF;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,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,mCAAmC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,kCAAkC,kCAAkC;AACpE;AACA;AACA,kCAAkC,kCAAkC;AACpE;AACA;AACA,8DAA8D,gBAAgB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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kC;AAClC;;AAEA;AACA,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,sCAAsC;AACtC;AACA,2BAA2B;AAC3B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;;AAEA,oCAAoC;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B;AAC9B,kBAAkB;AAClB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,qDAAqD,0DAA0D;AAC/G,qDAAqD,0DAA0D;AAC/G,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,wCAAwC,+CAA+C;;AAEvF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,0DAA0D;AAClG;;AAEA,2CAA2C,mCAAmC;;AAE9E;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sFAAsF;;AAEtF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,sDAAsD;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yCAAyC;AACzF,0BAA0B;AAC1B;AACA;AACA,gDAAgD,uCAAuC;AACvF,0BAA0B;AAC1B,gDAAgD,wBAAwB;AACxE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA,qIAAqI;AACrI;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,gGAAgG;AAChG;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,sGAAsG;AACtG;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gGAAgG;AAChG;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,uDAAuD;AACvD;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,0JAA0J;AAC1J;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;;AAGT;AACA,0FAA0F;AAC1F;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA,0FAA0F;AAC1F;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gEAAgE;AAChE;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,8RAA8R;AAC9R;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;;;AAGjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,gBAAgB;AAChB;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;;AAEA;AACA,kCAAkC;AAClC,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,wCAAK,qDAAqD,qBAAM,oB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AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;;;AAGR;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;;AAEA;AACA;;AAEA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B;;AAE7B,6DAA6D;;AAE7D;AACA;AACA,yCAAyC;;AAEzC,mEAAmE;AACnE;;;AAGA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA;AACA,4EAA4E;;AAE5E;AACA;AACA;AACA,wHAAwH;AACxH;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,iBAAiB,yLAAyL;AAC1M;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA,iBAAiB,gFAAgF;;AAEjG,kGAAkG;;AAElG;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,gBAAgB;AAChB;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,6DAA6D;AAC7D,iBAAiB;AACjB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;;AAGA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;;AAGd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,8CAA8C;;AAE9C,yDAAyD;;AAEzD;AACA,6EAA6E;;AAE7E,wCAAwC;;AAExC;AACA,2DAA2D;;AAE3D;;AAEA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA,cAAc;;;AAGd;AACA;AACA;AACA,YAAY;;;AAGZ,+DAA+D;;;AAG/D,2DAA2D;;AAE3D;AACA,WAAW;;;AAGX;;AAEA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA,UAAU;;;AAGV,gFAAgF;;AAEhF,wBAAwB;;AAExB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0DAA0D,kCAAkC,kDAAkD,0BAA0B,yBAAyB,4BAA4B,4BAA4B,cAAc,iBAAiB,sBAAsB;AAC9S;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;AACf;AACA;;AAEA;AACA;;AAEA,gEAAgE;;;AAGhE;AACA;AACA,0DAA0D;AAC1D,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA;;AAEA;AACA,wBAAwB,gCAAgC;AACxD;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,QAAQ;;;AAGR;AACA,wBAAwB,kBAAkB;AAC1C,oIAAoI;;AAEpI;AACA;AACA;;AAEA;;AAEA;AACA,mDAAmD;AACnD,YAAY;AACZ,uDAAuD;AACvD,YAAY;AACZ;AACA,kEAAkE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4LAA4L;;AAE5L;AACA;AACA;;AAEA,mFAAmF;;AAEnF;;AAEA;AACA;AACA;AACA,QAAQ;;;AAGR;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,4HAA4H;;AAE5H;AACA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kDAAkD,EAAE;AACpD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA,gCAAgC;AAChC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sIAAsI;;AAEtI;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;;;AAGV;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;;AAEA,wFAAwF;;AAExF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA,gCAAgC;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,GAAG;;AAEd,8FAA8F;;AAE9F;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe;AACnC,iBAAiB,QAAQ;AACzB,iBAAiB,QAAQ;AACzB,wBAAwB,QAAQ;AAChC,iBAAiB,QAAQ;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EAAE,wCAAK;;;;;;;;;;;;;;;;;;ACpsCoC;AAGE;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OqB;;;;;;;;;;;;AChBtB,mD;;;;;;;;;;;ACAA,yD;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC,I;;;;;WCPD,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;UENA;UACA;UACA;UACA","sources":["webpack://SurveyPDF/webpack/universalModuleDefinition","webpack://SurveyPDF/./node_modules/node-interval-tree/lib/index.js","webpack://SurveyPDF/./node_modules/shallowequal/index.js","webpack://SurveyPDF/./src/doc_controller.ts","webpack://SurveyPDF/./src/entries/helpers.ts","webpack://SurveyPDF/./src/entries/pdf.ts","webpack://SurveyPDF/./src/event_handler/adorners.ts","webpack://SurveyPDF/./src/event_handler/draw_canvas.ts","webpack://SurveyPDF/./src/event_handler/event_handler.ts","webpack://SurveyPDF/./src/flat_layout/flat_boolean.ts","webpack://SurveyPDF/./src/flat_layout/flat_checkbox.ts","webpack://SurveyPDF/./src/flat_layout/flat_comment.ts","webpack://SurveyPDF/./src/flat_layout/flat_custom_model.ts","webpack://SurveyPDF/./src/flat_layout/flat_default.ts","webpack://SurveyPDF/./src/flat_layout/flat_dropdown.ts","webpack://SurveyPDF/./src/flat_layout/flat_expression.ts","webpack://SurveyPDF/./src/flat_layout/flat_file.ts","webpack://SurveyPDF/./src/flat_layout/flat_html.ts","webpack://SurveyPDF/./src/flat_layout/flat_image.ts","webpack://SurveyPDF/./src/flat_layout/flat_imagepicker.ts","webpack://SurveyPDF/./src/flat_layout/flat_matrix.ts","webpack://SurveyPDF/./src/flat_layout/flat_matrixdynamic.ts","webpack://SurveyPDF/./src/flat_layout/flat_matrixmultiple.ts","webpack://SurveyPDF/./src/flat_layout/flat_multipletext.ts","webpack://SurveyPDF/./src/flat_layout/flat_paneldynamic.ts","webpack://SurveyPDF/./src/flat_layout/flat_question.ts","webpack://SurveyPDF/./src/flat_layout/flat_radiogroup.ts","webpack://SurveyPDF/./src/flat_layout/flat_ranking.ts","webpack://SurveyPDF/./src/flat_layout/flat_rating.ts","webpack://SurveyPDF/./src/flat_layout/flat_repository.ts","webpack://SurveyPDF/./src/flat_layout/flat_selectbase.ts","webpack://SurveyPDF/./src/flat_layout/flat_signaturepad.ts","webpack://SurveyPDF/./src/flat_layout/flat_slider.ts","webpack://SurveyPDF/./src/flat_layout/flat_survey.ts","webpack://SurveyPDF/./src/flat_layout/flat_textbox.ts","webpack://SurveyPDF/./src/helper_survey.ts","webpack://SurveyPDF/./src/jspdf_plugins/acroform.js","webpack://SurveyPDF/./src/jspdf_plugins/acroform_radio.ts","webpack://SurveyPDF/./src/jspdf_plugins/from_html.js","webpack://SurveyPDF/./src/page_layout/page_packer.ts","webpack://SurveyPDF/./src/pdf_render/pdf_booleanitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_brick.ts","webpack://SurveyPDF/./src/pdf_render/pdf_checkboxitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_checkitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_coloredbrick.ts","webpack://SurveyPDF/./src/pdf_render/pdf_composite.ts","webpack://SurveyPDF/./src/pdf_render/pdf_custom.ts","webpack://SurveyPDF/./src/pdf_render/pdf_description.ts","webpack://SurveyPDF/./src/pdf_render/pdf_dropdown.ts","webpack://SurveyPDF/./src/pdf_render/pdf_empty.ts","webpack://SurveyPDF/./src/pdf_render/pdf_html.ts","webpack://SurveyPDF/./src/pdf_render/pdf_image.ts","webpack://SurveyPDF/./src/pdf_render/pdf_link.ts","webpack://SurveyPDF/./src/pdf_render/pdf_radioitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_rankingitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_rowline.ts","webpack://SurveyPDF/./src/pdf_render/pdf_text.ts","webpack://SurveyPDF/./src/pdf_render/pdf_textbold.ts","webpack://SurveyPDF/./src/pdf_render/pdf_textfield.ts","webpack://SurveyPDF/./src/pdf_render/pdf_titlepanel.ts","webpack://SurveyPDF/./src/survey.ts","webpack://SurveyPDF/external umd {\"root\":\"jspdf\",\"commonjs2\":\"jspdf\",\"commonjs\":\"jspdf\",\"amd\":\"jspdf\"}","webpack://SurveyPDF/external umd {\"root\":\"Survey\",\"commonjs2\":\"survey-core\",\"commonjs\":\"survey-core\",\"amd\":\"survey-core\"}","webpack://SurveyPDF/webpack/bootstrap","webpack://SurveyPDF/webpack/runtime/compat get default export","webpack://SurveyPDF/webpack/runtime/define property getters","webpack://SurveyPDF/webpack/runtime/global","webpack://SurveyPDF/webpack/runtime/hasOwnProperty shorthand","webpack://SurveyPDF/webpack/runtime/make namespace object","webpack://SurveyPDF/webpack/before-startup","webpack://SurveyPDF/webpack/startup","webpack://SurveyPDF/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"survey-core\"), require(\"jspdf\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"SurveyPDF\", [\"survey-core\", \"jspdf\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SurveyPDF\"] = factory(require(\"survey-core\"), require(\"jspdf\"));\n\telse\n\t\troot[\"SurveyPDF\"] = factory(root[\"Survey\"], root[\"jspdf\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE_survey_core__, __WEBPACK_EXTERNAL_MODULE_jspdf__) => {\nreturn ","\"use strict\";\r\n// An augmented AVL Tree where each node maintains a list of records and their search intervals.\r\n// Record is composed of an interval and its underlying data, sent by a client. This allows the\r\n// interval tree to have the same interval inserted multiple times, as long its data is different.\r\n// Both insertion and deletion require O(log n) time. Searching requires O(k*logn) time, where `k`\r\n// is the number of intervals in the output list.\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar isSame = require(\"shallowequal\");\r\nfunction height(node) {\r\n if (node === undefined) {\r\n return -1;\r\n }\r\n else {\r\n return node.height;\r\n }\r\n}\r\nvar Node = /** @class */ (function () {\r\n function Node(intervalTree, record) {\r\n this.intervalTree = intervalTree;\r\n this.records = [];\r\n this.height = 0;\r\n this.key = record.low;\r\n this.max = record.high;\r\n // Save the array of all records with the same key for this node\r\n this.records.push(record);\r\n }\r\n // Gets the highest record.high value for this node\r\n Node.prototype.getNodeHigh = function () {\r\n var high = this.records[0].high;\r\n for (var i = 1; i < this.records.length; i++) {\r\n if (this.records[i].high > high) {\r\n high = this.records[i].high;\r\n }\r\n }\r\n return high;\r\n };\r\n // Updates height value of the node. Called during insertion, rebalance, removal\r\n Node.prototype.updateHeight = function () {\r\n this.height = Math.max(height(this.left), height(this.right)) + 1;\r\n };\r\n // Updates the max value of all the parents after inserting into already existing node, as well as\r\n // removing the node completely or removing the record of an already existing node. Starts with\r\n // the parent of an affected node and bubbles up to root\r\n Node.prototype.updateMaxOfParents = function () {\r\n if (this === undefined) {\r\n return;\r\n }\r\n var thisHigh = this.getNodeHigh();\r\n if (this.left !== undefined && this.right !== undefined) {\r\n this.max = Math.max(Math.max(this.left.max, this.right.max), thisHigh);\r\n }\r\n else if (this.left !== undefined && this.right === undefined) {\r\n this.max = Math.max(this.left.max, thisHigh);\r\n }\r\n else if (this.left === undefined && this.right !== undefined) {\r\n this.max = Math.max(this.right.max, thisHigh);\r\n }\r\n else {\r\n this.max = thisHigh;\r\n }\r\n if (this.parent) {\r\n this.parent.updateMaxOfParents();\r\n }\r\n };\r\n /*\r\n Left-Left case:\r\n \r\n z y\r\n / \\ / \\\r\n y T4 Right Rotate (z) x z\r\n / \\ - - - - - - - - -> / \\ / \\\r\n x T3 T1 T2 T3 T4\r\n / \\\r\n T1 T2\r\n \r\n Left-Right case:\r\n \r\n z z x\r\n / \\ / \\ / \\\r\n y T4 Left Rotate (y) x T4 Right Rotate(z) y z\r\n / \\ - - - - - - - - -> / \\ - - - - - - - -> / \\ / \\\r\n T1 x y T3 T1 T2 T3 T4\r\n / \\ / \\\r\n T2 T3 T1 T2\r\n */\r\n // Handles Left-Left case and Left-Right case after rebalancing AVL tree\r\n Node.prototype._updateMaxAfterRightRotate = function () {\r\n var parent = this.parent;\r\n var left = parent.left;\r\n // Update max of left sibling (x in first case, y in second)\r\n var thisParentLeftHigh = left.getNodeHigh();\r\n if (left.left === undefined && left.right !== undefined) {\r\n left.max = Math.max(thisParentLeftHigh, left.right.max);\r\n }\r\n else if (left.left !== undefined && left.right === undefined) {\r\n left.max = Math.max(thisParentLeftHigh, left.left.max);\r\n }\r\n else if (left.left === undefined && left.right === undefined) {\r\n left.max = thisParentLeftHigh;\r\n }\r\n else {\r\n left.max = Math.max(Math.max(left.left.max, left.right.max), thisParentLeftHigh);\r\n }\r\n // Update max of itself (z)\r\n var thisHigh = this.getNodeHigh();\r\n if (this.left === undefined && this.right !== undefined) {\r\n this.max = Math.max(thisHigh, this.right.max);\r\n }\r\n else if (this.left !== undefined && this.right === undefined) {\r\n this.max = Math.max(thisHigh, this.left.max);\r\n }\r\n else if (this.left === undefined && this.right === undefined) {\r\n this.max = thisHigh;\r\n }\r\n else {\r\n this.max = Math.max(Math.max(this.left.max, this.right.max), thisHigh);\r\n }\r\n // Update max of parent (y in first case, x in second)\r\n parent.max = Math.max(Math.max(parent.left.max, parent.right.max), parent.getNodeHigh());\r\n };\r\n /*\r\n Right-Right case:\r\n \r\n z y\r\n / \\ / \\\r\n T1 y Left Rotate(z) z x\r\n / \\ - - - - - - - -> / \\ / \\\r\n T2 x T1 T2 T3 T4\r\n / \\\r\n T3 T4\r\n \r\n Right-Left case:\r\n \r\n z z x\r\n / \\ / \\ / \\\r\n T1 y Right Rotate (y) T1 x Left Rotate(z) z y\r\n / \\ - - - - - - - - -> / \\ - - - - - - - -> / \\ / \\\r\n x T4 T2 y T1 T2 T3 T4\r\n / \\ / \\\r\n T2 T3 T3 T4\r\n */\r\n // Handles Right-Right case and Right-Left case in rebalancing AVL tree\r\n Node.prototype._updateMaxAfterLeftRotate = function () {\r\n var parent = this.parent;\r\n var right = parent.right;\r\n // Update max of right sibling (x in first case, y in second)\r\n var thisParentRightHigh = right.getNodeHigh();\r\n if (right.left === undefined && right.right !== undefined) {\r\n right.max = Math.max(thisParentRightHigh, right.right.max);\r\n }\r\n else if (right.left !== undefined && right.right === undefined) {\r\n right.max = Math.max(thisParentRightHigh, right.left.max);\r\n }\r\n else if (right.left === undefined && right.right === undefined) {\r\n right.max = thisParentRightHigh;\r\n }\r\n else {\r\n right.max = Math.max(Math.max(right.left.max, right.right.max), thisParentRightHigh);\r\n }\r\n // Update max of itself (z)\r\n var thisHigh = this.getNodeHigh();\r\n if (this.left === undefined && this.right !== undefined) {\r\n this.max = Math.max(thisHigh, this.right.max);\r\n }\r\n else if (this.left !== undefined && this.right === undefined) {\r\n this.max = Math.max(thisHigh, this.left.max);\r\n }\r\n else if (this.left === undefined && this.right === undefined) {\r\n this.max = thisHigh;\r\n }\r\n else {\r\n this.max = Math.max(Math.max(this.left.max, this.right.max), thisHigh);\r\n }\r\n // Update max of parent (y in first case, x in second)\r\n parent.max = Math.max(Math.max(parent.left.max, right.max), parent.getNodeHigh());\r\n };\r\n Node.prototype._leftRotate = function () {\r\n var rightChild = this.right;\r\n rightChild.parent = this.parent;\r\n if (rightChild.parent === undefined) {\r\n this.intervalTree.root = rightChild;\r\n }\r\n else {\r\n if (rightChild.parent.left === this) {\r\n rightChild.parent.left = rightChild;\r\n }\r\n else if (rightChild.parent.right === this) {\r\n rightChild.parent.right = rightChild;\r\n }\r\n }\r\n this.right = rightChild.left;\r\n if (this.right !== undefined) {\r\n this.right.parent = this;\r\n }\r\n rightChild.left = this;\r\n this.parent = rightChild;\r\n this.updateHeight();\r\n rightChild.updateHeight();\r\n };\r\n Node.prototype._rightRotate = function () {\r\n var leftChild = this.left;\r\n leftChild.parent = this.parent;\r\n if (leftChild.parent === undefined) {\r\n this.intervalTree.root = leftChild;\r\n }\r\n else {\r\n if (leftChild.parent.left === this) {\r\n leftChild.parent.left = leftChild;\r\n }\r\n else if (leftChild.parent.right === this) {\r\n leftChild.parent.right = leftChild;\r\n }\r\n }\r\n this.left = leftChild.right;\r\n if (this.left !== undefined) {\r\n this.left.parent = this;\r\n }\r\n leftChild.right = this;\r\n this.parent = leftChild;\r\n this.updateHeight();\r\n leftChild.updateHeight();\r\n };\r\n // Rebalances the tree if the height value between two nodes of the same parent is greater than\r\n // two. There are 4 cases that can happen which are outlined in the graphics above\r\n Node.prototype._rebalance = function () {\r\n if (height(this.left) >= 2 + height(this.right)) {\r\n var left = this.left;\r\n if (height(left.left) >= height(left.right)) {\r\n // Left-Left case\r\n this._rightRotate();\r\n this._updateMaxAfterRightRotate();\r\n }\r\n else {\r\n // Left-Right case\r\n left._leftRotate();\r\n this._rightRotate();\r\n this._updateMaxAfterRightRotate();\r\n }\r\n }\r\n else if (height(this.right) >= 2 + height(this.left)) {\r\n var right = this.right;\r\n if (height(right.right) >= height(right.left)) {\r\n // Right-Right case\r\n this._leftRotate();\r\n this._updateMaxAfterLeftRotate();\r\n }\r\n else {\r\n // Right-Left case\r\n right._rightRotate();\r\n this._leftRotate();\r\n this._updateMaxAfterLeftRotate();\r\n }\r\n }\r\n };\r\n Node.prototype.insert = function (record) {\r\n if (record.low < this.key) {\r\n // Insert into left subtree\r\n if (this.left === undefined) {\r\n this.left = new Node(this.intervalTree, record);\r\n this.left.parent = this;\r\n }\r\n else {\r\n this.left.insert(record);\r\n }\r\n }\r\n else {\r\n // Insert into right subtree\r\n if (this.right === undefined) {\r\n this.right = new Node(this.intervalTree, record);\r\n this.right.parent = this;\r\n }\r\n else {\r\n this.right.insert(record);\r\n }\r\n }\r\n // Update the max value of this ancestor if needed\r\n if (this.max < record.high) {\r\n this.max = record.high;\r\n }\r\n // Update height of each node\r\n this.updateHeight();\r\n // Rebalance the tree to ensure all operations are executed in O(logn) time. This is especially\r\n // important in searching, as the tree has a high chance of degenerating without the rebalancing\r\n this._rebalance();\r\n };\r\n Node.prototype._getOverlappingRecords = function (currentNode, low, high) {\r\n if (currentNode.key <= high && low <= currentNode.getNodeHigh()) {\r\n // Nodes are overlapping, check if individual records in the node are overlapping\r\n var tempResults = [];\r\n for (var i = 0; i < currentNode.records.length; i++) {\r\n if (currentNode.records[i].high >= low) {\r\n tempResults.push(currentNode.records[i]);\r\n }\r\n }\r\n return tempResults;\r\n }\r\n return [];\r\n };\r\n Node.prototype.search = function (low, high) {\r\n // Don't search nodes that don't exist\r\n if (this === undefined) {\r\n return [];\r\n }\r\n var leftSearch = [];\r\n var ownSearch = [];\r\n var rightSearch = [];\r\n // If interval is to the right of the rightmost point of any interval in this node and all its\r\n // children, there won't be any matches\r\n if (low > this.max) {\r\n return [];\r\n }\r\n // Search left children\r\n if (this.left !== undefined && this.left.max >= low) {\r\n leftSearch = this.left.search(low, high);\r\n }\r\n // Check this node\r\n ownSearch = this._getOverlappingRecords(this, low, high);\r\n // If interval is to the left of the start of this interval, then it can't be in any child to\r\n // the right\r\n if (high < this.key) {\r\n return leftSearch.concat(ownSearch);\r\n }\r\n // Otherwise, search right children\r\n if (this.right !== undefined) {\r\n rightSearch = this.right.search(low, high);\r\n }\r\n // Return accumulated results, if any\r\n return leftSearch.concat(ownSearch, rightSearch);\r\n };\r\n // Searches for a node by a `key` value\r\n Node.prototype.searchExisting = function (low) {\r\n if (this === undefined) {\r\n return undefined;\r\n }\r\n if (this.key === low) {\r\n return this;\r\n }\r\n else if (low < this.key) {\r\n if (this.left !== undefined) {\r\n return this.left.searchExisting(low);\r\n }\r\n }\r\n else {\r\n if (this.right !== undefined) {\r\n return this.right.searchExisting(low);\r\n }\r\n }\r\n return undefined;\r\n };\r\n // Returns the smallest node of the subtree\r\n Node.prototype._minValue = function () {\r\n if (this.left === undefined) {\r\n return this;\r\n }\r\n else {\r\n return this.left._minValue();\r\n }\r\n };\r\n Node.prototype.remove = function (node) {\r\n var parent = this.parent;\r\n if (node.key < this.key) {\r\n // Node to be removed is on the left side\r\n if (this.left !== undefined) {\r\n return this.left.remove(node);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n else if (node.key > this.key) {\r\n // Node to be removed is on the right side\r\n if (this.right !== undefined) {\r\n return this.right.remove(node);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n else {\r\n if (this.left !== undefined && this.right !== undefined) {\r\n // Node has two children\r\n var minValue = this.right._minValue();\r\n this.key = minValue.key;\r\n this.records = minValue.records;\r\n return this.right.remove(this);\r\n }\r\n else if (parent.left === this) {\r\n // One child or no child case on left side\r\n if (this.right !== undefined) {\r\n parent.left = this.right;\r\n this.right.parent = parent;\r\n }\r\n else {\r\n parent.left = this.left;\r\n if (this.left !== undefined) {\r\n this.left.parent = parent;\r\n }\r\n }\r\n parent.updateMaxOfParents();\r\n parent.updateHeight();\r\n parent._rebalance();\r\n return this;\r\n }\r\n else if (parent.right === this) {\r\n // One child or no child case on right side\r\n if (this.right !== undefined) {\r\n parent.right = this.right;\r\n this.right.parent = parent;\r\n }\r\n else {\r\n parent.right = this.left;\r\n if (this.left !== undefined) {\r\n this.left.parent = parent;\r\n }\r\n }\r\n parent.updateMaxOfParents();\r\n parent.updateHeight();\r\n parent._rebalance();\r\n return this;\r\n }\r\n }\r\n };\r\n return Node;\r\n}());\r\nexports.Node = Node;\r\nvar IntervalTree = /** @class */ (function () {\r\n function IntervalTree() {\r\n this.count = 0;\r\n }\r\n IntervalTree.prototype.insert = function (record) {\r\n if (record.low > record.high) {\r\n throw new Error('`low` value must be lower or equal to `high` value');\r\n }\r\n if (this.root === undefined) {\r\n // Base case: Tree is empty, new node becomes root\r\n this.root = new Node(this, record);\r\n this.count++;\r\n return true;\r\n }\r\n else {\r\n // Otherwise, check if node already exists with the same key\r\n var node = this.root.searchExisting(record.low);\r\n if (node !== undefined) {\r\n // Check the records in this node if there already is the one with same low, high, data\r\n for (var i = 0; i < node.records.length; i++) {\r\n if (isSame(node.records[i], record)) {\r\n // This record is same as the one we're trying to insert; return false to indicate\r\n // nothing has been inserted\r\n return false;\r\n }\r\n }\r\n // Add the record to the node\r\n node.records.push(record);\r\n // Update max of the node and its parents if necessary\r\n if (record.high > node.max) {\r\n node.max = record.high;\r\n if (node.parent) {\r\n node.parent.updateMaxOfParents();\r\n }\r\n }\r\n this.count++;\r\n return true;\r\n }\r\n else {\r\n // Node with this key doesn't already exist. Call insert function on root's node\r\n this.root.insert(record);\r\n this.count++;\r\n return true;\r\n }\r\n }\r\n };\r\n IntervalTree.prototype.search = function (low, high) {\r\n if (this.root === undefined) {\r\n // Tree is empty; return empty array\r\n return [];\r\n }\r\n else {\r\n return this.root.search(low, high);\r\n }\r\n };\r\n IntervalTree.prototype.remove = function (record) {\r\n if (this.root === undefined) {\r\n // Tree is empty; nothing to remove\r\n return false;\r\n }\r\n else {\r\n var node = this.root.searchExisting(record.low);\r\n if (node === undefined) {\r\n return false;\r\n }\r\n else if (node.records.length > 1) {\r\n var removedRecord = void 0;\r\n // Node with this key has 2 or more records. Find the one we need and remove it\r\n for (var i = 0; i < node.records.length; i++) {\r\n if (isSame(node.records[i], record)) {\r\n removedRecord = node.records[i];\r\n node.records.splice(i, 1);\r\n break;\r\n }\r\n }\r\n if (removedRecord) {\r\n removedRecord = undefined;\r\n // Update max of that node and its parents if necessary\r\n if (record.high === node.max) {\r\n var nodeHigh = node.getNodeHigh();\r\n if (node.left !== undefined && node.right !== undefined) {\r\n node.max = Math.max(Math.max(node.left.max, node.right.max), nodeHigh);\r\n }\r\n else if (node.left !== undefined && node.right === undefined) {\r\n node.max = Math.max(node.left.max, nodeHigh);\r\n }\r\n else if (node.left === undefined && node.right !== undefined) {\r\n node.max = Math.max(node.right.max, nodeHigh);\r\n }\r\n else {\r\n node.max = nodeHigh;\r\n }\r\n if (node.parent) {\r\n node.parent.updateMaxOfParents();\r\n }\r\n }\r\n this.count--;\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else if (node.records.length === 1) {\r\n // Node with this key has only 1 record. Check if the remaining record in this node is\r\n // actually the one we want to remove\r\n if (isSame(node.records[0], record)) {\r\n // The remaining record is the one we want to remove. Remove the whole node from the tree\r\n if (this.root.key === node.key) {\r\n // We're removing the root element. Create a dummy node that will temporarily take\r\n // root's parent role\r\n var rootParent = new Node(this, { low: record.low, high: record.low });\r\n rootParent.left = this.root;\r\n this.root.parent = rootParent;\r\n var removedNode = this.root.remove(node);\r\n this.root = rootParent.left;\r\n if (this.root !== undefined) {\r\n this.root.parent = undefined;\r\n }\r\n if (removedNode) {\r\n removedNode = undefined;\r\n this.count--;\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else {\r\n var removedNode = this.root.remove(node);\r\n if (removedNode) {\r\n removedNode = undefined;\r\n this.count--;\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n else {\r\n // The remaining record is not the one we want to remove\r\n return false;\r\n }\r\n }\r\n else {\r\n // No records at all in this node?! Shouldn't happen\r\n return false;\r\n }\r\n }\r\n };\r\n IntervalTree.prototype.inOrder = function () {\r\n return new InOrder(this.root);\r\n };\r\n IntervalTree.prototype.preOrder = function () {\r\n return new PreOrder(this.root);\r\n };\r\n return IntervalTree;\r\n}());\r\nexports.IntervalTree = IntervalTree;\r\nvar DataIntervalTree = /** @class */ (function () {\r\n function DataIntervalTree() {\r\n this.tree = new IntervalTree();\r\n }\r\n DataIntervalTree.prototype.insert = function (low, high, data) {\r\n return this.tree.insert({ low: low, high: high, data: data });\r\n };\r\n DataIntervalTree.prototype.remove = function (low, high, data) {\r\n return this.tree.remove({ low: low, high: high, data: data });\r\n };\r\n DataIntervalTree.prototype.search = function (low, high) {\r\n return this.tree.search(low, high).map(function (v) { return v.data; });\r\n };\r\n DataIntervalTree.prototype.inOrder = function () {\r\n return this.tree.inOrder();\r\n };\r\n DataIntervalTree.prototype.preOrder = function () {\r\n return this.tree.preOrder();\r\n };\r\n Object.defineProperty(DataIntervalTree.prototype, \"count\", {\r\n get: function () {\r\n return this.tree.count;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DataIntervalTree;\r\n}());\r\nexports.default = DataIntervalTree;\r\nvar InOrder = /** @class */ (function () {\r\n function InOrder(startNode) {\r\n this.stack = [];\r\n if (startNode !== undefined) {\r\n this.push(startNode);\r\n }\r\n }\r\n InOrder.prototype.next = function () {\r\n // Will only happen if stack is empty and pop is called\r\n if (this.currentNode === undefined) {\r\n return {\r\n done: true,\r\n value: undefined,\r\n };\r\n }\r\n // Process this node\r\n if (this.i < this.currentNode.records.length) {\r\n return {\r\n done: false,\r\n value: this.currentNode.records[this.i++],\r\n };\r\n }\r\n if (this.currentNode.right !== undefined) {\r\n this.push(this.currentNode.right);\r\n }\r\n else {\r\n // Might pop the last and set this.currentNode = undefined\r\n this.pop();\r\n }\r\n return this.next();\r\n };\r\n InOrder.prototype.push = function (node) {\r\n this.currentNode = node;\r\n this.i = 0;\r\n while (this.currentNode.left !== undefined) {\r\n this.stack.push(this.currentNode);\r\n this.currentNode = this.currentNode.left;\r\n }\r\n };\r\n InOrder.prototype.pop = function () {\r\n this.currentNode = this.stack.pop();\r\n this.i = 0;\r\n };\r\n return InOrder;\r\n}());\r\nexports.InOrder = InOrder;\r\nif (typeof Symbol === 'function') {\r\n InOrder.prototype[Symbol.iterator] = function () { return this; };\r\n}\r\nvar PreOrder = /** @class */ (function () {\r\n function PreOrder(startNode) {\r\n this.stack = [];\r\n this.i = 0;\r\n this.currentNode = startNode;\r\n }\r\n PreOrder.prototype.next = function () {\r\n // Will only happen if stack is empty and pop is called,\r\n // which only happens if there is no right node (i.e we are done)\r\n if (this.currentNode === undefined) {\r\n return {\r\n done: true,\r\n value: undefined,\r\n };\r\n }\r\n // Process this node\r\n if (this.i < this.currentNode.records.length) {\r\n return {\r\n done: false,\r\n value: this.currentNode.records[this.i++],\r\n };\r\n }\r\n if (this.currentNode.right !== undefined) {\r\n this.push(this.currentNode.right);\r\n }\r\n if (this.currentNode.left !== undefined) {\r\n this.push(this.currentNode.left);\r\n }\r\n this.pop();\r\n return this.next();\r\n };\r\n PreOrder.prototype.push = function (node) {\r\n this.stack.push(node);\r\n };\r\n PreOrder.prototype.pop = function () {\r\n this.currentNode = this.stack.pop();\r\n this.i = 0;\r\n };\r\n return PreOrder;\r\n}());\r\nexports.PreOrder = PreOrder;\r\nif (typeof Symbol === 'function') {\r\n PreOrder.prototype[Symbol.iterator] = function () { return this; };\r\n}\r\n//# sourceMappingURL=index.js.map","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","import { jsPDF, jsPDFOptions } from 'jspdf';\nimport { IHTMLRenderType } from './flat_layout/flat_html';\nimport { SurveyHelper } from './helper_survey';\nimport { LocalizableString } from 'survey-core';\n// import Fonts from './fonts';\nimport setRadioAppearance from './jspdf_plugins/acroform_radio';\nimport './jspdf_plugins/acroform.js';\nimport './jspdf_plugins/from_html.js';\n\nexport interface IPoint {\n /**\n * An X-coordinate for the left element edge.\n */\n xLeft: number;\n /**\n * A Y-coordinate for the top element edge.\n */\n yTop: number;\n}\n/**\n * An interface that describes a rectangle.\n */\nexport interface IRect extends IPoint {\n /**\n * An X-coordinate for the right element edge.\n */\n xRight: number;\n /**\n * A Y-coordinate for the bottom element edge.\n */\n yBot: number;\n}\nexport interface ISize {\n width: number;\n height: number;\n}\nexport interface IMarginLR {\n /**\n * A left margin.\n */\n left?: number;\n /**\n * A right margin.\n */\n right?: number;\n}\n/**\n * An interface that describes margins.\n */\nexport interface IMargin extends IMarginLR {\n /**\n * A top margin.\n */\n top?: number;\n /**\n * A bottom margin.\n */\n bot?: number;\n}\n/**\n * PDF document configuration. Pass it as the second argument to the `SurveyPDF` constructor:\n *\n * ```js\n * const surveyPdf = new SurveyPDF.SurveyPDF(surveyJson, pdfDocOptions);\n *\n * // In modular applications:\n * import { SurveyPDF } from \"survey-pdf\";\n * const surveyPdf = new SurveyPDF(surveyJson, pdfDocOptions);\n * ```\n */\nexport interface IDocOptions {\n /**\n * Page orientation.\n *\n * Possible values:\n *\n * - `\"p\"` (default) - Portrait orientation.\n * - `\"l\"` - Landscape orientation.\n *\n * @see format\n */\n orientation?: 'p' | 'l';\n\n /**\n * Page format.\n *\n * Possible values:\n *\n * - `\"a0\"` - `\"a10\"` (`\"a4\"` is default)\n * - `\"b0\"` - `\"b10\"`\n * - `\"c0\"` - `\"c10\"`\n * - `\"dl\"`\n * - `\"letter\"`\n * - `\"government-letter\"`\n * - `\"legal\"`\n * - `\"junior-legal\"`\n * - `\"ledger\"`\n * - `\"tabloid\"`\n * - `\"credit-card\"`\n * - `[width, height]` - Custom page size in millimeters, for example, `[210, 297]`.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/save-completed-forms-as-pdf-files/ (linkStyle))\n * @see orientation\n */\n format?: string | number[];\n\n /**\n * Font size in points.\n *\n * Default value: 14\n *\n * @see fontName\n */\n fontSize?: number;\n\n /**\n * Font name.\n *\n * Possible values:\n *\n * - `\"Helvetica\"` (default)\n * - `\"Courier\"`\n * - `\"Times\"`\n * - `\"Symbol\"`\n * - `\"ZapfDingbats\"`\n * - [Custom font name](https://surveyjs.io/pdf-generator/documentation/customize-pdf-form-settings#custom-fonts)\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/change-font-in-pdf-form/ (linkStyle))\n * @see fontSize\n */\n fontName?: string;\n\n base64Normal?: string;\n base64Bold?: string;\n /**\n * Specifies whether to apply a custom font to [HTML questions](https://surveyjs.io/form-library/examples/questiontype-html/).\n *\n * Default value: `false`\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/change-font-in-pdf-form/ (linkStyle))\n * @see htmlRenderAs\n */\n useCustomFontInHtml?: boolean;\n\n /**\n * Page margins.\n *\n * Set this property to an object with the following fields: `top`, `bot`, `left`, `right`.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/save-completed-forms-as-pdf-files/ (linkStyle))\n */\n margins?: IMargin;\n\n /**\n * Specifies how to render [HTML questions](https://surveyjs.io/Documentation/Library?id=questionhtmlmodel) into PDF.\n *\n * Possible values:\n *\n * - `\"standard\"` - Render HTML questions as selectable text.\n * - `\"image\"` - Render HTML questions as images.\n * - `\"auto\"` (default) - Select between the `\"standard\"` and `\"image\"` modes automatically based on the HTML content.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/split-html-image-across-pages/ (linkStyle))\n *\n * You can override this property for an individual HTML question. Set the question's `renderAs` property to `\"standard\"` or `\"image\"` in the survey JSON schema.\n * @see useCustomFontInHtml\n */\n htmlRenderAs?: IHTMLRenderType;\n\n /**\n * Specifies how to render [Matrix](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel), [Matrix Dropdown](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel), and [Matrix Dynamic](https://surveyjs.io/Documentation/Library?id=questionmatrixdynamicmodel) questions into PDF.\n *\n * Possible values:\n *\n * - `\"list\"` - Render matrix-like questions as lists.\n * - `\"auto\"` (default) - Render matrix-like questions as tables if they fit into the available space. Otherwise, render the questions as lists.\n *\n * You can override this property for an individual matrix-like question. Set the question's `renderAs` property to `\"list\"` in the survey JSON schema.\n */\n matrixRenderAs?: 'auto' | 'list';\n useLegacyBooleanRendering?: boolean;\n /**\n * Specifies how to render read-only questions.\n *\n * Possible values:\n *\n * - `\"text\"` - Render read-only questions as plain text and custom primitives.\n * - `\"acroform\"` - Use Adobe AcroForms to render questions that support them as interactive form elements switched to their native read-only state. Other questions are rendered in `\"text\"` mode.\n * - `\"auto\"` (default) - Prefer the `\"text\"` mode but use `\"acroform\"` for [File Upload](https://surveyjs.io/form-library/documentation/api-reference/file-model) questions and links.\n */\n readonlyRenderAs?: 'auto' | 'text' | 'acroform';\n\n textFieldRenderAs?: 'singleLine' | 'multiLine';\n\n /**\n * Specifies whether to compress the PDF document. Compressed documents do not support [custom fonts](https://surveyjs.io/Documentation/Pdf-Export?id=Customization-ChangeFonts#use-custom-font).\n *\n * Default value: `false`\n */\n compress?: boolean;\n\n /**\n * Specifies whether to apply `imageFit` settings specified in the survey JSON schema to exported images.\n *\n * Default value: `false`\n *\n * This property applies the following settings:\n *\n * - [`imageFit`](https://surveyjs.io/form-library/documentation/api-reference/add-image-to-survey#imageFit) to exported [Image](https://surveyjs.io/form-library/documentation/api-reference/add-image-to-survey) questions\n * - [`imageFit`](https://surveyjs.io/form-library/documentation/api-reference/image-picker-question-model#imageFit) to exported [Image Picker](https://surveyjs.io/form-library/documentation/api-reference/image-picker-question-model) questions\n * - [`logoFit`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#logoFit) to an exported logo in the survey header\n *\n * If you enable the `applyImageFit` property, the quality of images may be lower because they pass through several conversions. If `applyImageFit` is disabled, exported images fill the entire container and do not preserve their aspect ratio, but their quality remains the same because they are exported as is.\n */\n applyImageFit?: boolean;\n\n /**\n * Specifies whether the PDF document contains text in right-to-left languages.\n *\n * Default value: `false`\n */\n isRTL?: boolean;\n /**\n * Specifies whether to include only selected choices when PDF Generator renders a [Multi-Select Dropdown (Tag Box)](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question.\n *\n * Default value: `false` (include all choices)\n */\n tagboxSelectedChoicesOnly?: boolean;\n}\n\nexport class DocOptions implements IDocOptions {\n public static readonly MM_TO_PT = 72 / 25.4;\n public static readonly FONT_SIZE = 14;\n protected _orientation: 'l' | 'p';\n protected _format: string | number[];\n protected _fontSize: number;\n protected _fontName: string;\n public static SEGOE_NORMAL: string;\n public static SEGOE_BOLD: string;\n protected _base64Normal: string = undefined;\n protected _base64Bold: string = undefined;\n protected _useCustomFontInHtml: boolean;\n protected _margins: IMargin;\n protected _htmlRenderAs: IHTMLRenderType;\n protected _matrixRenderAs: 'auto' | 'list';\n protected _readonlyRenderAs: 'auto' | 'text' | 'acroform';\n protected _compress: boolean;\n protected _applyImageFit: boolean;\n protected _useLegacyBooleanRendering: boolean\n protected _isRTL: boolean;\n protected _tagboxSelectedChoicesOnly: boolean;\n public constructor(options: IDocOptions) {\n if (typeof options.orientation === 'undefined') {\n if (typeof options.format === 'undefined' ||\n options.format[0] < options.format[1]) {\n this._orientation = 'p';\n }\n else this._orientation = 'l';\n }\n else this._orientation = options.orientation;\n this._format = options.format || 'a4';\n if (Array.isArray(this._format)) {\n this._format = this._format.map(f => f * DocOptions.MM_TO_PT);\n }\n this._fontSize = options.fontSize || DocOptions.FONT_SIZE;\n if(!options.fontName) {\n if(!DocOptions.SEGOE_BOLD && !DocOptions.SEGOE_NORMAL) {\n this._fontName = SurveyHelper.STANDARD_FONT;\n } else {\n this._fontName = 'segoe';\n }\n } else {\n this._fontName = options.fontName;\n }\n if ((typeof options.fontName !== 'undefined' &&\n (typeof options.base64Normal !== 'undefined' ||\n typeof options.base64Bold !== 'undefined'))) {\n this._base64Normal = options.base64Normal || options.base64Bold;\n this._base64Bold = options.base64Bold || options.base64Normal;\n }\n else if (this.fontName === 'segoe') {\n // this._base64Normal = Fonts.SEGOE_NORMAL;\n // this._base64Bold = Fonts.SEGOE_BOLD;\n this._base64Normal = DocOptions.SEGOE_NORMAL;\n this._base64Bold = DocOptions.SEGOE_BOLD;\n }\n this._margins = SurveyHelper.clone(options.margins);\n if (typeof this._margins === 'undefined') {\n this._margins = {};\n }\n if (typeof this._margins.top === 'undefined') {\n this._margins.top = 10.0;\n }\n if (typeof this._margins.bot === 'undefined') {\n this._margins.bot = 10.0;\n }\n if (typeof this._margins.left === 'undefined') {\n this._margins.left = 10.0;\n }\n if (typeof this._margins.right === 'undefined') {\n this._margins.right = 10.0;\n }\n Object.keys(this._margins).forEach((name: string) => {\n (<any>this._margins)[name] = (<any>this._margins)[name] * DocOptions.MM_TO_PT;\n });\n this._htmlRenderAs = options.htmlRenderAs || 'auto';\n this._matrixRenderAs = options.matrixRenderAs || 'auto';\n this._readonlyRenderAs = options.readonlyRenderAs || 'auto';\n this._compress = options.compress || false;\n this._applyImageFit = options.applyImageFit || false;\n this._useLegacyBooleanRendering = options.useLegacyBooleanRendering || false;\n this._isRTL = options.isRTL || false;\n this._tagboxSelectedChoicesOnly = options.tagboxSelectedChoicesOnly || false;\n }\n public get leftTopPoint(): IPoint {\n return {\n xLeft: this.margins.left,\n yTop: this.margins.top\n };\n }\n public get fontSize(): number {\n return this._fontSize;\n }\n public get fontName(): string {\n return this._fontName;\n }\n public get base64Normal(): string {\n return this._base64Normal;\n }\n public get base64Bold(): string {\n return this._base64Bold;\n }\n public get useCustomFontInHtml(): boolean {\n return this._useCustomFontInHtml;\n }\n public get margins(): IMargin {\n return this._margins;\n }\n public get format(): string | number[] {\n return this._format;\n }\n public get orientation(): 'l' | 'p' {\n return this._orientation;\n }\n public get htmlRenderAs(): IHTMLRenderType {\n return this._htmlRenderAs;\n }\n public get matrixRenderAs(): 'auto' | 'list' {\n return this._matrixRenderAs;\n }\n public get readonlyRenderAs(): 'auto' | 'text' | 'acroform' {\n return this._readonlyRenderAs;\n }\n public get compress(): boolean {\n return this._compress;\n }\n public get applyImageFit(): boolean {\n return this._applyImageFit;\n }\n public get useLegacyBooleanRendering(): boolean {\n return this._useLegacyBooleanRendering;\n }\n public get isRTL(): boolean {\n return this._isRTL;\n }\n public get tagboxSelectedChoicesOnly(): boolean {\n return this._tagboxSelectedChoicesOnly;\n }\n}\n\n/**\n * The `DocController` object includes an API that allows you to configure main PDF document properties (font, margins, page width and height).\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/change-font-in-pdf-form/ (linkStyle))\n */\nexport class DocController extends DocOptions {\n private _doc: jsPDF;\n private _helperDoc: jsPDF;\n private _fontStyle: string;\n private marginsStack: IMarginLR[];\n public constructor(options: IDocOptions = {}) {\n super(options);\n const jspdfOptions: jsPDFOptions = {\n orientation: this.orientation,\n unit: 'pt',\n format: this.format,\n compress: this.compress\n };\n this._doc = new jsPDF(jspdfOptions);\n if (typeof this.base64Normal !== 'undefined' && !SurveyHelper.isFontExist(this, this.fontName)) {\n DocController.addFont(this.fontName, this.base64Normal, 'normal');\n DocController.addFont(this.fontName, this.base64Bold, 'bold');\n this._doc = new jsPDF(jspdfOptions);\n }\n setRadioAppearance(this._doc);\n this._useCustomFontInHtml = options.useCustomFontInHtml && SurveyHelper.isFontExist(this, this.fontName);\n this._helperDoc = new jsPDF(jspdfOptions);\n this._doc.setFont(this.fontName);\n this._helperDoc.setFont(this.fontName);\n this._doc.setFontSize(this.fontSize);\n this._helperDoc.setFontSize(this.fontSize);\n this._fontStyle = 'normal';\n this.marginsStack = [];\n }\n public static customFonts: { [name: string]: { normal: string, bold: string, italic: string, bolditalic: string } } = {};\n /**\n * Adds a custom font to the PDF Generator.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/change-font-in-pdf-form/ (linkStyle))\n * @param fontName A custom name that you will use to apply the custom font.\n * @param base64 The custom font as a Base64-encoded string. To encode your font to Base64, obtain it as a TTF file and use any TTF-to-Base64 online converter.\n * @param fontStyle The style of the custom font: `\"normal\"`, `\"bold\"`, `\"italic\"`, or `\"bolditalic\"`.\n */\n public static addFont(fontName: string, base64: string, fontStyle: 'normal' | 'bold' | 'italic' | 'bolditalic') {\n let font = DocController.customFonts[fontName];\n if (!font) {\n font = <any>{};\n DocController.customFonts[fontName] = font;\n }\n font[fontStyle] = base64;\n const addFontCallback: () => void = function () {\n const customFont = DocController.customFonts[fontName];\n if (!!customFont && !!customFont[fontStyle]) {\n const fontFile: string = `${fontName}-${fontStyle}.ttf`;\n this.addFileToVFS(fontFile, customFont[fontStyle]);\n this.addFont(fontFile, fontName, fontStyle);\n }\n };\n (<any>jsPDF).API.events.push(['addFonts', addFontCallback]);\n }\n public get doc(): any {\n return this._doc;\n }\n public get helperDoc(): any {\n return this._helperDoc;\n }\n public get fontName(): string {\n return this._fontName;\n }\n public set fontName(fontName: string) {\n this._fontName = fontName;\n this._doc.setFont(fontName);\n this._helperDoc.setFont(fontName);\n }\n public get fontSize(): number {\n return this._fontSize;\n }\n public set fontSize(fontSize: number) {\n this._fontSize = fontSize;\n this._doc.setFontSize(fontSize);\n this._helperDoc.setFontSize(fontSize);\n }\n public get fontStyle(): string {\n return this._fontStyle;\n }\n public set fontStyle(fontStyle: string) {\n this._fontStyle = fontStyle;\n this._doc.setFont(this._fontName, fontStyle);\n this._helperDoc.setFont(this._fontName, fontStyle);\n }\n public measureText(text: string | LocalizableString | number = 1, fontStyle: string = this._fontStyle,\n fontSize: number = this._fontSize): ISize {\n const oldFontSize: number = this._helperDoc.getFontSize();\n this._helperDoc.setFontSize(fontSize);\n this._helperDoc.setFont(this._fontName, fontStyle);\n const height: number = this._helperDoc.getLineHeight() / this._helperDoc.internal.scaleFactor;\n let width: number = 0.0;\n if (typeof text === 'number') {\n width = height * text;\n }\n else {\n text = typeof text === 'string' ? text : SurveyHelper.getLocString(text);\n width = text.split('').reduce((sm: number, cr: string) =>\n sm + this._helperDoc.getTextWidth(cr), 0.0);\n }\n this._helperDoc.setFontSize(oldFontSize);\n this._helperDoc.setFont(this._fontName, 'normal');\n return {\n width: width,\n height: height\n };\n }\n /**\n * The width of one character in pixels.\n */\n public get unitWidth(): number {\n return this.measureText().width;\n }\n /**\n * The heigth of one character in pixels.\n */\n public get unitHeight(): number {\n return this.measureText().height;\n }\n public pushMargins(left?: number, right?: number): void {\n this.marginsStack.push({ left: this.margins.left, right: this.margins.right });\n if (typeof left !== 'undefined') this.margins.left = left;\n if (typeof right !== 'undefined') this.margins.right = right;\n }\n public popMargins(): void {\n const margins: IMarginLR = this.marginsStack.pop();\n this.margins.left = margins.left;\n this.margins.right = margins.right;\n }\n /**\n * The width of a PDF page in pixels.\n */\n public get paperWidth(): number {\n return this.doc.internal.pageSize.width;\n }\n /**\n * The height of a PDF page in pixels.\n */\n public get paperHeight(): number {\n return this.doc.internal.pageSize.height;\n }\n public getNumberOfPages(): number {\n return this.doc.getNumberOfPages();\n }\n public addPage(): void {\n this.doc.addPage();\n }\n public getCurrentPageIndex(): number {\n return this.doc.getCurrentPageInfo().pageNumber - 1;\n }\n public setPage(index: number): void {\n this.doc.setPage(index + 1);\n }\n}\n","declare var Reflect: any;\n\nvar extendStatics = function(d: any, b: any): any {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d: any, b: any) {\n if (typeof b !== 'function' && b !== null)\n throw new TypeError('Class extends value ' + String(b) + ' is not a constructor or null');\n extendStatics(d, b);\n function __() { this.constructor = d; }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = (<any>Object).assign || function __assign(t: any) {\n for (var s: any, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nexport function __rest(s: any, e: any) {\n var t: any = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === 'function')\n for (var i = 0, q = Object.getOwnPropertySymbols(s); i < q.length; i++) {\n if (e.indexOf(q[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, q[i]))\n t[q[i]] = s[q[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators: any, target: any, key: any, desc: any) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);\n // eslint-disable-next-line no-cond-assign\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __awaiter(thisArg: any, _arguments: any, P: any, generator: any) {\n function adopt(value: any) { return value instanceof P ? value : new P(function (resolve: any) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve: any, reject: any) {\n function fulfilled(value: any) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value: any) { try { step(generator['throw'](value)); } catch (e) { reject(e); } }\n function step(result: any) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg: any, body: any) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: <any>[], ops: <any>[] }, f: any, y: any, t: any, g: any;\n return g = { next: verb(0), 'throw': verb(1), 'return': verb(2) }, typeof Symbol === 'function' && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n: any) { return function (v: any) { return step([n, v]); }; }\n function step(op: any) {\n if (f) throw new TypeError('Generator is already executing.');\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y['return'] : op[0] ? y['throw'] || ((t = y['return']) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { (<any>_) = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport function __spreadArray (to: any, from: any, pack: any) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar: any; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}","export { SurveyPDF } from '../survey';\nexport { SurveyHelper } from '../helper_survey';\nexport { IPoint, IRect, ISize, IMarginLR, IMargin, IDocOptions, DocOptions, DocController } from '../doc_controller';\nexport { FlatRepository } from '../flat_layout/flat_repository';\nexport { IFlatQuestion, FlatQuestion } from '../flat_layout/flat_question';\nexport { FlatQuestionDefault } from '../flat_layout/flat_default';\nexport { FlatBooleanCheckbox as FlatBoolean } from '../flat_layout/flat_boolean';\nexport { FlatCheckbox } from '../flat_layout/flat_checkbox';\nexport { FlatCustomModel } from '../flat_layout/flat_custom_model';\nexport { FlatComment } from '../flat_layout/flat_comment';\nexport { FlatDropdown } from '../flat_layout/flat_dropdown';\nexport { FlatExpression } from '../flat_layout/flat_expression';\nexport { FlatFile } from '../flat_layout/flat_file';\nexport { FlatHTML } from '../flat_layout/flat_html';\nexport { FlatImage } from '../flat_layout/flat_image';\nexport { FlatImagePicker } from '../flat_layout/flat_imagepicker';\nexport { FlatPanelDynamic } from '../flat_layout/flat_paneldynamic';\nexport { FlatRadiogroup } from '../flat_layout/flat_radiogroup';\nexport { FlatRanking } from '../flat_layout/flat_ranking';\nexport { FlatRating } from '../flat_layout/flat_rating';\nexport { FlatSlider } from '../flat_layout/flat_slider';\nexport { FlatSelectBase } from '../flat_layout/flat_selectbase';\nexport { FlatSignaturePad } from '../flat_layout/flat_signaturepad';\nexport { FlatTextbox } from '../flat_layout/flat_textbox';\nexport { FlatSurvey } from '../flat_layout/flat_survey';\nexport { FlatMatrix } from '../flat_layout/flat_matrix';\nexport { FlatMatrixMultiple } from '../flat_layout/flat_matrixmultiple';\nexport { FlatMatrixDynamic } from '../flat_layout/flat_matrixdynamic';\nexport { FlatMultipleText } from '../flat_layout/flat_multipletext';\nexport { PagePacker } from '../page_layout/page_packer';\nexport { EventHandler } from '../event_handler/event_handler';\nexport { HorizontalAlign, VerticalAlign, IDrawRectOptions, IDrawTextOptions, IDrawImageOptions, DrawCanvas } from '../event_handler/draw_canvas';\nexport { IPdfBrick, PdfBrick } from '../pdf_render/pdf_brick';\nexport { BooleanItemBrick } from '../pdf_render/pdf_booleanitem';\nexport { CheckboxItemBrick } from '../pdf_render/pdf_checkboxitem';\nexport { CheckItemBrick } from '../pdf_render/pdf_checkitem';\nexport { CompositeBrick } from '../pdf_render/pdf_composite';\nexport { CustomBrick } from '../pdf_render/pdf_custom';\nexport { DropdownBrick } from '../pdf_render/pdf_dropdown';\nexport { EmptyBrick } from '../pdf_render/pdf_empty';\nexport { HTMLBrick } from '../pdf_render/pdf_html';\nexport { ImageBrick } from '../pdf_render/pdf_image';\nexport { LinkBrick } from '../pdf_render/pdf_link';\nexport { RadioItemBrick } from '../pdf_render/pdf_radioitem';\nexport { RankingItemBrick } from '../pdf_render/pdf_rankingitem';\nexport { RowlineBrick } from '../pdf_render/pdf_rowline';\nexport { TextFieldBrick } from '../pdf_render/pdf_textfield';\nexport { TextBoldBrick } from '../pdf_render/pdf_textbold';\nexport { TextBrick } from '../pdf_render/pdf_text';\nexport { TitlePanelBrick } from '../pdf_render/pdf_titlepanel';\n\nimport { checkLibraryVersion } from 'survey-core';\ncheckLibraryVersion(`${process.env.VERSION}`, 'survey-pdf');","import { IQuestion, PanelModel, PageModel, Question } from 'survey-core';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatRepository } from '../flat_layout/flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\n\nexport class AdornersBaseOptions {\n public point: IPoint;\n public bricks: IPdfBrick[];\n public controller: DocController;\n public repository: FlatRepository;\n public module: any;\n\n public constructor(point: IPoint, bricks: IPdfBrick[],\n controller: DocController, repository: FlatRepository, module: any) {\n this.point = point;\n this.bricks = bricks;\n this.controller = controller;\n this.repository = repository;\n this.module = module;\n }\n}\nexport class AdornersOptions extends AdornersBaseOptions {\n public question: Question;\n public constructor(point: IPoint, bricks: IPdfBrick[],\n question: Question, controller: DocController,\n repository: FlatRepository, module: any) {\n super(point, bricks, controller, repository, module);\n this.question = question;\n }\n}\nexport class AdornersPanelOptions extends AdornersBaseOptions {\n public panel: PanelModel;\n public constructor(point: IPoint, bricks: IPdfBrick[],\n panel: PanelModel, controller: DocController,\n repository: FlatRepository, module: any) {\n super(point, bricks, controller, repository, module);\n this.panel = panel;\n }\n}\n\nexport class AdornersPageOptions extends AdornersBaseOptions {\n public page: PageModel;\n public constructor(point: IPoint, bricks: IPdfBrick[],\n page: PageModel, controller: DocController,\n repository: FlatRepository, module: any) {\n super(point, bricks, controller, repository, module);\n this.page = page;\n }\n}\n\n","import { IRect, IMargin, ISize, DocOptions, DocController } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { TextBoldBrick } from '../pdf_render/pdf_textbold';\nimport { SurveyHelper } from '../helper_survey';\n\n/**\n * Horizontal alignment types in onRenderHeader and onRenderFooter events\n */\nexport enum HorizontalAlign {\n NotSet = 'notset',\n Left = 'left',\n Center = 'center',\n Right = 'right'\n}\n/**\n * Vertical alignment types in onRenderHeader and onRenderFooter events\n */\nexport enum VerticalAlign {\n NotSet = 'notset',\n Top = 'top',\n Middle = 'middle',\n Bottom = 'bottom'\n}\n\nexport interface IDrawRectOptions {\n /**\n * Horizontal alignment within the rectangle that limits the drawing area.\n *\n * Possible values:\n *\n * - `\"center\"` (default)\n * - `\"left\"`\n * - `\"right\"`\n */\n horizontalAlign?: HorizontalAlign;\n /**\n * Vertical alignment within the rectangle that limits the drawing area.\n *\n * Possible values:\n *\n * - `\"middle\"` (default)\n * - `\"top\"`\n * - `\"bottom\"`\n */\n verticalAlign?: VerticalAlign;\n /**\n * The distance between the content and the borders of the rectangle. This property applies only if the content is aligned to the left/right or top/bottom.\n */\n margins?: IMargin;\n /**\n * An object with coordinates of the rectangle.\n */\n rect?: IRect;\n}\n/**\n * An object that configures rendering a piece of text.\n */\nexport interface IDrawTextOptions extends IDrawRectOptions {\n /**\n * A text string to be drawn.\n */\n text: string;\n /**\n * Font size in points.\n *\n * Default value: 14\n */\n fontSize?: number;\n /**\n * Enable this property to render the text string bold.\n *\n * Default value: `false`\n */\n isBold?: boolean;\n}\n/**\n * An object that configures rendering an image.\n */\nexport interface IDrawImageOptions extends IDrawRectOptions {\n /**\n * An image width in pixels. Defaults to the [rectangle width](https://surveyjs.io/pdf-generator/documentation/api-reference/idrawimageoptions#rect).\n */\n width?: number;\n /**\n * An image height in pixels. Defaults to the [rectangle height](https://surveyjs.io/pdf-generator/documentation/api-reference/idrawimageoptions#rect).\n */\n height?: number;\n /**\n * A string value with a base64-encoded image to be drawn.\n */\n base64: string;\n /**\n * Specifies how to resize the image to fit it into its container.\n *\n * Default value: `\"contain\"` if [`applyImageFit`](https://surveyjs.io/pdf-generator/documentation/api-reference/idocoptions#applyImageFit) is enabled or `undefined` if not.\n *\n * Refer to the [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property description for information on accepted values.\n */\n imageFit?: string;\n}\n\n/**\n * An object that describes a drawing area and enables you to draw an image or a piece of text within the area. You can access this object within functions that handle `SurveyPDF`'s [`onRenderHeader`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderHeader) and [`onRenderFooter`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderFooter) events.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n */\nexport class DrawCanvas {\n public constructor(public packs: IPdfBrick[],\n public controller: DocController,\n protected _rect: IRect,\n protected _countPages: number,\n protected _pageNumber: number) { }\n /**\n * A total number of pages in the document.\n */\n public get pageCount(): number {\n return this._countPages;\n }\n public get countPages(): number {\n return this._countPages;\n }\n /**\n * The number of the page that contains the drawing area. Enumeration starts with 1.\n */\n public get pageNumber(): number {\n return this._pageNumber;\n }\n /**\n * An object with coordinates of a rectangle that limits the drawing area. This object contain the following fields: `xLeft`, `xRight`, `yTop`, `yBot`.\n */\n public get rect(): IRect {\n return this._rect;\n }\n private alignRect(rectOptions: IDrawRectOptions, itemSize: ISize): IRect {\n if (typeof rectOptions.margins === 'undefined') {\n rectOptions.margins = { left: 0.0, right: 0.0, top: 0.0, bot: 0.0 };\n }\n else {\n if (typeof rectOptions.margins.left === 'undefined') {\n rectOptions.margins.left = 0.0;\n }\n if (typeof rectOptions.margins.right === 'undefined') {\n rectOptions.margins.right = 0.0;\n }\n if (typeof rectOptions.margins.top === 'undefined') {\n rectOptions.margins.top = 0.0;\n }\n if (typeof rectOptions.margins.bot === 'undefined') {\n rectOptions.margins.bot = 0.0;\n }\n }\n if (typeof rectOptions.rect === 'undefined') {\n if (typeof rectOptions.horizontalAlign === 'undefined' ||\n rectOptions.horizontalAlign === HorizontalAlign.NotSet) {\n rectOptions.horizontalAlign = HorizontalAlign.Center;\n }\n if (typeof rectOptions.verticalAlign === 'undefined' ||\n rectOptions.verticalAlign === VerticalAlign.NotSet) {\n rectOptions.verticalAlign = VerticalAlign.Middle;\n }\n }\n const rect: IRect = SurveyHelper.clone(this.rect);\n if (typeof rectOptions.horizontalAlign !== 'undefined') {\n switch (rectOptions.horizontalAlign) {\n case HorizontalAlign.Left:\n rect.xLeft = this.rect.xLeft + rectOptions.margins.left;\n rect.xRight = Math.min(this.rect.xRight - rectOptions.margins.right,\n this.rect.xLeft + rectOptions.margins.left + itemSize.width);\n break;\n case HorizontalAlign.Center:\n rect.xLeft = Math.max(this.rect.xLeft + rectOptions.margins.left,\n (this.rect.xLeft + this.rect.xRight - itemSize.width) / 2.0);\n rect.xRight = Math.min(this.rect.xRight - rectOptions.margins.right,\n (this.rect.xLeft + this.rect.xRight + itemSize.width) / 2.0);\n break;\n case HorizontalAlign.Right:\n rect.xLeft = Math.max(this.rect.xLeft + rectOptions.margins.left,\n this.rect.xRight - rectOptions.margins.right - itemSize.width);\n rect.xRight = this.rect.xRight - rectOptions.margins.right;\n break;\n }\n }\n else {\n rect.xLeft = rectOptions.rect.xLeft || this.rect.xLeft;\n rect.xRight = rectOptions.rect.xRight || this.rect.xRight;\n }\n if (typeof rectOptions.verticalAlign !== 'undefined') {\n switch (rectOptions.verticalAlign) {\n case VerticalAlign.Top:\n rect.yTop = this.rect.yTop + rectOptions.margins.top;\n rect.yBot = Math.min(this.rect.yBot - rectOptions.margins.bot,\n this.rect.yTop + rectOptions.margins.top + itemSize.height);\n break;\n case VerticalAlign.Middle:\n rect.yTop = Math.max(this.rect.yTop + rectOptions.margins.top,\n (this.rect.yTop + this.rect.yBot - itemSize.height) / 2.0);\n rect.yBot = Math.min(this.rect.yBot - rectOptions.margins.bot,\n (this.rect.yTop + this.rect.yBot + itemSize.height) / 2.0);\n break;\n case VerticalAlign.Bottom:\n rect.yTop = Math.max(this.rect.yTop + rectOptions.margins.top,\n this.rect.yBot - rectOptions.margins.bot - itemSize.height);\n rect.yBot = this.rect.yBot - rectOptions.margins.bot;\n break;\n }\n }\n else {\n rect.yTop = rectOptions.rect.yTop || this.rect.yTop;\n rect.yBot = rectOptions.rect.yBot || this.rect.yBot;\n }\n return rect;\n }\n /**\n * Draws a piece of text within the drawing area.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n * @param textOptions An [`IDrawTextOptions`](https://surveyjs.io/pdf-generator/documentation/api-reference/idrawtextoptions) object that configures the drawing.\n */\n public drawText(textOptions: IDrawTextOptions): void {\n textOptions = SurveyHelper.clone(textOptions);\n if (typeof textOptions.fontSize === 'undefined') {\n textOptions.fontSize = DocOptions.FONT_SIZE;\n }\n if (typeof textOptions.isBold === 'undefined') {\n textOptions.isBold = false;\n }\n const textSize: ISize = this.controller.measureText(textOptions.text,\n textOptions.isBold ? 'bold' : 'normal', textOptions.fontSize);\n const textRect: IRect = this.alignRect(textOptions, textSize);\n if (!textOptions.isBold) {\n this.packs.push(new TextBrick(null, this.controller,\n textRect, textOptions.text));\n }\n else {\n this.packs.push(new TextBoldBrick(null, this.controller,\n textRect, textOptions.text));\n }\n (<PdfBrick>this.packs[this.packs.length - 1]).fontSize = textOptions.fontSize;\n }\n /**\n * Draws an image within the drawing area.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n * @param imageOptions An [`IDrawImageOptions`](https://surveyjs.io/pdf-generator/documentation/api-reference/idrawimageoptions) object that configures drawing.\n */\n public async drawImage(imageOptions: IDrawImageOptions): Promise<void> {\n imageOptions = SurveyHelper.clone(imageOptions);\n if (typeof imageOptions.width === 'undefined') {\n imageOptions.width = this.rect.xRight - this.rect.xLeft;\n }\n if (typeof imageOptions.height === 'undefined') {\n imageOptions.height = this.rect.yBot - this.rect.yTop;\n }\n const imageSize: ISize = {\n width: imageOptions.width,\n height: imageOptions.height\n };\n const imageRect: IRect = this.alignRect(imageOptions, imageSize);\n this.controller.pushMargins(0, 0);\n this.packs.push(await SurveyHelper.createImageFlat(\n SurveyHelper.createPoint(imageRect, true, true),\n null, this.controller, { link: imageOptions.base64,\n width: imageRect.xRight - imageRect.xLeft,\n height: imageRect.yBot - imageRect.yTop, objectFit: imageOptions.imageFit }, !!imageOptions.imageFit || this.controller.applyImageFit));\n this.controller.popMargins();\n }\n}","import { Event, EventBase } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { DocController } from '../doc_controller';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { DrawCanvas } from './draw_canvas';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class EventAsync<Sender, Options> extends EventBase<Sender, Options> {\n public unshift(func: (sender: Sender, options: Options) => any) {\n if (this.hasFunc(func)) return;\n if (this.callbacks == null) {\n this.callbacks = new Array<(sender: Sender, options: Options) => any>();\n }\n this.callbacks.unshift(func);\n }\n public async fire(sender: Sender, options: Options) {\n if (this.callbacks == null) return;\n for (var i = 0; i < this.callbacks.length; i++) {\n await this.callbacks[i](sender, options);\n }\n }\n}\nexport class EventHandler {\n public static async process_header_events(survey: SurveyPDF,\n controller: DocController, packs: IPdfBrick[][]): Promise<void> {\n if (!survey.haveCommercialLicense) {\n survey.onRenderHeader.add((_, canvas) => {\n canvas.drawText({\n text: 'SurveyJS PDF | Please purchase a SurveyJS PDF developer license to use it in your app | https://surveyjs.io/Buy',\n fontSize: 10\n });\n });\n }\n for (let i: number = 0; i < packs.length; i++) {\n await survey.onRenderHeader.fire(survey, new DrawCanvas(packs[i], controller,\n SurveyHelper.createHeaderRect(controller), packs.length, i + 1));\n await survey.onRenderFooter.fire(survey, new DrawCanvas(packs[i], controller,\n SurveyHelper.createFooterRect(controller), packs.length, i + 1));\n }\n }\n}","import { IQuestion, ItemValue, LocalizableString, QuestionBooleanModel, QuestionRadiogroupModel, SurveyModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { BooleanItemBrick } from '../pdf_render/pdf_booleanitem';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { FlatRadiogroup } from './flat_radiogroup';\n\nexport class FlatBooleanCheckbox extends FlatQuestion {\n protected question: QuestionBooleanModel;\n constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionBooleanModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n const height: number = this.controller.unitHeight;\n const itemFlat: IPdfBrick = new BooleanItemBrick(this.question, this.controller,\n SurveyHelper.moveRect(\n SurveyHelper.scaleRect(SurveyHelper.createRect(point, height, height),\n SurveyHelper.SELECT_ITEM_FLAT_SCALE), point.xLeft));\n compositeFlat.addBrick(itemFlat);\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft = itemFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const locLabelText: LocalizableString = this.question.isIndeterminate ? null :\n this.question.booleanValue ? this.question.locLabelTrue : this.question.locLabelFalse;\n if (locLabelText !== null && locLabelText.renderedHtml !== null) {\n compositeFlat.addBrick(await SurveyHelper.createTextFlat(\n textPoint, this.question, this.controller, locLabelText, TextBrick));\n }\n return [compositeFlat];\n }\n}\nexport class FlatBoolean extends FlatRadiogroup {\n private items: Array<ItemValue>;\n constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.buildItems();\n }\n private buildItems() {\n const question = <QuestionBooleanModel>(<any>this.question);\n const falseChoice = new ItemValue((<QuestionBooleanModel>question).valueFalse !== undefined ? (<QuestionBooleanModel>question).valueFalse : false);\n const trueChoice = new ItemValue((<QuestionBooleanModel>question).valueTrue !== undefined ? (<QuestionBooleanModel>question).valueTrue : true);\n falseChoice.locOwner = question;\n falseChoice.setLocText((<QuestionBooleanModel>question).locLabelFalse);\n trueChoice.locOwner = question;\n trueChoice.setLocText((<QuestionBooleanModel>question).locLabelTrue);\n this.items = [falseChoice, trueChoice];\n }\n protected getVisibleChoices(): Array<ItemValue> {\n return this.items;\n }\n protected getColCount(): number {\n return 0;\n }\n}\n\nFlatRepository.getInstance().register('boolean', FlatBoolean);\nFlatRepository.getInstance().register('boolean-checkbox', FlatBooleanCheckbox);\n","import { IQuestion, ItemValue, QuestionCheckboxModel, QuestionTagboxModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IRect, DocController } from '../doc_controller';\nimport { FlatSelectBase } from './flat_selectbase';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { CheckboxItemBrick } from '../pdf_render/pdf_checkboxitem';\n\nexport class FlatCheckbox extends FlatSelectBase {\n protected question: QuestionCheckboxModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionCheckboxModel>question;\n }\n public generateFlatItem(rect: IRect, item: ItemValue, index: number): IPdfBrick {\n return new CheckboxItemBrick(this.question, this.controller, rect, item, index);\n }\n}\nexport class FlatTagbox extends FlatCheckbox {\n protected question: QuestionTagboxModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionTagboxModel>question;\n }\n protected getVisibleChoices(): Array<ItemValue> {\n if(this.controller.tagboxSelectedChoicesOnly) {\n return this.question.selectedChoices;\n } else {\n return super.getVisibleChoices();\n }\n }\n}\nFlatRepository.getInstance().register('tagbox', FlatTagbox);\nFlatRepository.getInstance().register('checkbox', FlatCheckbox);","import { IQuestion, QuestionCommentModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatComment extends FlatQuestion {\n protected question: QuestionCommentModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionCommentModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n return [await SurveyHelper.createCommentFlat(\n point, this.question, this.controller,\n {\n rows: this.question.rows,\n isReadOnly: this.question.isReadOnly,\n isMultiline: true,\n fieldName: this.question.id,\n placeholder: SurveyHelper.getLocString(this.question.locPlaceHolder),\n shouldRenderBorders: settings.readOnlyCommentRenderMode === 'textarea',\n value: this.question.value\n })];\n }\n}\n\nFlatRepository.getInstance().register('comment', FlatComment);","import { IQuestion, QuestionCustomModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\n\nexport class FlatCustomModel extends FlatQuestion {\n constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const flat = FlatRepository.getInstance().create(this.survey, this.question, this.controller, this.question.getType());\n return flat.generateFlatsContent(point);\n }\n}\n\nFlatRepository.getInstance().register('custom_model', FlatCustomModel);","import { IPoint } from '../doc_controller';\nimport { SurveyHelper } from '../helper_survey';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { FlatQuestion } from './flat_question';\n\nexport class FlatQuestionDefault extends FlatQuestion {\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const valueBrick = await SurveyHelper.createTextFlat(point, this.question, this.controller, `${this.question.displayValue}`, TextBrick);\n return [valueBrick];\n }\n}","import { IQuestion, QuestionDropdownModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { DropdownBrick } from '../pdf_render/pdf_dropdown';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatDropdown extends FlatQuestion {\n protected question: QuestionDropdownModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionDropdownModel>question;\n }\n protected async generateItemComment(point: IPoint): Promise<IPdfBrick> {\n const commentModel = this.question.getCommentTextAreaModel(this.question.selectedItem);\n return await SurveyHelper.createCommentFlat(\n point, this.question, this.controller, {\n fieldName: commentModel.id,\n rows: SurveyHelper.OTHER_ROWS_COUNT,\n value: commentModel.getTextValue(),\n shouldRenderBorders: settings.readOnlyCommentRenderMode === 'textarea',\n isReadOnly: this.question.isReadOnly,\n isMultiline: true,\n }\n );\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const valueBrick = !this.shouldRenderAsComment ? new DropdownBrick(this.question, this.controller, SurveyHelper.createTextFieldRect(point, this.controller)) : await SurveyHelper.createCommentFlat(point, this.question, this.controller,\n {\n fieldName: this.question.id,\n shouldRenderBorders: settings.readOnlyTextRenderMode === 'input',\n value: this.question.readOnlyText || '',\n isReadOnly: this.question.isReadOnly,\n placeholder: SurveyHelper.getLocString(this.question.locPlaceholder)\n });\n const compositeFlat: CompositeBrick = new CompositeBrick(valueBrick);\n if (this.question.isShowingChoiceComment) {\n const otherPoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n otherPoint.yTop += this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ROWS;\n compositeFlat.addBrick(await this.generateItemComment(otherPoint));\n }\n return [compositeFlat];\n }\n}\n\nFlatRepository.getInstance().register('dropdown', FlatDropdown);","import { IQuestion, QuestionExpressionModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatExpression extends FlatQuestion {\n protected question: QuestionExpressionModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionExpressionModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n return [await SurveyHelper.createCommentFlat(point, this.question, this.controller, {\n value: this.question.displayValue,\n isReadOnly: true,\n fieldName: this.question.id,\n shouldRenderBorders: settings.readOnlyTextRenderMode === 'input',\n })];\n }\n}\n\nFlatRepository.getInstance().register('expression', FlatExpression);","import { IQuestion, QuestionFileModel, surveyLocalization } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, ISize, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatFile extends FlatQuestion {\n public static readonly IMAGE_GAP_SCALE: number = 0.195;\n public static readonly TEXT_MIN_SCALE: number = 5.0;\n public static DEFAULT_IMAGE_FIT: string = 'contain';\n protected question: QuestionFileModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionFileModel>question;\n }\n private async generateFlatItem(point: IPoint, item: {\n name: string, type: string, content: string, imageSize?: ISize,\n }): Promise<IPdfBrick> {\n const compositeFlat: CompositeBrick = new CompositeBrick(await SurveyHelper.createLinkFlat(\n point, this.question, this.controller, item.name === undefined ? 'image' : item.name, item.content));\n if (SurveyHelper.canPreviewImage(this.question, item, item.content)) {\n const imagePoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n imagePoint.yTop += this.controller.unitHeight * FlatFile.IMAGE_GAP_SCALE;\n compositeFlat.addBrick(await SurveyHelper.createImageFlat(imagePoint, this.question, this.controller, { link: item.content, width: item.imageSize.width, height: item.imageSize.height, objectFit: FlatFile.DEFAULT_IMAGE_FIT }));\n }\n return compositeFlat;\n }\n private addLine(rowsFlats: CompositeBrick[], currPoint: IPoint, index: number, previewValue: Array<any>): void {\n if (index !== previewValue.length - 1) {\n rowsFlats[rowsFlats.length - 1].addBrick(\n SurveyHelper.createRowlineFlat(currPoint, this.controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n rowsFlats.push(new CompositeBrick());\n }\n }\n\n private async getImagePreviewContentWidth(item: { name: string, type: string, content: string, imageSize?: ISize }) {\n return Math.max(item.imageSize.width, FlatFile.TEXT_MIN_SCALE * this.controller.unitWidth);\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const previewValue = this.question.showPreview ? this.question.previewValue : this.question.value;\n if (!previewValue || previewValue.length === 0) {\n return [await SurveyHelper.createTextFlat(point, this.question,\n this.controller, this.question.noFileChosenCaption, TextBrick)];\n }\n const rowsFlats: CompositeBrick[] = [new CompositeBrick()];\n const currPoint: IPoint = SurveyHelper.clone(point);\n let yBot: number = currPoint.yTop;\n for (let i: number = 0; i < previewValue.length; i++) {\n let item: { name: string, type: string, content: string, imageSize?: ISize } = { ...previewValue[i] };\n const canPreviewImage = SurveyHelper.canPreviewImage(this.question, item, item.content);\n if (canPreviewImage) {\n item.imageSize = await SurveyHelper.getCorrectedImageSize(this.controller, { imageWidth: this.question.imageWidth, imageHeight: this.question.imageHeight, imageLink: previewValue[i].content, defaultImageWidth: 200, defaultImageHeight: 150 });\n }\n const availableWidth: number = this.controller.paperWidth -\n this.controller.margins.right - currPoint.xLeft;\n if (canPreviewImage) {\n const compositeWidth = await this.getImagePreviewContentWidth(item);\n if (availableWidth < compositeWidth) {\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = yBot;\n this.addLine(rowsFlats, currPoint, i, previewValue);\n }\n this.controller.pushMargins(currPoint.xLeft,\n this.controller.paperWidth - currPoint.xLeft - compositeWidth);\n const itemFlat: IPdfBrick = await this.generateFlatItem(currPoint, item);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n currPoint.xLeft += itemFlat.width;\n yBot = Math.max(yBot, itemFlat.yBot);\n this.controller.popMargins();\n }\n else {\n if (availableWidth < this.controller.unitWidth) {\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = yBot;\n this.addLine(rowsFlats, currPoint, i, previewValue);\n }\n const itemFlat: IPdfBrick = await this.generateFlatItem(currPoint, item);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n currPoint.xLeft += itemFlat.xRight - itemFlat.xLeft;\n yBot = Math.max(yBot, itemFlat.yBot);\n }\n currPoint.xLeft += this.controller.unitWidth;\n }\n return rowsFlats;\n }\n}\n\nFlatRepository.getInstance().register('file', FlatFile);","import { IQuestion, QuestionHtmlModel, Serializer } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\nimport { EmptyBrick } from '../pdf_render/pdf_empty';\n\nexport type IHTMLRenderType = 'auto' | 'standard' | 'image';\nexport class FlatHTML extends FlatQuestion {\n protected question: QuestionHtmlModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n }\n private chooseRender(html: string): IHTMLRenderType {\n if (/<[^>]*style[^<]*>/.test(html) ||\n /<[^>]*table[^<]*>/.test(html) ||\n /&\\w+;/.test(html)) {\n return 'image';\n }\n return 'standard';\n }\n\n private static correctHtmlRules: [{ searchRegExp: RegExp, replaceString: string }] = [\n { searchRegExp: /(<\\/?br\\s*?\\/?\\s*?>\\s*){2,}/g, replaceString: '<br>' }\n ]\n protected correctHtml(html: string): string {\n FlatHTML.correctHtmlRules.forEach((rule) => {\n html = html.replace(rule.searchRegExp, rule.replaceString);\n });\n return html;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n let renderAs: IHTMLRenderType = <IHTMLRenderType>this.question.renderAs;\n if(!SurveyHelper.hasDocument) {\n return [new EmptyBrick(SurveyHelper.createRect(point, 0, 0))];\n }\n if (renderAs === 'auto') renderAs = this.controller.htmlRenderAs;\n if (renderAs === 'auto') renderAs = this.chooseRender(SurveyHelper.getLocString(this.question.locHtml));\n const html: string = SurveyHelper.createHtmlContainerBlock(SurveyHelper.getLocString(this.question.locHtml), this.controller, renderAs);\n if (renderAs === 'image') {\n const width: number = SurveyHelper.getPageAvailableWidth(this.controller);\n const { url, aspect }: { url: string, aspect: number } =\n await SurveyHelper.htmlToImage(html, width, this.controller);\n const height: number = width / aspect;\n return [await SurveyHelper.createImageFlat(point, this.question, this.controller, { link: url, width, height })];\n }\n return [SurveyHelper.splitHtmlRect(this.controller, await SurveyHelper.createHTMLFlat(\n point, this.question, this.controller, this.correctHtml(html)))];\n }\n}\n\nSerializer.removeProperty('html', 'renderAs');\nSerializer.addProperty('html', {\n name: 'renderAs',\n default: 'auto',\n visible: false,\n choices: ['auto', 'standard', 'image']\n});\nFlatRepository.getInstance().register('html', FlatHTML);","import { IQuestion, QuestionImageModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController, ISize } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatImage extends FlatQuestion {\n protected question: QuestionImageModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionImageModel>question;\n }\n private async getCorrectImageSize(): Promise<ISize> {\n return await SurveyHelper.getCorrectedImageSize(this.controller, { imageWidth: this.question.imageWidth, imageHeight: this.question.imageHeight, imageLink: this.question.imageLink });\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const imageSize = await this.getCorrectImageSize();\n return [await SurveyHelper.createImageFlat(point, this.question,\n this.controller, { link: this.question.imageLink, width: imageSize.width, height: imageSize.height })];\n }\n}\n\nFlatRepository.getInstance().register('image', FlatImage);","import { IQuestion, ItemValue, QuestionImagePickerModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { FlatRadiogroup } from './flat_radiogroup';\nimport { CheckItemBrick } from '../pdf_render/pdf_checkitem';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatImagePicker extends FlatQuestion {\n protected question: QuestionImagePickerModel;\n protected radio: FlatRadiogroup;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionImagePickerModel>question;\n }\n private async generateFlatItem(point: IPoint, item: ItemValue, index: number): Promise<IPdfBrick> {\n const pageAvailableWidth = SurveyHelper.getPageAvailableWidth(this.controller);\n const imageFlat = await SurveyHelper.createImageFlat(point, this.question, this.controller, { link: (<any>item).imageLink, width: pageAvailableWidth, height: pageAvailableWidth / SurveyHelper.IMAGEPICKER_RATIO });\n const compositeFlat: CompositeBrick = new CompositeBrick(imageFlat);\n let buttonPoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n if (this.question.showLabel) {\n let labelFlat: IPdfBrick = await SurveyHelper.createTextFlat(buttonPoint, this.question, this.controller, item.text || item.value, TextBrick);\n compositeFlat.addBrick(labelFlat);\n buttonPoint = SurveyHelper.createPoint(labelFlat);\n }\n const height: number = this.controller.unitHeight;\n const buttonRect: IRect = SurveyHelper.createRect(buttonPoint, pageAvailableWidth, height);\n if (this.question.multiSelect) {\n compositeFlat.addBrick(new CheckItemBrick(this.controller,\n buttonRect, this.question.id + 'index' + index, { readOnly: this.question.isReadOnly || !item.isEnabled, question: this.question, item: item, checked: this.question.value.indexOf(item.value) !== -1, index: index }));\n }\n else {\n compositeFlat.addBrick(this.radio.generateFlatItem(buttonRect, item, index));\n }\n return compositeFlat;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n this.radio = this.question.multiSelect ? null :\n new FlatRadiogroup(this.survey, this.question, this.controller);\n const rowsFlats: CompositeBrick[] = [new CompositeBrick()];\n const colWidth: number = SurveyHelper.getImagePickerAvailableWidth(\n this.controller) / SurveyHelper.IMAGEPICKER_COUNT;\n let cols: number = ~~(SurveyHelper.\n getPageAvailableWidth(this.controller) / colWidth) || 1;\n const count: number = this.question.visibleChoices.length;\n cols = cols <= count ? cols : count;\n const rows: number = ~~(Math.ceil(count / cols));\n const currPoint: IPoint = SurveyHelper.clone(point);\n for (let i: number = 0; i < rows; i++) {\n let yBot: number = currPoint.yTop;\n this.controller.pushMargins();\n let currMarginLeft: number = this.controller.margins.left;\n for (let j: number = 0; j < cols; j++) {\n const index: number = i * cols + j;\n if (index == count) break;\n this.controller.margins.left = currMarginLeft;\n this.controller.margins.right = this.controller.paperWidth -\n currMarginLeft - colWidth;\n currMarginLeft = this.controller.paperWidth -\n this.controller.margins.right + this.controller.unitWidth;\n currPoint.xLeft = this.controller.margins.left;\n const itemFlat: IPdfBrick = await this.generateFlatItem(currPoint,\n this.question.visibleChoices[index], index);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n yBot = Math.max(yBot, itemFlat.yBot);\n }\n this.controller.popMargins();\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = yBot;\n if (i !== rows - 1) {\n rowsFlats[rowsFlats.length - 1].addBrick(\n SurveyHelper.createRowlineFlat(currPoint, this.controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n rowsFlats.push(new CompositeBrick());\n }\n }\n return rowsFlats;\n }\n}\n\nFlatRepository.getInstance().register('imagepicker', FlatImagePicker);","import { IQuestion, QuestionMatrixModel, MatrixRowModel,\n QuestionRadiogroupModel, ItemValue, Serializer } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { DocController, IPoint, IRect } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { RadioGroupWrap, RadioItemBrick } from '../pdf_render/pdf_radioitem';\nimport { CheckItemBrick } from '../pdf_render/pdf_checkitem';\n\nexport class FlatMatrix extends FlatQuestion {\n public static readonly GAP_BETWEEN_ROWS: number = 0.5;\n protected question: QuestionMatrixModel;\n constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, <QuestionRadiogroupModel>question, controller);\n this.question = <QuestionMatrixModel>question;\n }\n protected async generateFlatsHeader(point: IPoint): Promise<IPdfBrick[]> {\n const headers: IPdfBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n if(this.question.hasRows) {\n currPoint.xLeft += this.rowTitleWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n }\n for (let i: number = 0; i < this.question.visibleColumns.length; i++) {\n this.controller.pushMargins();\n this.controller.margins.left = currPoint.xLeft;\n this.controller.margins.right += (SurveyHelper.getPageAvailableWidth(this.controller) - this.columnWidth);\n headers.push(await SurveyHelper.createBoldTextFlat(currPoint,\n this.question, this.controller, this.question.visibleColumns[i].locText));\n currPoint.xLeft += this.columnWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.popMargins();\n }\n const compositeBrick: CompositeBrick = new CompositeBrick(...headers);\n return [compositeBrick, SurveyHelper.createRowlineFlat(SurveyHelper.createPoint(compositeBrick), this.controller)];\n }\n protected async generateFlatsRows(point: IPoint, isVertical: boolean): Promise<IPdfBrick[]> {\n const cells: IPdfBrick[] = [];\n let currPoint: IPoint = SurveyHelper.clone(point);\n for (let i: number = 0; i < this.question.visibleRows.length; i++) {\n const key: string = 'row' + i;\n const flatsRow: IPdfBrick[] = await new FlatMatrixRow(this.survey, this.question, this.controller,\n this.question.visibleRows[i], i, key, i == 0, isVertical, this.rowTitleWidth, this.columnWidth).generateFlatsContent(currPoint);\n currPoint = SurveyHelper.createPoint(SurveyHelper.mergeRects(...flatsRow));\n currPoint.yTop += this.controller.unitHeight * FlatMatrix.GAP_BETWEEN_ROWS;\n cells.push(...flatsRow);\n }\n return cells;\n }\n private rowTitleWidth: number;\n private columnWidth: number;\n private calculateColumnsWidthes() {\n const availableWidth = SurveyHelper.getPageAvailableWidth(this.controller);\n if(this.question.hasRows && this.question.rowTitleWidth) {\n this.controller.pushMargins();\n this.rowTitleWidth = SurveyHelper.parseWidth(this.question.rowTitleWidth, availableWidth);\n this.controller.margins.left += (this.rowTitleWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS);\n this.columnWidth = SurveyHelper.getColumnWidth(this.controller, this.question.visibleColumns.length);\n this.controller.popMargins();\n } else {\n this.columnWidth = this.rowTitleWidth = SurveyHelper.getColumnWidth(this.controller, this.question.visibleColumns.length + (this.question.hasRows ? 1 : 0));\n }\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n this.calculateColumnsWidthes();\n const isVertical: boolean = this.question.renderAs === 'list' || this.controller.matrixRenderAs === 'list' ||\n this.columnWidth < this.controller.measureText(SurveyHelper.MATRIX_COLUMN_WIDTH).width;\n let currPoint: IPoint = SurveyHelper.clone(point);\n const cells: IPdfBrick[] = [];\n if (!isVertical && this.question.showHeader && this.question.visibleColumns.length != 0) {\n let headers: IPdfBrick[] = await this.generateFlatsHeader(currPoint);\n currPoint = SurveyHelper.createPoint(SurveyHelper.mergeRects(...headers));\n currPoint.yTop += FlatMatrix.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n cells.push(...headers);\n }\n cells.push(...await this.generateFlatsRows(currPoint, isVertical));\n return cells;\n }\n}\n\nexport class FlatMatrixRow {\n private radioGroupWrap: RadioGroupWrap;\n public constructor(protected survey: SurveyPDF,\n protected question: QuestionMatrixModel, protected controller: DocController, private row: MatrixRowModel, private rowIndex: number,\n private key: string, protected isFirst: boolean = false, protected isVertical: boolean = false, private rowTitleWidth: number, private columnWidth: number) {\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n return this.isVertical ?\n await this.generateFlatsVerticallyCells(point) :\n await this.generateFlatsHorizontallyCells(point);\n }\n\n protected generateFlatItem(rect: IRect, item: ItemValue,\n index: number, key: string, context: any = {}) {\n const fieldName = this.question.id + key;\n const isChecked: boolean = this.row.isChecked(item);\n if(this.question.isMultiSelect) {\n return new CheckItemBrick(this.controller, rect, fieldName + 'index' + index, { question: this.question, index, checked: isChecked, item, readOnly: this.question.isReadOnly });\n } else {\n if (index === 0) {\n this.radioGroupWrap = new RadioGroupWrap(fieldName,\n this.controller, { readOnly: this.question.isReadOnly, question: this.question, ...context });\n (<any>this.question).pdfRadioGroupWrap = this.radioGroupWrap;\n }\n else if (typeof this.radioGroupWrap === 'undefined') {\n this.radioGroupWrap = (<any>this.question).pdfRadioGroupWrap;\n }\n return new RadioItemBrick(this.controller, rect,\n { question: this.question, index: index, checked: isChecked, item: item }, this.radioGroupWrap);\n }\n }\n\n protected async generateTextComposite(point: IPoint, column: ItemValue, index: number): Promise<IPdfBrick> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const itemRect = SurveyHelper.createRect(currPoint,\n SurveyHelper.getPageAvailableWidth(this.controller), this.controller.unitHeight);\n const radioFlat: IPdfBrick = this.generateFlatItem(itemRect, column, index, this.key, { row: this.row, rowIndex: this.rowIndex });\n currPoint.yTop = radioFlat.yBot + this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const cellTextFlat = await SurveyHelper.createTextFlat(currPoint, this.question, this.controller,\n this.question.getCellDisplayLocText(this.row.name, column), TextBrick);\n return new CompositeBrick(radioFlat, cellTextFlat);\n }\n protected async generateItemComposite(point: IPoint, column: ItemValue, index: number): Promise<IPdfBrick> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const itemRect: IRect = SurveyHelper.createRect(currPoint,\n this.controller.unitHeight, this.controller.unitHeight);\n const radioFlat: IPdfBrick = this.generateFlatItem(SurveyHelper.moveRect(\n SurveyHelper.scaleRect(itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE), itemRect.xLeft), column, index, this.key, { row: this.row, rowIndex: this.rowIndex });\n currPoint.xLeft = radioFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const radioText: IPdfBrick = await SurveyHelper.createTextFlat(currPoint, this.question,\n this.controller, column.locText, TextBrick);\n return new CompositeBrick(radioFlat, radioText);\n }\n protected async generateFlatsHorizontallyCells(point: IPoint) {\n const cells: IPdfBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n if (this.question.hasRows) {\n this.controller.pushMargins();\n currPoint.xLeft = this.controller.margins.left;\n this.controller.margins.right += (SurveyHelper.getPageAvailableWidth(this.controller) - this.rowTitleWidth);\n cells.push(await SurveyHelper.createTextFlat(currPoint, this.question, this.controller, this.row.locText, TextBrick));\n currPoint.xLeft += this.rowTitleWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.popMargins();\n }\n for (let i: number = 0; i < this.question.visibleColumns.length; i++) {\n const column: ItemValue = this.question.visibleColumns[i];\n const checked: boolean = this.row.value == column.value;\n this.controller.pushMargins();\n this.controller.margins.left = currPoint.xLeft;\n this.controller.margins.right += (SurveyHelper.getPageAvailableWidth(this.controller) - this.columnWidth);\n if (this.question.hasCellText) {\n cells.push(await this.generateTextComposite(currPoint, column, i));\n }\n else {\n const itemRect: IRect = SurveyHelper.createRect(currPoint, this.controller.unitHeight, this.controller.unitHeight);\n cells.push(this.generateFlatItem(SurveyHelper.moveRect(\n SurveyHelper.scaleRect(itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE), currPoint.xLeft), column, i, this.key, { row: this.row, rowIndex: this.rowIndex }));\n }\n currPoint.xLeft += this.columnWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.popMargins();\n }\n const compositeBrick = new CompositeBrick(...cells);\n return [compositeBrick, SurveyHelper.createRowlineFlat(SurveyHelper.createPoint(compositeBrick), this.controller)];\n }\n protected async generateFlatsVerticallyCells(point: IPoint): Promise<IPdfBrick[]> {\n const cells: IPdfBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n if (this.question.hasRows) {\n const rowTextFlat = await SurveyHelper.createTextFlat(currPoint, this.question,\n this.controller, this.row.locText, TextBrick);\n currPoint.yTop = rowTextFlat.yBot + FlatQuestion.CONTENT_GAP_VERT_SCALE * this.controller.unitHeight;\n cells.push(rowTextFlat);\n }\n cells.push(...await this.generateVerticallyItems(currPoint, this.question.visibleColumns));\n const compositeBrick: CompositeBrick = new CompositeBrick(...cells);\n return [compositeBrick, SurveyHelper.createRowlineFlat(SurveyHelper.createPoint(compositeBrick), this.controller)];\n }\n protected async generateVerticallyItems(point: IPoint, itemValues: ItemValue[]): Promise<IPdfBrick[]> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n for (let i: number = 0; i < itemValues.length; i++) {\n const itemFlat: IPdfBrick = await ((this.question.hasCellText) ? this.generateTextComposite : this.generateItemComposite).call(this, currPoint, itemValues[i], i);\n currPoint.yTop = itemFlat.yBot + SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n flats.push(itemFlat);\n }\n return flats;\n }\n}\n\nSerializer.removeProperty('matrix', 'renderAs');\nSerializer.addProperty('matrix', {\n name: 'renderAs',\n default: 'auto',\n visible: false,\n choices: ['auto', 'list']\n});\nFlatRepository.getInstance().register('matrix', FlatMatrix);","import { IQuestion, Serializer } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { DocController } from '../doc_controller';\nimport { FlatRepository } from './flat_repository';\nimport { FlatMatrixMultiple } from './flat_matrixmultiple';\n\nexport class FlatMatrixDynamic extends FlatMatrixMultiple {\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller, false);\n }\n}\n\nSerializer.removeProperty('matrixdynamic', 'renderAs');\nSerializer.addProperty('matrixdynamic', {\n name: 'renderAs',\n default: 'auto',\n visible: false,\n choices: ['auto', 'list']\n});\nFlatRepository.getInstance().register('matrixdynamic', FlatMatrixDynamic);","import {\n IQuestion, QuestionMatrixDropdownModelBase, QuestionMatrixDropdownRenderedTable,\n QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedCell, Serializer, PanelModel, QuestionMatrixDynamicModel,\n LocalizableString\n} from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { IFlatQuestion, FlatQuestion } from './flat_question';\nimport { FlatSelectBase } from './flat_selectbase';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { FlatSurvey } from './flat_survey';\n\nexport class FlatMatrixMultiple extends FlatQuestion {\n public static readonly GAP_BETWEEN_ROWS: number = 0.5;\n protected question: QuestionMatrixDropdownModelBase;\n public constructor(protected survey: SurveyPDF, question: IQuestion, controller: DocController,\n protected isMultiple: boolean = true) {\n super(survey, question, controller);\n this.question = <QuestionMatrixDropdownModelBase>question;\n }\n private visibleRowsValue: QuestionMatrixDropdownRenderedRow[];\n private get visibleRows() {\n if(!this.visibleRowsValue) {\n this.visibleRowsValue = this.question.renderedTable.rows.filter(row => row.visible);\n }\n return this.visibleRowsValue;\n }\n private async generateFlatsCellTitle(point: IPoint, locTitle: LocalizableString): Promise<CompositeBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n composite.addBrick(await SurveyHelper.createTextFlat(point,\n this.question, this.controller, locTitle, TextBrick));\n return composite;\n }\n private async generateFlatsCell(point: IPoint, cell: QuestionMatrixDropdownRenderedCell,\n location?: 'header' | 'footer', isWide: boolean = true): Promise<CompositeBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n if (cell.hasQuestion) {\n if(location == 'footer' && !cell.question.isAnswered) {}\n else if (isWide && cell.isChoice) {\n const flatMultipleColumnsQuestion: IFlatQuestion = FlatRepository.getInstance().create(\n this.survey, cell.question, this.controller, cell.question.getType());\n const itemRect: IRect = SurveyHelper.moveRect(SurveyHelper.scaleRect(\n SurveyHelper.createRect(point, this.controller.unitHeight, this.controller.unitHeight),\n SurveyHelper.SELECT_ITEM_FLAT_SCALE), point.xLeft);\n composite.addBrick((<FlatSelectBase>flatMultipleColumnsQuestion)\n .generateFlatItem(itemRect, cell.item, cell.choiceIndex));\n }\n else {\n cell.question.titleLocation = SurveyHelper.TITLE_LOCATION_MATRIX;\n composite.addBrick(...await SurveyHelper.generateQuestionFlats(\n this.survey, this.controller, cell.question, point));\n }\n }\n else if (cell.hasTitle) {\n if (location == 'header') {\n composite.addBrick(await SurveyHelper.createBoldTextFlat(point,\n this.question, this.controller, cell.locTitle));\n }\n else {\n composite.addBrick(await SurveyHelper.createTextFlat(point,\n this.question, this.controller, cell.locTitle, TextBrick));\n }\n }\n return composite;\n }\n private get hasDetailPanel(): boolean {\n return this.visibleRows.some((renderedRow) => renderedRow.row && this.question.hasDetailPanel(renderedRow.row));\n }\n private ignoreCell(cell: QuestionMatrixDropdownRenderedCell, index: number, location?: 'header' | 'footer', isWide: boolean = true): boolean {\n if(!isWide && location == 'footer' && cell.hasQuestion && !cell.question.isAnswered) return true;\n return !(cell.hasQuestion || cell.hasTitle || (this.isMultiple && (this.hasDetailPanel ? index == 1 : index == 0)));\n }\n private getRowLocation(row: QuestionMatrixDropdownRenderedRow) {\n return row === this.question.renderedTable.headerRow ? 'header' : (this.question.renderedTable.footerRow === row ? 'footer' : undefined);\n }\n private async generateFlatsRowHorisontal(point: IPoint, row: QuestionMatrixDropdownRenderedRow, columnWidth: number[]): Promise<CompositeBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n const currPoint: IPoint = SurveyHelper.clone(point);\n let lastRightMargin: number = this.controller.paperWidth - this.controller.margins.left +\n this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.pushMargins();\n let cnt = 0;\n const rowLocation = this.getRowLocation(row);\n for (let i = 0; i < row.cells.length; i++) {\n if (this.ignoreCell(row.cells[i], i, rowLocation)) continue;\n this.controller.margins.left = this.controller.paperWidth - lastRightMargin +\n this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.margins.right = this.controller.paperWidth -\n this.controller.margins.left - columnWidth[cnt];\n lastRightMargin = this.controller.margins.right;\n currPoint.xLeft = this.controller.margins.left;\n const cellContent: CompositeBrick = await this.generateFlatsCell(\n currPoint, row.cells[i], rowLocation);\n if (!cellContent.isEmpty) {\n composite.addBrick(cellContent);\n }\n cnt++;\n }\n this.controller.popMargins();\n return composite;\n }\n private async generateFlatsRowVertical(point: IPoint, row: QuestionMatrixDropdownRenderedRow): Promise<CompositeBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n const currPoint: IPoint = SurveyHelper.clone(point);\n const rowLocation = this.getRowLocation(row);\n for (let i: number = 0; i < row.cells.length; i++) {\n if (this.ignoreCell(row.cells[i], i, rowLocation, false)) continue;\n if (this.question.renderedTable.showHeader && (!this.isMultiple || i > 0) && row.cells[i].cell?.column?.locTitle) {\n composite.addBrick(await this.generateFlatsCellTitle(currPoint, row.cells[i].cell.column.locTitle));\n currPoint.yTop = composite.yBot + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n }\n composite.addBrick(await this.generateFlatsCell(currPoint, row.cells[i], rowLocation, false));\n currPoint.yTop = composite.yBot + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n }\n return composite;\n }\n private getAvalableWidth(colCount: number): number {\n return SurveyHelper.getPageAvailableWidth(this.controller) -\n (colCount - 1) * this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n }\n private calculateColumnWidth(rows: QuestionMatrixDropdownRenderedRow[], colCount: number): number[] {\n const availableWidth: number = this.getAvalableWidth(colCount);\n let remainWidth: number = availableWidth;\n let remainColCount: number = colCount;\n const columnWidth: number[] = [];\n const unsetCells: QuestionMatrixDropdownRenderedCell[] = [];\n let cells = rows[0].cells.filter((cell: QuestionMatrixDropdownRenderedCell, index: number) => !this.ignoreCell(cell, index));\n for (let i: number = 0; i < colCount; i++) {\n const width: number = SurveyHelper.parseWidth(cells[i].width,\n availableWidth, colCount) || 0.0;\n remainWidth -= width;\n if (width !== 0.0) {\n remainColCount--;\n } else {\n unsetCells.push(cells[i]);\n }\n columnWidth.push(width);\n }\n if (remainColCount === 0) return columnWidth;\n const heuristicWidth: number = this.controller.measureText(SurveyHelper.MATRIX_COLUMN_WIDTH).width;\n unsetCells.sort((cell1: QuestionMatrixDropdownRenderedCell, cell2: QuestionMatrixDropdownRenderedCell) => {\n let minWidth1 = SurveyHelper.parseWidth(cell1.minWidth, availableWidth, colCount) || 0.0;\n let minWidth2 = SurveyHelper.parseWidth(cell2.minWidth, availableWidth, colCount) || 0.0;\n return minWidth2 > minWidth1 ? 1 : -1;\n }).forEach((cell: QuestionMatrixDropdownRenderedCell) => {\n const equalWidth: number = remainWidth / remainColCount;\n const columnMinWidth: number = SurveyHelper.parseWidth(cell.minWidth, availableWidth, colCount) || 0.0;\n if(columnMinWidth > equalWidth && columnMinWidth > heuristicWidth) {\n remainWidth -= columnMinWidth;\n remainColCount--;\n }\n columnWidth[cells.indexOf(cell)] = Math.max(heuristicWidth, columnMinWidth, equalWidth);\n });\n return columnWidth;\n }\n private async generateOneRow(point: IPoint, row: QuestionMatrixDropdownRenderedRow, isWide: boolean, columnWidth: number[]): Promise<CompositeBrick> {\n if (isWide) {\n return await this.generateFlatsRowHorisontal(point, row, columnWidth);\n }\n return await this.generateFlatsRowVertical(point, row);\n }\n private async generateFlatsRows(point: IPoint, rows: QuestionMatrixDropdownRenderedRow[],\n colCount: number, isWide: boolean): Promise<CompositeBrick[]> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const rowsFlats: CompositeBrick[] = [];\n for (let i: number = 0; i < rows.length; i++) {\n let rowFlat: CompositeBrick = await this.generateOneRow(currPoint, rows[i],\n isWide, this.calculateColumnWidth(rows, colCount));\n if (rowFlat.isEmpty && !(rows[i].row && rows[i].row.hasPanel)) continue;\n if(!rowFlat.isEmpty) {\n if (i !== rows.length - 1) {\n currPoint.yTop = rowFlat.yBot;\n rowFlat.addBrick(SurveyHelper.createRowlineFlat(currPoint, this.controller));\n }\n rowsFlats.push(rowFlat);\n currPoint.yTop = rowFlat.yBot + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n }\n\n if (!!rows[i].row && rows[i].row.hasPanel) {\n rows[i].row.showDetailPanel();\n const currentDetailPanel: PanelModel = rows[i].row.detailPanel;\n for (let j = 0; j < currentDetailPanel.questions.length; j++) {\n currentDetailPanel.questions[j].id += '_' + i;\n }\n const panelBricks: IPdfBrick[] = await FlatSurvey.generateFlatsPanel(\n this.survey, this.controller, currentDetailPanel, currPoint);\n\n const currComposite: CompositeBrick = new CompositeBrick();\n currComposite.addBrick(...panelBricks);\n currPoint.yTop = currComposite.yBot + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n\n rowsFlats.push(currComposite);\n if (i !== rows.length - 1 && this.question.renderedTable.showHeader && isWide) {\n const header: CompositeBrick = await this.generateOneRow(currPoint, rows[0],\n isWide, this.calculateColumnWidth(rows, colCount));\n let currYTop = currComposite.yBot;\n if(!header.isEmpty) {\n currYTop = header.yBot;\n rowsFlats.push(header);\n }\n currPoint.yTop = currYTop + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n }\n }\n }\n return rowsFlats;\n }\n private calculateIsWide(table: QuestionMatrixDropdownRenderedTable, colCount: number) {\n const rows: QuestionMatrixDropdownRenderedRow[] = [];\n if(table.showHeader) {\n rows.push(table.headerRow);\n }\n rows.push(...this.visibleRows);\n if(rows.length === 0) return true;\n const columnWidthSum = this.calculateColumnWidth(rows, colCount).reduce((widthSum: number, width: number) => widthSum += width, 0);\n return this.question.renderAs !== 'list' && this.controller.matrixRenderAs !== 'list' && Math.floor(columnWidthSum) <= Math.floor(this.getAvalableWidth(colCount));\n }\n private getRowsToRender(table: QuestionMatrixDropdownRenderedTable, isVertical: boolean, isWide: boolean) {\n const rows: QuestionMatrixDropdownRenderedRow[] = [];\n const renderedRows = this.visibleRows;\n if (table.showHeader && isWide) rows.push(table.headerRow);\n rows.push(...renderedRows);\n if (table.hasRemoveRows && isVertical) rows.pop();\n if (table.showFooter) rows.push(table.footerRow);\n return rows;\n }\n private getColCount(table: QuestionMatrixDropdownRenderedTable, renderedRows: Array<QuestionMatrixDropdownRenderedRow>): number {\n if (!!renderedRows[0]) {\n return renderedRows[0].cells.filter((cell: QuestionMatrixDropdownRenderedCell, index: number) => !this.ignoreCell(cell, index)).length;\n } else {\n return table.showHeader && table.headerRow ? table.headerRow.cells.length :\n table.showFooter && table.footerRow ? table.footerRow.cells.length : 0;\n }\n }\n\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n let table: QuestionMatrixDropdownRenderedTable = this.question.renderedTable;\n let isVertical: boolean = this.question.columnLayout === 'vertical';\n let colCount: number = this.getColCount(table, this.visibleRows);\n if (colCount === 0 && !this.hasDetailPanel) {\n return [new CompositeBrick(SurveyHelper.createRowlineFlat(point, this.controller))];\n }\n const isWide = this.calculateIsWide(table, colCount);\n if(!isWide) {\n this.question.isMobile = true;\n isVertical = false;\n table = this.question.renderedTable;\n this.visibleRowsValue = undefined;\n colCount = this.getColCount(table, this.visibleRows);\n }\n const rows = this.getRowsToRender(table, isVertical, isWide);\n return await this.generateFlatsRows(point, rows, colCount, isWide);\n }\n}\n\nSerializer.removeProperty('matrixdropdown', 'renderAs');\nSerializer.addProperty('matrixdropdown', {\n name: 'renderAs',\n default: 'auto',\n visible: false,\n choices: ['auto', 'list']\n});\nFlatRepository.getInstance().register('matrixdropdown', FlatMatrixMultiple);","import { IQuestion, QuestionMultipleTextModel, MultipleTextItemModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion, IFlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { FlatTextbox } from './flat_textbox';\n\nexport class FlatMultipleText extends FlatQuestion {\n public static readonly ROWS_GAP_SCALE: number = 0.195;\n protected question: QuestionMultipleTextModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionMultipleTextModel>question;\n }\n private getVisibleRows() {\n return this.question.getRows().filter(row => row.isVisible);\n }\n private async generateFlatItem(point: IPoint, row_index: number, col_index: number,\n item: MultipleTextItemModel): Promise<IPdfBrick> {\n const colWidth: number = SurveyHelper.getPageAvailableWidth(this.controller);\n this.controller.pushMargins();\n this.controller.margins.right = this.controller.paperWidth -\n this.controller.margins.left - colWidth * SurveyHelper.MULTIPLETEXT_TEXT_PERS;\n const compositeFlat: CompositeBrick = new CompositeBrick(await SurveyHelper.\n createBoldTextFlat(point, this.question, this.controller, item.locTitle));\n this.controller.popMargins();\n\n const flatMultipleTextItemQuestion: IFlatQuestion = FlatRepository.getInstance().create(\n this.survey, item.editor, this.controller, 'text');\n const itemPoint: IPoint = SurveyHelper.createTextFieldRect({\n xLeft: point.xLeft + colWidth * SurveyHelper.MULTIPLETEXT_TEXT_PERS, yTop: point.yTop },\n this.controller);\n compositeFlat.addBrick(...await (<FlatTextbox>flatMultipleTextItemQuestion).generateFlatsContent(itemPoint));\n\n return compositeFlat;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const rowsFlats: CompositeBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n const rows = this.getVisibleRows();\n for (let i: number = 0; i < rows.length; i++) {\n rowsFlats.push(new CompositeBrick());\n let yBot: number = currPoint.yTop;\n this.controller.pushMargins();\n for (let j: number = 0; j < rows[i].cells.length; j++) {\n this.controller.pushMargins();\n SurveyHelper.setColumnMargins(this.controller, this.question.colCount, j);\n currPoint.xLeft = this.controller.margins.left;\n const itemFlat: IPdfBrick = await this.generateFlatItem(\n currPoint, i, j, rows[i].cells[j].item);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n yBot = Math.max(yBot, itemFlat.yBot);\n this.controller.popMargins();\n }\n this.controller.popMargins();\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = yBot;\n rowsFlats[rowsFlats.length - 1].addBrick(\n SurveyHelper.createRowlineFlat(currPoint, this.controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n currPoint.yTop += this.controller.unitHeight * FlatMultipleText.ROWS_GAP_SCALE;\n }\n return rowsFlats;\n }\n}\n\nFlatRepository.getInstance().register('multipletext', FlatMultipleText);","import { IQuestion, QuestionPanelDynamicModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatSurvey } from './flat_survey';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatPanelDynamic extends FlatQuestion {\n protected question: QuestionPanelDynamicModel;\n public static readonly GAP_BETWEEN_PANELS: number = 0.75;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionPanelDynamicModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const flats: IPdfBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n for (const panel of this.question.panels) {\n const panelFlats: IPdfBrick[] = await FlatSurvey.generateFlatsPanel(\n this.survey, this.controller, panel, currPoint);\n if (panelFlats.length !== 0) {\n currPoint.yTop = SurveyHelper.mergeRects(...panelFlats).yBot;\n currPoint.yTop += this.controller.unitHeight * FlatPanelDynamic.GAP_BETWEEN_PANELS;\n flats.push(...panelFlats);\n }\n }\n return flats;\n }\n}\n\nFlatRepository.getInstance().register('paneldynamic', FlatPanelDynamic);","import { IQuestion, Question, LocalizableString, Serializer, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatSurvey } from './flat_survey';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport interface IFlatQuestion {\n generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;\n generateFlats(point: IPoint): Promise<IPdfBrick[]>;\n}\nexport class FlatQuestion implements IFlatQuestion {\n public static CONTENT_GAP_VERT_SCALE: number = 0.5;\n public static CONTENT_GAP_HOR_SCALE: number = 1.0;\n public static CONTENT_INDENT_SCALE: number = 1.0;\n public static DESC_GAP_SCALE: number = 0.0625;\n protected question: Question;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n this.question = <Question>question;\n }\n private async generateFlatTitle(point: IPoint): Promise<IPdfBrick> {\n return await SurveyHelper.createTitleFlat(point,\n this.question, this.controller);\n }\n private async generateFlatDescription(point: IPoint): Promise<IPdfBrick> {\n return await SurveyHelper.createDescFlat(point, this.question, this.controller, this.question.locDescription);\n }\n private async generateFlatHeader(point: IPoint): Promise<CompositeBrick> {\n const titleFlat: IPdfBrick = await this.generateFlatTitle(point);\n const compositeFlat: CompositeBrick = new CompositeBrick(titleFlat);\n if(this.question.hasDescriptionUnderTitle) {\n const descPoint: IPoint = SurveyHelper.createPoint(titleFlat, true, false);\n descPoint.yTop += FlatQuestion.DESC_GAP_SCALE * this.controller.unitHeight;\n descPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n compositeFlat.addBrick(await this.generateFlatDescription(descPoint));\n }\n return compositeFlat;\n }\n private async generateFlatsComment(point: IPoint): Promise<IPdfBrick> {\n const text: LocalizableString = this.question.locCommentText;\n const otherTextFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n point, this.question, this.controller, text, TextBrick);\n const otherPoint: IPoint = SurveyHelper.createPoint(otherTextFlat);\n otherPoint.yTop += this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ROWS;\n return new CompositeBrick(otherTextFlat, await SurveyHelper.createCommentFlat(\n otherPoint, this.question, this.controller, {\n fieldName: this.question.id + '_comment',\n rows: SurveyHelper.OTHER_ROWS_COUNT,\n value: this.question.comment !== undefined && this.question.comment !== null ? this.question.comment : '',\n shouldRenderBorders: settings.readOnlyCommentRenderMode === 'textarea',\n isReadOnly: this.question.isReadOnly,\n isMultiline: true,\n placeholder: ''\n }));\n }\n public async generateFlatsComposite(point: IPoint): Promise<IPdfBrick[]> {\n const contentPanel = (<any>this.question).contentPanel;\n if (!!contentPanel) {\n return await FlatSurvey.generateFlatsPanel(this.survey,\n this.controller, contentPanel, point);\n }\n this.question = SurveyHelper.getContentQuestion(this.question);\n return await this.generateFlatsContent(point);\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n return null;\n }\n public async generateFlatsContentWithOptionalElements(point: IPoint): Promise<IPdfBrick[]> {\n const flats: Array<IPdfBrick> = [];\n const contentFlats = await this.generateFlatsComposite(point);\n if(Array.isArray(contentFlats)) {\n flats.push(...contentFlats);\n }\n const getLatestPoint = (): IPoint => {\n const res = SurveyHelper.clone(point);\n if(contentFlats !== null && contentFlats.length !== 0) {\n res.yTop = SurveyHelper.mergeRects(...flats).yBot + this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ROWS;\n }\n return res;\n };\n if (this.question.hasComment) {\n flats.push(await this.generateFlatsComment(getLatestPoint()));\n }\n if (this.question.hasDescriptionUnderInput) {\n flats.push(await this.generateFlatDescription(getLatestPoint()));\n }\n\n return flats;\n }\n public async generateFlats(point: IPoint): Promise<IPdfBrick[]> {\n this.controller.pushMargins();\n this.controller.margins.left += this.controller.measureText(this.question.indent).width;\n const indentPoint: IPoint = {\n xLeft: point.xLeft + this.controller.measureText(this.question.indent).width,\n yTop: point.yTop\n };\n const flats: IPdfBrick[] = [];\n let titleLocation: string = this.question.getTitleLocation();\n titleLocation = this.question.hasTitle ? titleLocation : 'hidden';\n switch (titleLocation) {\n case 'top':\n case 'default': {\n const headerFlat = await this.generateFlatHeader(indentPoint);\n let contentPoint: IPoint = SurveyHelper.createPoint(headerFlat);\n contentPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n headerFlat.addBrick(SurveyHelper.createRowlineFlat(\n SurveyHelper.createPoint(headerFlat), this.controller));\n contentPoint.yTop += this.controller.unitHeight *\n FlatQuestion.CONTENT_GAP_VERT_SCALE + SurveyHelper.EPSILON;\n this.controller.pushMargins();\n this.controller.margins.left += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n const contentFlats: IPdfBrick[] = await this.generateFlatsContentWithOptionalElements(contentPoint);\n this.controller.popMargins();\n if(contentFlats !== null && contentFlats.length !== 0) {\n headerFlat.addBrick(contentFlats.shift());\n }\n flats.push(headerFlat);\n flats.push(...contentFlats);\n break;\n }\n case 'bottom': {\n const contentPoint: IPoint = SurveyHelper.clone(indentPoint);\n this.controller.pushMargins();\n contentPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n this.controller.margins.left += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n const contentFlats: IPdfBrick[] = await this.generateFlatsContentWithOptionalElements(contentPoint);\n this.controller.popMargins();\n flats.push(...contentFlats);\n const titlePoint: IPoint = indentPoint;\n if (flats.length !== 0) {\n titlePoint.yTop = flats[flats.length - 1].yBot;\n }\n titlePoint.yTop += this.controller.unitHeight * FlatQuestion.CONTENT_GAP_VERT_SCALE;\n flats.push(await this.generateFlatHeader(titlePoint));\n break;\n }\n case 'left': {\n this.controller.pushMargins(this.controller.margins.left,\n this.controller.paperWidth - this.controller.margins.left -\n SurveyHelper.getPageAvailableWidth(this.controller) *\n SurveyHelper.MULTIPLETEXT_TEXT_PERS);\n const headerFlat: CompositeBrick = await this.generateFlatHeader(indentPoint);\n const contentPoint: IPoint = SurveyHelper.createPoint(headerFlat, false, true);\n this.controller.popMargins();\n contentPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_GAP_HOR_SCALE;\n this.controller.margins.left = contentPoint.xLeft;\n const contentFlats: IPdfBrick[] = await this.generateFlatsContentWithOptionalElements(contentPoint);\n if(contentFlats !== null && contentFlats.length !== 0) {\n headerFlat.addBrick(contentFlats.shift());\n }\n flats.push(headerFlat);\n flats.push(...contentFlats);\n break;\n }\n case 'hidden':\n case SurveyHelper.TITLE_LOCATION_MATRIX:\n default: {\n const contentPoint: IPoint = SurveyHelper.clone(indentPoint);\n this.controller.pushMargins();\n if (titleLocation !== SurveyHelper.TITLE_LOCATION_MATRIX) {\n contentPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n this.controller.margins.left += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n }\n flats.push(...await this.generateFlatsContentWithOptionalElements(contentPoint));\n this.controller.popMargins();\n break;\n }\n }\n this.controller.popMargins();\n return flats;\n }\n protected get shouldRenderAsComment(): boolean {\n return SurveyHelper.shouldRenderReadOnly(this.question, this.controller);\n }\n}\n\nSerializer.addProperty('question', {\n name: 'readonlyRenderAs',\n default: 'auto',\n choices: ['auto', 'text', 'acroform'],\n visible: false\n});","import { IQuestion, ItemValue, QuestionRadiogroupModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IRect, DocController } from '../doc_controller';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { RadioGroupWrap, RadioItemBrick } from '../pdf_render/pdf_radioitem';\nimport { FlatSelectBase } from './flat_selectbase';\n\nexport class FlatRadiogroup extends FlatSelectBase {\n protected question: QuestionRadiogroupModel;\n private radioGroupWrap: RadioGroupWrap;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionRadiogroupModel>question;\n }\n protected isItemSelected(item: ItemValue, checked?: boolean): boolean {\n return (typeof checked === 'undefined') ?\n (item === this.question.otherItem ? this.question.isOtherSelected :\n (item.value === this.question.value ||\n (typeof this.question.isItemSelected !== 'undefined' &&\n this.question.isItemSelected(item)))) : checked;\n }\n public generateFlatItem(rect: IRect, item: ItemValue,\n index: number, key?: string, checked?: boolean, context: any = {}): IPdfBrick {\n if (index === 0) {\n this.radioGroupWrap = new RadioGroupWrap(this.question.id + ((typeof key === 'undefined') ? '' : key),\n this.controller, { readOnly: this.question.isReadOnly, question: this.question, ...context });\n (<any>this.question).pdfRadioGroupWrap = this.radioGroupWrap;\n }\n else if (typeof this.radioGroupWrap === 'undefined') {\n this.radioGroupWrap = (<any>this.question).pdfRadioGroupWrap;\n }\n const isChecked: boolean = this.isItemSelected(item, checked);\n return new RadioItemBrick(this.controller, rect,\n { question: this.question, index: index, checked: isChecked, item: item }, this.radioGroupWrap);\n }\n}\n\nFlatRepository.getInstance().register('radiogroup', FlatRadiogroup);\nFlatRepository.getInstance().register('buttongroup', FlatRadiogroup);","import { IQuestion, ItemValue, QuestionRankingModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { RankingItemBrick } from '../pdf_render/pdf_rankingitem';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { ColoredBrick } from '../pdf_render/pdf_coloredbrick';\n\nexport class FlatRanking extends FlatQuestion {\n protected question: QuestionRankingModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionRankingModel>question;\n }\n protected async generateFlatComposite(point: IPoint, item: ItemValue, index: number, unrankedItem: boolean = false): Promise<IPdfBrick> {\n const itemRect: IRect = SurveyHelper.createRect(point,\n this.controller.unitWidth, this.controller.unitHeight);\n const itemScaledRect: IRect = SurveyHelper.moveRect(SurveyHelper.scaleRect(\n itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE), point.xLeft);\n const itemFlat: IPdfBrick = new RankingItemBrick(this.question, this.controller,\n itemScaledRect, unrankedItem ? '-' : this.question.getNumberByIndex(index));\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft = itemFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const textFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n textPoint, this.question, this.controller, item.locText, TextBrick);\n return new CompositeBrick(itemFlat, textFlat);\n }\n public async generateChoicesColumn(point: IPoint, choices: ItemValue[], unrankedChoices: boolean = false): Promise<IPdfBrick[]> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n for (let i: number = 0; i < choices.length; i++) {\n const itemFlat: IPdfBrick = await this.generateFlatComposite(currPoint, choices[i], i, unrankedChoices);\n currPoint.yTop = itemFlat.yBot + SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n flats.push(itemFlat);\n }\n return flats;\n }\n public async generateSelectToRankItemsVertically(point: IPoint): Promise<IPdfBrick[]> {\n const currPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n if(this.question.rankingChoices.length !== 0) {\n flats.push(...await this.generateChoicesColumn(currPoint, this.question.rankingChoices));\n currPoint.yTop = flats[flats.length - 1].yBot + 2 * (SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight);\n }\n const separatorRect = SurveyHelper.createRect({\n xLeft: currPoint.xLeft,\n yTop: currPoint.yTop - (SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight) - 0.5,\n }, this.controller.paperWidth - this.controller.margins.right - currPoint.xLeft, 1);\n flats.push(new ColoredBrick(this.controller, separatorRect, SurveyHelper.FORM_BORDER_COLOR));\n\n flats.push(...await this.generateChoicesColumn(currPoint, this.question.unRankingChoices, true));\n return flats;\n }\n public async generateSelectToRankItemsHorizontally(point: IPoint): Promise<IPdfBrick[]> {\n const colCount = 2;\n const currPoint: IPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n const rowsCount = Math.max(this.question.unRankingChoices.length, this.question.rankingChoices.length);\n let row: CompositeBrick = new CompositeBrick();\n for (let i: number = 0; i < rowsCount; i++) {\n let colIndex = 0;\n for (let item of [this.question.unRankingChoices[i], this.question.rankingChoices[i]]) {\n if(!!item) {\n this.controller.pushMargins(this.controller.margins.left, this.controller.margins.right);\n SurveyHelper.setColumnMargins(this.controller, colCount, colIndex);\n currPoint.xLeft = this.controller.margins.left;\n const itemFlat: IPdfBrick = await this.generateFlatComposite(\n currPoint, item, i, colIndex == 0);\n row.addBrick(itemFlat);\n this.controller.popMargins();\n }\n colIndex++;\n }\n const rowLineFlat: IPdfBrick = SurveyHelper.createRowlineFlat(\n SurveyHelper.createPoint(row), this.controller);\n flats.push(row, rowLineFlat);\n const separatorRect = SurveyHelper.createRect({\n xLeft: this.controller.margins.left + SurveyHelper.getPageAvailableWidth(this.controller) / 2 - 0.5,\n yTop: currPoint.yTop,\n }, 0, 0);\n row.addBrick(new ColoredBrick(this.controller, separatorRect, SurveyHelper.FORM_BORDER_COLOR, 1, rowLineFlat.yBot - currPoint.yTop + (i !== rowsCount - 1 ?\n SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight : 0)));\n\n currPoint.yTop = rowLineFlat.yBot +\n SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n row = new CompositeBrick();\n }\n return flats;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n if(!this.question.selectToRankEnabled) {\n return this.generateChoicesColumn(point, this.question.rankingChoices);\n }\n else if(this.question.selectToRankAreasLayout == 'vertical') {\n return this.generateSelectToRankItemsVertically(point);\n }\n else {\n return this.generateSelectToRankItemsHorizontally(point);\n }\n }\n}\n\nFlatRepository.getInstance().register('ranking', FlatRanking);","import { IQuestion, ItemValue, QuestionRatingModel, LocalizableString } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatRadiogroup } from './flat_radiogroup';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatRating extends FlatRadiogroup {\n protected questionRating: QuestionRatingModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.questionRating = <QuestionRatingModel>question;\n }\n protected async generateFlatHorisontalComposite(point: IPoint, item: ItemValue, index: number): Promise<IPdfBrick> {\n const itemText: LocalizableString = SurveyHelper.getRatingItemText(\n this.questionRating, index, item.locText);\n this.controller.pushMargins();\n const halfWidth: number = this.controller.unitWidth / 2.0;\n this.controller.margins.left += halfWidth;\n this.controller.margins.right += halfWidth;\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft += halfWidth;\n const compositeFlat: CompositeBrick = new CompositeBrick(await SurveyHelper.\n createBoldTextFlat(textPoint, this.questionRating, this.controller, itemText));\n this.controller.popMargins();\n let textWidth: number = compositeFlat.width;\n if (textWidth < SurveyHelper.getRatingMinWidth(this.controller)) {\n compositeFlat.xLeft += (SurveyHelper.getRatingMinWidth(\n this.controller) - textWidth) / 2.0 - halfWidth;\n textWidth = SurveyHelper.getRatingMinWidth(this.controller);\n }\n else {\n textWidth += this.controller.unitWidth;\n }\n const radioPoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n radioPoint.xLeft = point.xLeft;\n compositeFlat.addBrick(this.generateFlatItem(SurveyHelper.createRect(\n radioPoint, textWidth, this.controller.unitHeight), item, index, undefined, this.question.value == item.value));\n return compositeFlat;\n }\n protected async generateFlatComposite(point: IPoint, item: ItemValue, index: number): Promise<IPdfBrick> {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n const itemRect: IRect = SurveyHelper.createRect(point,\n this.controller.unitHeight, this.controller.unitHeight);\n const itemFlat: IPdfBrick = this.generateFlatItem(SurveyHelper.moveRect(\n SurveyHelper.scaleRect(itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE),\n point.xLeft), item, index, undefined, this.question.value == item.value);\n compositeFlat.addBrick(itemFlat);\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft = itemFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const itemText: LocalizableString = SurveyHelper.getRatingItemText(this.questionRating, index, item.locText);\n itemText == null || compositeFlat.addBrick(await SurveyHelper.createTextFlat(\n textPoint, this.question, this.controller, itemText, TextBrick));\n return compositeFlat;\n }\n protected async generateHorisontallyItems(point: IPoint) {\n const rowsFlats: CompositeBrick[] = [new CompositeBrick()];\n const currPoint: IPoint = SurveyHelper.clone(point);\n for (let i: number = 0; i < this.questionRating.visibleRateValues.length; i++) {\n const itemFlat: IPdfBrick = await this.generateFlatHorisontalComposite(currPoint,\n this.questionRating.visibleRateValues[i], i);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n const leftWidth: number = this.controller.paperWidth -\n this.controller.margins.right - itemFlat.xRight;\n if (SurveyHelper.getRatingMinWidth(this.controller) <= leftWidth + SurveyHelper.EPSILON) {\n currPoint.xLeft = itemFlat.xRight;\n }\n else {\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = itemFlat.yBot;\n if (i !== this.questionRating.visibleRateValues.length - 1) {\n rowsFlats[rowsFlats.length - 1].addBrick(\n SurveyHelper.createRowlineFlat(currPoint, this.controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n rowsFlats.push(new CompositeBrick());\n }\n }\n }\n return rowsFlats;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n let isVertical: boolean = false;\n for (let i: number = 0; i < this.questionRating.visibleRateValues.length; i++) {\n const itemText: LocalizableString = SurveyHelper.getRatingItemText(\n this.questionRating, i, this.questionRating.visibleRateValues[i].locText);\n if (this.controller.measureText(itemText).width > this.controller.measureText(SurveyHelper.RATING_COLUMN_WIDTH).width) {\n isVertical = true;\n }\n }\n return isVertical ? this.generateVerticallyItems(point, this.questionRating.visibleRateValues) : this.generateHorisontallyItems(point);\n }\n}\n\nFlatRepository.getInstance().register('rating', FlatRating);","import { IQuestion, Question } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { DocController } from '../doc_controller';\nimport { IFlatQuestion, FlatQuestion } from './flat_question';\nimport { FlatQuestionDefault } from './flat_default';\n\nexport type FlatConstructor = new (\n survey: SurveyPDF,\n question: IQuestion,\n controller: DocController\n) => IFlatQuestion;\nexport class FlatRepository {\n private questions: { [index: string]: FlatConstructor } = {};\n private static instance: FlatRepository = new FlatRepository();\n public static getInstance(): FlatRepository {\n return FlatRepository.instance;\n }\n public register(modelType: string, rendererConstructor: FlatConstructor): void {\n this.questions[modelType] = rendererConstructor;\n }\n public isTypeRegistered(type: string): boolean {\n return !!this.questions[type];\n }\n public getRenderer(type: string): FlatConstructor {\n return this.questions[type];\n }\n public create(survey: SurveyPDF, question: Question,\n docController: DocController, type?: string): IFlatQuestion {\n const questionType: string = typeof type === 'undefined' ? question.getType() : type;\n let rendererConstructor = this.getRenderer(questionType);\n if(!rendererConstructor) {\n if(!!question.customWidget?.pdfRender) {\n rendererConstructor = FlatQuestion;\n } else {\n rendererConstructor = FlatQuestionDefault;\n }\n }\n return new rendererConstructor(survey, question, docController);\n }\n public static register(type: string, rendererConstructor: FlatConstructor): void {\n this.getInstance().register(type, rendererConstructor);\n }\n public static getRenderer(type: string): FlatConstructor {\n return this.getInstance().getRenderer(type);\n }\n}","import { IQuestion, ItemValue, QuestionCheckboxBase, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { ChoiceItem } from 'survey-core/typings/src/question_baseselect';\n\nexport abstract class FlatSelectBase extends FlatQuestion {\n protected question: QuestionCheckboxBase;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionCheckboxBase>question;\n }\n public abstract generateFlatItem(rect: IRect, item: ItemValue, index: number): IPdfBrick;\n protected async generateItemComment(point: IPoint, item: ItemValue) {\n const commentModel = this.question.getCommentTextAreaModel(item);\n return await SurveyHelper.createCommentFlat(\n point, this.question, this.controller, {\n fieldName: commentModel.id,\n rows: SurveyHelper.OTHER_ROWS_COUNT,\n value: commentModel.getTextValue(),\n shouldRenderBorders: settings.readOnlyCommentRenderMode === 'textarea',\n isReadOnly: this.question.isReadOnly,\n isMultiline: true,\n });\n }\n protected async generateFlatComposite(point: IPoint, item: ItemValue | ChoiceItem, index: number): Promise<IPdfBrick> {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n const itemRect: IRect = SurveyHelper.createRect(point,\n this.controller.unitWidth, this.controller.unitHeight);\n const itemFlat: IPdfBrick = this.generateFlatItem(SurveyHelper.moveRect(\n SurveyHelper.scaleRect(itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE),\n point.xLeft), item, index);\n\n compositeFlat.addBrick(itemFlat);\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft = itemFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n if (item.locText.renderedHtml !== null) {\n compositeFlat.addBrick(await SurveyHelper.createTextFlat(\n textPoint, this.question, this.controller, item.locText, TextBrick));\n }\n if(item.isCommentShowing) {\n const otherPoint: IPoint = SurveyHelper.createPoint(compositeFlat, true, false);\n otherPoint.yTop += this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ROWS;\n compositeFlat.addBrick(await this.generateItemComment(otherPoint, item));\n }\n return compositeFlat;\n }\n protected getVisibleChoices(): Array<ItemValue> {\n return this.question.visibleChoices;\n }\n protected getColCount(): number {\n return this.question.colCount;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const colCount = this.getColCount();\n const visibleChoices = this.getVisibleChoices();\n let currentColCount: number = colCount;\n if (colCount == 0) {\n currentColCount = Math.floor(SurveyHelper.getPageAvailableWidth(this.controller)\n / this.controller.measureText(SurveyHelper.MATRIX_COLUMN_WIDTH).width) || 1;\n if (visibleChoices.length < currentColCount) {\n currentColCount = visibleChoices.length;\n }\n }\n else if (colCount > 1) {\n currentColCount = (SurveyHelper.getColumnWidth(this.controller, colCount) <\n this.controller.measureText(SurveyHelper.MATRIX_COLUMN_WIDTH).width) ? 1 : colCount;\n if(currentColCount == colCount) {\n return await this.generateColumns(point);\n }\n }\n return (currentColCount == 1) ? await this.generateVerticallyItems(point, visibleChoices) :\n await this.generateHorisontallyItems(point, currentColCount);\n\n }\n\n protected async generateRows(point: IPoint, rows: Array<Array<ItemValue>>) {\n const visibleChoices = this.getVisibleChoices();\n const currPoint: IPoint = SurveyHelper.clone(point);\n const colCount = (rows[0] ?? []).length;\n const flats: IPdfBrick[] = [];\n for (let row of rows) {\n const rowFlat: CompositeBrick = new CompositeBrick();\n for (let colIndex = 0; colIndex < row.length; colIndex ++) {\n const item = row[colIndex];\n this.controller.pushMargins();\n SurveyHelper.setColumnMargins(this.controller, colCount, colIndex);\n currPoint.xLeft = this.controller.margins.left;\n const itemFlat: IPdfBrick = await this.generateFlatComposite(\n currPoint, item, visibleChoices.indexOf(item));\n rowFlat.addBrick(itemFlat);\n this.controller.popMargins();\n }\n const rowLineFlat: IPdfBrick = SurveyHelper.createRowlineFlat(\n SurveyHelper.createPoint(rowFlat), this.controller);\n currPoint.yTop = rowLineFlat.yBot +\n SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n flats.push(rowFlat, rowLineFlat);\n }\n return flats;\n }\n\n protected async generateVerticallyItems(point: IPoint, itemValues: ItemValue[]): Promise<IPdfBrick[]> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n for (let i: number = 0; i < itemValues.length; i++) {\n const itemFlat: IPdfBrick = await this.generateFlatComposite(currPoint, itemValues[i], i);\n currPoint.yTop = itemFlat.yBot + SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n flats.push(itemFlat);\n }\n return flats;\n }\n\n protected async generateColumns(point: IPoint): Promise<IPdfBrick[]> {\n const columns = this.question.columns;\n const rowsCount = columns.reduce((max, column) => Math.max(max, column.length), 0);\n const rows: Array<Array<ItemValue>> = [];\n for (let i = 0; i < rowsCount; i++) {\n const row = [];\n for (let column of columns) {\n if(column[i]) {\n row.push(column[i]);\n }\n }\n rows.push(row);\n }\n return await this.generateRows(point, rows);\n }\n protected async generateHorisontallyItems(point: IPoint, colCount: number): Promise<IPdfBrick[]> {\n const rows: Array<Array<ItemValue>> = [];\n const visibleChoices = this.getVisibleChoices();\n visibleChoices.forEach((item, index) => {\n const rowIndex = Math.floor(index / colCount);\n const colIndex = index % colCount;\n if(!rows[rowIndex]) rows[rowIndex] = [];\n rows[rowIndex][colIndex] = item;\n });\n return await this.generateRows(point, rows);\n }\n}\n","import { IQuestion, QuestionSignaturePadModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPoint, DocController, IRect, ISize } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from '../pdf_render/pdf_brick';\nimport { IBorderDescription, SurveyHelper } from '../helper_survey';\nimport { EmptyBrick } from '../pdf_render/pdf_empty';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\n\nexport class FlatSignaturePad extends FlatQuestion {\n protected question: QuestionSignaturePadModel;\n public static BORDER_STYLE: 'dashed' | 'solid' | 'none' = 'dashed';\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionSignaturePadModel>question;\n }\n private _signatureSize: ISize;\n private get signatureSize(): ISize {\n if(!this._signatureSize) {\n let width = SurveyHelper.pxToPt(<any>this.question.signatureWidth);\n let height = SurveyHelper.pxToPt(<any>this.question.signatureHeight);\n const availableWidth = SurveyHelper.getPageAvailableWidth(this.controller);\n if(width > availableWidth) {\n const newWidth: number = availableWidth;\n height *= newWidth / width;\n width = newWidth;\n }\n this._signatureSize = { width, height };\n }\n return this._signatureSize;\n }\n public async generateBackgroundImage(point: IPoint): Promise<IPdfBrick> {\n return await SurveyHelper.createImageFlat(point, this.question, this.controller, { link: this.question.backgroundImage, ...this.signatureSize, objectFit: 'cover' }, true);\n }\n private getSignImageUrl() {\n return this.question.storeDataAsText || !this.question.loadedData ? this.question.value : this.question.loadedData;\n }\n public async generateSign(point: IPoint): Promise<IPdfBrick> {\n let brick: PdfBrick;\n if(this.question.value) {\n brick = await SurveyHelper.createImageFlat(point,\n this.question, this.controller, { link: this.getSignImageUrl(), ...this.signatureSize }, false\n ) as PdfBrick;\n } else {\n brick = new EmptyBrick(SurveyHelper.createRect(point, this.signatureSize.width, this.signatureSize.height));\n }\n if(FlatSignaturePad.BORDER_STYLE !== 'none') {\n brick.afterRenderCallback = () => {\n const borderOptions: IBorderDescription = {\n height: brick.width,\n width: brick.width,\n yTop: brick.yTop,\n yBot: brick.yBot,\n xLeft: brick.xLeft,\n xRight: brick.xRight,\n formBorderColor: brick.formBorderColor,\n rounded: false,\n outside: true,\n dashStyle: FlatSignaturePad.BORDER_STYLE == 'dashed' ? {\n dashArray: [5],\n dashPhase: 0\n } : undefined\n };\n SurveyHelper.renderFlatBorders(this.controller, borderOptions);\n };\n }\n\n return brick;\n }\n\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const compositeBrick = new CompositeBrick();\n if(this.question.backgroundImage) {\n compositeBrick.addBrick(await this.generateBackgroundImage(point));\n }\n compositeBrick.addBrick(await this.generateSign(point));\n return [compositeBrick];\n }\n}\n\nFlatRepository.getInstance().register('signaturepad', FlatSignaturePad);","import { IQuestion, QuestionSliderModel, QuestionTextModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\nimport { ITextFieldBrickOptions, TextFieldBrick } from '../pdf_render/pdf_textfield';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\n\nexport class FlatSlider extends FlatQuestion {\n protected question: QuestionSliderModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionSliderModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n let currentPoint: IPoint = SurveyHelper.clone(point);\n\n if (this.question.sliderType === 'single') {\n const options = this.getOptionsByValue(this.question.value);\n const inputBrick: IPdfBrick = await this.generateInputBrick(currentPoint, options);\n return [inputBrick];\n }\n\n if (this.question.sliderType === 'range') {\n const compositeBrick: CompositeBrick = new CompositeBrick();\n for (let i = 0; i < this.question.value.length; i++) {\n const valueItem = this.question.value[i];\n const options = this.getOptionsByValue(valueItem);\n const columnInput = await this.generateColumnInput(currentPoint, options, 2, i);\n compositeBrick.addBrick(columnInput);\n }\n return [compositeBrick];\n }\n }\n private getOptionsByValue(value: string):ITextFieldBrickOptions {\n const { id, isReadOnly } = this.question;\n return {\n fieldName: id,\n inputType: 'number',\n value,\n isReadOnly,\n shouldRenderBorders: true,\n };\n }\n\n private async generateInputBrick(point: IPoint, options:ITextFieldBrickOptions): Promise<IPdfBrick> {\n if (!this.shouldRenderAsComment) {\n const rect1: IRect = SurveyHelper.createTextFieldRect(point, this.controller);\n return new TextFieldBrick(this.question, this.controller, rect1, { ...options });\n }\n else {\n return await SurveyHelper.createCommentFlat(point, this.question, this.controller, { ...options });\n }\n }\n\n private async generateColumnInput(point: IPoint, options:ITextFieldBrickOptions, colCount: number, colNumber: number): Promise<IPdfBrick> {\n this.controller.pushMargins();\n SurveyHelper.setColumnMargins(this.controller, colCount, colNumber);\n const currentPoint = SurveyHelper.clone(point);\n currentPoint.xLeft = this.controller.margins.left;\n const inputBrick = await this.generateInputBrick(currentPoint, options);\n this.controller.popMargins();\n return inputBrick;\n }\n}\n\nFlatRepository.getInstance().register('slider', FlatSlider);","import { IElement, Question, PanelModelBase, PanelModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { RowlineBrick } from '../pdf_render/pdf_rowline';\nimport { SurveyHelper } from '../helper_survey';\nimport { AdornersPanelOptions, AdornersPageOptions } from '../event_handler/adorners';\nimport { FlatRepository } from '../entries/pdf';\nimport * as SurveyPDFModule from '../entries/pdf';\n\nexport class FlatSurvey {\n public static QUES_GAP_VERT_SCALE: number = 1.5;\n public static PANEL_CONT_GAP_SCALE: number = 1.0;\n public static PANEL_DESC_GAP_SCALE: number = 0.25;\n public static async generateFlatsPanel(survey: SurveyPDF, controller: DocController,\n panel: PanelModel, point: IPoint): Promise<IPdfBrick[]> {\n const panelFlats: IPdfBrick[] = [];\n const panelContentPoint: IPoint = SurveyHelper.clone(point);\n controller.pushMargins();\n controller.margins.left += controller.measureText(panel.innerIndent).width;\n panelContentPoint.xLeft += controller.measureText(panel.innerIndent).width;\n panelFlats.push(...await this.generateFlatsPagePanel(survey,\n controller, panel, panelContentPoint));\n controller.popMargins();\n const adornersOptions: AdornersPanelOptions = new AdornersPanelOptions(point,\n panelFlats, panel, controller, FlatRepository.getInstance(), SurveyPDFModule);\n await survey.onRenderPanel.fire(survey, adornersOptions);\n return [...adornersOptions.bricks];\n }\n private static async generateFlatsPagePanel(survey: SurveyPDF, controller: DocController,\n pagePanel: PanelModelBase, point: IPoint): Promise<IPdfBrick[]> {\n if (!pagePanel.isVisible) return;\n pagePanel.onFirstRendering();\n const pagePanelFlats: IPdfBrick[] = [];\n let currPoint: IPoint = SurveyHelper.clone(point);\n if (pagePanel.getType() !== 'page' || survey.showPageTitles) {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n if (pagePanel.title) {\n if (pagePanel instanceof PanelModel && pagePanel.no) {\n const noFlat: IPdfBrick = await SurveyHelper.createTitlePanelFlat(\n currPoint, controller, pagePanel.no, pagePanel.getType() === 'page');\n compositeFlat.addBrick(noFlat);\n currPoint.xLeft = noFlat.xRight + controller.measureText(' ').width;\n }\n const pagelPanelTitleFlat: IPdfBrick = await SurveyHelper.createTitlePanelFlat(\n currPoint, controller, pagePanel.locTitle, pagePanel.getType() === 'page');\n compositeFlat.addBrick(pagelPanelTitleFlat);\n currPoint = SurveyHelper.createPoint(pagelPanelTitleFlat);\n }\n if (pagePanel.description) {\n if (pagePanel.title) {\n currPoint.yTop += controller.unitWidth * FlatSurvey.PANEL_DESC_GAP_SCALE;\n }\n const pagePanelDescFlat: IPdfBrick = await SurveyHelper.createDescFlat(\n currPoint, null, controller, pagePanel.locDescription);\n compositeFlat.addBrick(pagePanelDescFlat);\n currPoint = SurveyHelper.createPoint(pagePanelDescFlat);\n }\n if (!compositeFlat.isEmpty) {\n const rowLinePoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n compositeFlat.addBrick(SurveyHelper.createRowlineFlat(rowLinePoint, controller));\n pagePanelFlats.push(compositeFlat);\n currPoint.yTop += controller.unitHeight * FlatSurvey.PANEL_CONT_GAP_SCALE + SurveyHelper.EPSILON;\n }\n }\n for (const row of pagePanel.rows) {\n if (!row.visible) continue;\n controller.pushMargins();\n const width: number = SurveyHelper.getPageAvailableWidth(controller);\n let nextMarginLeft: number = controller.margins.left;\n const rowFlats: IPdfBrick[] = [];\n const visibleElements = row.elements.filter(el => el.isVisible);\n for (let i: number = 0; i < visibleElements.length; i++) {\n let element: IElement = visibleElements[i];\n if (!element.isVisible) continue;\n const persWidth: number = SurveyHelper.parseWidth(element.renderWidth,\n width - (visibleElements.length - 1) * controller.unitWidth,\n visibleElements.length);\n controller.margins.left = nextMarginLeft + ((i !== 0) ? controller.unitWidth : 0);\n controller.margins.right = controller.paperWidth - controller.margins.left - persWidth;\n currPoint.xLeft = controller.margins.left;\n nextMarginLeft = controller.margins.left + persWidth;\n if (element instanceof PanelModel) {\n rowFlats.push(...await this.generateFlatsPanel(\n survey, controller, element, currPoint));\n }\n else {\n await (<Question>element).waitForQuestionIsReady();\n rowFlats.push(...await SurveyHelper.generateQuestionFlats(survey,\n controller, <Question>element, currPoint));\n }\n }\n controller.popMargins();\n currPoint.xLeft = controller.margins.left;\n if (rowFlats.length !== 0) {\n currPoint.yTop = SurveyHelper.mergeRects(...rowFlats).yBot;\n currPoint.xLeft = point.xLeft;\n currPoint.yTop += controller.unitHeight * FlatSurvey.QUES_GAP_VERT_SCALE;\n pagePanelFlats.push(...rowFlats);\n pagePanelFlats.push(SurveyHelper.createRowlineFlat(currPoint, controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n }\n }\n return pagePanelFlats;\n }\n private static popRowlines(flats: IPdfBrick[]) {\n while (flats.length > 0 && flats[flats.length - 1] instanceof RowlineBrick) {\n flats.pop();\n }\n }\n private static async generateFlatTitle(survey: SurveyPDF, controller: DocController,\n point: IPoint): Promise<CompositeBrick> {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n if (survey.showTitle) {\n if (survey.title) {\n const surveyTitleFlat: IPdfBrick = await SurveyHelper.createTitleSurveyFlat(\n point, controller, survey.locTitle);\n compositeFlat.addBrick(surveyTitleFlat);\n point = SurveyHelper.createPoint(surveyTitleFlat);\n }\n if (survey.description) {\n if (survey.title) {\n point.yTop += controller.unitWidth * FlatSurvey.PANEL_DESC_GAP_SCALE;\n }\n compositeFlat.addBrick(await SurveyHelper.createDescFlat(\n point, null, controller, survey.locDescription));\n }\n }\n return compositeFlat;\n }\n private static async generateFlatLogoImage(survey: SurveyPDF, controller: DocController,\n point: IPoint): Promise<IPdfBrick> {\n const logoUrl = SurveyHelper.getLocString(survey.locLogo);\n const logoSize = await SurveyHelper.getCorrectedImageSize(controller, { imageLink: logoUrl, imageHeight: survey.logoHeight, imageWidth: survey.logoWidth, defaultImageWidth: '300px', defaultImageHeight: '200px' });\n const logoFlat: IPdfBrick = await SurveyHelper.createImageFlat(\n point, null, controller, { link: logoUrl,\n width: logoSize.width, height: logoSize.height });\n let shift: number = 0;\n if (survey.logoPosition === 'right') {\n shift = SurveyHelper.getPageAvailableWidth(controller) - logoFlat.width;\n }\n else if (survey.logoPosition !== 'left') {\n shift = SurveyHelper.getPageAvailableWidth(controller) / 2.0 - logoFlat.width / 2.0;\n }\n logoFlat.xLeft += shift;\n logoFlat.xRight += shift;\n return logoFlat;\n }\n public static async generateFlats(survey: SurveyPDF, controller: DocController): Promise<IPdfBrick[][]> {\n const flats: IPdfBrick[][] = [];\n if (!survey.hasLogo) {\n const titleFlat: CompositeBrick = await this.generateFlatTitle(\n survey, controller, controller.leftTopPoint);\n if (!titleFlat.isEmpty) flats.push([titleFlat]);\n }\n else if (survey.isLogoBefore) {\n const logoFlat: IPdfBrick = await this.generateFlatLogoImage(\n survey, controller, controller.leftTopPoint);\n flats.push([logoFlat]);\n const titlePoint: IPoint = SurveyHelper.createPoint(logoFlat,\n survey.logoPosition === 'top', survey.logoPosition !== 'top');\n if (survey.logoPosition !== 'top') {\n controller.pushMargins();\n titlePoint.xLeft += controller.unitWidth;\n controller.margins.left += logoFlat.width + controller.unitWidth;\n }\n else {\n titlePoint.xLeft = controller.leftTopPoint.xLeft;\n titlePoint.yTop += controller.unitHeight / 2.0;\n }\n const titleFlat: CompositeBrick = await this.generateFlatTitle(\n survey, controller, titlePoint);\n if (survey.logoPosition !== 'top') controller.popMargins();\n if (!titleFlat.isEmpty) flats[0].push(titleFlat);\n }\n else {\n if (survey.logoPosition === 'right') {\n const logoFlat: IPdfBrick = await this.generateFlatLogoImage(\n survey, controller, controller.leftTopPoint);\n flats.push([logoFlat]);\n controller.pushMargins();\n controller.margins.right += logoFlat.width + controller.unitWidth;\n const titleFlat: CompositeBrick = await this.generateFlatTitle(\n survey, controller, controller.leftTopPoint);\n if (!titleFlat.isEmpty) flats[0].unshift(titleFlat);\n controller.popMargins();\n }\n else {\n const titleFlat: CompositeBrick = await this.generateFlatTitle(\n survey, controller, controller.leftTopPoint);\n let logoPoint: IPoint = controller.leftTopPoint;\n if (!titleFlat.isEmpty) {\n flats.push([titleFlat]);\n logoPoint = SurveyHelper.createPoint(titleFlat);\n logoPoint.yTop += controller.unitHeight / 2.0;\n }\n const logoFlat: IPdfBrick = await this.generateFlatLogoImage(\n survey, controller, logoPoint);\n if (flats.length !== 0) flats[0].push(logoFlat);\n else flats.push([logoFlat]);\n }\n }\n let point: IPoint = controller.leftTopPoint;\n if (flats.length !== 0) {\n point.yTop = SurveyHelper.createPoint(SurveyHelper.mergeRects(...flats[0])).yTop;\n flats[0].push(SurveyHelper.createRowlineFlat(point, controller));\n point.yTop += controller.unitHeight * FlatSurvey.PANEL_CONT_GAP_SCALE + SurveyHelper.EPSILON;\n }\n for (let i: number = 0; i < survey.visiblePages.length; i++) {\n survey.currentPage = survey.visiblePages[i];\n let pageFlats: IPdfBrick[] = [];\n pageFlats.push(...await this.generateFlatsPagePanel(\n survey, controller, survey.visiblePages[i], point));\n const adornersOptions: AdornersPageOptions = new AdornersPageOptions(point,\n pageFlats, survey.visiblePages[i], controller, FlatRepository.getInstance(), SurveyPDFModule);\n await survey.onRenderPage.fire(survey, adornersOptions);\n pageFlats = [...adornersOptions.bricks];\n if (i === 0 && flats.length !== 0) {\n flats[0].push(...pageFlats);\n }\n else flats.push(pageFlats);\n this.popRowlines(flats[flats.length - 1]);\n point.yTop = controller.leftTopPoint.yTop;\n }\n return flats;\n }\n}","import { IQuestion, QuestionTextModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\nimport { ITextFieldBrickOptions, TextFieldBrick } from '../pdf_render/pdf_textfield';\n\nexport class FlatTextbox extends FlatQuestion {\n public static readonly MULTILINE_TEXT_ROWS_COUNT: number = 1;\n protected question: QuestionTextModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionTextModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const options: Omit<ITextFieldBrickOptions, 'isMultiline'> = {\n fieldName: this.question.id,\n inputType: this.question.inputType,\n value: this.question.inputValue,\n isReadOnly: this.question.isReadOnly,\n shouldRenderBorders: settings.readOnlyTextRenderMode === 'input',\n placeholder: SurveyHelper.getLocString(this.question.locPlaceHolder)\n };\n if (!this.shouldRenderAsComment) {\n const rect: IRect = SurveyHelper.createTextFieldRect(point, this.controller);\n return [new TextFieldBrick(this.question, this.controller, rect, { ...options })];\n }\n return [await SurveyHelper.createCommentFlat(point, this.question,\n this.controller, { rows: FlatTextbox.MULTILINE_TEXT_ROWS_COUNT, isMultiline: true, ...options })];\n }\n}\n\nFlatRepository.getInstance().register('text', FlatTextbox);","import { IQuestion, Question, QuestionRatingModel, QuestionFileModel, LocalizableString, QuestionSelectBase, QuestionDropdownModel, settings } from 'survey-core';\nimport * as SurveyPDFModule from './entries/pdf';\nimport { SurveyPDF } from './survey';\nimport { IPoint, IRect, ISize, DocController } from './doc_controller';\nimport { FlatRepository } from './flat_layout/flat_repository';\nimport { IFlatQuestion } from './flat_layout/flat_question';\nimport { IHTMLRenderType } from './flat_layout/flat_html';\nimport { IPdfBrick, PdfBrick } from './pdf_render/pdf_brick';\nimport { TextBrick } from './pdf_render/pdf_text';\nimport { TextBoldBrick } from './pdf_render/pdf_textbold';\nimport { TitlePanelBrick } from './pdf_render/pdf_titlepanel';\nimport { DescriptionBrick } from './pdf_render/pdf_description';\nimport { LinkBrick } from './pdf_render/pdf_link';\nimport { HTMLBrick } from './pdf_render/pdf_html';\nimport { ImageBrick } from './pdf_render/pdf_image';\nimport { EmptyBrick } from './pdf_render/pdf_empty';\nimport { RowlineBrick } from './pdf_render/pdf_rowline';\nimport { CompositeBrick } from './pdf_render/pdf_composite';\nimport { AdornersOptions } from './event_handler/adorners';\nimport { ITextFieldBrickOptions, TextFieldBrick } from './pdf_render/pdf_textfield';\n\nexport type IBorderDescription = IRect & ISize & Pick<PdfBrick, 'formBorderColor'> & { rounded?: boolean, dashStyle?: { dashArray: [number, number] | [number], dashPhase: number }, outside?: boolean };\n\nexport class SurveyHelper {\n public static EPSILON: number = 2.2204460492503130808472633361816e-15;\n public static TITLE_SURVEY_FONT_SIZE_SCALE: number = 1.7;\n public static TITLE_PAGE_FONT_SIZE_SCALE: number = 1.3;\n public static TITLE_PANEL_FONT_SIZE_SCALE: number = 1.3;\n public static DESCRIPTION_FONT_SIZE_SCALE: number = 2.0 / 3.0;\n public static OTHER_ROWS_COUNT: number = 2;\n public static RATING_MIN_WIDTH: number = 3;\n public static RATING_MIN_HEIGHT: number = 2;\n public static RATING_COLUMN_WIDTH: number = 5;\n public static MATRIX_COLUMN_WIDTH: number = 5;\n public static IMAGEPICKER_COUNT: number = 4;\n public static IMAGEPICKER_RATIO: number = 4.0 / 3.0;\n public static MULTIPLETEXT_TEXT_PERS: number = Math.E / 10.0;\n public static HTML_TAIL_TEXT_SCALE: number = 0.24;\n public static SELECT_ITEM_FLAT_SCALE: number = 0.95;\n public static GAP_BETWEEN_ROWS: number = 0.25;\n public static GAP_BETWEEN_COLUMNS: number = 1.5;\n public static GAP_BETWEEN_ITEM_TEXT: number = 0.25;\n public static FORM_BORDER_VISIBLE: boolean = true;\n public static BORDER_SCALE: number = 0.1;\n public static VISIBLE_BORDER_SCALE: number = 0.8;\n public static UNVISIBLE_BORDER_SCALE: number = 0.2;\n public static RADIUS_SCALE: number = 3.0;\n public static TITLE_FONT_SCALE: number = 1.1;\n public static VALUE_READONLY_PADDING_SCALE: number = 0.3;\n public static HTML_TO_IMAGE_QUALITY: number = 1.0;\n public static FORM_BORDER_COLOR: string = '#9f9f9f';\n public static TEXT_COLOR: string = '#404040';\n public static BACKGROUND_COLOR: string = '#FFFFFF';\n public static TITLE_LOCATION_MATRIX: string = 'matrix';\n public static STANDARD_FONT: string = 'helvetica';\n public static CUSTOM_FONT_ENCODING: string = 'Identity-H';\n\n public static parseWidth(width: string, maxWidth: number,\n columnsCount: number = 1, defaultUnit?: string): number {\n if (width.indexOf('calc') === 0) {\n return maxWidth / columnsCount;\n }\n const value: number = parseFloat(width);\n const unit: string = width.replace(/[^A-Za-z%]/g, '') || defaultUnit;\n let k: number;\n switch (unit) {\n case 'pt':\n k = 1.0;\n break;\n case 'mm':\n k = 72.0 / 25.4;\n break;\n case 'cm':\n k = 72.0 / 2.54;\n break;\n case 'in':\n k = 72.0;\n break;\n case 'px':\n k = 72.0 / 96.0;\n break;\n case 'pc':\n k = 12.0;\n break;\n case 'em':\n k = 12.0;\n break;\n case 'ex':\n k = 6.0;\n break;\n default:\n case '%':\n k = maxWidth / 100.0;\n break;\n }\n return Math.min(value * k, maxWidth);\n }\n public static pxToPt(value: number | string) {\n if (typeof value === 'string') {\n if(!isNaN(Number(value))) {\n value += 'px';\n }\n return SurveyHelper.parseWidth(value, Number.MAX_VALUE);\n }\n return value * 72.0 / 96.0;\n }\n public static mergeRects(...rects: IRect[]): IRect {\n const resultRect: IRect = {\n xLeft: rects[0].xLeft,\n xRight: rects[0].xRight,\n yTop: rects[0].yTop,\n yBot: rects[0].yBot\n };\n rects.forEach((rect: IRect) => {\n resultRect.xLeft = Math.min(resultRect.xLeft, rect.xLeft),\n resultRect.xRight = Math.max(resultRect.xRight, rect.xRight),\n resultRect.yTop = Math.min(resultRect.yTop, rect.yTop),\n resultRect.yBot = Math.max(resultRect.yBot, rect.yBot);\n });\n return resultRect;\n }\n public static createPoint(rect: IRect, isLeft: boolean = true, isTop: boolean = false): IPoint {\n return {\n xLeft: isLeft ? rect.xLeft : rect.xRight,\n yTop: isTop ? rect.yTop : rect.yBot\n };\n }\n public static createRect(point: IPoint, width: number, height: number): IRect {\n return {\n xLeft: point.xLeft,\n xRight: point.xLeft + width,\n yTop: point.yTop,\n yBot: point.yTop + height\n };\n }\n public static createHeaderRect(controller: DocController): IRect {\n return {\n xLeft: 0.0,\n xRight: controller.paperWidth,\n yTop: 0.0,\n yBot: controller.margins.top\n };\n }\n public static createFooterRect(controller: DocController): IRect {\n return {\n xLeft: 0.0,\n xRight: controller.paperWidth,\n yTop: controller.paperHeight - controller.margins.bot,\n yBot: controller.paperHeight\n };\n }\n public static chooseHtmlFont(controller: DocController): string {\n return controller.useCustomFontInHtml ? controller.fontName : this.STANDARD_FONT;\n }\n public static generateCssTextRule(fontSize: number, fontStyle: string, fontName: string): string {\n return `\"font-size: ${fontSize}pt; font-weight: ${fontStyle}; font-family: ${fontName}; color: ${this.TEXT_COLOR};\"`;\n }\n public static createHtmlContainerBlock(html: string, controller: DocController, renderAs: IHTMLRenderType): string {\n const font = this.chooseHtmlFont(controller);\n return `<div class=\"__surveypdf_html\" style=${this.generateCssTextRule(\n controller.fontSize, controller.fontStyle, font)}>` +\n `<style>.__surveypdf_html p { margin: 0; line-height: ${controller.fontSize}pt } body { margin: 0; }</style>${html}</div>`;\n }\n public static splitHtmlRect(controller: DocController, htmlBrick: IPdfBrick): IPdfBrick {\n const bricks: IPdfBrick[] = [];\n const htmlHeight: number = htmlBrick.height;\n const minHeight: number = controller.doc.getFontSize();\n htmlBrick.yBot = htmlBrick.yTop + minHeight;\n const emptyBrickCount: number = Math.floor(htmlHeight / minHeight) - 1;\n bricks.push(htmlBrick);\n const currPoint: IPoint = this.createPoint(htmlBrick);\n for (let i: number = 0; i < emptyBrickCount; i++) {\n bricks.push(new EmptyBrick(this.createRect(currPoint, htmlBrick.width, minHeight)));\n currPoint.yTop += minHeight;\n }\n const remainingHeight: number = htmlHeight - (emptyBrickCount + 1) * minHeight;\n if (remainingHeight > 0) {\n bricks.push(new EmptyBrick(this.createRect(currPoint, htmlBrick.width, remainingHeight)));\n }\n return new CompositeBrick(...bricks);\n }\n public static createPlainTextFlat<T extends IPdfBrick>(point: IPoint, question: IQuestion,\n controller: DocController, text: string, fabric: new (question: IQuestion,\n controller: DocController, rect: IRect, text: string) => T): CompositeBrick {\n const lines: string[] = controller.doc.splitTextToSize(text,\n controller.paperWidth - controller.margins.right - point.xLeft);\n const currPoint: IPoint = this.clone(point);\n const composite: CompositeBrick = new CompositeBrick();\n lines.forEach((line: string) => {\n const size: ISize = controller.measureText(line);\n composite.addBrick(new fabric(question, controller,\n this.createRect(currPoint, size.width, size.height), line));\n currPoint.yTop += size.height;\n });\n return composite;\n }\n public static async createTextFlat<T extends IPdfBrick>(point: IPoint, question: IQuestion,\n controller: DocController, text: string | LocalizableString, fabric: new (question: IQuestion,\n controller: DocController, rect: IRect, text: string) => T): Promise<IPdfBrick> {\n if (typeof text === 'string' || !this.hasHtml(text)) {\n return this.createPlainTextFlat(point, question, controller, typeof text === 'string' ?\n text : this.getLocString(<LocalizableString>text), fabric);\n }\n else {\n return this.splitHtmlRect(controller, await this.createHTMLFlat(point, <Question>question, controller,\n this.createHtmlContainerBlock(this.getLocString(text), controller, 'standard')));\n }\n }\n private static hasHtml(text: LocalizableString): boolean {\n const pattern: RegExp = /<\\/?[a-z][\\s\\S]*>/i;\n return text.hasHtml && (pattern.test((<any>text).renderedText) || pattern.test(text.renderedHtml));\n }\n private static getHtmlMargins(controller: DocController, point: IPoint): { top: number, bottom: number, width: number } {\n const width: number = controller.paperWidth - point.xLeft - controller.margins.right;\n return {\n top: controller.margins.top,\n bottom: controller.margins.bot,\n width: width > controller.unitWidth ? width : controller.unitWidth\n };\n }\n\n public static createHTMLRect(point: IPoint, controller: DocController,\n margins: { top: number, bottom: number, width: number }, resultY: number): IRect {\n const availablePageHeight: number = controller.paperHeight - controller.margins.bot - controller.margins.top;\n const height: number = (controller.helperDoc.getNumberOfPages() - 1) *\n (controller.fontSize * Math.floor(availablePageHeight / controller.fontSize))\n + resultY - margins.top + SurveyHelper.HTML_TAIL_TEXT_SCALE * controller.fontSize;\n const numberOfPages: number = controller.helperDoc.getNumberOfPages();\n controller.helperDoc.addPage();\n for (let i: number = 0; i < numberOfPages; i++) {\n controller.helperDoc.deletePage(1);\n }\n return SurveyHelper.createRect(point, margins.width, height);\n }\n\n public static async createHTMLFlat(point: IPoint, question: Question, controller: DocController, html: string): Promise<IPdfBrick> {\n const margins: { top: number, bottom: number, width: number } = this.getHtmlMargins(controller, point);\n return await new Promise<IPdfBrick>((resolve) => {\n controller.helperDoc.fromHTML(html, point.xLeft, margins.top, {\n pagesplit: true, width: margins.width\n }, function (result: any) {\n const rect: IRect = SurveyHelper.createHTMLRect(point, controller, margins, result.y);\n resolve(new HTMLBrick(question, controller, rect, html));\n }, margins);\n });\n }\n public static generateFontFace(fontName: string, fontBase64: string, fontWeight: string) {\n return `@font-face { font-family: ${fontName}; ` +\n `src: url(data:application/font-woff;charset=utf-8;base64,${fontBase64}) format('woff'); ` +\n `font-weight: ${fontWeight}; }`;\n }\n public static generateFontFaceWithItalicStyle(fontName: string, fontBase64: string, fontWeight: string) {\n return `@font-face { font-family: ${fontName}; ` +\n `src: url(data:application/font-woff;charset=utf-8;base64,${fontBase64}) format('woff'); ` +\n `font-weight: ${fontWeight}; font-style: italic}`;\n }\n public static htmlToXml(html: string): string {\n const htmlDoc: Document = document.implementation.createHTMLDocument('');\n htmlDoc.write(html.replace(/\\#/g, '%23'));\n htmlDoc.documentElement.setAttribute('xmlns', htmlDoc.documentElement.namespaceURI);\n htmlDoc.body.style.margin = 'unset';\n return (new XMLSerializer()).serializeToString(htmlDoc.body).replace(/%23/g, '#');\n }\n public static createSvgContent(html: string, width: number, controller: DocController) {\n const style: HTMLStyleElement = document.createElement('style');\n style.innerHTML = '.__surveypdf_html p { margin: unset; line-height: 22px; } body { margin: unset; }';\n document.body.appendChild(style);\n const div: HTMLDivElement = document.createElement('div');\n div.className = '__surveypdf_html';\n div.style.display = 'block';\n div.style.position = 'fixed';\n div.style.top = '-10000px';\n div.style.left = '-10000px';\n div.style.width = (width / 72.0 * 96.0) + 'px';\n div.style.boxSizing = 'initial';\n div.style.color = 'initial';\n div.style.fontFamily = 'initial';\n div.style.font = 'initial';\n div.style.lineHeight = 'initial';\n div.insertAdjacentHTML('beforeend', html);\n document.body.appendChild(div);\n const divWidth: number = div.offsetWidth;\n const divHeight: number = div.offsetHeight;\n div.remove();\n style.remove();\n let defs: string = '';\n if (controller.useCustomFontInHtml) {\n defs = `<defs><style>${this.generateFontFace(controller.fontName, controller.base64Normal, 'normal')}` +\n ` ${this.generateFontFace(controller.fontName, controller.base64Bold, 'bold')}</style></defs>`;\n } else {\n Object.keys(DocController.customFonts).forEach(fontName => {\n const font = DocController.customFonts[fontName];\n Object.keys(font).forEach((fontStyle: 'normal' | 'bold' | 'italic' | 'bolditalic') => {\n if (fontStyle === 'normal' || fontStyle === 'bold') {\n defs += `${this.generateFontFace(fontName, font[fontStyle], fontStyle)}`;\n } else {\n defs += `${this.generateFontFaceWithItalicStyle(fontName, font[fontStyle], fontStyle === 'italic' ? 'normal' : 'bold')}`;\n }\n });\n defs = '<defs><style>' + defs + '</style></defs>';\n });\n }\n const svg: string = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${divWidth}px\" height=\"${divHeight}px\">` + defs +\n '<style>.__surveypdf_html p { margin: unset; line-height: 22px; }</style>' +\n `<foreignObject width=\"${divWidth}px\" height=\"${divHeight}px\">` +\n this.htmlToXml(html) + '</foreignObject></svg>';\n return { svg, divWidth, divHeight };\n }\n private static setCanvas(canvas: HTMLCanvasElement, divWidth: number, divHeight: number, img: HTMLImageElement): void {\n canvas.width = divWidth * SurveyHelper.HTML_TO_IMAGE_QUALITY;\n canvas.height = divHeight * SurveyHelper.HTML_TO_IMAGE_QUALITY;\n const context: CanvasRenderingContext2D = canvas.getContext('2d');\n context.scale(SurveyHelper.HTML_TO_IMAGE_QUALITY, SurveyHelper.HTML_TO_IMAGE_QUALITY);\n context.fillStyle = SurveyHelper.BACKGROUND_COLOR;\n context.fillRect(0, 0, divWidth, divHeight);\n context.drawImage(img, 0, 0);\n }\n public static async htmlToImage(html: string, width: number, controller: DocController): Promise<{ url: string, aspect: number }> {\n const { svg, divWidth, divHeight } = SurveyHelper.createSvgContent(html, width, controller);\n const data: string = 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(svg)));\n const img: HTMLImageElement = new Image();\n img.crossOrigin='anonymous';\n img.src = data;\n return new Promise((resolve) => {\n img.onload = function () {\n const canvas: HTMLCanvasElement = document.createElement('canvas');\n SurveyHelper.setCanvas(canvas, divWidth, divHeight, img);\n const url: string = canvas.toDataURL('image/jpeg', SurveyHelper.HTML_TO_IMAGE_QUALITY);\n canvas.remove();\n resolve({ url: url, aspect: divWidth / divHeight });\n };\n img.onerror = function () {\n resolve({ url: 'data:,', aspect: width / this.EPSILON });\n };\n });\n }\n public static async createBoldTextFlat(point: IPoint, question: Question,\n controller: DocController, text: string | LocalizableString): Promise<IPdfBrick> {\n controller.fontStyle = 'bold';\n const composite: IPdfBrick = await this.createTextFlat(\n point, question, controller, text, TextBoldBrick);\n controller.fontStyle = 'normal';\n return composite;\n }\n public static async createTitleFlat(point: IPoint, question: Question, controller: DocController): Promise<IPdfBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n let currPoint: IPoint = this.clone(point);\n const oldFontSize: number = controller.fontSize;\n controller.fontSize *= this.TITLE_FONT_SCALE;\n if (question.no) {\n const noText: string = question.no + ' ';\n let noFlat: IPdfBrick;\n if (this.hasHtml(question.locTitle)) {\n controller.fontStyle = 'bold';\n controller.pushMargins();\n controller.margins.right = controller.paperWidth -\n controller.margins.left - controller.measureText(noText, 'bold').width;\n noFlat = await this.createHTMLFlat(currPoint, question, controller,\n this.createHtmlContainerBlock(noText, controller, 'standard'));\n controller.popMargins();\n controller.fontStyle = 'normal';\n }\n else {\n noFlat = await this.createBoldTextFlat(currPoint,\n question, controller, noText);\n }\n composite.addBrick(noFlat);\n currPoint.xLeft = noFlat.xRight;\n }\n controller.pushMargins();\n controller.margins.left = currPoint.xLeft;\n const textFlat: CompositeBrick = <CompositeBrick>await this.createBoldTextFlat(\n currPoint, question, controller, question.locTitle);\n composite.addBrick(textFlat);\n controller.popMargins();\n if (question.isRequired) {\n const requiredText: string = question.requiredText;\n if (this.hasHtml(question.locTitle)) {\n currPoint = this.createPoint(textFlat.unfold()[0], false, false);\n controller.fontStyle = 'bold';\n controller.pushMargins();\n controller.margins.right = controller.paperWidth -\n controller.margins.left - controller.measureText(requiredText, 'bold').width;\n composite.addBrick(await this.createHTMLFlat(currPoint, question, controller,\n this.createHtmlContainerBlock(requiredText, controller, 'standard')));\n controller.popMargins();\n controller.fontStyle = 'normal';\n }\n else {\n currPoint = this.createPoint(textFlat.unfold().pop(), false, true);\n composite.addBrick(await this.createBoldTextFlat(currPoint,\n question, controller, requiredText));\n }\n }\n controller.fontSize = oldFontSize;\n return composite;\n }\n private static async createTitleSurveyPanelFlat(point: IPoint, controller: DocController,\n text: string | LocalizableString, fontSizeScale: number): Promise<IPdfBrick> {\n const oldFontSize: number = controller.fontSize;\n controller.fontSize = oldFontSize * fontSizeScale;\n controller.fontStyle = 'bold';\n const titleFlat: IPdfBrick = await this.createTextFlat(point, null, controller, text, TitlePanelBrick);\n controller.fontStyle = 'normal';\n controller.fontSize = oldFontSize;\n return titleFlat;\n }\n public static async createTitleSurveyFlat(point: IPoint, controller: DocController,\n text: string | LocalizableString): Promise<IPdfBrick> {\n return await this.createTitleSurveyPanelFlat(point, controller, text, this.TITLE_SURVEY_FONT_SIZE_SCALE);\n }\n public static async createTitlePanelFlat(point: IPoint, controller: DocController,\n text: string | LocalizableString, isPage: boolean = false): Promise<IPdfBrick> {\n return await this.createTitleSurveyPanelFlat(point, controller, text,\n isPage ? this.TITLE_PAGE_FONT_SIZE_SCALE : this.TITLE_PANEL_FONT_SIZE_SCALE);\n }\n public static async createDescFlat(point: IPoint, question: IQuestion,\n controller: DocController, text: string | LocalizableString): Promise<IPdfBrick> {\n const oldFontSize: number = controller.fontSize;\n controller.fontSize = oldFontSize * this.DESCRIPTION_FONT_SIZE_SCALE;\n const composite: IPdfBrick = await this.createTextFlat(\n point, question, controller, text, DescriptionBrick);\n controller.fontSize = oldFontSize;\n return composite;\n }\n public static getReadonlyRenderAs(question: Question, controller: DocController): 'auto' | 'text' | 'acroform' {\n return (<any>question).readonlyRenderAs === 'auto' ? controller.readonlyRenderAs : (<any>question).readonlyRenderAs;\n }\n public static async createCommentFlat(point: IPoint, question: Question,\n controller: DocController, options: { rows?: number } & ITextFieldBrickOptions): Promise<IPdfBrick> {\n options.rows = options.rows ?? 1;\n options.value = options.value ?? '';\n const rect: IRect = this.createTextFieldRect(point, controller, options.rows);\n let textFlat;\n if (SurveyHelper.shouldRenderReadOnly(question, controller, options.isReadOnly)) {\n textFlat = await this.createReadOnlyTextFieldTextFlat(\n point, controller, question, options.value);\n const padding: number = controller.unitHeight * this.VALUE_READONLY_PADDING_SCALE;\n if (textFlat.yBot + padding > rect.yBot) rect.yBot = textFlat.yBot + padding;\n }\n const comment = new TextFieldBrick(question, controller, rect, options);\n if(textFlat) {\n comment.textBrick = textFlat;\n }\n return comment;\n }\n public static inBrowser = typeof Image === 'function';\n\n public static get hasDocument(): boolean {\n return typeof document !== 'undefined';\n }\n\n public static async getImageBase64(imageLink: string): Promise<string> {\n const image = new Image();\n image.crossOrigin='anonymous';\n return new Promise((resolve) => {\n image.onload = () => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n canvas.height = image.naturalHeight;\n canvas.width = image.naturalWidth;\n ctx.drawImage(image, 0, 0);\n const dataUrl = canvas.toDataURL();\n resolve(dataUrl);\n };\n image.onerror = () => {\n resolve('');\n };\n image.src = imageLink;\n });\n }\n public static shouldConvertImageToPng = true;\n public static async getImageLink(controller: DocController, imageOptions: { link: string, width: number, height: number, objectFit?: string }, applyImageFit: boolean): Promise<string> {\n const ptToPx: number = 96.0 / 72.0;\n let url = this.shouldConvertImageToPng ? await SurveyHelper.getImageBase64(imageOptions.link) : imageOptions.link;\n if(typeof XMLSerializer === 'function' && applyImageFit) {\n const canvasHtml: string =\n `<div style='overflow: hidden; width: ${imageOptions.width * ptToPx}px; height: ${imageOptions.height * ptToPx}px;'>\n <img src='${url}' style='object-fit: ${imageOptions.objectFit}; width: 100%; height: 100%;'/>\n </div>`;\n url = (await SurveyHelper.htmlToImage(canvasHtml, imageOptions.width, controller)).url;\n }\n return url;\n }\n public static async createImageFlat(point: IPoint, question: any,\n controller: DocController, imageOptions: { link: string, width: number, height: number, objectFit?: string }, applyImageFit?: boolean): Promise<IPdfBrick> {\n if (SurveyHelper.inBrowser) {\n imageOptions.objectFit = !!question && !!question.imageFit ? question.imageFit : (imageOptions.objectFit || 'contain');\n if (applyImageFit ?? controller.applyImageFit) {\n if (imageOptions.width > controller.paperWidth - controller.margins.left - controller.margins.right) {\n const newWidth: number = controller.paperWidth - controller.margins.left - controller.margins.right;\n imageOptions.height *= newWidth / imageOptions.width;\n imageOptions.width = newWidth;\n }\n }\n const html: string = `<img src='${await SurveyHelper.getImageLink(controller, imageOptions, applyImageFit ?? controller.applyImageFit)}' width='${imageOptions.width}' height='${imageOptions.height}'/>`;\n return new HTMLBrick(question, controller, this.createRect(point, imageOptions.width, imageOptions.height), html, true);\n }\n return new ImageBrick(question, controller, imageOptions.link, point, imageOptions.width, imageOptions.height);\n }\n public static canPreviewImage(question: QuestionFileModel, item: { name: string, type: string, content: string }, url: string): boolean {\n return question.canPreviewImage(item);\n // && await this.getImageSize(url) !== null;\n }\n public static async getImageSize(url: string): Promise<ISize> {\n if (!SurveyHelper.inBrowser) {\n return await new Promise((resolve) => {\n return resolve({ width: undefined, height: undefined });\n });\n }\n return await new Promise((resolve) => {\n const image: any = new Image();\n image.src = url;\n image.onload = function () {\n return resolve({ width: image.width, height: image.height });\n };\n image.onerror = function () { return resolve(null); };\n });\n }\n public static createRowlineFlat(point: IPoint, controller: DocController,\n width?: number, color?: string): IPdfBrick {\n let xRight: number = typeof width === 'undefined' ?\n controller.paperWidth - controller.margins.right :\n point.xLeft + width;\n xRight = xRight > point.xLeft ? xRight : point.xLeft + this.EPSILON;\n return new RowlineBrick(controller, {\n xLeft: point.xLeft,\n xRight: xRight,\n yTop: point.yTop + this.EPSILON,\n yBot: point.yTop + this.EPSILON\n }, typeof color === 'undefined' ? null : color);\n }\n public static async createLinkFlat(point: IPoint, question: Question,\n controller: DocController, text: string, link: string): Promise<IPdfBrick> {\n const compositeText: CompositeBrick = <CompositeBrick>await this.\n createTextFlat(point, question, controller, text, TextBrick);\n const compositeLink: CompositeBrick = new CompositeBrick();\n compositeText.unfold().forEach((text: TextBrick) => {\n compositeLink.addBrick(new LinkBrick(text, link));\n const linePoint: IPoint = this.createPoint(compositeLink);\n compositeLink.addBrick(this.createRowlineFlat(linePoint,\n controller, compositeLink.width, LinkBrick.COLOR));\n });\n return compositeLink;\n }\n public static createAcroformRect(rect: IRect): number[] {\n return [\n rect.xLeft,\n rect.yTop,\n rect.xRight - rect.xLeft,\n rect.yBot - rect.yTop\n ];\n }\n public static createTextFieldRect(point: IPoint, controller: DocController, lines: number = 1): IRect {\n let width: number = controller.paperWidth - point.xLeft - controller.margins.right;\n width = Math.max(width, controller.unitWidth);\n const height: number = controller.unitHeight * lines;\n return this.createRect(point, width, height);\n }\n public static async createReadOnlyTextFieldTextFlat(point: IPoint,\n controller: DocController, question: Question, value: string): Promise<IPdfBrick> {\n const padding: number = controller.unitWidth * this.VALUE_READONLY_PADDING_SCALE;\n point.yTop += padding;\n point.xLeft += padding;\n controller.pushMargins(point.xLeft, controller.margins.right + padding);\n const textFlat: IPdfBrick = await this.createTextFlat(\n point, question, controller, value.toString(), TextBrick);\n controller.popMargins();\n return textFlat;\n }\n public static renderFlatBorders(controller: DocController, borderOptions: IBorderDescription): void {\n if (!this.FORM_BORDER_VISIBLE) return;\n borderOptions.rounded = borderOptions.rounded ?? true;\n borderOptions.outside = borderOptions.outside ?? false;\n const minSide: number = Math.min(borderOptions.width, borderOptions.height);\n const borderWidth = this.getBorderWidth(controller);\n const visibleWidth: number = controller.unitHeight * this.VISIBLE_BORDER_SCALE * this.BORDER_SCALE;\n const visibleScale: number = borderOptions.outside ? (minSide + borderWidth) / minSide - visibleWidth / minSide : (minSide - borderWidth) / minSide + visibleWidth / minSide;\n const oldDrawColor: string = controller.doc.getDrawColor();\n controller.doc.setDrawColor(borderOptions.formBorderColor);\n controller.doc.setLineWidth(visibleWidth);\n const scaledRect = this.scaleRect(borderOptions, visibleScale);\n if(borderOptions.dashStyle) {\n const dashStyle = borderOptions.dashStyle;\n const borderLength = (Math.abs(scaledRect.yTop - scaledRect.yBot) + Math.abs(scaledRect.xLeft - scaledRect.xRight)) * 2;\n const dashWithSpaceSize = dashStyle.dashArray[0] + (dashStyle.dashArray[1] ?? dashStyle.dashArray[0]);\n const dashSize = dashStyle.dashArray[0] + (borderLength % dashWithSpaceSize) / Math.floor(borderLength / dashWithSpaceSize);\n\n controller.doc.setLineDashPattern(\n [dashSize, dashStyle.dashArray[1] ?? dashStyle.dashArray[0]],\n dashStyle.dashPhase\n );\n }\n\n controller.doc.rect(...this.createAcroformRect(scaledRect));\n if(borderOptions.rounded) {\n const unvisibleWidth: number = controller.unitHeight * this.UNVISIBLE_BORDER_SCALE * this.BORDER_SCALE;\n const unvisibleScale: number = 1.0 - unvisibleWidth / minSide;\n const unvisibleRadius: number = this.RADIUS_SCALE * unvisibleWidth;\n controller.doc.setDrawColor(this.BACKGROUND_COLOR);\n controller.doc.setLineWidth(unvisibleWidth);\n controller.doc.roundedRect(...this.createAcroformRect(\n this.scaleRect(borderOptions, unvisibleScale)), unvisibleRadius, unvisibleRadius);\n }\n if(borderOptions.dashStyle) {\n controller.doc.setLineDashPattern([]);\n }\n controller.doc.setDrawColor(oldDrawColor);\n }\n public static getLocString(text: LocalizableString): string {\n if (this.hasHtml(text)) return text.renderedHtml;\n return (<any>text).renderedText || text.renderedHtml;\n }\n public static getContentQuestion(question: Question): Question {\n return !!(<any>question).contentQuestion ? (<any>question).contentQuestion : question;\n }\n public static getContentQuestionTypeRenderAs(question: Question, survey: SurveyPDF): string {\n let renderAs = question.renderAs;\n if(question.getType() === 'boolean' && survey.options.useLegacyBooleanRendering) {\n renderAs = 'checkbox';\n }\n if(renderAs !== 'default') {\n const type = `${question.getType()}-${renderAs}`;\n if(FlatRepository.getInstance().isTypeRegistered(type)) return type;\n }\n return question.getType();\n }\n public static getContentQuestionType(question: Question, survey: SurveyPDF): string {\n if(!!question.customWidget) return question.customWidget.pdfQuestionType;\n return !!(<any>question).contentQuestion ? 'custom_model' : this.getContentQuestionTypeRenderAs(question, survey);\n }\n public static getRatingMinWidth(controller: DocController): number {\n return controller.measureText(this.RATING_MIN_WIDTH).width;\n }\n public static getRatingItemText(question: QuestionRatingModel,\n index: number, locText: LocalizableString): LocalizableString {\n const ratingItemLocText: LocalizableString = new LocalizableString(locText.owner, locText.useMarkdown);\n ratingItemLocText.text = this.getLocString(locText);\n if (index === 0 && question.minRateDescription) {\n ratingItemLocText.text = question.locMinRateDescription.text + ' ' + this.getLocString(locText);\n }\n else if (index === question.visibleRateValues.length - 1 && question.maxRateDescription) {\n ratingItemLocText.text = this.getLocString(locText) + ' ' + question.locMaxRateDescription.text;\n }\n return ratingItemLocText;\n }\n public static getPageAvailableWidth(controller: DocController): number {\n return controller.paperWidth - controller.margins.left - controller.margins.right;\n }\n public static getImagePickerAvailableWidth(controller: DocController): number {\n const width: number = (this.getPageAvailableWidth(controller) -\n (this.IMAGEPICKER_COUNT - 1) * controller.unitHeight);\n return width > 0 ? width : controller.unitHeight;\n }\n public static getColumnWidth(controller: DocController, colCount: number) {\n return (this.getPageAvailableWidth(controller) - (colCount - 1) *\n controller.unitWidth * this.GAP_BETWEEN_COLUMNS) / colCount;\n }\n public static setColumnMargins(controller: DocController, colCount: number, column: number) {\n const cellWidth: number = this.getColumnWidth(controller, colCount);\n controller.margins.left = controller.margins.left + column *\n (cellWidth + controller.unitWidth * this.GAP_BETWEEN_COLUMNS);\n controller.margins.right = controller.margins.right + (colCount - column - 1) *\n (cellWidth + controller.unitWidth * this.GAP_BETWEEN_COLUMNS);\n }\n public static moveRect(rect: IRect, left: number = rect.xLeft, top: number = rect.yTop): IRect {\n return {\n xLeft: left,\n yTop: top,\n xRight: left + rect.xRight - rect.xLeft,\n yBot: top + rect.yBot - rect.yTop\n };\n }\n public static scaleRect(rect: IRect, scale: number): IRect {\n const scaleWidth: number = Math.min(rect.xRight - rect.xLeft, rect.yBot - rect.yTop) * (1.0 - scale) / 2.0;\n return {\n xLeft: rect.xLeft + scaleWidth,\n yTop: rect.yTop + scaleWidth,\n xRight: rect.xRight - scaleWidth,\n yBot: rect.yBot - scaleWidth\n };\n }\n public static getBorderWidth(controller: DocController) {\n return 2.0 * controller.unitWidth * this.BORDER_SCALE;\n }\n public static formScale(controller: DocController, flat: ISize): number {\n const minSide: number = Math.min(flat.width, flat.height);\n return (minSide - this.getBorderWidth(controller)) / minSide;\n }\n public static async generateQuestionFlats(survey: SurveyPDF,\n controller: DocController, question: Question, point: IPoint): Promise<IPdfBrick[]> {\n const questionType: string = this.getContentQuestionType(question, survey);\n const flatQuestion: IFlatQuestion = FlatRepository.getInstance().\n create(survey, question, controller, questionType);\n const questionFlats: IPdfBrick[] = await flatQuestion.generateFlats(point);\n const adornersOptions: AdornersOptions = new AdornersOptions(point,\n questionFlats, question, controller, FlatRepository.getInstance(), SurveyPDFModule);\n if (question.customWidget && question.customWidget.isFit(question) &&\n question.customWidget.pdfRender) {\n survey.onRenderQuestion.unshift(question.customWidget.pdfRender);\n }\n await survey.onRenderQuestion.fire(survey, adornersOptions);\n return [...adornersOptions.bricks];\n }\n public static isFontExist(controller: DocController, fontName: string): boolean {\n return controller.doc.internal.getFont(fontName).fontName === fontName;\n }\n public static isCustomFont(controller: DocController, fontName: string): boolean {\n return controller.doc.internal.getFont(fontName).encoding === this.CUSTOM_FONT_ENCODING;\n }\n public static fixFont(controller: DocController): void {\n if (this.isCustomFont(controller, controller.fontName)) {\n controller.doc.text('load font', 0, 0);\n controller.doc.deletePage(1);\n controller.addPage();\n }\n }\n public static clone(src: any): any {\n const target: any = {};\n for (const prop in src) {\n if (src.hasOwnProperty(prop)) {\n target[prop] = src[prop];\n }\n }\n return target;\n }\n public static shouldRenderReadOnly(question: IQuestion, controller: DocController, readOnly?: boolean): boolean {\n return ((!!question && question.isReadOnly || readOnly) && SurveyHelper.getReadonlyRenderAs(\n <Question>question, controller) !== 'acroform') || controller?.compress;\n }\n public static isSizeEmpty(val: any): boolean {\n return !val || val === 'auto';\n }\n public static isHeightEmpty(val: any): boolean {\n return this.isSizeEmpty(val) || val == '100%';\n }\n public static async getCorrectedImageSize(controller: DocController, imageOptions: { imageWidth?: any, imageHeight?: any, imageLink: string, defaultImageWidth?: any, defaultImageHeight?: any }): Promise<ISize> {\n let { imageWidth, imageLink, imageHeight, defaultImageWidth, defaultImageHeight } = imageOptions;\n imageWidth = typeof imageWidth === 'number' ? imageWidth.toString() : imageWidth;\n imageHeight = typeof imageHeight === 'number' ? imageHeight.toString() : imageHeight;\n let widthPt: number = imageWidth && SurveyHelper.parseWidth(imageWidth, SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n let heightPt: number = imageHeight && SurveyHelper.parseWidth(imageHeight, SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n defaultImageWidth = typeof defaultImageWidth === 'number' ? defaultImageWidth.toString() : defaultImageWidth;\n defaultImageHeight = typeof defaultImageHeight === 'number' ? defaultImageHeight.toString() : defaultImageHeight;\n let defaultWidthPt: number = defaultImageWidth && SurveyHelper.parseWidth(defaultImageWidth, SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n let defaultHeightPt: number = defaultImageHeight && SurveyHelper.parseWidth(defaultImageHeight, SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n\n if(SurveyHelper.isSizeEmpty(imageWidth) || SurveyHelper.isHeightEmpty(imageHeight)) {\n const imageSize = await SurveyHelper.getImageSize(imageLink);\n if(!SurveyHelper.isSizeEmpty(imageWidth)) {\n if(imageSize && imageSize.width) {\n heightPt = imageSize.height * widthPt / imageSize.width;\n }\n }\n else if(!SurveyHelper.isHeightEmpty(imageHeight)) {\n if(imageSize && imageSize.height) {\n widthPt = imageSize.width * heightPt / imageSize.height;\n }\n }\n else if(imageSize && imageSize.height && imageSize.width) {\n heightPt = SurveyHelper.parseWidth(imageSize.height.toString(), SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n widthPt = SurveyHelper.parseWidth(imageSize.width.toString(), SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n }\n }\n return { width: widthPt || defaultWidthPt || 0, height: heightPt || defaultHeightPt || 0 };\n }\n}","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n * \n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/** \n* jsPDF AcroForm Plugin\n* @module AcroForm\n*/\nimport { jsPDF } from \"jspdf\";\n\n(function (jsPDF, globalObj) {\n 'use strict';\n\n var jsPDFAPI = jsPDF.API;\n var scope;\n var scaleFactor = 1;\n function toUnicode(str) {\n var unicodeString = '';\n for (var i = 0; i < str.length; i++) {\n var theUnicode = str.charCodeAt(i).toString(16).toUpperCase();\n while (theUnicode.length < 4) {\n theUnicode = '0' + theUnicode;\n };\n unicodeString += theUnicode;\n }\n return '<FEFF' + unicodeString + '>';\n }\n var pdfEscape = function (value) { return value.replace(/\\\\/g, '\\\\\\\\').replace(/\\(/g, '\\\\(').replace(/\\)/g, '\\\\)') };\n var pdfUnescape = function (value) { return value.replace(/\\\\\\\\/g, '\\\\').replace(/\\\\\\(/g, '(').replace(/\\\\\\)/g, ')'); };\n function arrayToPdfUnicodeArray(value) {\n var result = '[ ';\n for (var i = 0; i < value.length; i++) {\n result += toUnicode(value[i]);\n }\n result += ' ]'\n return result;\n }\n var f2 = function (number) {\n return number.toFixed(2); // Ie, %.2f\n };\n\n var f5 = function (number) {\n return number.toFixed(5); // Ie, %.2f\n };\n\n jsPDFAPI.__acroform__ = {};\n var inherit = function (child, parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n };\n\n var scale = function (x) {\n return (x * scaleFactor);\n };\n var antiScale = function (x) {\n return (x / scaleFactor);\n };\n\n var createFormXObject = function (formObject) {\n var xobj = new AcroFormXObject();\n var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n return xobj;\n };\n\n /**\n * Bit-Operations\n */\n var setBit = jsPDFAPI.__acroform__.setBit = function (number, bitPosition) {\n number = number || 0;\n bitPosition = bitPosition || 0;\n\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.setBit');\n }\n var bitMask = 1 << bitPosition;\n\n number |= bitMask;\n\n return number;\n };\n\n var clearBit = jsPDFAPI.__acroform__.clearBit = function (number, bitPosition) {\n number = number || 0;\n bitPosition = bitPosition || 0;\n\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.clearBit');\n }\n var bitMask = 1 << bitPosition;\n\n number &= ~bitMask;\n\n return number;\n };\n\n var getBit = jsPDFAPI.__acroform__.getBit = function (number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.getBit');\n }\n return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n };\n\n /*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\n var getBitForPdf = jsPDFAPI.__acroform__.getBitForPdf = function (number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf');\n }\n return getBit(number, bitPosition - 1);\n };\n\n var setBitForPdf = jsPDFAPI.__acroform__.setBitForPdf = function (number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf');\n }\n return setBit(number, bitPosition - 1);\n };\n\n var clearBitForPdf = jsPDFAPI.__acroform__.clearBitForPdf = function (number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf');\n }\n return clearBit(number, bitPosition - 1);\n };\n\n var calculateCoordinates = jsPDFAPI.__acroform__.calculateCoordinates = function (args) {\n var getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\n var getVerticalCoordinate = this.internal.getVerticalCoordinate;\n var x = args[0];\n var y = args[1];\n var w = args[2];\n var h = args[3];\n\n var coordinates = {};\n\n coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n return [Number(f2(coordinates.lowerLeft_X)), Number(f2(coordinates.lowerLeft_Y)), Number(f2(coordinates.upperRight_X)), Number(f2(coordinates.upperRight_Y))];\n };\n\n var calculateAppearanceStream = function (formObject) {\n if (formObject.appearanceStreamContent) {\n return formObject.appearanceStreamContent;\n }\n\n if (!formObject.V && !formObject.DV) {\n return;\n }\n\n // else calculate it\n\n var stream = [];\n var text = formObject.V || formObject.DV;\n var calcRes = calculateX(formObject, text);\n var fontKey = scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;\n\n //PDF 32000-1:2008, page 444\n stream.push('/Tx BMC');\n stream.push('q');\n stream.push('BT'); // Begin Text\n stream.push(scope.__private__.encodeColorString(formObject.color));\n stream.push('/' + fontKey + ' ' + f2(calcRes.fontSize) + ' Tf');\n stream.push('1 0 0 1 0 0 Tm');// Transformation Matrix\n stream.push(calcRes.text);\n stream.push('ET'); // End Text \n stream.push('Q');\n stream.push('EMC');\n\n var appearanceStreamContent = new createFormXObject(formObject);\n appearanceStreamContent.stream = stream.join(\"\\n\");\n return appearanceStreamContent;\n };\n\n var calculateX = function (formObject, text) {\n if (formObject.isUnicode) text = formObject.trueValue;\n var maxFontSize =\n formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n var returnValue = {\n text: \"\",\n fontSize: \"\"\n };\n // Remove Brackets\n text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n text =\n text.substr(text.length - 1) == \")\"\n ? text.substr(0, text.length - 1)\n : text;\n // split into array of words\n var textSplit = text.split(\" \");\n textSplit = textSplit.map(function (word) {\n return word.split(\"\\n\");\n });\n if (!formObject.multiline) {\n textSplit = textSplit.map(function (arr) {\n return [arr.join(\" \")]\n });\n }\n\n var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n var lineSpacing = 2;\n var borderPadding = 2;\n\n var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n height = height < 0 ? -height : height;\n var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n width = width < 0 ? -width : width;\n\n var isSmallerThanWidth = function(i, lastLine, fontSize) {\n if (i + 1 < textSplit.length) {\n var tmp = lastLine + \" \" + textSplit[i + 1][0];\n var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n var FieldWidth = width - 2 * borderPadding;\n return TextWidth <= FieldWidth;\n } else {\n return false;\n }\n };\n\n fontSize++;\n FontSize: while (fontSize > 0) {\n text = \"\";\n fontSize--;\n var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n var startY = formObject.multiline\n ? height - fontSize\n : (height - textHeight) / 2;\n startY += lineSpacing;\n var startX;\n\n var lastY = startY;\n var firstWordInLine = 0,\n lastWordInLine = 0;\n var lastLength;\n var currWord = 0;\n\n if (fontSize <= 0) {\n // In case, the Text doesn't fit at all\n fontSize = 12;\n text = \"(...) Tj\\n\";\n text +=\n \"% Width of Text: \" +\n calculateFontSpace(text, formObject, fontSize).width +\n \", FieldWidth:\" +\n width +\n \"\\n\";\n break;\n }\n\n var lastLine = \"\";\n var lineCount = 0;\n Line: for (var i = 0; i < textSplit.length; i++) {\n if (textSplit.hasOwnProperty(i)) {\n var isWithNewLine = false;\n if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n if (\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n continue FontSize;\n }\n\n lastLine += textSplit[i][currWord];\n isWithNewLine = true;\n lastWordInLine = i;\n i--;\n } else {\n lastLine += textSplit[i][currWord] + \" \";\n lastLine =\n lastLine.substr(lastLine.length - 1) == \" \"\n ? lastLine.substr(0, lastLine.length - 1)\n : lastLine;\n var key = parseInt(i);\n var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n var isLastWord = i >= textSplit.length - 1;\n\n if (nextLineIsSmaller && !isLastWord) {\n lastLine += \" \";\n currWord = 0;\n continue; // Line\n } else if (!nextLineIsSmaller && !isLastWord) {\n if (!formObject.multiline) {\n continue FontSize;\n } else {\n if (\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n // If the Text is higher than the\n // FieldObject\n continue FontSize;\n }\n lastWordInLine = key;\n // go on\n }\n } else if (isLastWord) {\n lastWordInLine = key;\n } else {\n if (\n formObject.multiline &&\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n // If the Text is higher than the FieldObject\n continue FontSize;\n }\n }\n }\n // Remove last blank\n\n var line = \"\";\n\n for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n var currLine = textSplit[x];\n if (formObject.multiline) {\n if (x === lastWordInLine) {\n line += currLine[currWord] + \" \";\n currWord = (currWord + 1) % currLine.length;\n continue;\n }\n if (x === firstWordInLine) {\n line += currLine[currLine.length - 1] + \" \";\n continue;\n }\n }\n line += currLine[0] + \" \";\n }\n\n // Remove last blank\n line =\n line.substr(line.length - 1) == \" \"\n ? line.substr(0, line.length - 1)\n : line;\n // lastLength -= blankSpace.width;\n lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n // Calculate startX\n switch (formObject.textAlign) {\n case \"right\":\n startX = width - lastLength - borderPadding;\n break;\n case \"center\":\n startX = (width - lastLength) / 2;\n break;\n case \"left\":\n default:\n startX = borderPadding;\n break;\n }\n text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n\n if (formObject.isUnicode) {\n var fontList = {};\n fontList[scope.internal.getFont().id] = scope.internal.getFont();\n var payload = {\n text: line,\n x: null,\n y: null,\n options: {\n lang: null\n },\n mutex: {\n pdfEscape: pdfEscape,\n activeFontKey: scope.internal.getFont().id,\n fonts: fontList,\n activeFontSize: formObject.fontSize\n }\n };\n scope.internal.events.publish('postProcessText', payload);\n text += '<' + payload.text + '> Tj\\n';\n }\n else {\n text += '(' + pdfEscape(line) + ') Tj\\n';\n }\n // reset X in PDF\n text += -f2(startX) + \" 0 Td\\n\";\n\n // After a Line, adjust y position\n lastY = -(fontSize + lineSpacing);\n\n // Reset for next iteration step\n lastLength = 0;\n firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n lineCount++;\n\n lastLine = \"\";\n continue Line;\n }\n }\n break;\n }\n\n returnValue.text = text;\n returnValue.fontSize = fontSize;\n\n return returnValue;\n };\n\n /**\n * Small workaround for calculating the TextMetric approximately.\n * \n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\n var calculateFontSpace = function (text, formObject, fontSize) {\n var font = scope.internal.getFont(formObject.fontName, formObject.fontStyle);\n var width = scope.getStringUnitWidth(text, { font: font, fontSize: parseFloat(fontSize), charSpace: 0 }) * parseFloat(fontSize);\n var height = scope.getStringUnitWidth(\"3\", { font: font, fontSize: parseFloat(fontSize), charSpace: 0 }) * parseFloat(fontSize) * 1.5;\n return { height: height, width: width };\n };\n\n var acroformPluginTemplate = {\n fields: [],\n xForms: [],\n /**\n * acroFormDictionaryRoot contains information about the AcroForm\n * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n * 1: The Object ID of the Root\n */\n acroFormDictionaryRoot: null,\n /**\n * After the PDF gets evaluated, the reference to the root has to be\n * reset, this indicates, whether the root has already been printed\n * out\n */\n printedOut: false,\n internal: null,\n isInitialized: false\n };\n\n var annotReferenceCallback = function () {\n //set objId to undefined and force it to get a new objId on buildDocument\n scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n for (var i in fields) {\n if (fields.hasOwnProperty(i)) {\n var formObject = fields[i];\n //set objId to undefined and force it to get a new objId on buildDocument\n formObject.objId = undefined;\n // add Annot Reference!\n if (formObject.hasAnnotation) {\n // If theres an Annotation Widget in the Form Object, put the\n // Reference in the /Annot array\n createAnnotationReference.call(scope, formObject);\n }\n }\n }\n };\n\n var putForm = function (formObject) {\n if (scope.internal.acroformPlugin.printedOut) {\n scope.internal.acroformPlugin.printedOut = false;\n scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n }\n if (!scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n initializeAcroForm.call(scope);\n }\n scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(formObject);\n };\n /**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\n var createAnnotationReference = function (object) {\n var options = {\n type: 'reference',\n object: object\n };\n var findEntry = function (entry) { return (entry.type === options.type && entry.object === options.object); };\n if (scope.internal.getPageInfo(object.page).pageContext.annotations.find(findEntry) === undefined) {\n scope.internal.getPageInfo(object.page).pageContext.annotations.push(options);\n }\n };\n\n // Callbacks\n\n var putCatalogCallback = function () {\n // Put reference to AcroForm to DocumentCatalog\n if (typeof scope.internal.acroformPlugin.acroFormDictionaryRoot != 'undefined') {\n // for safety, shouldn't normally be the case\n scope.internal.write('/AcroForm ' + scope.internal.acroformPlugin.acroFormDictionaryRoot.objId + ' ' + 0 + ' R');\n } else {\n throw new Error('putCatalogCallback: Root missing.');\n }\n };\n\n /**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\n var AcroFormDictionaryCallback = function () {\n // Remove event\n scope.internal.events.unsubscribe(scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID);\n delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n scope.internal.acroformPlugin.printedOut = true;\n };\n\n /**\n * Creates the single Fields and writes them into the Document\n * \n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\n var createFieldCallback = function (fieldArray) {\n var standardFields = (!fieldArray);\n\n if (!fieldArray) {\n // in case there is no fieldArray specified, we want to print out\n // the Fields of the AcroForm\n // Print out Root\n scope.internal.newObjectDeferredBegin(scope.internal.acroformPlugin.acroFormDictionaryRoot.objId, true);\n scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n }\n\n fieldArray = fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n for (var i in fieldArray) {\n if (fieldArray.hasOwnProperty(i)) {\n var fieldObject = fieldArray[i];\n var keyValueList = [];\n var oldRect = fieldObject.Rect;\n\n if (fieldObject.Rect) {\n fieldObject.Rect = calculateCoordinates.call(this, fieldObject.Rect);\n }\n\n // Start Writing the Object\n scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(fieldObject);\n\n if (typeof fieldObject === \"object\" && typeof fieldObject.getKeyValueListForStream === \"function\") {\n keyValueList = fieldObject.getKeyValueListForStream();\n }\n\n fieldObject.Rect = oldRect;\n\n if (fieldObject.hasAppearanceStream && !fieldObject.appearanceStreamContent) {\n // Calculate Appearance\n var appearance = calculateAppearanceStream.call(this, fieldObject);\n keyValueList.push({ key: 'AP', value: \"<</N \" + appearance + \">>\" });\n\n scope.internal.acroformPlugin.xForms.push(appearance);\n }\n\n // Assume AppearanceStreamContent is a Array with N,R,D (at least\n // one of them!)\n if (fieldObject.appearanceStreamContent) {\n var appearanceStreamString = \"\";\n // Iterate over N,R and D\n for (var k in fieldObject.appearanceStreamContent) {\n if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n var value = fieldObject.appearanceStreamContent[k];\n appearanceStreamString += (\"/\" + k + \" \");\n appearanceStreamString += \"<<\";\n if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n // appearanceStream is an Array or Object!\n for (var i in value) {\n if (value.hasOwnProperty(i)) {\n var obj = value[i];\n if (typeof obj === 'function') {\n // if Function is referenced, call it in order\n // to get the FormXObject\n obj = obj.call(this, fieldObject);\n }\n appearanceStreamString += (\"/\" + i + \" \" + obj + \" \");\n\n // In case the XForm is already used, e.g. OffState\n // of CheckBoxes, don't add it\n if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n scope.internal.acroformPlugin.xForms.push(obj);\n\n }\n }\n } else {\n obj = value;\n if (typeof obj === 'function') {\n // if Function is referenced, call it in order to\n // get the FormXObject\n obj = obj.call(this, fieldObject);\n }\n appearanceStreamString += (\"/\" + i + \" \" + obj);\n if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n scope.internal.acroformPlugin.xForms.push(obj);\n }\n appearanceStreamString += \">>\";\n }\n }\n\n // appearance stream is a normal Object..\n keyValueList.push({ key: 'AP', value: \"<<\\n\" + appearanceStreamString + \">>\" });\n }\n\n scope.internal.putStream({ additionalKeyValues: keyValueList });\n\n scope.internal.out(\"endobj\");\n\n }\n }\n if (standardFields) {\n createXFormObjectCallback.call(this, scope.internal.acroformPlugin.xForms);\n }\n };\n\n var createXFormObjectCallback = function (fieldArray) {\n for (var i in fieldArray) {\n if (fieldArray.hasOwnProperty(i)) {\n var key = i;\n var fieldObject = fieldArray[i];\n // Start Writing the Object\n scope.internal.newObjectDeferredBegin(fieldObject && fieldObject.objId, true);\n\n if (typeof fieldObject === \"object\" && typeof fieldObject.putStream === \"function\") {\n fieldObject.putStream();\n }\n delete fieldArray[key];\n }\n }\n };\n\n var initializeAcroForm = function () {\n if (this.internal !== undefined && (this.internal.acroformPlugin === undefined || this.internal.acroformPlugin.isInitialized === false)) {\n\n scope = this;\n\n AcroFormField.FieldNum = 0;\n this.internal.acroformPlugin = JSON.parse(JSON.stringify(acroformPluginTemplate));\n if (this.internal.acroformPlugin.acroFormDictionaryRoot) {\n throw new Error(\"Exception while creating AcroformDictionary\");\n }\n scaleFactor = scope.internal.scaleFactor;\n // The Object Number of the AcroForm Dictionary\n scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n\n // add Callback for creating the AcroForm Dictionary\n scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe('postPutResources', AcroFormDictionaryCallback);\n\n scope.internal.events.subscribe('buildDocument', annotReferenceCallback); // buildDocument\n\n // Register event, that is triggered when the DocumentCatalog is\n // written, in order to add /AcroForm\n scope.internal.events.subscribe('putCatalog', putCatalogCallback);\n\n // Register event, that creates all Fields\n scope.internal.events.subscribe('postPutPages', createFieldCallback);\n\n scope.internal.acroformPlugin.isInitialized = true;\n }\n };\n\n //PDF 32000-1:2008, page 26, 7.3.6\n var arrayToPdfArray = jsPDFAPI.__acroform__.arrayToPdfArray = function (array) {\n if (Array.isArray(array)) {\n var content = '[';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n content += ' ';\n }\n switch (typeof array[i]) {\n case 'boolean':\n case 'number':\n case 'object':\n content += array[i].toString();\n break;\n case 'string':\n if (array[i].substr(0, 1) !== '/') {\n content += '(' + pdfEscape(array[i].toString()) + ')';\n } else {\n content += array[i].toString();\n }\n break;\n }\n }\n content += ']';\n return content;\n }\n throw new Error('Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray');\n };\n function getMatches(string, regex, index) {\n index || (index = 1); // default to the first capturing group\n var matches = [];\n var match;\n while (match = regex.exec(string)) {\n matches.push(match[index]);\n }\n return matches;\n }\n var pdfArrayToStringArray = function (array) {\n var result = [];\n if (typeof array === \"string\") {\n result = getMatches(array, /\\((.*?)\\)/g);\n }\n return result;\n };\n\n var toPdfString = function (string) {\n string = string || \"\";\n string.toString();\n string = '(' + pdfEscape(string) + ')';\n return string;\n };\n\n // ##########################\n // Classes\n // ##########################\n\n /**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\n var AcroFormPDFObject = function () {\n var _objId;\n\n /**\n * @name AcroFormPDFObject#objId\n * @type {any}\n */\n Object.defineProperty(this, 'objId', {\n configurable: true,\n get: function () {\n if (!_objId) {\n _objId = scope.internal.newObjectDeferred();\n }\n return _objId\n },\n set: function (value) {\n _objId = value;\n }\n });\n };\n\n /**\n * @function AcroFormPDFObject.toString\n */\n AcroFormPDFObject.prototype.toString = function () {\n return this.objId + \" 0 R\";\n };\n\n AcroFormPDFObject.prototype.putStream = function () {\n var keyValueList = this.getKeyValueListForStream();\n scope.internal.putStream({ data: this.stream, additionalKeyValues: keyValueList });\n scope.internal.out(\"endobj\");\n };\n\n /**\n * Returns an key-value-List of all non-configurable Variables from the Object\n * \n * @name getKeyValueListForStream\n * @returns {string}\n */\n AcroFormPDFObject.prototype.getKeyValueListForStream = function () {\n var createKeyValueListFromFieldObject = function (fieldObject) {\n var keyValueList = [];\n var keys = Object.getOwnPropertyNames(fieldObject).filter(function (key) {\n return (key != 'content' && key != 'appearanceStreamContent' && key.substring(0, 1) != \"_\");\n });\n\n for (var i in keys) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(fieldObject, keys[i]);\n if (propertyDescriptor && propertyDescriptor.configurable === false) {\n var key = keys[i];\n var value = fieldObject[key];\n if (value) {\n if (Array.isArray(value)) {\n keyValueList.push({ key: key, value: arrayToPdfArray(value) });\n } else if (value instanceof AcroFormPDFObject) {\n // In case it is a reference to another PDFObject,\n // take the reference number\n keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n } else if (typeof value !== \"function\") {\n keyValueList.push({ key: key, value: value });\n }\n }\n }\n }\n return keyValueList;\n };\n\n return createKeyValueListFromFieldObject(this);\n };\n\n var AcroFormXObject = function () {\n AcroFormPDFObject.call(this);\n\n\n Object.defineProperty(this, 'Type', {\n value: \"/XObject\",\n configurable: false,\n writeable: true\n });\n\n Object.defineProperty(this, 'Subtype', {\n value: \"/Form\",\n configurable: false,\n writeable: true\n });\n\n Object.defineProperty(this, 'FormType', {\n value: 1,\n configurable: false,\n writeable: true\n });\n\n var _BBox = [];\n Object.defineProperty(this, 'BBox', {\n configurable: false,\n writeable: true,\n get: function () {\n return _BBox;\n },\n set: function (value) {\n _BBox = value;\n }\n });\n\n Object.defineProperty(this, 'Resources', {\n value: \"2 0 R\",\n configurable: false,\n writeable: true\n });\n\n var _stream;\n Object.defineProperty(this, 'stream', {\n enumerable: false,\n configurable: true,\n set: function (value) {\n _stream = value.trim();\n },\n get: function () {\n if (_stream) {\n return _stream;\n } else {\n return null;\n }\n }\n });\n };\n\n inherit(AcroFormXObject, AcroFormPDFObject);\n\n var AcroFormDictionary = function () {\n AcroFormPDFObject.call(this);\n\n var _Kids = [];\n\n Object.defineProperty(this, 'Kids', {\n enumerable: false,\n configurable: true,\n get: function () {\n if (_Kids.length > 0) {\n return _Kids;\n } else {\n return undefined;\n }\n }\n });\n Object.defineProperty(this, 'Fields', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _Kids;\n }\n });\n\n // Default Appearance\n var _DA;\n Object.defineProperty(this, 'DA', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (!_DA) {\n return undefined;\n }\n return '(' + _DA + ')'\n },\n set: function (value) {\n _DA = value;\n }\n });\n };\n\n inherit(AcroFormDictionary, AcroFormPDFObject);\n\n /**\n * The Field Object contains the Variables, that every Field needs\n * \n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\n var AcroFormField = function () {\n AcroFormPDFObject.call(this);\n\n //Annotation-Flag See Table 165\n var _F = 4;\n this.isUnicode = false;\n this.trueValue = '';\n Object.defineProperty(this, 'F', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _F;\n },\n set: function (value) {\n if (!isNaN(value)) {\n _F = value;\n } else {\n throw new Error('Invalid value \"' + value + '\" for attribute F supplied.');\n }\n }\n });\n\n /**\n * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen. \n * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n *\n * @name AcroFormField#showWhenPrinted\n * @default true\n * @type {boolean}\n */\n Object.defineProperty(this, 'showWhenPrinted', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(_F, 3));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.F = setBitForPdf(_F, 3);\n } else {\n this.F = clearBitForPdf(_F, 3);\n }\n }\n });\n\n var _Ff = 0;\n Object.defineProperty(this, 'Ff', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _Ff;\n },\n set: function (value) {\n if (!isNaN(value)) {\n _Ff = value;\n } else {\n throw new Error('Invalid value \"' + value + '\" for attribute Ff supplied.');\n }\n }\n });\n\n var _Rect = [];\n Object.defineProperty(this, 'Rect', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (_Rect.length === 0) {\n return undefined;\n }\n return _Rect;\n },\n set: function (value) {\n if (typeof value !== \"undefined\") {\n _Rect = value;\n } else {\n _Rect = [];\n }\n }\n });\n\n /**\n * The x-position of the field.\n *\n * @name AcroFormField#x\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, 'x', {\n enumerable: true,\n configurable: true,\n get: function () {\n if (!_Rect || isNaN(_Rect[0])) {\n return 0;\n }\n return antiScale(_Rect[0]);\n },\n set: function (value) {\n _Rect[0] = scale(value);\n }\n });\n\n /**\n * The y-position of the field.\n *\n * @name AcroFormField#y\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, 'y', {\n enumerable: true,\n configurable: true,\n get: function () {\n if (!_Rect || isNaN(_Rect[1])) {\n return 0;\n }\n return antiScale(_Rect[1]);\n },\n set: function (value) {\n _Rect[1] = scale(value);\n }\n });\n\n /**\n * The width of the field.\n *\n * @name AcroFormField#width\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, 'width', {\n enumerable: true,\n configurable: true,\n get: function () {\n if (!_Rect || isNaN(_Rect[2])) {\n return 0;\n }\n return antiScale(_Rect[2]);\n },\n set: function (value) {\n _Rect[2] = scale(value);\n }\n });\n\n /**\n * The height of the field.\n *\n * @name AcroFormField#height\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, 'height', {\n enumerable: true,\n configurable: true,\n get: function () {\n if (!_Rect || isNaN(_Rect[3])) {\n return 0;\n }\n return antiScale(_Rect[3]);\n },\n set: function (value) {\n _Rect[3] = scale(value);\n }\n });\n\n var _FT = \"\";\n Object.defineProperty(this, 'FT', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _FT\n },\n set: function (value) {\n switch (value) {\n case '/Btn':\n case '/Tx':\n case '/Ch':\n case '/Sig':\n _FT = value;\n break;\n default:\n throw new Error('Invalid value \"' + value + '\" for attribute FT supplied.');\n }\n }\n });\n\n var _T = null;\n\n Object.defineProperty(this, 'T', {\n enumerable: true,\n configurable: false,\n get: function () {\n if (!_T || _T.length < 1) {\n // In case of a Child from a Radio´Group, you don't need a FieldName\n if (this instanceof AcroFormChildClass) {\n return undefined;\n }\n _T = \"FieldObject\" + (AcroFormField.FieldNum++);\n }\n return '(' + pdfEscape(_T) + ')';\n },\n set: function (value) {\n _T = value.toString();\n }\n });\n\n /**\n * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n *\n * @name AcroFormField#fieldName\n * @default null\n * @type {string}\n */\n Object.defineProperty(this, 'fieldName', {\n configurable: true,\n enumerable: true,\n get: function () {\n return _T;\n },\n set: function (value) {\n _T = value;\n }\n });\n\n var _fontName = 'helvetica';\n /**\n * The fontName of the font to be used.\n *\n * @name AcroFormField#fontName\n * @default 'helvetica'\n * @type {string}\n */\n Object.defineProperty(this, 'fontName', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _fontName;\n },\n set: function (value) {\n _fontName = value;\n }\n });\n\n var _fontStyle = 'normal';\n /**\n * The fontStyle of the font to be used.\n *\n * @name AcroFormField#fontStyle\n * @default 'normal'\n * @type {string}\n */\n Object.defineProperty(this, 'fontStyle', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _fontStyle;\n },\n set: function (value) {\n _fontStyle = value;\n }\n });\n\n var _fontSize = 0;\n /**\n * The fontSize of the font to be used.\n *\n * @name AcroFormField#fontSize\n * @default 0 (for auto)\n * @type {number}\n */\n Object.defineProperty(this, 'fontSize', {\n enumerable: true,\n configurable: true,\n get: function () {\n return antiScale(_fontSize);\n },\n set: function (value) {\n _fontSize = scale(value);\n }\n });\n\n var _maxFontSize = 50;\n /**\n * The maximum fontSize of the font to be used.\n *\n * @name AcroFormField#maxFontSize\n * @default 0 (for auto)\n * @type {number}\n */\n Object.defineProperty(this, 'maxFontSize', {\n enumerable: true,\n configurable: true,\n get: function () {\n return antiScale(_maxFontSize);\n },\n set: function (value) {\n _maxFontSize = scale(value);\n }\n });\n\n var _color = 'black';\n /**\n * The color of the text\n *\n * @name AcroFormField#color\n * @default 'black'\n * @type {string|rgba}\n */\n Object.defineProperty(this, 'color', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _color;\n },\n set: function (value) {\n _color = value;\n }\n });\n\n var _DA = '/F1 0 Tf 0 g';\n // Defines the default appearance (Needed for variable Text)\n Object.defineProperty(this, 'DA', {\n enumerable: true,\n configurable: false,\n get: function () {\n if (!_DA\n || this instanceof AcroFormChildClass\n || this instanceof AcroFormTextField) {\n return undefined;\n }\n return toPdfString(_DA);\n },\n set: function (value) {\n value = value.toString();\n _DA = value;\n }\n });\n\n\n var _DV = null;\n Object.defineProperty(this, 'DV', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (!_DV) {\n return undefined;\n }\n if ((this instanceof AcroFormButton === false)) {\n return toPdfString(_DV);\n }\n return _DV;\n },\n set: function (value) {\n value = value.toString();\n if ((this instanceof AcroFormButton === false)) {\n if (value.substr(0, 1) === '(') {\n _DV = pdfUnescape(value.substr(1, value.length - 2));\n } else {\n _DV = pdfUnescape(value);\n }\n } else {\n _DV = value;\n }\n }\n });\n\n /**\n * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value. \n *\n * @name AcroFormField#defaultValue\n * @default null\n * @type {any}\n */\n Object.defineProperty(this, 'defaultValue', {\n enumerable: true,\n configurable: true,\n get: function () {\n if ((this instanceof AcroFormButton === true)) {\n return pdfUnescape(_DV.substr(1, _DV.length - 1));\n } else {\n return _DV;\n }\n },\n set: function (value) {\n value = value.toString();\n if ((this instanceof AcroFormButton === true)) {\n _DV = '/' + value;\n } else {\n _DV = value;\n }\n }\n });\n\n var _V = null;\n Object.defineProperty(this, 'V', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (this.isUnicode) {\n return _V;\n }\n if (!_V) {\n return undefined;\n }\n if ((this instanceof AcroFormButton === false)) {\n return toPdfString(_V);\n }\n return _V;\n },\n set: function (value) {\n value = value.toString();\n if (this.isUnicode) {\n _V = toUnicode(value);\n this.trueValue = value;\n }\n else {\n if ((this instanceof AcroFormButton === false)) {\n if (value.substr(0, 1) === '(') {\n _V = pdfUnescape(value.substr(1, value.length - 2));\n } else {\n _V = pdfUnescape(value);\n }\n } else {\n _V = value;\n }\n }\n }\n });\n\n /**\n * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information. \n *\n * @name AcroFormField#value\n * @default null\n * @type {any}\n */\n Object.defineProperty(this, 'value', {\n enumerable: true,\n configurable: true,\n get: function () {\n if ((this instanceof AcroFormButton === true)) {\n return pdfUnescape(_V.substr(1, _V.length - 1));\n } else {\n return _V;\n }\n },\n set: function (value) {\n value = value.toString();\n if ((this instanceof AcroFormButton === true)) {\n _V = '/' + value;\n } else {\n _V = value;\n }\n }\n });\n\n /**\n * Check if field has annotations\n *\n * @name AcroFormField#hasAnnotation\n * @readonly\n * @type {boolean}\n */\n Object.defineProperty(this, 'hasAnnotation', {\n enumerable: true,\n configurable: true,\n get: function () {\n return (this.Rect);\n }\n });\n\n Object.defineProperty(this, 'Type', {\n enumerable: true,\n configurable: false,\n get: function () {\n return (this.hasAnnotation) ? \"/Annot\" : null;\n }\n });\n\n Object.defineProperty(this, 'Subtype', {\n enumerable: true,\n configurable: false,\n get: function () {\n return (this.hasAnnotation) ? \"/Widget\" : null;\n }\n });\n\n var _hasAppearanceStream = false;\n /**\n * true if field has an appearanceStream\n *\n * @name AcroFormField#hasAppearanceStream\n * @readonly\n * @type {boolean}\n */\n Object.defineProperty(this, 'hasAppearanceStream', {\n enumerable: true,\n configurable: true,\n writeable: true,\n get: function () {\n return _hasAppearanceStream;\n },\n set: function (value) {\n value = Boolean(value);\n _hasAppearanceStream = value;\n }\n });\n\n /**\n * The page on which the AcroFormField is placed\n *\n * @name AcroFormField#page\n * @type {number}\n */\n var _page;\n Object.defineProperty(this, 'page', {\n enumerable: true,\n configurable: true,\n writeable: true,\n get: function () {\n if (!_page) {\n return undefined;\n }\n return _page\n },\n set: function (value) {\n _page = value;\n }\n });\n\n /**\n * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database. \n *\n * @name AcroFormField#readOnly\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'readOnly', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 1));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 1);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 1);\n }\n }\n });\n\n /**\n * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”). \n *\n * @name AcroFormField#required\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'required', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 2));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 2);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 2);\n }\n }\n });\n\n /**\n * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n *\n * @name AcroFormField#noExport\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'noExport', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 3));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 3);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 3);\n }\n }\n });\n\n\n var _Q = null;\n Object.defineProperty(this, 'Q', {\n enumerable: true,\n configurable: false,\n get: function () {\n if (_Q === null) {\n return undefined;\n }\n return _Q;\n },\n set: function (value) {\n if ([0, 1, 2].indexOf(value) !== -1) {\n _Q = value;\n } else {\n throw new Error('Invalid value \"' + value + '\" for attribute Q supplied.');\n }\n }\n });\n\n /**\n * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n * 'left', 'center', 'right'\n *\n * @name AcroFormField#textAlign\n * @default 'left'\n * @type {string}\n */\n Object.defineProperty(this, 'textAlign', {\n get: function () {\n var result;\n switch (_Q) {\n case 0:\n default:\n result = 'left';\n break;\n case 1:\n result = 'center';\n break;\n case 2:\n result = 'right';\n break;\n }\n return result;\n },\n configurable: true,\n enumerable: true,\n set: function (value) {\n switch (value) {\n case 'right':\n case 2:\n _Q = 2;\n break;\n case 'center':\n case 1:\n _Q = 1;\n break;\n case 'left':\n case 0:\n default:\n _Q = 0;\n }\n }\n });\n\n };\n\n inherit(AcroFormField, AcroFormPDFObject);\n\n /**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\n var AcroFormChoiceField = function () {\n AcroFormField.call(this);\n // Field Type = Choice Field\n this.FT = \"/Ch\";\n // options\n this.V = '()';\n\n this.fontName = 'zapfdingbats';\n // Top Index\n var _TI = 0;\n\n Object.defineProperty(this, 'TI', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _TI;\n },\n set: function (value) {\n _TI = value;\n }\n });\n\n // MK fix for Acrobat\n var _MK = '<< /BG [ 0.975 0.975 0.975 ] >>';\n Object.defineProperty(this, 'MK', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _MK;\n },\n set: function (value) {\n _MK = value;\n }\n });\n\n /**\n * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n * \n * @name AcroFormChoiceField#topIndex\n * @default 0\n * @type {number}\n */\n Object.defineProperty(this, 'topIndex', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _TI;\n },\n set: function (value) {\n _TI = value;\n }\n });\n\n var _Opt = [];\n Object.defineProperty(this, 'Opt', {\n enumerable: true,\n configurable: false,\n get: function () {\n if (this.isUnicode) {\n return arrayToPdfUnicodeArray(_Opt);\n }\n return arrayToPdfArray(_Opt);\n },\n set: function (value) {\n _Opt = pdfArrayToStringArray(value);\n }\n });\n\n\n /**\n * @memberof AcroFormChoiceField\n * @name getOptions\n * @function\n * @instance\n * @returns {array} array of Options\n */\n this.getOptions = function () {\n return _Opt;\n }\n\n /**\n * @memberof AcroFormChoiceField\n * @name setOptions\n * @function\n * @instance\n * @param {array} value\n */\n this.setOptions = function (value) {\n _Opt = value;\n if (this.sort) {\n _Opt.sort();\n }\n }\n\n /**\n * @memberof AcroFormChoiceField\n * @name addOption\n * @function\n * @instance\n * @param {string} value\n */\n this.addOption = function (value) {\n value = value || \"\";\n value = value.toString();\n _Opt.push(value);\n if (this.sort) {\n _Opt.sort();\n }\n }\n\n /**\n * @memberof AcroFormChoiceField\n * @name removeOption\n * @function\n * @instance\n * @param {string} value\n * @param {boolean} allEntries (default: false)\n */\n this.removeOption = function (value, allEntries) {\n allEntries = allEntries || false\n value = value || \"\";\n value = value.toString();\n\n while (_Opt.indexOf(value) !== -1) {\n _Opt.splice(_Opt.indexOf(value), 1);\n if (allEntries === false) {\n break;\n }\n }\n };\n\n /**\n * If set, the field is a combo box; if clear, the field is a list box. \n *\n * @name AcroFormChoiceField#combo\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'combo', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 18));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 18);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 18);\n }\n }\n });\n\n /**\n * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set. \n *\n * @name AcroFormChoiceField#edit\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'edit', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 19));\n },\n set: function (value) {\n //PDF 32000-1:2008, page 444\n if (this.combo === true) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 19);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 19);\n }\n }\n }\n });\n\n /**\n * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231). \n *\n * @name AcroFormChoiceField#sort\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'sort', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 20));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 20);\n _Opt.sort();\n } else {\n this.Ff = clearBitForPdf(this.Ff, 20);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected \n *\n * @name AcroFormChoiceField#multiSelect\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'multiSelect', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 22));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 22);\n\n } else {\n this.Ff = clearBitForPdf(this.Ff, 22);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set. \n *\n * @name AcroFormChoiceField#doNotSpellCheck\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'doNotSpellCheck', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 23));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 23);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 23);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n *\n * @name AcroFormChoiceField#commitOnSelChange\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'commitOnSelChange', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 27));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 27);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 27);\n }\n }\n });\n\n\n this.hasAppearanceStream = false;\n };\n inherit(AcroFormChoiceField, AcroFormField);\n\n /**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\n var AcroFormListBox = function () {\n AcroFormChoiceField.call(this);\n this.fontName = 'helvetica';\n\n //PDF 32000-1:2008, page 444\n this.combo = false;\n };\n inherit(AcroFormListBox, AcroFormChoiceField);\n\n /**\n * @class AcroFormComboBox \n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\n var AcroFormComboBox = function () {\n AcroFormListBox.call(this);\n this.combo = true;\n };\n inherit(AcroFormComboBox, AcroFormListBox);\n\n /**\n * @class AcroFormEditBox \n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\n var AcroFormEditBox = function () {\n AcroFormComboBox.call(this);\n this.edit = true;\n };\n inherit(AcroFormEditBox, AcroFormComboBox);\n\n /**\n * @class AcroFormButton\n * @extends AcroFormField\n */\n var AcroFormButton = function () {\n AcroFormField.call(this);\n this.FT = \"/Btn\";\n\n /**\n * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n * \n * @name AcroFormButton#noToggleToOff\n * @type {boolean}\n */\n Object.defineProperty(this, 'noToggleToOff', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 15));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 15);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 15);\n }\n }\n });\n\n /**\n * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear. \n * \n * @name AcroFormButton#radio\n * @type {boolean}\n */\n Object.defineProperty(this, 'radio', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 16));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 16);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 16);\n }\n }\n });\n\n /**\n * If set, the field is a pushbutton that does not retain a permanent value. \n *\n * @name AcroFormButton#pushButton\n * @type {boolean}\n */\n Object.defineProperty(this, 'pushButton', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 17));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 17);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 17);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n *\n * @name AcroFormButton#radioIsUnison\n * @type {boolean}\n */\n Object.defineProperty(this, 'radioIsUnison', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 26));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 26);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 26);\n }\n }\n });\n\n var _MK = {};\n Object.defineProperty(this, 'MK', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (Object.keys(_MK).length !== 0) {\n var result = [];\n result.push('<<');\n var key;\n for (key in _MK) {\n result.push('/' + key + ' (' + _MK[key] + ')');\n }\n result.push('>>');\n return result.join('\\n');\n }\n return undefined;\n },\n set: function (value) {\n if (typeof value === \"object\") {\n _MK = value\n }\n }\n });\n\n /**\n * From the PDF reference:\n * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user. \n * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n *\n * - '8' = Cross, \n * - 'l' = Circle,\n * - '' = nothing\n * @name AcroFormButton#caption\n * @type {string}\n */\n Object.defineProperty(this, 'caption', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _MK.CA || '';\n },\n set: function (value) {\n if (typeof value === \"string\") {\n _MK.CA = value;\n }\n }\n });\n\n var _AS;\n Object.defineProperty(this, 'AS', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _AS;\n },\n set: function (value) {\n _AS = value;\n }\n });\n\n\n /**\n * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n *\n * @name AcroFormButton#appearanceState\n * @type {any}\n */\n Object.defineProperty(this, 'appearanceState', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _AS.substr(1, _AS.length - 1);\n },\n set: function (value) {\n _AS = '/' + value;\n }\n });\n\n };\n inherit(AcroFormButton, AcroFormField);\n\n /**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\n var AcroFormPushButton = function () {\n AcroFormButton.call(this);\n this.pushButton = true;\n };\n inherit(AcroFormPushButton, AcroFormButton);\n\n /**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\n var AcroFormRadioButton = function () {\n AcroFormButton.call(this);\n this.radio = true;\n this.pushButton = false;\n\n var _Kids = [];\n Object.defineProperty(this, 'Kids', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _Kids;\n },\n set: function (value) {\n if (typeof value !== \"undefined\") {\n _Kids = value;\n } else {\n _Kids = [];\n }\n }\n });\n };\n inherit(AcroFormRadioButton, AcroFormButton);\n\n /**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n * \n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\n var AcroFormChildClass = function () {\n AcroFormField.call(this);\n\n var _parent;\n Object.defineProperty(this, 'Parent', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _parent;\n },\n set: function (value) {\n _parent = value;\n }\n });\n\n var _optionName;\n Object.defineProperty(this, 'optionName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return _optionName;\n },\n set: function (value) {\n _optionName = value;\n }\n });\n\n var _MK = {};\n Object.defineProperty(this, 'MK', {\n enumerable: false,\n configurable: false,\n get: function () {\n var result = [];\n result.push('<<');\n var key;\n for (key in _MK) {\n result.push('/' + key + ' (' + _MK[key] + ')');\n }\n result.push('>>');\n return result.join('\\n');\n },\n set: function (value) {\n if (typeof value === \"object\") {\n _MK = value\n }\n }\n });\n\n /**\n * From the PDF reference:\n * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user. \n * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n *\n * - '8' = Cross, \n * - 'l' = Circle,\n * - '' = nothing\n * @name AcroFormButton#caption\n * @type {string}\n */\n Object.defineProperty(this, 'caption', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _MK.CA || '';\n },\n set: function (value) {\n if (typeof value === \"string\") {\n _MK.CA = value;\n }\n }\n });\n\n var _AS;\n Object.defineProperty(this, 'AS', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _AS;\n },\n set: function (value) {\n _AS = value;\n }\n });\n\n /**\n * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n *\n * @name AcroFormButton#appearanceState\n * @type {any}\n */\n Object.defineProperty(this, 'appearanceState', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _AS.substr(1, _AS.length - 1);\n },\n set: function (value) {\n _AS = '/' + value;\n }\n });\n this.caption = 'l';\n this.appearanceState = 'Off';\n // todo: set AppearanceType as variable that can be set from the\n // outside...\n this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n // The Default appearanceType is the Circle\n this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(this.optionName);\n };\n inherit(AcroFormChildClass, AcroFormField);\n\n AcroFormRadioButton.prototype.setAppearance = function (appearance) {\n if (!('createAppearanceStream' in appearance && 'getCA' in appearance)) {\n throw new Error(\"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\");\n }\n for (var objId in this.Kids) {\n if (this.Kids.hasOwnProperty(objId)) {\n var child = this.Kids[objId];\n child.appearanceStreamContent = appearance.createAppearanceStream(child.optionName);\n child.caption = appearance.getCA();\n }\n }\n };\n\n AcroFormRadioButton.prototype.createOption = function (name) {\n // Create new Child for RadioGroup\n var child = new AcroFormChildClass();\n child.Parent = this;\n child.optionName = name;\n // Add to Parent\n this.Kids.push(child);\n\n addField.call(this, child);\n\n return child;\n };\n\n /**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\n var AcroFormCheckBox = function () {\n AcroFormButton.call(this);\n\n this.fontName = 'zapfdingbats';\n this.caption = '3';\n this.appearanceState = 'On';\n this.value = \"On\";\n this.textAlign = 'center';\n this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n };\n inherit(AcroFormCheckBox, AcroFormButton);\n\n /**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\n var AcroFormTextField = function () {\n AcroFormField.call(this);\n this.FT = '/Tx';\n\n /**\n * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line. \n *\n * @name AcroFormTextField#multiline\n * @type {boolean}\n */\n Object.defineProperty(this, 'multiline', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 13));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 13);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 13);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field. \n * \n * @name AcroFormTextField#fileSelect\n * @type {boolean}\n */\n Object.defineProperty(this, 'fileSelect', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 21));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 21);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 21);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, text entered in the field shall not be spell-checked. \n *\n * @name AcroFormTextField#doNotSpellCheck\n * @type {boolean}\n */\n Object.defineProperty(this, 'doNotSpellCheck', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 23));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 23);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 23);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area. \n * \n * @name AcroFormTextField#doNotScroll\n * @type {boolean}\n */\n Object.defineProperty(this, 'doNotScroll', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 24));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 24);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 24);\n }\n }\n });\n\n /**\n * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n * \n * @name AcroFormTextField#comb\n * @type {boolean}\n */\n Object.defineProperty(this, 'comb', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 25));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 25);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 25);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n * \n * @name AcroFormTextField#richText\n * @type {boolean}\n */\n Object.defineProperty(this, 'richText', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 26));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 26);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 26);\n }\n }\n });\n\n var _MaxLen = null;\n Object.defineProperty(this, 'MaxLen', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _MaxLen;\n },\n set: function (value) {\n _MaxLen = value;\n }\n });\n\n /**\n * (Optional; inheritable) The maximum length of the field’s text, in characters. \n *\n * @name AcroFormTextField#maxLength\n * @type {number}\n */\n Object.defineProperty(this, 'maxLength', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _MaxLen;\n },\n set: function (value) {\n if (Number.isInteger(value)) {\n _MaxLen = value;\n }\n }\n });\n\n\n Object.defineProperty(this, 'hasAppearanceStream', {\n enumerable: true,\n configurable: true,\n get: function () {\n return (this.V || this.DV);\n }\n });\n\n };\n inherit(AcroFormTextField, AcroFormField);\n\n /**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\n var AcroFormPasswordField = function () {\n AcroFormTextField.call(this);\n\n /**\n * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set. \n *\n * @name AcroFormTextField#password\n * @type {boolean}\n */\n Object.defineProperty(this, 'password', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 14));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 14);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 14);\n }\n }\n });\n this.password = true;\n };\n inherit(AcroFormPasswordField, AcroFormTextField);\n\n\n // Contains Methods for creating standard appearances\n var AcroFormAppearance = {\n CheckBox: {\n createAppearanceStream: function () {\n var appearance = {\n N: {\n On: AcroFormAppearance.CheckBox.YesNormal\n },\n D: {\n On: AcroFormAppearance.CheckBox.YesPushDown,\n Off: AcroFormAppearance.CheckBox.OffPushDown\n }\n };\n\n return appearance;\n },\n /**\n * Returns the standard On Appearance for a CheckBox\n * \n * @returns {AcroFormXObject}\n */\n YesPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n var fontKey = scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;\n var encodedColor = scope.__private__.encodeColorString(formObject.color);\n var calcRes = calculateX(formObject, formObject.caption);\n stream.push(\"0.749023 g\");\n stream.push(\"0 0 \" + f2(AcroFormAppearance.internal.getWidth(formObject)) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject)) + \" re\");\n stream.push(\"f\");\n stream.push(\"BMC\");\n stream.push(\"q\");\n stream.push(\"0 0 1 rg\");\n stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor);\n stream.push(\"BT\");\n stream.push(calcRes.text);\n stream.push(\"ET\");\n stream.push(\"Q\");\n stream.push(\"EMC\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n\n YesNormal: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var fontKey = scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;\n var encodedColor = scope.__private__.encodeColorString(formObject.color);\n var stream = [];\n var height = AcroFormAppearance.internal.getHeight(formObject);\n var width = AcroFormAppearance.internal.getWidth(formObject);\n var calcRes = calculateX(formObject, formObject.caption);\n stream.push(\"1 g\");\n stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n stream.push(\"f\");\n stream.push(\"q\");\n stream.push(\"0 0 1 rg\");\n stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(\"0 g\");\n stream.push(\"BT\");\n stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor);\n stream.push(calcRes.text);\n stream.push(\"ET\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n\n /**\n * Returns the standard Off Appearance for a CheckBox\n * \n * @returns {AcroFormXObject}\n */\n OffPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\"0 0 \" + f2(AcroFormAppearance.internal.getWidth(formObject)) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject)) + \" re\");\n stream.push(\"f\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n },\n\n RadioButton: {\n Circle: {\n createAppearanceStream: function (name) {\n var appearanceStreamContent = {\n D: {\n 'Off': AcroFormAppearance.RadioButton.Circle.OffPushDown\n },\n N: {}\n };\n appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Circle.YesNormal;\n appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Circle.YesPushDown;\n return appearanceStreamContent;\n },\n getCA: function () {\n return 'l';\n },\n\n YesNormal: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n // Make the Radius of the Circle relative to min(height, width) of formObject\n var DotRadius = (AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject)) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n var c = AcroFormAppearance.internal.Bezier_C;\n var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n /*\n * The Following is a Circle created with Bezier-Curves.\n */\n stream.push(\"q\");\n stream.push(\"1 0 0 1 \" + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + \" \" + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + \" cm\");\n stream.push(DotRadius + \" 0 m\");\n stream.push(DotRadius + \" \" + DotRadiusBezier + \" \" + DotRadiusBezier + \" \" + DotRadius + \" 0 \" + DotRadius + \" c\");\n stream.push(\"-\" + DotRadiusBezier + \" \" + DotRadius + \" -\" + DotRadius + \" \" + DotRadiusBezier + \" -\" + DotRadius + \" 0 c\");\n stream.push(\"-\" + DotRadius + \" -\" + DotRadiusBezier + \" -\" + DotRadiusBezier + \" -\" + DotRadius + \" 0 -\" + DotRadius + \" c\");\n stream.push(DotRadiusBezier + \" -\" + DotRadius + \" \" + DotRadius + \" -\" + DotRadiusBezier + \" \" + DotRadius + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n YesPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n var DotRadius = (AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject)) ?\n AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n var DotRadius = Number((DotRadius * 0.9).toFixed(5));\n // Save results for later use; no need to waste\n // processor ticks on doing math\n var k = Number((DotRadius * 2).toFixed(5));\n var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n var dc = Number((DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n stream.push(\"0.749023 g\");\n stream.push(\"q\");\n stream.push(\"1 0 0 1 \" + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + \" \" + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + \" cm\");\n stream.push(k + \" 0 m\");\n stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n stream.push(\"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\");\n stream.push(\"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\");\n stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n stream.push(\"0 g\");\n stream.push(\"q\");\n stream.push(\"1 0 0 1 \" + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + \" \" + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + \" cm\");\n stream.push(DotRadius + \" 0 m\");\n stream.push(\"\" + DotRadius + \" \" + dc + \" \" + dc + \" \" + DotRadius + \" 0 \" + DotRadius + \" c\");\n stream.push(\"-\" + dc + \" \" + DotRadius + \" -\" + DotRadius + \" \" + dc + \" -\" + DotRadius + \" 0 c\");\n stream.push(\"-\" + DotRadius + \" -\" + dc + \" -\" + dc + \" -\" + DotRadius + \" 0 -\" + DotRadius + \" c\");\n stream.push(dc + \" -\" + DotRadius + \" \" + DotRadius + \" -\" + dc + \" \" + DotRadius + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n OffPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n var DotRadius = (AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject)) ?\n AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n // Save results for later use; no need to waste\n // processor ticks on doing math\n var k = Number((DotRadius * 2).toFixed(5));\n var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n stream.push(\"0.749023 g\");\n stream.push(\"q\");\n stream.push(\"1 0 0 1 \" + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + \" \" + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + \" cm\");\n stream.push(k + \" 0 m\");\n stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n stream.push(\"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\");\n stream.push(\"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\");\n stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n },\n\n Cross: {\n /**\n * Creates the Actual AppearanceDictionary-References\n * \n * @param {string} name\n * @returns {Object}\n * @ignore\n */\n createAppearanceStream: function (name) {\n var appearanceStreamContent = {\n D: {\n 'Off': AcroFormAppearance.RadioButton.Cross.OffPushDown\n },\n N: {}\n };\n appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Cross.YesNormal;\n appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Cross.YesPushDown;\n return appearanceStreamContent;\n },\n getCA: function () {\n return '8'\n },\n\n\n YesNormal: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n var cross = AcroFormAppearance.internal.calculateCross(formObject);\n stream.push(\"q\");\n stream.push(\"1 1 \" + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + \" re\");\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n stream.push(\"s\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n YesPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var cross = AcroFormAppearance.internal.calculateCross(formObject);\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\"0 0 \" + f2(AcroFormAppearance.internal.getWidth(formObject)) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject)) + \" re\");\n stream.push(\"f\");\n stream.push(\"q\");\n stream.push(\"1 1 \" + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + \" re\");\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n stream.push(\"s\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n OffPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\"0 0 \" + f2(AcroFormAppearance.internal.getWidth(formObject)) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject)) + \" re\");\n stream.push(\"f\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n },\n },\n\n /**\n * Returns the standard Appearance\n * \n * @returns {AcroFormXObject}\n */\n createDefaultAppearanceStream: function (formObject) {\n // Set Helvetica to Standard Font (size: auto)\n // Color: Black\n var fontKey = scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;\n var encodedColor = scope.__private__.encodeColorString(formObject.color);\n var fontSize = formObject.fontSize;\n var result = '/' + fontKey + ' ' + fontSize + ' Tf ' + encodedColor;\n return result;\n }\n };\n\n AcroFormAppearance.internal = {\n Bezier_C: 0.551915024494,\n\n calculateCross: function (formObject) {\n\n var width = AcroFormAppearance.internal.getWidth(formObject);\n var height = AcroFormAppearance.internal.getHeight(formObject);\n var a = Math.min(width, height);\n\n var cross = {\n x1: { // upperLeft\n x: (width - a) / 2,\n y: ((height - a) / 2) + a,// height - borderPadding\n },\n x2: { // lowerRight\n x: ((width - a) / 2) + a,\n y: ((height - a) / 2)// borderPadding\n },\n x3: { // lowerLeft\n x: (width - a) / 2,\n y: ((height - a) / 2)// borderPadding\n },\n x4: { // upperRight\n x: ((width - a) / 2) + a,\n y: ((height - a) / 2) + a,// height - borderPadding\n }\n };\n\n return cross;\n },\n };\n AcroFormAppearance.internal.getWidth = function (formObject) {\n var result = 0;\n if (typeof formObject === \"object\") {\n result = scale(formObject.Rect[2]);\n }\n return result;\n };\n AcroFormAppearance.internal.getHeight = function (formObject) {\n var result = 0;\n if (typeof formObject === \"object\") {\n result = scale(formObject.Rect[3]);\n }\n return result;\n };\n\n // Public:\n\n /**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function \n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\n var addField = jsPDFAPI.addField = function (fieldObject) {\n initializeAcroForm.call(this);\n\n if (fieldObject instanceof AcroFormField) {\n putForm.call(this, fieldObject);\n } else {\n throw new Error('Invalid argument passed to jsPDF.addField.');\n }\n fieldObject.page = scope.internal.getCurrentPageInfo().pageNumber;\n return this;\n };\n\n /**\n * @name addButton\n * @function\n * @instance\n * @param {AcroFormButton} options\n * @returns {jsPDF}\n * @deprecated\n */\n jsPDFAPI.addButton = function (button) {\n if (button instanceof AcroFormButton === false) {\n throw new Error('Invalid argument passed to jsPDF.addButton.');\n }\n return addField.call(this, button);\n };\n\n /**\n * @name addTextField\n * @function\n * @instance\n * @param {AcroFormTextField} textField\n * @returns {jsPDF}\n * @deprecated\n */\n jsPDFAPI.addTextField = function (textField) {\n if (textField instanceof AcroFormTextField === false) {\n throw new Error('Invalid argument passed to jsPDF.addTextField.');\n }\n return addField.call(this, textField);\n };\n\n /**\n * @name addChoiceField\n * @function\n * @instance\n * @param {AcroFormChoiceField} \n * @returns {jsPDF}\n * @deprecated\n */\n jsPDFAPI.addChoiceField = function (choiceField) {\n if (choiceField instanceof AcroFormChoiceField === false) {\n throw new Error('Invalid argument passed to jsPDF.addChoiceField.');\n }\n return addField.call(this, choiceField);\n };\n\n if (typeof globalObj == \"object\" &&\n typeof (globalObj[\"ChoiceField\"]) === \"undefined\" &&\n typeof (globalObj[\"ListBox\"]) === \"undefined\" &&\n typeof (globalObj[\"ComboBox\"]) === \"undefined\" &&\n typeof (globalObj[\"EditBox\"]) === \"undefined\" &&\n typeof (globalObj[\"Button\"]) === \"undefined\" &&\n typeof (globalObj[\"PushButton\"]) === \"undefined\" &&\n typeof (globalObj[\"RadioButton\"]) === \"undefined\" &&\n typeof (globalObj[\"CheckBox\"]) === \"undefined\" &&\n typeof (globalObj[\"TextField\"]) === \"undefined\" &&\n typeof (globalObj[\"PasswordField\"]) === \"undefined\"\n ) {\n globalObj[\"ChoiceField\"] = AcroFormChoiceField;\n globalObj[\"ListBox\"] = AcroFormListBox;\n globalObj[\"ComboBox\"] = AcroFormComboBox;\n globalObj[\"EditBox\"] = AcroFormEditBox;\n globalObj[\"Button\"] = AcroFormButton;\n globalObj[\"PushButton\"] = AcroFormPushButton;\n globalObj[\"RadioButton\"] = AcroFormRadioButton;\n globalObj[\"CheckBox\"] = AcroFormCheckBox;\n globalObj[\"TextField\"] = AcroFormTextField;\n globalObj[\"PasswordField\"] = AcroFormPasswordField;\n\n // backwardsCompatibility\n globalObj[\"AcroForm\"] = { Appearance: AcroFormAppearance };\n } else {\n // eslint-disable-next-line no-console\n // console.warn(\"AcroForm-Classes are not populated into global-namespace, because the class-Names exist already. This avoids conflicts with the already used framework.\");\n }\n\n jsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\n jsPDFAPI.AcroFormListBox = AcroFormListBox;\n jsPDFAPI.AcroFormComboBox = AcroFormComboBox;\n jsPDFAPI.AcroFormEditBox = AcroFormEditBox;\n jsPDFAPI.AcroFormButton = AcroFormButton;\n jsPDFAPI.AcroFormPushButton = AcroFormPushButton;\n jsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\n jsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\n jsPDFAPI.AcroFormTextField = AcroFormTextField;\n jsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\n jsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\n jsPDFAPI.AcroForm = {\n ChoiceField: AcroFormChoiceField,\n ListBox: AcroFormListBox,\n ComboBox: AcroFormComboBox,\n EditBox: AcroFormEditBox,\n Button: AcroFormButton,\n PushButton: AcroFormPushButton,\n RadioButton: AcroFormRadioButton,\n CheckBox: AcroFormCheckBox,\n TextField: AcroFormTextField,\n PasswordField: AcroFormPasswordField,\n Appearance: AcroFormAppearance\n };\n\n jsPDF.AcroForm = {\n ChoiceField: AcroFormChoiceField,\n ListBox: AcroFormListBox,\n ComboBox: AcroFormComboBox,\n EditBox: AcroFormEditBox,\n Button: AcroFormButton,\n PushButton: AcroFormPushButton,\n RadioButton: AcroFormRadioButton,\n CheckBox: AcroFormCheckBox,\n TextField: AcroFormTextField,\n PasswordField: AcroFormPasswordField,\n Appearance: AcroFormAppearance\n };\n})(jsPDF, (typeof window !== 'undefined' && window || typeof global !== 'undefined' && global));","export default function setRadioAppearance(doc: any): any {\n const oldAppearanceFuncition: Function = doc.AcroFormAppearance.RadioButton.Circle.YesNormal;\n doc.AcroFormAppearance.RadioButton.Circle.YesNormal = function(formObject: any) {\n const xobj: any = oldAppearanceFuncition(formObject);\n const stream: string[] = xobj.stream.split('\\n');\n const encodeColor: string = doc.__private__.encodeColorString(formObject.color);\n stream[0] = stream[0] + '\\n' + encodeColor + '\\n' + encodeColor.toUpperCase();\n xobj.stream = stream.join('\\n');\n return xobj;\n };\n}"," /**\n * jsPDF fromHTML plugin. BETA stage. API subject to change. Needs browser\n * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com\n * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n * 2014 Diego Casorran, https://github.com/diegocr\n * 2014 Daniel Husar, https://github.com/danielhusar\n * 2014 Wolfgang Gassler, https://github.com/woolfg\n * 2014 Steven Spungin, https://github.com/flamenco\n *\n * @license\n * \n * ====================================================================\n */\n import { jsPDF } from \"jspdf\";\n\n (function (jsPDFAPI) {\n var clone, _DrillForContent, FontNameDB, FontStyleMap, TextAlignMap, FontWeightMap, FloatMap, ClearMap, GetCSS, PurgeWhiteSpace, Renderer, ResolveFont, ResolveUnitedNumber, UnitedNumberMap, elementHandledElsewhere, images, loadImgs, checkForFooter, process, tableToJson;\n\n clone = function () {\n return function (obj) {\n Clone.prototype = obj;\n return new Clone();\n };\n\n function Clone() {}\n }();\n\n PurgeWhiteSpace = function PurgeWhiteSpace(array) {\n var fragment, i, l, lTrimmed, r, rTrimmed, trailingSpace;\n i = 0;\n l = array.length;\n fragment = void 0;\n lTrimmed = false;\n rTrimmed = false;\n\n while (!lTrimmed && i !== l) {\n fragment = array[i] = array[i].trimLeft();\n\n if (fragment) {\n lTrimmed = true;\n }\n\n i++;\n }\n\n i = l - 1;\n\n while (l && !rTrimmed && i !== -1) {\n fragment = array[i] = array[i].trimRight();\n\n if (fragment) {\n rTrimmed = true;\n }\n\n i--;\n }\n\n r = /\\s+$/g;\n trailingSpace = true;\n i = 0;\n\n while (i !== l) {\n // Leave the line breaks intact\n if (array[i] != \"\\u2028\") {\n fragment = array[i].replace(/\\s+/g, \" \");\n\n if (trailingSpace) {\n fragment = fragment.trimLeft();\n }\n\n if (fragment) {\n trailingSpace = r.test(fragment);\n }\n\n array[i] = fragment;\n }\n\n i++;\n }\n\n return array;\n };\n\n Renderer = function Renderer(pdf, x, y, settings) {\n this.pdf = pdf;\n this.x = x;\n this.y = y;\n this.settings = settings; //list of functions which are called after each element-rendering process\n\n this.watchFunctions = [];\n this.init();\n return this;\n };\n\n ResolveFont = function ResolveFont(css_font_family_string) {\n var name, part, parts;\n name = void 0;\n parts = css_font_family_string.split(\",\");\n part = parts.shift();\n\n while (!name && part) {\n name = FontNameDB[part.trim().toLowerCase()];\n part = parts.shift();\n }\n\n return name;\n };\n\n ResolveUnitedNumber = function ResolveUnitedNumber(css_line_height_string) {\n //IE8 issues\n css_line_height_string = css_line_height_string === \"auto\" ? \"0px\" : css_line_height_string;\n\n if (css_line_height_string.indexOf(\"em\") > -1 && !isNaN(Number(css_line_height_string.replace(\"em\", \"\")))) {\n css_line_height_string = Number(css_line_height_string.replace(\"em\", \"\")) * 18.719 + \"px\";\n }\n\n if (css_line_height_string.indexOf(\"pt\") > -1 && !isNaN(Number(css_line_height_string.replace(\"pt\", \"\")))) {\n css_line_height_string = Number(css_line_height_string.replace(\"pt\", \"\")) * 1.333 + \"px\";\n }\n\n var normal, undef, value;\n undef = void 0;\n normal = 16.00;\n value = UnitedNumberMap[css_line_height_string];\n\n if (value) {\n return value;\n }\n\n value = {\n \"xx-small\": 9,\n \"x-small\": 11,\n small: 13,\n medium: 16,\n large: 19,\n \"x-large\": 23,\n \"xx-large\": 28,\n auto: 0\n }[css_line_height_string];\n\n if (value !== undef) {\n return UnitedNumberMap[css_line_height_string] = value / normal;\n }\n\n if (value = parseFloat(css_line_height_string)) {\n return UnitedNumberMap[css_line_height_string] = value / normal;\n }\n\n value = css_line_height_string.match(/([\\d\\.]+)(px)/);\n\n if (Array.isArray(value) && value.length === 3) {\n return UnitedNumberMap[css_line_height_string] = parseFloat(value[1]) / normal;\n }\n\n return UnitedNumberMap[css_line_height_string] = 1;\n };\n\n GetCSS = function GetCSS(element) {\n var css, tmp, computedCSSElement;\n\n computedCSSElement = function (el) {\n var compCSS;\n\n compCSS = function (el) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n return document.defaultView.getComputedStyle(el, null);\n } else if (el.currentStyle) {\n return el.currentStyle;\n } else {\n return el.style;\n }\n }(el);\n\n return function (prop) {\n prop = prop.replace(/-\\D/g, function (match) {\n return match.charAt(1).toUpperCase();\n });\n return compCSS[prop];\n };\n }(element);\n\n css = {};\n tmp = void 0;\n css[\"font-family\"] = ResolveFont(computedCSSElement(\"font-family\")) || \"times\";\n css[\"font-style\"] = FontStyleMap[computedCSSElement(\"font-style\")] || \"normal\";\n css[\"text-align\"] = TextAlignMap[computedCSSElement(\"text-align\")] || \"left\";\n tmp = FontWeightMap[computedCSSElement(\"font-weight\")] || \"normal\";\n\n if (tmp === \"bold\") {\n if (css[\"font-style\"] === \"normal\") {\n css[\"font-style\"] = tmp;\n } else {\n css[\"font-style\"] = tmp + css[\"font-style\"];\n }\n }\n\n css[\"font-size\"] = ResolveUnitedNumber(computedCSSElement(\"font-size\")) || 1;\n css[\"line-height\"] = ResolveUnitedNumber(computedCSSElement(\"line-height\")) || 1;\n css[\"display\"] = computedCSSElement(\"display\") === \"inline\" ? \"inline\" : \"block\";\n tmp = css[\"display\"] === \"block\";\n css[\"margin-top\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"margin-top\")) || 0;\n css[\"margin-bottom\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"margin-bottom\")) || 0;\n css[\"padding-top\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"padding-top\")) || 0;\n css[\"padding-bottom\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"padding-bottom\")) || 0;\n css[\"margin-left\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"margin-left\")) || 0;\n css[\"margin-right\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"margin-right\")) || 0;\n css[\"padding-left\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"padding-left\")) || 0;\n css[\"padding-right\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"padding-right\")) || 0;\n css[\"page-break-before\"] = computedCSSElement(\"page-break-before\") || \"auto\"; //float and clearing of floats\n\n css[\"float\"] = FloatMap[computedCSSElement(\"cssFloat\")] || \"none\";\n css[\"clear\"] = ClearMap[computedCSSElement(\"clear\")] || \"none\";\n css[\"color\"] = computedCSSElement(\"color\");\n return css;\n };\n\n elementHandledElsewhere = function elementHandledElsewhere(element, renderer, elementHandlers) {\n var handlers, i, isHandledElsewhere, l, classNames;\n isHandledElsewhere = false;\n i = void 0;\n l = void 0;\n handlers = elementHandlers[\"#\" + element.id];\n\n if (handlers) {\n if (typeof handlers === \"function\") {\n isHandledElsewhere = handlers(element, renderer);\n } else {\n i = 0;\n l = handlers.length;\n\n while (!isHandledElsewhere && i !== l) {\n isHandledElsewhere = handlers[i](element, renderer);\n i++;\n }\n }\n }\n\n handlers = elementHandlers[element.nodeName];\n\n if (!isHandledElsewhere && handlers) {\n if (typeof handlers === \"function\") {\n isHandledElsewhere = handlers(element, renderer);\n } else {\n i = 0;\n l = handlers.length;\n\n while (!isHandledElsewhere && i !== l) {\n isHandledElsewhere = handlers[i](element, renderer);\n i++;\n }\n }\n } // Try class names\n\n\n classNames = typeof element.className === 'string' ? element.className.split(' ') : [];\n\n for (i = 0; i < classNames.length; i++) {\n handlers = elementHandlers['.' + classNames[i]];\n\n if (!isHandledElsewhere && handlers) {\n if (typeof handlers === \"function\") {\n isHandledElsewhere = handlers(element, renderer);\n } else {\n i = 0;\n l = handlers.length;\n\n while (!isHandledElsewhere && i !== l) {\n isHandledElsewhere = handlers[i](element, renderer);\n i++;\n }\n }\n }\n }\n\n return isHandledElsewhere;\n };\n\n tableToJson = function tableToJson(table, renderer) {\n var data, headers, i, j, rowData, tableRow, table_obj, table_with, cell, l;\n data = [];\n headers = [];\n i = 0;\n l = 0;\n for (var j = 0; j < table.rows[0].cells.length; j++) {\n l += table.rows[0].cells[j].colSpan;\n }\n table_with = table.clientWidth;\n\n while (i < l) {\n cell = table.rows[0].cells[i];\n\n for (var j = 0; j < cell.colSpan; j++) {\n headers[i + j] = {\n name: cell.textContent.toLowerCase().replace(/\\s+/g, '') + '_' + j,\n prompt: cell.textContent.replace(/\\r?\\n/g, ''),\n width: cell.clientWidth / table_with * renderer.settings.width / cell.colSpan\n };\n }\n\n i += j;\n }\n\n i = 1;\n\n while (i < table.rows.length) {\n tableRow = table.rows[i];\n rowData = {};\n j = 0;\n\n while (j < tableRow.cells.length) {\n rowData[headers[j].name] = tableRow.cells[j].textContent.replace(/\\r?\\n/g, '');\n j++;\n }\n\n data.push(rowData);\n i++;\n }\n\n return table_obj = {\n rows: data,\n headers: headers\n };\n };\n\n var SkipNode = {\n SCRIPT: 1,\n STYLE: 1,\n NOSCRIPT: 1,\n OBJECT: 1,\n EMBED: 1,\n SELECT: 1\n };\n var listCount = 1;\n\n _DrillForContent = function DrillForContent(element, renderer, elementHandlers) {\n var cn, cns, fragmentCSS, i, isBlock, l, table2json, cb;\n cns = element.childNodes;\n cn = void 0;\n fragmentCSS = GetCSS(element);\n isBlock = fragmentCSS.display === \"block\";\n\n if (isBlock) {\n renderer.setBlockBoundary();\n renderer.setBlockStyle(fragmentCSS);\n }\n i = 0;\n l = cns.length;\n\n while (i < l) {\n cn = cns[i];\n\n if (typeof(cn) === \"object\") {\n //execute all watcher functions to e.g. reset floating\n renderer.executeWatchFunctions(cn);\n /*** HEADER rendering **/\n\n if (cn.nodeType === 1 && cn.nodeName === 'HEADER') {\n var header = cn; //store old top margin\n\n var oldMarginTop = renderer.pdf.margins_doc.top; //subscribe for new page event and render header first on every page\n\n renderer.pdf.internal.events.subscribe('addPage', function (pageInfo) {\n //set current y position to old margin\n renderer.y = oldMarginTop; //render all child nodes of the header element\n\n _DrillForContent(header, renderer, elementHandlers); //set margin to old margin + rendered header + 10 space to prevent overlapping\n //important for other plugins (e.g. table) to start rendering at correct position after header\n\n\n renderer.pdf.margins_doc.top = renderer.y + 10;\n renderer.y += 10;\n }, false);\n }\n\n if (cn.nodeType === 8 && cn.nodeName === \"#comment\") {\n if (~cn.textContent.indexOf(\"ADD_PAGE\")) {\n renderer.pdf.addPage();\n renderer.y = renderer.pdf.margins_doc.top;\n }\n } else if (cn.nodeType === 1 && !SkipNode[cn.nodeName]) {\n /*** IMAGE RENDERING ***/\n var cached_image;\n\n if (cn.nodeName === \"IMG\") {\n var url = cn.getAttribute(\"src\");\n cached_image = images[(renderer.pdf.sHashCode && renderer.pdf.sHashCode(url)) || url];\n }\n\n if (cached_image) {\n if (renderer.pdf.internal.pageSize.getHeight() - renderer.pdf.margins_doc.bottom < renderer.y + cn.height && renderer.y > renderer.pdf.margins_doc.top) {\n renderer.pdf.addPage();\n renderer.y = renderer.pdf.margins_doc.top; //check if we have to set back some values due to e.g. header rendering for new page\n\n renderer.executeWatchFunctions(cn);\n }\n\n var imagesCSS = GetCSS(cn);\n var imageX = renderer.x;\n var fontToUnitRatio = 12 / renderer.pdf.internal.scaleFactor; //define additional paddings, margins which have to be taken into account for margin calculations\n\n var additionalSpaceLeft = (imagesCSS[\"margin-left\"] + imagesCSS[\"padding-left\"]) * fontToUnitRatio;\n var additionalSpaceRight = (imagesCSS[\"margin-right\"] + imagesCSS[\"padding-right\"]) * fontToUnitRatio;\n var additionalSpaceTop = (imagesCSS[\"margin-top\"] + imagesCSS[\"padding-top\"]) * fontToUnitRatio;\n var additionalSpaceBottom = (imagesCSS[\"margin-bottom\"] + imagesCSS[\"padding-bottom\"]) * fontToUnitRatio; //if float is set to right, move the image to the right border\n //add space if margin is set\n\n if (imagesCSS['float'] !== undefined && imagesCSS['float'] === 'right') {\n imageX += renderer.settings.width - cn.width - additionalSpaceRight;\n } else {\n imageX += additionalSpaceLeft;\n }\n\n renderer.pdf.addImage(cached_image, imageX, renderer.y + additionalSpaceTop, cn.width, cn.height);\n cached_image = undefined; //if the float prop is specified we have to float the text around the image\n\n if (imagesCSS['float'] === 'right' || imagesCSS['float'] === 'left') {\n //add functiont to set back coordinates after image rendering\n renderer.watchFunctions.push(function (diffX, thresholdY, diffWidth, el) {\n //undo drawing box adaptions which were set by floating\n if (renderer.y >= thresholdY) {\n renderer.x += diffX;\n renderer.settings.width += diffWidth;\n return true;\n } else if (el && el.nodeType === 1 && !SkipNode[el.nodeName] && renderer.x + el.width > renderer.pdf.margins_doc.left + renderer.pdf.margins_doc.width) {\n renderer.x += diffX;\n renderer.y = thresholdY;\n renderer.settings.width += diffWidth;\n return true;\n } else {\n return false;\n }\n }.bind(this, imagesCSS['float'] === 'left' ? -cn.width - additionalSpaceLeft - additionalSpaceRight : 0, renderer.y + cn.height + additionalSpaceTop + additionalSpaceBottom, cn.width)); //reset floating by clear:both divs\n //just set cursorY after the floating element\n\n renderer.watchFunctions.push(function (yPositionAfterFloating, pages, el) {\n if (renderer.y < yPositionAfterFloating && pages === renderer.pdf.internal.getNumberOfPages()) {\n if (el.nodeType === 1 && GetCSS(el).clear === 'both') {\n renderer.y = yPositionAfterFloating;\n return true;\n } else {\n return false;\n }\n } else {\n return true;\n }\n }.bind(this, renderer.y + cn.height, renderer.pdf.internal.getNumberOfPages())); //if floating is set we decrease the available width by the image width\n\n renderer.settings.width -= cn.width + additionalSpaceLeft + additionalSpaceRight; //if left just add the image width to the X coordinate\n\n if (imagesCSS['float'] === 'left') {\n renderer.x += cn.width + additionalSpaceLeft + additionalSpaceRight;\n }\n } else {\n //if no floating is set, move the rendering cursor after the image height\n renderer.y += cn.height + additionalSpaceTop + additionalSpaceBottom;\n }\n /*** TABLE RENDERING ***/\n\n } else if (cn.nodeName === \"TABLE\") {\n if(!renderer.pdf.autoTable) {\n table2json = tableToJson(cn, renderer);\n renderer.y += 10;\n renderer.pdf.table(renderer.x, renderer.y, table2json.rows, table2json.headers, {\n autoSize: false,\n printHeaders: elementHandlers.printHeaders,\n margins: renderer.pdf.margins_doc,\n css: GetCSS(cn)\n });\n renderer.y = renderer.pdf.internal.__cell__.lastCell.y +\n renderer.pdf.internal.__cell__.lastCell.height;\n } else {\n renderer.y += 10;\n renderer.pdf.autoTable({ theme: \"grid\", html: cn, startY: renderer.y,\n styles: {\n font: renderer.pdf.getFont().fontName,\n fontSize: renderer.pdf.getFontSize(),\n textColor: renderer.pdf.getTextColor()\n },\n margin: { \n top: renderer.pdf.margins_doc.top, \n left: renderer.x, \n right: renderer.pdf.internal.pageSize.getWidth() - (renderer.x + renderer.settings.width), \n bottom: renderer.pdf.margins_doc.bottom },\n });\n renderer.y = renderer.pdf.lastAutoTable.finalY;\n }\n } else if (cn.nodeName === \"OL\" || cn.nodeName === \"UL\") {\n listCount = 1;\n\n if (!elementHandledElsewhere(cn, renderer, elementHandlers)) {\n _DrillForContent(cn, renderer, elementHandlers);\n }\n\n renderer.y += 10;\n } else if (cn.nodeName === \"LI\") {\n var temp = renderer.x;\n renderer.x += 20 / renderer.pdf.internal.scaleFactor;\n renderer.y += 3;\n\n if (!elementHandledElsewhere(cn, renderer, elementHandlers)) {\n _DrillForContent(cn, renderer, elementHandlers);\n }\n\n renderer.x = temp;\n } else if (cn.nodeName === \"BR\") {\n renderer.y += fragmentCSS[\"font-size\"] * renderer.pdf.internal.scaleFactor;\n renderer.addText(\"\\u2028\", clone(fragmentCSS));\n } else {\n if (!elementHandledElsewhere(cn, renderer, elementHandlers)) {\n _DrillForContent(cn, renderer, elementHandlers);\n }\n }\n } else if (cn.nodeType === 3) {\n var value = cn.nodeValue;\n\n if (cn.nodeValue && cn.parentNode.nodeName === \"LI\") {\n if (cn.parentNode.parentNode.nodeName === \"OL\") {\n value = listCount++ + '. ' + value;\n } else {\n var fontSize = fragmentCSS[\"font-size\"];\n var offsetX = (3 - fontSize * 0.75) * renderer.pdf.internal.scaleFactor;\n var offsetY = fontSize * 0.75 * renderer.pdf.internal.scaleFactor;\n var radius = fontSize * 1.74 / renderer.pdf.internal.scaleFactor;\n\n cb = function cb(x, y) {\n this.pdf.circle(x + offsetX, y + offsetY, radius, 'FD');\n };\n }\n } // Only add the text if the text node is in the body element\n // Add compatibility with IE11\n\n\n if (!!(cn.ownerDocument.body.compareDocumentPosition(cn) & 16)) {\n renderer.addText(value, fragmentCSS);\n }\n } else if (typeof cn === \"string\") {\n renderer.addText(cn, fragmentCSS);\n }\n }\n\n i++;\n }\n\n elementHandlers.outY = renderer.y;\n\n if (isBlock) {\n return renderer.setBlockBoundary(cb);\n }\n };\n\n images = {};\n\n loadImgs = function loadImgs(element, renderer, elementHandlers, cb) {\n var imgs = element.getElementsByTagName('img'),\n l = imgs.length,\n found_images,\n x = 0;\n\n function done() {\n renderer.pdf.internal.events.publish('imagesLoaded');\n cb(found_images);\n }\n\n function loadImage(url, width, height) {\n if (!url) return;\n var img = new Image();\n found_images = ++x;\n img.crossOrigin = '';\n\n img.onerror = img.onload = function () {\n if (img.complete) {\n //to support data urls in images, set width and height\n //as those values are not recognized automatically\n if (img.src.indexOf('data:image/') === 0) {\n img.width = width || img.width || 0;\n img.height = height || img.height || 0;\n } //if valid image add to known images array\n\n\n if (img.width + img.height) {\n var hash = (renderer.pdf.sHashCode && renderer.pdf.sHashCode(url)) || url;\n images[hash] = images[hash] || img;\n }\n }\n\n if (! --x) {\n done();\n }\n };\n\n img.src = url;\n }\n\n while (l--) {\n loadImage(imgs[l].getAttribute(\"src\"), imgs[l].width, imgs[l].height);\n }\n\n return x || done();\n };\n\n checkForFooter = function checkForFooter(elem, renderer, elementHandlers) {\n //check if we can found a <footer> element\n var footer = elem.getElementsByTagName(\"footer\");\n\n if (footer.length > 0) {\n footer = footer[0]; //bad hack to get height of footer\n //creat dummy out and check new y after fake rendering\n\n var oldOut = renderer.pdf.internal.write;\n var oldY = renderer.y;\n\n renderer.pdf.internal.write = function () {};\n\n _DrillForContent(footer, renderer, elementHandlers);\n\n var footerHeight = Math.ceil(renderer.y - oldY) + 5;\n renderer.y = oldY;\n renderer.pdf.internal.write = oldOut; //add 20% to prevent overlapping\n\n renderer.pdf.margins_doc.bottom += footerHeight; //Create function render header on every page\n\n var renderFooter = function renderFooter(pageInfo) {\n var pageNumber = pageInfo !== undefined ? pageInfo.pageNumber : 1; //set current y position to old margin\n\n var oldPosition = renderer.y; //render all child nodes of the header element\n\n renderer.y = renderer.pdf.internal.pageSize.getHeight() - renderer.pdf.margins_doc.bottom;\n renderer.pdf.margins_doc.bottom -= footerHeight; //check if we have to add page numbers\n\n var spans = footer.getElementsByTagName('span');\n\n for (var i = 0; i < spans.length; ++i) {\n //if we find some span element with class pageCounter, set the page\n if ((\" \" + spans[i].className + \" \").replace(/[\\n\\t]/g, \" \").indexOf(\" pageCounter \") > -1) {\n spans[i].innerHTML = pageNumber;\n } //if we find some span element with class totalPages, set a variable which is replaced after rendering of all pages\n\n\n if ((\" \" + spans[i].className + \" \").replace(/[\\n\\t]/g, \" \").indexOf(\" totalPages \") > -1) {\n spans[i].innerHTML = '###jsPDFVarTotalPages###';\n }\n } //render footer content\n\n\n _DrillForContent(footer, renderer, elementHandlers); //set bottom margin to previous height including the footer height\n\n\n renderer.pdf.margins_doc.bottom += footerHeight; //important for other plugins (e.g. table) to start rendering at correct position after header\n\n renderer.y = oldPosition;\n }; //check if footer contains totalPages which should be replace at the disoposal of the document\n\n\n var spans = footer.getElementsByTagName('span');\n\n for (var i = 0; i < spans.length; ++i) {\n if ((\" \" + spans[i].className + \" \").replace(/[\\n\\t]/g, \" \").indexOf(\" totalPages \") > -1) {\n renderer.pdf.internal.events.subscribe('htmlRenderingFinished', renderer.pdf.putTotalPages.bind(renderer.pdf, '###jsPDFVarTotalPages###'), true);\n }\n } //register event to render footer on every new page\n\n\n renderer.pdf.internal.events.subscribe('addPage', renderFooter, false); //render footer on first page\n\n renderFooter(); //prevent footer rendering\n\n SkipNode['FOOTER'] = 1;\n }\n };\n\n process = function process(pdf, element, x, y, settings, callback) {\n if (!element) return false;\n if (typeof element !== \"string\" && !element.parentNode) element = '' + element.innerHTML;\n\n if (typeof element === \"string\") {\n element = function (element) {\n var $frame, $hiddendiv, framename, visuallyhidden;\n framename = \"jsPDFhtmlText\" + Date.now().toString() + (Math.random() * 1000).toFixed(0);\n visuallyhidden = \"position: absolute !important;\" + \"clip: rect(1px 1px 1px 1px); /* IE6, IE7 */\" + \"clip: rect(1px, 1px, 1px, 1px);\" + \"padding:0 !important;\" + \"border:0 !important;\" + \"height: 1px !important;\" + \"width: 1px !important; \" + \"top:auto;\" + \"left:-100px;\" + \"overflow: hidden;\";\n $hiddendiv = document.createElement('div');\n $hiddendiv.className = \"sjs-pdf-hidden-html-div\";\n $hiddendiv.style.cssText = visuallyhidden;\n $hiddendiv.innerHTML = \"<iframe style=\\\"height:1px;width:1px\\\" name=\\\"\" + framename + \"\\\" />\";\n document.body.appendChild($hiddendiv);\n $frame = window.frames[framename];\n $frame.document.open();\n $frame.document.writeln(element);\n $frame.document.close();\n return $frame.document.body;\n }(element.replace(/<\\/?script[^>]*?>/gi, ''));\n }\n\n var availableFonts = Object.keys(pdf.getFontList());\n for(var i = 0; i < availableFonts.length; ++i) {\n var fontName = availableFonts[i];\n var fontFamily = fontName.toLowerCase();\n if(!FontNameDB[fontFamily]) {\n FontNameDB[fontFamily] = fontName;\n }\n }\n\n var r = new Renderer(pdf, x, y, settings),\n out; // 1. load images\n // 2. prepare optional footer elements\n // 3. render content\n\n loadImgs.call(this, element, r, settings.elementHandlers, function (found_images) {\n checkForFooter(element, r, settings.elementHandlers);\n\n _DrillForContent(element, r, settings.elementHandlers); //send event dispose for final taks (e.g. footer totalpage replacement)\n\n\n r.pdf.internal.events.publish('htmlRenderingFinished');\n out = r.dispose();\n if (typeof callback === 'function') callback(out);else if (found_images) console.error('jsPDF Warning: rendering issues? provide a callback to fromHTML!');\n });\n return out || {\n x: r.x,\n y: r.y\n };\n };\n\n Renderer.prototype.init = function () {\n this.paragraph = {\n text: [],\n style: []\n };\n return this.pdf.internal.write(\"q\");\n };\n\n Renderer.prototype.dispose = function () {\n this.pdf.internal.write(\"Q\");\n return {\n x: this.x,\n y: this.y,\n ready: true\n };\n }; //Checks if we have to execute some watcher functions\n //e.g. to end text floating around an image\n\n\n Renderer.prototype.executeWatchFunctions = function (el) {\n var ret = false;\n var narray = [];\n\n if (this.watchFunctions.length > 0) {\n for (var i = 0; i < this.watchFunctions.length; ++i) {\n if (this.watchFunctions[i](el) === true) {\n ret = true;\n } else {\n narray.push(this.watchFunctions[i]);\n }\n }\n\n this.watchFunctions = narray;\n }\n\n return ret;\n };\n\n Renderer.prototype.splitFragmentsIntoLines = function (fragments, styles) {\n var currentLineLength, defaultFontSize, ff, fragment, fragmentChopped, fragmentLength, fragmentSpecificMetrics, fs, k, line, lines, maxLineLength, style;\n defaultFontSize = 12;\n k = this.pdf.internal.scaleFactor;\n ff = void 0;\n fs = void 0;\n fragment = void 0;\n style = void 0;\n fragmentSpecificMetrics = void 0;\n fragmentLength = void 0;\n fragmentChopped = void 0;\n line = [];\n lines = [line];\n currentLineLength = 0;\n maxLineLength = this.settings.width;\n const oldFontName = this.pdf.getFont().fontName;\n const oldFontStyle = this.pdf.getFont().fontStyle;\n while (fragments.length) {\n fragment = fragments.shift();\n style = styles.shift();\n\n if (fragment) {\n ff = style[\"font-family\"];\n fs = style[\"font-style\"];\n this.pdf.setFont(ff, fs);\n fragmentSpecificMetrics = {\n textIndent: currentLineLength,\n fontSize: style[\"font-size\"] * defaultFontSize\n };\n fragmentLength = this.pdf.getStringUnitWidth(fragment, fragmentSpecificMetrics) * fragmentSpecificMetrics.fontSize / k;\n\n if (fragment == \"\\u2028\") {\n line = [];\n lines.push(line);\n } else if (currentLineLength + fragmentLength > maxLineLength) {\n fragmentChopped = this.pdf.splitTextToSize(fragment, maxLineLength, fragmentSpecificMetrics);\n line.push([fragmentChopped.shift(), style]);\n\n while (fragmentChopped.length) {\n line = [[fragmentChopped.shift(), style]];\n lines.push(line);\n }\n\n currentLineLength = this.pdf.getStringUnitWidth(line[0][0], fragmentSpecificMetrics) * fragmentSpecificMetrics.fontSize / k;\n } else {\n line.push([fragment, style]);\n currentLineLength += fragmentLength;\n }\n }\n } //if text alignment was set, set margin/indent of each line\n\n\n if (style['text-align'] !== undefined && (style['text-align'] === 'center' || style['text-align'] === 'right' || style['text-align'] === 'justify')) {\n for (var i = 0; i < lines.length; ++i) {\n var length = this.pdf.getStringUnitWidth(lines[i][0][0], fragmentSpecificMetrics) * fragmentSpecificMetrics.fontSize / k; //if there is more than on line we have to clone the style object as all lines hold a reference on this object\n\n if (i > 0) {\n lines[i][0][1] = clone(lines[i][0][1]);\n }\n\n var space = maxLineLength - length;\n\n if (style['text-align'] === 'right') {\n lines[i][0][1]['margin-left'] = space; //if alignment is not right, it has to be center so split the space to the left and the right\n } else if (style['text-align'] === 'center') {\n lines[i][0][1]['margin-left'] = space / 2; //if justify was set, calculate the word spacing and define in by using the css property\n } else if (style['text-align'] === 'justify') {\n var countSpaces = lines[i][0][0].split(' ').length - 1;\n lines[i][0][1]['word-spacing'] = space / countSpaces; //ignore the last line in justify mode\n\n if (i === lines.length - 1) {\n lines[i][0][1]['word-spacing'] = 0;\n }\n }\n }\n }\n this.pdf.setFont(oldFontName, oldFontStyle)\n return lines;\n };\n\n Renderer.prototype.RenderTextFragment = function (text, style) {\n var defaultFontSize, font, maxLineHeight;\n maxLineHeight = 0;\n defaultFontSize = 12;\n\n if (this.pdf.internal.pageSize.getHeight() - this.pdf.margins_doc.bottom < this.y + this.pdf.internal.getFontSize()) {\n this.pdf.internal.write(\"ET\", \"Q\", \"Q\");\n const currentPageNumber = this.pdf.getCurrentPageInfo().pageNumber;\n if (this.pdf.getNumberOfPages() === currentPageNumber) this.pdf.addPage();\n else this.pdf.setPage(currentPageNumber + 1);\n this.y = this.pdf.margins_doc.top;\n this.pdf.internal.write(\"q\", \"q\", \"BT\", this.getPdfColor(style.color), this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), \"Td\"); //move cursor by one line on new page\n\n maxLineHeight = Math.max(maxLineHeight, style[\"line-height\"], style[\"font-size\"]);\n this.pdf.internal.write(0, (-1 * defaultFontSize * maxLineHeight).toFixed(2), \"Td\");\n }\n\n font = this.pdf.internal.getFont(style[\"font-family\"], style[\"font-style\"]); // text color\n\n var pdfTextColor = this.getPdfColor(style[\"color\"]);\n\n if (pdfTextColor !== this.lastTextColor) {\n this.pdf.internal.write(pdfTextColor);\n this.lastTextColor = pdfTextColor;\n } //set the word spacing for e.g. justify style\n\n\n if (style['word-spacing'] !== undefined && style['word-spacing'] > 0) {\n this.pdf.internal.write(style['word-spacing'].toFixed(2), \"Tw\");\n }\n\n\n var pdfEscape16 = function(text, font) {\n var widths = font.metadata.Unicode.widths;\n var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n var ar = [\"\"];\n for (var i = 0, l = text.length, t; i < l; ++i) {\n t = font.metadata.characterToGlyph(text.charCodeAt(i));\n font.metadata.glyIdsUsed.push(t);\n font.metadata.toUnicode[t] = text.charCodeAt(i);\n if (widths.indexOf(t) == -1) {\n widths.push(t);\n widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n }\n if (t == \"0\") {\n //Spaces are not allowed in cmap.\n return ar.join(\"\");\n } else {\n t = t.toString(16);\n ar.push(padz[4 - t.length], t);\n }\n }\n return ar.join(\"\");\n };\n\n var utf8TextFunction = function(text, font) {\n var text = text || \"\";\n \n var str = \"\",\n s = 0,\n cmapConfirm;\n var strText = \"\";\n var encoding = font.encoding;\n \n if (font.encoding !== \"Identity-H\") {\n return text;\n }\n strText = text;\n \n for (s = 0; s < strText.length; s += 1) {\n if (font.metadata.hasOwnProperty(\"cmap\")) {\n cmapConfirm = font.metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n }\n if (!cmapConfirm) {\n if (\n strText[s].charCodeAt(0) < 256 &&\n font.metadata.hasOwnProperty(\"Unicode\")\n ) {\n str += strText[s];\n } else {\n str += \"\";\n }\n } else {\n str += strText[s];\n }\n }\n var result = \"\";\n if (parseInt(font.id.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n result = this.pdf.internal.pdfEscape(str, key)\n .split(\"\")\n .map(function(cv) {\n return cv.charCodeAt(0).toString(16);\n })\n .join(\"\");\n } else if (encoding === \"Identity-H\") {\n result = pdfEscape16(str, font);\n }\n \n return result;\n }; \n\n // var escapedText = this.pdf.internal.pdfEscape(text);\n // var escapedText = utf8TextFunction(text, font);\n // if(escapedText != text) {\n // escapedText = \"<\" + escapedText + \">\";\n // } else {\n // escapedText = \"(\" + escapedText + \")\";\n // }\n\n var escapedText = \"\";\n if(font.encoding !== \"Identity-H\") {\n escapedText = \"(\" + this.pdf.internal.pdfEscape(text) + \")\";\n } else {\n escapedText = \"<\" + utf8TextFunction(text, font) + \">\";\n }\n\n this.pdf.internal.write(\"/\" + font.id, (defaultFontSize * style[\"font-size\"]).toFixed(2), \"Tf\", escapedText + \" Tj\"); //set the word spacing back to neutral => 0\n\n if (style['word-spacing'] !== undefined) {\n this.pdf.internal.write(0, \"Tw\");\n }\n }; // Accepts #FFFFFF, rgb(int,int,int), or CSS Color Name\n\n\n Renderer.prototype.getPdfColor = function (style) {\n var textColor;\n var r, g, b;\n var rx = /rgb\\s*\\(\\s*(\\d+),\\s*(\\d+),\\s*(\\d+\\s*)\\)/;\n var m = rx.exec(style);\n\n if (m != null) {\n r = parseInt(m[1]);\n g = parseInt(m[2]);\n b = parseInt(m[3]);\n } else {\n if (typeof style === \"string\" && style.charAt(0) != '#') {\n var rgbColor = new RGBColor(style);\n\n if (rgbColor.ok) {\n style = rgbColor.toHex();\n } else {\n style = '#000000';\n }\n }\n\n r = style.substring(1, 3);\n r = parseInt(r, 16);\n g = style.substring(3, 5);\n g = parseInt(g, 16);\n b = style.substring(5, 7);\n b = parseInt(b, 16);\n }\n\n if (typeof r === 'string' && /^#[0-9A-Fa-f]{6}$/.test(r)) {\n var hex = parseInt(r.substr(1), 16);\n r = hex >> 16 & 255;\n g = hex >> 8 & 255;\n b = hex & 255;\n }\n\n var f3 = this.f3;\n\n if (r === 0 && g === 0 && b === 0 || typeof g === 'undefined') {\n textColor = f3(r / 255) + ' g';\n } else {\n textColor = [f3(r / 255), f3(g / 255), f3(b / 255), 'rg'].join(' ');\n }\n\n return textColor;\n };\n\n Renderer.prototype.f3 = function (number) {\n return number.toFixed(3); // Ie, %.3f\n }, Renderer.prototype.renderParagraph = function (cb) {\n var blockstyle, defaultFontSize, fontToUnitRatio, fragments, i, l, line, lines, maxLineHeight, out, paragraphspacing_after, paragraphspacing_before, priorblockstyle, styles, fontSize;\n fragments = PurgeWhiteSpace(this.paragraph.text);\n styles = this.paragraph.style;\n blockstyle = this.paragraph.blockstyle;\n priorblockstyle = this.paragraph.priorblockstyle || {};\n this.paragraph = {\n text: [],\n style: [],\n blockstyle: {},\n priorblockstyle: blockstyle\n };\n\n if (!fragments.join(\"\").trim()) {\n return;\n }\n\n lines = this.splitFragmentsIntoLines(fragments, styles);\n line = void 0;\n maxLineHeight = void 0;\n defaultFontSize = 12;\n fontToUnitRatio = defaultFontSize / this.pdf.internal.scaleFactor;\n this.priorMarginBottom = this.priorMarginBottom || 0;\n paragraphspacing_before = (Math.max((blockstyle[\"margin-top\"] || 0) - this.priorMarginBottom, 0) + (blockstyle[\"padding-top\"] || 0)) * fontToUnitRatio;\n paragraphspacing_after = ((blockstyle[\"margin-bottom\"] || 0) + (blockstyle[\"padding-bottom\"] || 0)) * fontToUnitRatio;\n this.priorMarginBottom = blockstyle[\"margin-bottom\"] || 0;\n\n if (blockstyle['page-break-before'] === 'always') {\n this.pdf.addPage();\n this.y = 0;\n paragraphspacing_before = ((blockstyle[\"margin-top\"] || 0) + (blockstyle[\"padding-top\"] || 0)) * fontToUnitRatio;\n }\n\n out = this.pdf.internal.write;\n i = void 0;\n l = void 0;\n this.y += paragraphspacing_before;\n out(\"q\", \"BT 0 g\", this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), \"Td\"); //stores the current indent of cursor position\n\n var currentIndent = 0;\n\n while (lines.length) {\n line = lines.shift();\n maxLineHeight = 0;\n i = 0;\n l = line.length;\n\n while (i !== l) {\n if (line[i][0].trim()) {\n maxLineHeight = Math.max(maxLineHeight, line[i][1][\"line-height\"], line[i][1][\"font-size\"]);\n fontSize = line[i][1][\"font-size\"] * 7;\n }\n\n i++;\n } //if we have to move the cursor to adapt the indent\n\n\n var indentMove = 0;\n var wantedIndent = 0; //if a margin was added (by e.g. a text-alignment), move the cursor\n\n if (line[0][1][\"margin-left\"] !== undefined && line[0][1][\"margin-left\"] > 0) {\n wantedIndent = this.pdf.internal.getCoordinateString(line[0][1][\"margin-left\"]);\n indentMove = wantedIndent - currentIndent;\n currentIndent = wantedIndent;\n }\n\n var indentMore = Math.max(blockstyle[\"margin-left\"] || 0, 0) * fontToUnitRatio; //move the cursor\n\n out(indentMove + indentMore, (-1 * defaultFontSize * maxLineHeight).toFixed(2), \"Td\");\n i = 0;\n l = line.length;\n\n while (i !== l) {\n if (line[i][0]) {\n this.RenderTextFragment(line[i][0], line[i][1]);\n }\n\n i++;\n }\n\n this.y += maxLineHeight * fontToUnitRatio; //if some watcher function was executed successful, so e.g. margin and widths were changed,\n //reset line drawing and calculate position and lines again\n //e.g. to stop text floating around an image\n\n if (this.executeWatchFunctions(line[0][1]) && lines.length > 0) {\n var localFragments = [];\n var localStyles = []; //create fragment array of\n\n lines.forEach(function (localLine) {\n var i = 0;\n var l = localLine.length;\n\n while (i !== l) {\n if (localLine[i][0]) {\n localFragments.push(localLine[i][0] + ' ');\n localStyles.push(localLine[i][1]);\n }\n\n ++i;\n }\n }); //split lines again due to possible coordinate changes\n\n lines = this.splitFragmentsIntoLines(PurgeWhiteSpace(localFragments), localStyles); //reposition the current cursor\n\n out(\"ET\", \"Q\");\n out(\"q\", \"BT 0 g\", this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), \"Td\");\n }\n }\n\n if (cb && typeof cb === \"function\") {\n cb.call(this, this.x - 9, this.y - fontSize / 2);\n }\n\n out(\"ET\", \"Q\");\n return this.y += paragraphspacing_after;\n };\n\n Renderer.prototype.setBlockBoundary = function (cb) {\n return this.renderParagraph(cb);\n };\n\n Renderer.prototype.setBlockStyle = function (css) {\n return this.paragraph.blockstyle = css;\n };\n\n Renderer.prototype.addText = function (text, css) {\n this.paragraph.text.push(text);\n return this.paragraph.style.push(css);\n };\n\n FontNameDB = {\n helvetica: \"helvetica\",\n \"sans-serif\": \"helvetica\",\n \"times new roman\": \"times\",\n serif: \"times\",\n times: \"times\",\n monospace: \"courier\",\n courier: \"courier\"\n };\n FontWeightMap = {\n 100: \"normal\",\n 200: \"normal\",\n 300: \"normal\",\n 400: \"normal\",\n 500: \"bold\",\n 600: \"bold\",\n 700: \"bold\",\n 800: \"bold\",\n 900: \"bold\",\n normal: \"normal\",\n bold: \"bold\",\n bolder: \"bold\",\n lighter: \"normal\"\n };\n FontStyleMap = {\n normal: \"normal\",\n italic: \"italic\",\n oblique: \"italic\"\n };\n TextAlignMap = {\n left: \"left\",\n right: \"right\",\n center: \"center\",\n justify: \"justify\"\n };\n FloatMap = {\n none: 'none',\n right: 'right',\n left: 'left'\n };\n ClearMap = {\n none: 'none',\n both: 'both'\n };\n UnitedNumberMap = {\n normal: 1\n };\n /**\n * Converts HTML-formatted text into formatted PDF text.\n *\n * Notes:\n * 2012-07-18\n * Plugin relies on having browser, DOM around. The HTML is pushed into dom and traversed.\n * Plugin relies on jQuery for CSS extraction.\n * Targeting HTML output from Markdown templating, which is a very simple\n * markup - div, span, em, strong, p. No br-based paragraph separation supported explicitly (but still may work.)\n * Images, tables are NOT supported.\n *\n * @public\n * @function\n * @param HTML {String|Object} HTML-formatted text, or pointer to DOM element that is to be rendered into PDF.\n * @param x {Number} starting X coordinate in jsPDF instance's declared units.\n * @param y {Number} starting Y coordinate in jsPDF instance's declared units.\n * @param settings {Object} Additional / optional variables controlling parsing, rendering.\n * @returns {Object} jsPDF instance\n */\n\n jsPDFAPI.fromHTML = function (HTML, x, y, settings, callback, margins) {\n\n this.margins_doc = margins || {\n top: 0,\n bottom: 0\n };\n if (!settings) settings = {};\n if (!settings.elementHandlers) settings.elementHandlers = {};\n return process(this, HTML, isNaN(x) ? 4 : x, isNaN(y) ? 4 : y, settings, callback);\n };\n })(jsPDF.API);\n","import IntervalTree from 'node-interval-tree';\nimport { DocOptions, DocController } from '../doc_controller';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\ninterface PackInterval {\n pageIndex: number;\n xLeft: number;\n xRight: number;\n yBot: number;\n absBot: number;\n}\nexport class PagePacker {\n private static findBotInterval(tree: IntervalTree<PackInterval>,\n xLeft: number, xRight: number, options: DocOptions): PackInterval {\n const intervals: PackInterval[] = tree.search(xLeft, xRight);\n intervals.push({\n pageIndex: 0, xLeft:\n options.margins.left, xRight: options.margins.left,\n yBot: options.margins.top, absBot: options.margins.top\n });\n return intervals.reduce((mx, cr) => {\n if (Math.abs(cr.xRight - xLeft) < SurveyHelper.EPSILON ||\n Math.abs(cr.xLeft - xRight) < SurveyHelper.EPSILON) return mx;\n if (cr.pageIndex < mx.pageIndex) return mx;\n if (cr.pageIndex > mx.pageIndex) return cr;\n return cr.yBot > mx.yBot ? cr : mx;\n }, intervals[intervals.length - 1]);\n }\n private static addPack(packs: IPdfBrick[][], index: number, brick: IPdfBrick) {\n for (let i: number = packs.length; i <= index; i++) {\n packs.push([]);\n }\n packs[index].push(brick);\n }\n public static pack(flats: IPdfBrick[][], controller: DocController): IPdfBrick[][] {\n const pageHeight: number = controller.paperHeight -\n controller.margins.top - controller.margins.bot;\n const unfoldFlats: IPdfBrick[][] = [];\n flats.forEach((flatsPage: IPdfBrick[]) => {\n unfoldFlats.push([]);\n flatsPage.forEach((flat: IPdfBrick) => {\n if (flat.height > pageHeight + SurveyHelper.EPSILON) {\n unfoldFlats[unfoldFlats.length - 1].push(...flat.unfold());\n }\n else unfoldFlats[unfoldFlats.length - 1].push(flat);\n });\n });\n unfoldFlats.forEach((unfoldFlatsPage: IPdfBrick[]) => {\n unfoldFlatsPage.sort((a: IPdfBrick, b: IPdfBrick) => {\n if (a.yTop < b.yTop) return -1;\n if (a.yTop > b.yTop) return 1;\n if (a.xLeft > b.xLeft) return 1;\n if (a.xLeft < b.xLeft) return -1;\n return 0;\n });\n });\n let pageIndexModel: number = 0;\n const packs: IPdfBrick[][] = [];\n const pageBot: number = controller.paperHeight - controller.margins.bot;\n unfoldFlats.forEach((unfoldFlatsPage: IPdfBrick[]) => {\n const tree: IntervalTree<PackInterval> = new IntervalTree();\n let pageIndexShift: number = 0;\n unfoldFlatsPage.forEach((flat: IPdfBrick) => {\n let { pageIndex, yBot, absBot } = PagePacker.findBotInterval(\n tree, flat.xLeft, flat.xRight, controller);\n const height: number = flat.height;\n flat.yTop = yBot + flat.yTop - absBot;\n if (Math.abs(flat.yTop - controller.margins.top) > SurveyHelper.EPSILON &&\n flat.yTop + height > pageBot + SurveyHelper.EPSILON || flat.isPageBreak) {\n flat.yTop = controller.margins.top;\n pageIndex++;\n pageIndexShift = Math.max(pageIndexShift, pageIndex);\n }\n tree.insert(flat.xLeft, flat.xRight, {\n pageIndex: pageIndex,\n xLeft: flat.xLeft, xRight: flat.xRight,\n yBot: flat.yTop + height, absBot: flat.yBot\n });\n flat.yBot = flat.yTop + height;\n PagePacker.addPack(packs, pageIndexModel + pageIndex, flat);\n });\n pageIndexModel += pageIndexShift + 1;\n });\n return packs;\n }\n}","import { IQuestion, QuestionBooleanModel } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { CheckItemBrick } from './pdf_checkitem';\n\nexport class BooleanItemBrick extends CheckItemBrick {\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect) {\n super(controller, rect,\n (<QuestionBooleanModel>question).id,\n { question: question, readOnly: question.isReadOnly, checked: (<QuestionBooleanModel>question).booleanValue });\n }\n}","import { IRect, ISize, DocController } from '../doc_controller';\nimport { IQuestion, Question } from 'survey-core';\nimport { SurveyHelper } from '../helper_survey';\n\nexport type TranslateXFunction = (xLeft: number, xRight : number) => { xLeft: number, xRight: number};\nexport interface IPdfBrick extends IRect, ISize {\n render(): Promise<void>;\n unfold(): IPdfBrick[];\n translateX(func: TranslateXFunction): void;\n isPageBreak: boolean;\n}\n/**\n * An object that describes a PDF brick&mdash;a simple element with specified content, size, and location. Bricks are fundamental elements used to construct a PDF document.\n *\n * You can access `PdfBrick` objects within functions that handle `SurveyPDF`'s [`onRenderQuestion`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderQuestion), [`onRenderPanel`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderPanel), and [`onRenderPage`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderPage) events.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/add-markup-to-customize-pdf-forms/ (linkStyle))\n */\nexport class PdfBrick implements IPdfBrick {\n protected _xLeft: number;\n protected _xRight: number;\n protected _yTop: number;\n protected _yBot: number;\n\n /**\n * An X-coordinate for the left brick edge.\n */\n public get xLeft(): number {\n return this._xLeft;\n }\n public set xLeft(val: number) {\n this.setXLeft(val);\n }\n /**\n * An X-coordinate for the right brick edge.\n */\n public get xRight(): number {\n return this._xRight;\n }\n public set xRight(val: number) {\n this.setXRight(val);\n }\n /**\n * A Y-coordinate for the top brick edge.\n */\n public get yTop(): number {\n return this._yTop;\n }\n public set yTop(val: number) {\n this.setYTop(val);\n }\n /**\n * A Y-coordinate for the bottom brick edge.\n */\n public get yBot(): number {\n return this._yBot;\n }\n public set yBot(val: number) {\n this.setYBottom(val);\n }\n /**\n * Font size in points.\n *\n * Default value: 14 (inherited from the parent PDF document)\n */\n public fontSize: number;\n /**\n * The color of text within the brick.\n *\n * Default value: `\"#404040\"`\n */\n public textColor: string = SurveyHelper.TEXT_COLOR;\n public formBorderColor: string = SurveyHelper.FORM_BORDER_COLOR;\n public isPageBreak: boolean = false;\n public constructor(protected question: IQuestion,\n protected controller: DocController, rect: IRect) {\n this.xLeft = rect.xLeft;\n this.xRight = rect.xRight;\n this.yTop = rect.yTop;\n this.yBot = rect.yBot;\n this.fontSize = !!controller ?\n controller.fontSize : DocController.FONT_SIZE;\n }\n translateX(func: TranslateXFunction): void {\n const res = func(this.xLeft, this.xRight);\n this.xLeft = res.xLeft;\n this.xRight = res.xRight;\n }\n /**\n * The brick's width in pixels.\n */\n public get width(): number {\n return this.xRight - this.xLeft;\n }\n /**\n * The brick's height in pixels.\n */\n public get height(): number {\n return this.yBot - this.yTop;\n }\n protected getShouldRenderReadOnly(): boolean {\n return SurveyHelper.shouldRenderReadOnly(this.question, this.controller);\n }\n public afterRenderCallback: () => void;\n public async render(): Promise<void> {\n if (this.getShouldRenderReadOnly()) {\n await this.renderReadOnly();\n }\n else await this.renderInteractive();\n this.afterRenderCallback && this.afterRenderCallback();\n }\n public async renderInteractive(): Promise<void> { }\n public async renderReadOnly(): Promise<void> {\n await this.renderInteractive();\n }\n /**\n * Allows you to get a flat array of nested PDF bricks.\n * @returns A flat array of nested PDF bricks.\n */\n public unfold(): IPdfBrick[] {\n return [this];\n }\n protected getCorrectedText(val: string): string {\n return this.controller.isRTL ? (val || '').split('').reverse().join(''): val;\n }\n protected setXLeft(val: number): void {\n this._xLeft = val;\n }\n protected setXRight(val: number): void {\n this._xRight = val;\n }\n protected setYTop(val: number): void {\n this._yTop = val;\n }\n protected setYBottom(val: number): void {\n this._yBot = val;\n }\n}\n","import { IQuestion, QuestionCheckboxModel, ItemValue } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { CheckItemBrick } from './pdf_checkitem';\n\nexport class CheckboxItemBrick extends CheckItemBrick {\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, item: ItemValue, index: number) {\n super(controller, rect,\n (<QuestionCheckboxModel>question).id + 'index' + index,\n { question: question, readOnly: question.isReadOnly || !item.isEnabled, item: item, checked: (<QuestionCheckboxModel>question).isItemSelected(item), index: index });\n }\n}","import { IQuestion, ItemValue, QuestionCheckboxModel } from 'survey-core';\nimport { IRect, ISize, DocController, IPoint } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from './pdf_brick';\nimport { TextBrick } from './pdf_text';\nimport { SurveyHelper } from '../helper_survey';\nimport { SurveyPDF } from '../survey';\n\nexport interface ICheckItemBrickContext {\n question: IQuestion;\n readOnly: boolean;\n checked: boolean;\n item?: ItemValue;\n index?: number;\n}\nexport class CheckItemBrick extends PdfBrick {\n private static readonly FONT_SIZE_SCALE: number = 0.7;\n private static readonly CHECKMARK_READONLY_SYMBOL: string = '3';\n private static readonly CHECKMARK_READONLY_FONT: string = 'zapfdingbats';\n public static readonly CHECKMARK_READONLY_FONT_SIZE_SCALE: number = 1.0 - Math.E / 10.0;\n protected question: QuestionCheckboxModel;\n public constructor(controller: DocController,\n rect: IRect, protected fieldName: string, protected context: ICheckItemBrickContext) {\n super(context.question, controller, rect);\n this.question = <QuestionCheckboxModel>this.context.question;\n this.textColor = this.formBorderColor;\n }\n protected getShouldRenderReadOnly(): boolean {\n return this.context.readOnly && SurveyHelper.getReadonlyRenderAs(\n this.question, this.controller) !== 'acroform' || this.controller.compress;\n }\n public async renderInteractive(): Promise<void> {\n const checkBox: any = new (<any>this.controller.doc.AcroFormCheckBox)();\n const formScale: number = SurveyHelper.formScale(this.controller, this);\n const options: any = {};\n options.maxFontSize = this.height * formScale * CheckItemBrick.FONT_SIZE_SCALE;\n options.caption = CheckItemBrick.CHECKMARK_READONLY_SYMBOL;\n options.textAlign = 'center';\n options.fieldName = this.fieldName;\n options.readOnly = this.context.readOnly;\n options.color = this.formBorderColor;\n options.value = this.context.checked ? 'On' : false;\n options.AS = this.context.checked ? '/On' : '/Off';\n options.context = this.context;\n\n options.Rect = SurveyHelper.createAcroformRect(\n SurveyHelper.scaleRect(this, formScale));\n this.controller.doc.addField(checkBox);\n (<SurveyPDF>this.question.survey)?.getUpdatedCheckItemAcroformOptions(options);\n\n checkBox.maxFontSize = options.maxFontSize;\n checkBox.caption = options.caption;\n checkBox.textAlign = options.textAlign;\n checkBox.fieldName = options.fieldName;\n checkBox.readOnly = options.readOnly;\n checkBox.color = options.color;\n checkBox.value = options.value;\n checkBox.AS = options.AS;\n checkBox.Rect = options.Rect;\n\n SurveyHelper.renderFlatBorders(this.controller, this);\n }\n public async renderReadOnly(): Promise<void> {\n SurveyHelper.renderFlatBorders(this.controller, this);\n if (this.context.checked) {\n const checkmarkPoint: IPoint = SurveyHelper.createPoint(this, true, true);\n const oldFontName: string = this.controller.fontName;\n this.controller.fontName = CheckItemBrick.CHECKMARK_READONLY_FONT;\n const oldFontSize: number = this.controller.fontSize;\n this.controller.fontSize = oldFontSize *\n CheckItemBrick.CHECKMARK_READONLY_FONT_SIZE_SCALE;\n const checkmarkSize: ISize = this.controller.measureText(\n CheckItemBrick.CHECKMARK_READONLY_SYMBOL);\n checkmarkPoint.xLeft += this.width / 2.0 - checkmarkSize.width / 2.0;\n checkmarkPoint.yTop += this.height / 2.0 - checkmarkSize.height / 2.0;\n const checkmarkFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n checkmarkPoint, this.question, this.controller,\n CheckItemBrick.CHECKMARK_READONLY_SYMBOL, TextBrick);\n (<any>checkmarkFlat.unfold()[0]).textColor = this.textColor;\n this.controller.fontSize = oldFontSize;\n await checkmarkFlat.render();\n this.controller.fontName = oldFontName;\n }\n }\n}","import { IRect, DocController } from '../doc_controller';\nimport { PdfBrick } from './pdf_brick';\n\nexport class ColoredBrick extends PdfBrick {\n public constructor(controller: DocController,\n rect: IRect, private color: string, private renderWidth?: number, private renderHeight?: number) {\n super(undefined, controller, rect);\n }\n public async renderInteractive(): Promise<void> {\n let oldFillColor: string = this.controller.doc.getFillColor();\n this.controller.doc.setFillColor(this.color || 'black');\n this.controller.doc.rect(this.xLeft, this.yTop,\n this.renderWidth ?? this.width, this.renderHeight ?? this.height, 'F');\n this.controller.doc.setFillColor(oldFillColor);\n }\n}","import { IPdfBrick, TranslateXFunction } from './pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class CompositeBrick implements IPdfBrick {\n private bricks: IPdfBrick[] = [];\n private _xLeft: number;\n private _xRight: number;\n private _yTop: number;\n private _yBot: number;\n public isPageBreak: boolean = false;\n public constructor(...bricks: IPdfBrick[]) {\n this._xLeft = 0.0;\n this._xRight = 0.0;\n this._yTop = 0.0;\n this._yBot = 0.0;\n this.addBrick(...bricks);\n }\n get xLeft(): number { return this._xLeft; }\n set xLeft(xLeft: number) {\n this.shift(xLeft - this.xLeft, 0.0, 0.0, 0.0);\n this._xLeft = xLeft;\n }\n get xRight(): number { return this._xRight; }\n set xRight(xRight: number) {\n this.shift(0.0, xRight - this.xRight, 0.0, 0.0);\n this._xRight = xRight;\n }\n get yTop(): number { return this._yTop; }\n set yTop(yTop: number) {\n this.shift(0.0, 0.0, yTop - this.yTop, 0.0);\n this._yTop = yTop;\n }\n get yBot(): number { return this._yBot; }\n set yBot(yBot: number) {\n this.shift(0.0, 0.0, 0.0, yBot - this.yBot);\n this._yBot = yBot;\n }\n private shift(leftShift: number, rightShift: number,\n topShift: number, botShift: number) {\n this.bricks.forEach((brick: IPdfBrick) => {\n brick.xLeft += leftShift;\n brick.xRight += rightShift;\n brick.yTop += topShift;\n brick.yBot += botShift;\n });\n }\n public get width(): number {\n return this.xRight - this.xLeft;\n }\n public get height(): number {\n return this.yBot - this.yTop;\n }\n public async render(): Promise<void> {\n for (let i: number = 0; i < this.bricks.length; i++) {\n await this.bricks[i].render();\n }\n }\n public get isEmpty(): boolean {\n return this.bricks.length === 0;\n }\n public addBrick(...bricks: IPdfBrick[]) {\n if (bricks.length != 0) {\n this.bricks.push(...bricks);\n let mergeRect = SurveyHelper.mergeRects(...this.bricks);\n this._xLeft = mergeRect.xLeft;\n this._xRight = mergeRect.xRight;\n this._yTop = mergeRect.yTop;\n this._yBot = mergeRect.yBot;\n }\n }\n public unfold(): IPdfBrick[] {\n const unfoldBricks: IPdfBrick[] = [];\n this.bricks.forEach((brick: IPdfBrick) => {\n unfoldBricks.push(...brick.unfold());\n });\n return unfoldBricks;\n }\n translateX(func: TranslateXFunction): void {\n this.bricks.forEach(brick => brick.translateX(func));\n const res = func(this.xLeft, this.xRight);\n this._xLeft = res.xLeft;\n this._xRight = res.xRight;\n }\n}","import { PdfBrick } from './pdf_brick';\nimport { DocController, IRect } from '../doc_controller';\nimport { IQuestion } from 'survey-core';\n\nexport class CustomBrick extends PdfBrick {\n\n constructor(question: IQuestion, controller: DocController, private renderFunc: (doc: any, question: any, xLeft: number, yTop: number) => IRect) {\n super(question, controller, renderFunc(controller.helperDoc, question, 0, 0));\n }\n public async renderInteractive(): Promise<void> {\n await new Promise<void>((resolve) => {\n this.renderFunc(this.controller.doc, this.question, this.xLeft, this.yTop);\n resolve();\n });\n }\n}","import { IQuestion } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { TextBrick } from './pdf_text';\n\nexport class DescriptionBrick extends TextBrick {\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, text: string) {\n super(question, controller, rect, text);\n }\n}","import { IQuestion, QuestionDropdownModel, ItemValue } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { PdfBrick } from './pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class DropdownBrick extends PdfBrick {\n protected question: QuestionDropdownModel;\n protected isQuestion: boolean;\n protected isMultiline: boolean;\n public constructor(question: IQuestion,\n protected controller: DocController, rect: IRect) {\n super(question, controller, rect);\n this.question = <QuestionDropdownModel>question;\n }\n public async renderInteractive(): Promise<void> {\n const comboBox = new (<any>this.controller.doc.AcroFormComboBox)();\n comboBox.fieldName = this.question.id;\n comboBox.Rect = SurveyHelper.createAcroformRect(\n SurveyHelper.scaleRect(this,\n SurveyHelper.formScale(this.controller, this)));\n comboBox.edit = false;\n comboBox.color = this.textColor;\n const options: string[] = [];\n if (this.question.showOptionsCaption) {\n options.push(this.getCorrectedText(this.question.optionsCaption));\n }\n this.question.visibleChoices.forEach((item: ItemValue) => {\n options.push(this.getCorrectedText(SurveyHelper.getLocString(item.locText)));\n });\n comboBox.setOptions(options);\n comboBox.fontName = this.controller.fontName;\n comboBox.fontSize = this.fontSize;\n comboBox.readOnly = this.question.isReadOnly;\n comboBox.isUnicode = SurveyHelper.isCustomFont(\n this.controller, comboBox.fontName);\n comboBox.V = this.getCorrectedText(this.question.readOnlyText || '');\n this.controller.doc.addField(comboBox);\n SurveyHelper.renderFlatBorders(this.controller, this);\n }\n}","import { PdfBrick } from './pdf_brick';\nimport { DocController, IRect } from '../doc_controller';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class EmptyBrick extends PdfBrick {\n private isBorderVisible: boolean = false;\n\n constructor(rect: IRect,\n protected controller: DocController = null,\n isBorderVisible: boolean = false) {\n super(null, controller, rect);\n this.isBorderVisible = isBorderVisible;\n }\n\n private resizeBorder(isIncrease: boolean): void {\n const coef: number = isIncrease ? 1 : -1;\n const borderPadding: number = this.controller.doc.getFontSize() * SurveyHelper.VALUE_READONLY_PADDING_SCALE;\n this.xLeft -= coef * borderPadding;\n this.xRight += coef * borderPadding;\n this.yBot += coef * borderPadding;\n }\n\n public async renderInteractive(): Promise<void> {\n if (this.isBorderVisible) {\n this.resizeBorder(true);\n SurveyHelper.renderFlatBorders(this.controller, this);\n this.resizeBorder(false);\n }\n }\n}","import { IQuestion } from 'survey-core';\nimport { PdfBrick } from './pdf_brick';\nimport { IRect, DocController } from '../doc_controller';\n\nexport class HTMLBrick extends PdfBrick {\n private margins: { top: number, bottom: number };\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, protected html: string, isImage: boolean = false) {\n super(question, controller, rect);\n if (isImage) {\n this.margins = {\n top: 0.0,\n bottom: 0.0\n };\n }\n else {\n this.margins = {\n top: controller.margins.top,\n bottom: controller.margins.bot\n };\n }\n }\n public async renderInteractive(): Promise<void> {\n let oldFontSize: number = this.controller.fontSize;\n this.controller.fontSize = this.fontSize;\n await new Promise<void>((resolve) => {\n this.controller.doc.fromHTML(this.html, this.xLeft, this.yTop, {\n width: this.width, pagesplit: true,\n }, function () {\n [].slice.call(document.querySelectorAll('.sjs-pdf-hidden-html-div')).forEach(\n function (el: HTMLDivElement) {\n el.parentNode.removeChild(el);\n }\n );\n resolve();\n }, this.margins);\n });\n this.controller.fontSize = oldFontSize;\n }\n}","import { IQuestion } from 'survey-core';\nimport { PdfBrick } from './pdf_brick';\nimport { DocController } from '../doc_controller';\nimport { IPoint } from '../entries/pdf';\n\nexport class ImageBrick extends PdfBrick {\n public constructor(question: IQuestion, controller: DocController, protected image: string,\n point: IPoint, protected originalWidth: number, protected originalHeight: number) {\n super(question, controller, {\n xLeft: point.xLeft,\n xRight: point.xLeft + (originalWidth || 0),\n yTop: point.yTop,\n yBot: point.yTop + (originalHeight || 0)\n });\n this.isPageBreak = this.originalHeight === undefined;\n }\n public async renderInteractive(): Promise<void> {\n await new Promise<void>((resolve) => {\n try {\n this.controller.doc.addImage(this.image, 'PNG', this.xLeft, this.yTop, this.originalWidth, this.originalHeight);\n } finally {\n resolve();\n }\n });\n }\n}","import { Question } from 'survey-core';\nimport { TextBrick } from './pdf_text';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class LinkBrick extends TextBrick {\n private static readonly SCALE_FACTOR_MAGIC: number = 0.955;\n public static readonly COLOR: string = '#0000EE';\n public constructor(textFlat: TextBrick, protected link: string) {\n super((<LinkBrick>textFlat).question,\n (<LinkBrick>textFlat).controller,\n textFlat, (<LinkBrick>textFlat).text);\n this.textColor = LinkBrick.COLOR;\n }\n public async renderInteractive(): Promise<void> {\n let oldTextColor: string = this.controller.doc.getTextColor();\n this.controller.doc.setTextColor(SurveyHelper.BACKGROUND_COLOR);\n let descent: number = this.controller.unitHeight *\n (this.controller.doc.getLineHeightFactor() -\n LinkBrick.SCALE_FACTOR_MAGIC);\n let yTopLink: number = this.yTop +\n (this.yBot - this.yTop) - descent;\n this.controller.doc.textWithLink(this.text, this.xLeft,\n yTopLink, { url: this.link });\n await super.renderInteractive();\n this.controller.doc.setTextColor(oldTextColor);\n }\n public async renderReadOnly(): Promise<void> {\n if (SurveyHelper.getReadonlyRenderAs(<Question>this.question,\n this.controller) !== 'text') {\n return this.renderInteractive();\n }\n await super.renderInteractive();\n }\n}","import { IQuestion, ItemValue, Question } from 'survey-core';\nimport { IPoint, IRect, ISize, DocController } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from './pdf_brick';\nimport { TextBrick } from './pdf_text';\nimport { SurveyPDF } from '../survey';\nimport { SurveyHelper } from '../helper_survey';\n\nexport interface IRadiogroupWrapContext {\n question: IQuestion;\n readOnly: boolean;\n}\nexport class RadioGroupWrap {\n private _radioGroup: any;\n public constructor(public name: string,\n private controller: DocController,\n private context: IRadiogroupWrapContext) {\n }\n public addToPdf(color: string) {\n this._radioGroup = new this.controller.doc.AcroFormRadioButton();\n const options: any = {};\n options.fieldName = this.name;\n options.readOnly = this.readOnly;\n options.color = color;\n options.context = this.context;\n (<SurveyPDF>this.context.question.survey)?.getUpdatedRadioGroupWrapOptions(options);\n this._radioGroup.fieldName = options.fieldName;\n this._radioGroup.readOnly = options.readOnly;\n this._radioGroup.color = options.color;\n\n this._radioGroup.value = '';\n this.controller.doc.addField(this._radioGroup);\n }\n get radioGroup(): any {\n return this._radioGroup;\n }\n get readOnly(): boolean {\n return this.context.readOnly;\n }\n}\n\nexport interface IRadioGroupItemBrickContext {\n question: IQuestion;\n checked: boolean;\n index: number;\n item: ItemValue;\n}\n\nexport class RadioItemBrick extends PdfBrick {\n private static readonly RADIOMARKER_READONLY_SYMBOL: string = 'l';\n private static readonly RADIOMARKER_READONLY_FONT: string = 'zapfdingbats';\n public static readonly RADIOMARKER_READONLY_FONT_SIZE_SCALE: number = 1.0 - ((2.0 + Math.E) / 10.0);\n public constructor(controller: DocController,\n rect: IRect, private context: IRadioGroupItemBrickContext,\n private radioGroupWrap: RadioGroupWrap) {\n super(context.question, controller, rect);\n this.textColor = this.formBorderColor;\n }\n protected getShouldRenderReadOnly(): boolean {\n return this.radioGroupWrap.readOnly && SurveyHelper.getReadonlyRenderAs(\n <Question>this.question, this.controller) !== 'acroform' || this.controller.compress;\n }\n public async renderInteractive(): Promise<void> {\n if (this.context.index == 0) {\n this.radioGroupWrap.addToPdf(this.formBorderColor);\n }\n const options: any = {};\n options.fieldName = this.radioGroupWrap.name + 'index' + this.context.index;\n let formScale: number = SurveyHelper.formScale(this.controller, this);\n options.Rect = SurveyHelper.createAcroformRect(\n SurveyHelper.scaleRect(this, formScale));\n options.color = this.formBorderColor;\n options.appearance = this.controller.doc.AcroForm.Appearance.RadioButton.Circle;\n options.radioGroup = this.radioGroupWrap.radioGroup;\n options.context = this.context;\n\n (<SurveyPDF>this.context.question.survey)?.getUpdatedRadioItemAcroformOptions(options);\n let radioButton: any = this.radioGroupWrap.radioGroup.createOption(options.fieldName);\n\n if (this.context.checked) {\n if(!options.AS) {\n radioButton.AS = '/' + options.fieldName;\n }\n if(!this.radioGroupWrap.radioGroup.value) {\n this.radioGroupWrap.radioGroup.value = options.fieldName;\n }\n }\n else {\n if(!options.AS) {\n options.AS = '/Off';\n }\n }\n radioButton.Rect = options.Rect;\n radioButton.color = options.color;\n\n SurveyHelper.renderFlatBorders(this.controller, this);\n this.radioGroupWrap.radioGroup.setAppearance(\n options.appearance\n );\n }\n public async renderReadOnly(): Promise<void> {\n SurveyHelper.renderFlatBorders(this.controller, this);\n if (this.context.checked) {\n const radiomarkerPoint: IPoint = SurveyHelper.createPoint(this, true, true);\n const oldFontSize: number = this.controller.fontSize;\n const oldFontName: string = this.controller.fontName;\n this.controller.fontName = RadioItemBrick.RADIOMARKER_READONLY_FONT;\n this.controller.fontSize = oldFontSize *\n RadioItemBrick.RADIOMARKER_READONLY_FONT_SIZE_SCALE;\n let radiomarkerSize: ISize = this.controller.measureText(\n RadioItemBrick.RADIOMARKER_READONLY_SYMBOL);\n radiomarkerPoint.xLeft += this.width / 2.0 - radiomarkerSize.width / 2.0;\n radiomarkerPoint.yTop += this.height / 2.0 - radiomarkerSize.height / 2.0;\n let radiomarkerFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n radiomarkerPoint, this.question, this.controller,\n RadioItemBrick.RADIOMARKER_READONLY_SYMBOL, TextBrick);\n (<any>radiomarkerFlat.unfold()[0]).textColor = this.textColor;\n await radiomarkerFlat.render();\n this.controller.fontSize = oldFontSize;\n this.controller.fontName = oldFontName;\n }\n }\n}","import { IQuestion, QuestionRankingModel } from 'survey-core';\nimport { IRect, ISize, DocController, IPoint } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from './pdf_brick';\nimport { TextBrick } from './pdf_text';\nimport { CheckItemBrick } from './pdf_checkitem';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class RankingItemBrick extends PdfBrick {\n protected question: QuestionRankingModel;\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, protected mark: string) {\n super(question, controller, rect);\n this.question = <QuestionRankingModel>question;\n this.textColor = this.formBorderColor;\n }\n public async renderInteractive(): Promise<void> {\n SurveyHelper.renderFlatBorders(this.controller, this);\n const markPoint: IPoint = SurveyHelper.createPoint(this, true, true);\n const oldFontSize: number = this.controller.fontSize;\n this.controller.fontSize = oldFontSize *\n CheckItemBrick.CHECKMARK_READONLY_FONT_SIZE_SCALE;\n const markSize: ISize = this.controller.measureText(this.mark);\n markPoint.xLeft += this.width / 2.0 - markSize.width / 2.0;\n markPoint.yTop += this.height / 2.0 - markSize.height / 2.0;\n const markFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n markPoint, this.question, this.controller, this.mark, TextBrick);\n (<any>markFlat.unfold()[0]).textColor = this.textColor;\n this.controller.fontSize = oldFontSize;\n await markFlat.render();\n }\n}","import { IRect, DocController } from '../doc_controller';\nimport { IPdfBrick, TranslateXFunction } from './pdf_brick';\n\nexport class RowlineBrick implements IPdfBrick {\n xLeft: number;\n xRight: number;\n yTop: number;\n yBot: number;\n public isPageBreak: boolean = false;\n public constructor(protected controller: DocController,\n rect: IRect, public color: string) {\n this.xLeft = rect.xLeft;\n this.xRight = rect.xRight;\n this.yTop = rect.yTop;\n this.yBot = rect.yBot;\n }\n public get width(): number {\n return this.xRight - this.xLeft;\n }\n public get height(): number {\n return this.yBot - this.yTop;\n }\n public async render(): Promise<void> {\n if (this.color !== null) {\n let oldDrawColor: string = this.controller.doc.getDrawColor();\n this.controller.doc.setDrawColor(this.color);\n this.controller.doc.line(this.xLeft, this.yTop, this.xRight, this.yTop);\n this.controller.doc.setDrawColor(oldDrawColor);\n }\n }\n public unfold(): IPdfBrick[] {\n return [this];\n }\n translateX(_: TranslateXFunction): void {}\n}","import { IQuestion, } from 'survey-core';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { PdfBrick } from './pdf_brick';\n\nexport class TextBrick extends PdfBrick {\n protected align: any;\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, protected text: string) {\n super(question, controller, rect);\n this.align = {\n isInputRtl: false,\n isOutputRtl: controller.isRTL,\n align: controller.isRTL ? 'right': 'left',\n baseline: 'middle'\n };\n }\n private escapeText() {\n while (this.text.indexOf('\\t') > -1) {\n this.text = this.text.replace('\\t', Array(5).join(String.fromCharCode(160)));\n }\n return this.text;\n }\n public async renderInteractive(): Promise<void> {\n let alignPoint: IPoint = this.alignPoint(this);\n let oldFontSize: number = this.controller.fontSize;\n this.controller.fontSize = this.fontSize;\n let oldTextColor: string = this.controller.doc.getTextColor();\n this.controller.doc.setTextColor(this.textColor);\n this.controller.doc.text(this.escapeText(), alignPoint.xLeft, alignPoint.yTop, this.align);\n this.controller.doc.setTextColor(oldTextColor);\n this.controller.fontSize = oldFontSize;\n }\n protected alignPoint(rect: IRect): IPoint {\n return {\n xLeft: this.controller.isRTL ? rect.xRight : rect.xLeft,\n yTop: rect.yTop + (rect.yBot - rect.yTop) / 2.0\n };\n }\n}","import { IQuestion } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { TextBrick } from './pdf_text';\n\nexport class TextBoldBrick extends TextBrick {\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, text: string) {\n super(question, controller, rect, text);\n }\n public async renderInteractive(): Promise<void> {\n this.controller.fontStyle = 'bold';\n await super.renderInteractive();\n this.controller.fontStyle = 'normal';\n }\n}","import { IQuestion, QuestionTextModel, settings } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { IPdfBrick, PdfBrick, TranslateXFunction } from './pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\nimport { CompositeBrick } from './pdf_composite';\n\nexport interface ITextFieldBrickOptions {\n isReadOnly: boolean;\n fieldName: string;\n shouldRenderBorders: boolean;\n value?: string;\n placeholder?: string;\n inputType?: string;\n isMultiline?: boolean;\n}\n\nexport class TextFieldBrick extends PdfBrick {\n public constructor(protected question: IQuestion, controller: DocController,\n rect: IRect, protected options: ITextFieldBrickOptions\n ) {\n super(question, controller, rect);\n options.isMultiline = options.isMultiline ?? false;\n options.placeholder = options.placeholder ?? '';\n options.inputType = options.inputType ?? '';\n options.value = options.value ?? '';\n this.question = <QuestionTextModel>question;\n }\n private renderColorQuestion(): void {\n let oldFillColor: string = this.controller.doc.getFillColor();\n this.controller.doc.setFillColor(this.question.value || 'black');\n this.controller.doc.rect(this.xLeft, this.yTop,\n this.width, this.height, 'F');\n this.controller.doc.setFillColor(oldFillColor);\n }\n public async renderInteractive(): Promise<void> {\n if (this.options.inputType === 'color') {\n this.renderColorQuestion();\n return;\n }\n const inputField: any = this.options.inputType === 'password' ?\n new (<any>this.controller.doc.AcroFormPasswordField)() :\n new (<any>this.controller.doc.AcroFormTextField)();\n inputField.fieldName = this.options.fieldName;\n inputField.fontName = this.controller.fontName;\n inputField.fontSize = this.fontSize;\n inputField.isUnicode = SurveyHelper.isCustomFont(\n this.controller, inputField.fontName);\n if (this.options.inputType !== 'password') {\n inputField.V = ' ' + this.getCorrectedText(this.options.value);\n inputField.DV = ' ' + this.getCorrectedText(this.options.placeholder);\n }\n else inputField.value = '';\n inputField.multiline = this.options.isMultiline;\n inputField.readOnly = this.options.isReadOnly;\n inputField.color = this.textColor;\n let formScale: number = SurveyHelper.formScale(this.controller, this);\n inputField.maxFontSize = this.controller.fontSize * formScale;\n inputField.Rect = SurveyHelper.createAcroformRect(\n SurveyHelper.scaleRect(this, formScale));\n this.controller.doc.addField(inputField);\n SurveyHelper.renderFlatBorders(this.controller, this);\n }\n protected shouldRenderFlatBorders(): boolean {\n return this.options.shouldRenderBorders;\n }\n protected getShouldRenderReadOnly(): boolean {\n return SurveyHelper.shouldRenderReadOnly(this.question, this.controller, this.options.isReadOnly);\n }\n private _textBrick: IPdfBrick;\n public get textBrick(): IPdfBrick {\n return this._textBrick;\n }\n public set textBrick(val: IPdfBrick) {\n this._textBrick = val;\n const unFoldedBricks = val.unfold();\n const bricksCount = unFoldedBricks.length;\n let renderedBricksCount = 0;\n const bricksByPage: { [index: number]: Array<PdfBrick> } = {};\n const afterRenderTextBrickCallback = (brick: PdfBrick) => {\n if(this.shouldRenderFlatBorders()) {\n renderedBricksCount++;\n const currentPageNumber = this.controller.getCurrentPageIndex();\n if(!bricksByPage[currentPageNumber]) {\n bricksByPage[currentPageNumber] = [];\n }\n bricksByPage[currentPageNumber].push(brick);\n if(renderedBricksCount >= bricksCount) {\n const keys = Object.keys(bricksByPage);\n const renderedOnOnePage = keys.length == 1;\n keys.forEach((key: string) => {\n const compositeBrick = new CompositeBrick();\n bricksByPage[key as any].forEach((brick: PdfBrick) => {\n compositeBrick.addBrick(brick);\n });\n const padding = this.controller.unitHeight * SurveyHelper.VALUE_READONLY_PADDING_SCALE;\n const borderRect = {\n xLeft: this.xLeft,\n xRight: this.xRight,\n width: this.width,\n yTop: renderedOnOnePage ? this.yTop : compositeBrick.yTop - padding,\n yBot: renderedOnOnePage ? this.yBot : compositeBrick.yBot + padding,\n height: renderedOnOnePage ? this.height : compositeBrick.height + 2 * padding,\n formBorderColor: this.formBorderColor,\n };\n this.controller.setPage(Number(key));\n SurveyHelper.renderFlatBorders(this.controller, borderRect);\n this.controller.setPage(currentPageNumber);\n });\n }\n }\n };\n unFoldedBricks.forEach((brick: PdfBrick) => {\n brick.afterRenderCallback = afterRenderTextBrickCallback.bind(this, brick);\n });\n }\n public async renderReadOnly(): Promise<void> {\n this.controller.pushMargins(this.xLeft,\n this.controller.paperWidth - this.xRight);\n if (this.options.inputType === 'color') {\n this.renderColorQuestion();\n } else {\n await this.textBrick.render();\n }\n this.controller.popMargins();\n }\n public unfold(): IPdfBrick[] {\n if (this.getShouldRenderReadOnly() && this.options.inputType !== 'color') {\n return this.textBrick.unfold();\n } else {\n return super.unfold();\n }\n }\n public translateX(func: TranslateXFunction): void {\n const res = func(this.xLeft, this.xRight);\n this._xLeft = res.xLeft;\n this._xRight = res.xRight;\n if(this.textBrick) {\n this.textBrick.translateX(func);\n }\n }\n protected setXLeft(val: number): void {\n const delta = val - this._xLeft;\n super.setXLeft(val);\n if(this.textBrick) {\n this.textBrick.xLeft = this.textBrick.xLeft + delta;\n }\n }\n protected setXRight(val: number): void {\n const delta = val - this._xRight;\n super.setXRight(val);\n if(this.textBrick) {\n this.textBrick.xRight = this.textBrick.xRight + delta;\n }\n }\n protected setYTop(val: number): void {\n const delta = val - this._yTop;\n super.setYTop(val);\n if(this.textBrick) {\n this.textBrick.yTop = this.textBrick.yTop + delta;\n }\n }\n protected setYBottom(val: number): void {\n const delta = val - this._yBot;\n super.setYBottom(val);\n if(this.textBrick) {\n this.textBrick.yBot = this.textBrick.yBot + delta;\n }\n }\n}","import { IQuestion, QuestionTextModel } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { TextBoldBrick } from './pdf_textbold';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class TitlePanelBrick extends TextBoldBrick {\n protected question: QuestionTextModel;\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, text: string) {\n super(question, controller, rect, text);\n }\n public async renderInteractive(): Promise<void> {\n let oldFontSize = this.controller.fontSize;\n this.controller.fontSize = oldFontSize * SurveyHelper.TITLE_PANEL_FONT_SIZE_SCALE;\n await super.renderInteractive();\n this.controller.fontSize = oldFontSize;\n }\n}","import { SurveyModel, Question, EventBase } from 'survey-core';\nimport * as SurveyCore from 'survey-core';\nimport { IDocOptions, DocController } from './doc_controller';\nimport { FlatSurvey } from './flat_layout/flat_survey';\nimport { PagePacker } from './page_layout/page_packer';\nimport { IPdfBrick } from './pdf_render/pdf_brick';\nimport { EventAsync, EventHandler } from './event_handler/event_handler';\nimport { DrawCanvas } from './event_handler/draw_canvas';\nimport { AdornersOptions, AdornersPanelOptions, AdornersPageOptions } from './event_handler/adorners';\nimport { SurveyHelper } from './helper_survey';\n\n/**\n * The `SurveyPDF` object enables you to export your surveys and forms to PDF documents.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/ (linkStyle))\n */\nexport class SurveyPDF extends SurveyModel {\n private static currentlySaving: boolean = false;\n private static saveQueue: any[] = [];\n public options: IDocOptions;\n public constructor(jsonObject: any, options?: IDocOptions) {\n super(jsonObject);\n if (typeof options === 'undefined') {\n options = {};\n }\n if(this.questionsOnPageMode == 'inputPerPage') {\n this.questionsOnPageMode = 'standard';\n }\n this.options = SurveyHelper.clone(options);\n }\n public get haveCommercialLicense(): boolean {\n const f = SurveyCore.hasLicense;\n return !!f && f(2);\n }\n public set haveCommercialLicense(val: boolean) {\n // eslint-disable-next-line no-console\n console.error('As of v1.9.101, the haveCommercialLicense property is not supported. To activate your license, use the setLicenseKey(key) method as shown on the following page: https://surveyjs.io/remove-alert-banner');\n }\n /**\n * An event that is raised when SurveyJS PDF Generator renders a page header. Handle this event to customize the header.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `canvas`: [`DrawCanvas`](https://surveyjs.io/pdf-generator/documentation/api-reference/drawcanvas)\\\n * An object that you can use to draw text and images in the page header.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n */\n public onRenderHeader: EventAsync<SurveyPDF, DrawCanvas> =\n new EventAsync<SurveyPDF, DrawCanvas>();\n /**\n * An event that is raised when SurveyJS PDF Generator renders a page footer. Handle this event to customize the footer.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `canvas`: [`DrawCanvas`](https://surveyjs.io/pdf-generator/documentation/api-reference/drawcanvas)\\\n * An object that you can use to draw text and images in the page footer.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n */\n public onRenderFooter: EventAsync<SurveyPDF, DrawCanvas> =\n new EventAsync<SurveyPDF, DrawCanvas>();\n /**\n * An event that is raised when SurveyJS PDF Generator renders a survey question. Handle this event to customize question rendering.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\\\n * A survey question that is being rendered.\n *\n * - `options.point`: `IPoint`\\\n * An object with coordinates of the top-left corner of the element being rendered. This object contains the following properties: `{ xLeft: number, yTop: number }`.\n *\n * - `options.bricks`: [`PdfBrick[]`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfbrick)\\\n * An array of [bricks](https://surveyjs.io/pdf-generator/documentation/customize-survey-question-rendering-in-pdf-form#custom-rendering) used to render the element.\n *\n * - `options.controller`: [`DocController`](https://surveyjs.io/pdf-generator/documentation/api-reference/doccontroller)\\\n * An object that provides access to main PDF document properties (font, margins, page width and height) and allows you to modify them.\n *\n * - `options.repository`: `FlatRepository`\\\n * A repository with classes that render elements to PDF. Use its `create` method if you need to create a new instance of a rendering class.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/how-to-use-adorners-in-pdf-forms/ (linkStyle))\n */\n public onRenderQuestion: EventAsync<SurveyPDF, AdornersOptions> =\n new EventAsync<SurveyPDF, AdornersOptions>();\n /**\n * An event that is raised when SurveyJS PDF Generator renders a panel. Handle this event to customize panel rendering.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\\\n * A panel that is being rendered.\n *\n * - `options.point`: `IPoint`\\\n * An object with coordinates of the top-left corner of the element being rendered. This object contains the following properties: `{ xLeft: number, yTop: number }`.\n *\n * - `options.bricks`: [`PdfBrick[]`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfbrick)\\\n * An array of [bricks](https://surveyjs.io/pdf-generator/documentation/customize-survey-question-rendering-in-pdf-form#custom-rendering) used to render the element.\n *\n * - `options.controller`: [`DocController`](https://surveyjs.io/pdf-generator/documentation/api-reference/doccontroller)\\\n * An object that provides access to main PDF document properties (font, margins, page width and height) and allows you to modify them.\n *\n * - `options.repository`: `FlatRepository`\\\n * A repository with classes that render elements to PDF. Use its `create` method if you need to create a new instance of a rendering class.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/how-to-use-adorners-in-pdf-forms/ (linkStyle))\n */\n public onRenderPanel: EventAsync<SurveyPDF, AdornersPanelOptions> =\n new EventAsync<SurveyPDF, AdornersPanelOptions>();\n /**\n * An event that is raised when SurveyJS PDF Generator renders a page. Handle this event to customize page rendering.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\\\n * A page that is being rendered.\n *\n * - `options.point`: `IPoint`\\\n * An object with coordinates of the top-left corner of the element being rendered. This object contains the following properties: `{ xLeft: number, yTop: number }`.\n *\n * - `options.bricks`: [`PdfBrick[]`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfbrick)\\\n * An array of [bricks](https://surveyjs.io/pdf-generator/documentation/customize-survey-question-rendering-in-pdf-form#custom-rendering) used to render the element.\n *\n * - `options.controller`: [`DocController`](https://surveyjs.io/pdf-generator/documentation/api-reference/doccontroller)\\\n * An object that provides access to main PDF document properties (font, margins, page width and height) and allows you to modify them.\n *\n * - `options.repository`: `FlatRepository`\\\n * A repository with classes that render elements to PDF. Use its `create` method if you need to create a new instance of a rendering class.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/how-to-use-adorners-in-pdf-forms/ (linkStyle))\n */\n public onRenderPage: EventAsync<SurveyPDF, AdornersPageOptions> =\n new EventAsync<SurveyPDF, AdornersPageOptions>();\n\n public onDocControllerCreated: EventBase<SurveyPDF, { controller: DocController }> = new EventBase<SurveyPDF, {controller: DocController}>();\n\n public onRenderCheckItemAcroform: EventAsync<SurveyPDF, any> =\n new EventAsync<SurveyPDF, any>();\n\n public onRenderRadioGroupWrapAcroform: EventAsync<SurveyPDF, any> =\n new EventAsync<SurveyPDF, any>();\n\n public onRenderRadioItemAcroform: EventAsync<SurveyPDF, any> =\n new EventAsync<SurveyPDF, any>();\n\n public getUpdatedCheckItemAcroformOptions(options: any): void {\n this.onRenderCheckItemAcroform.fire(this, options);\n }\n public getUpdatedRadioGroupWrapOptions(options: any): void {\n this.onRenderRadioGroupWrapAcroform.fire(this, options);\n }\n public getUpdatedRadioItemAcroformOptions(options: any): void {\n this.onRenderRadioItemAcroform.fire(this, options);\n }\n private correctBricksPosition(controller: DocController, flats: IPdfBrick[][]) {\n if(controller.isRTL) {\n flats.forEach(flatsArr => {\n flatsArr.forEach(flat => {\n flat.translateX((xLeft: number, xRight: number) => {\n const shiftWidth = controller.paperWidth - xLeft - xRight;\n return { xLeft: xLeft + shiftWidth, xRight: xRight + shiftWidth };\n });\n });\n });\n }\n }\n protected async renderSurvey(controller: DocController): Promise<void> {\n this.visiblePages.forEach(page => page.onFirstRendering());\n const flats: IPdfBrick[][] = await FlatSurvey.generateFlats(this, controller);\n this.correctBricksPosition(controller, flats);\n const packs: IPdfBrick[][] = PagePacker.pack(flats, controller);\n await EventHandler.process_header_events(this, controller, packs);\n for (let i: number = 0; i < packs.length; i++) {\n for (let j: number = 0; j < packs[i].length; j++) {\n if (controller.getNumberOfPages() === i) {\n controller.addPage();\n }\n controller.setPage(i);\n //gizmos bricks borders for debug\n // packs[i][j].unfold().forEach((rect: IPdfBrick) => {\n // controller.doc.setDrawColor('green');\n // controller.doc.rect(...SurveyHelper.createAcroformRect(rect));\n // controller.doc.setDrawColor('black');\n // }\n // );\n await packs[i][j].render();\n }\n }\n }\n /**\n * An asynchronous method that starts to download the generated PDF file in the web browser.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/save-completed-forms-as-pdf-files/ (linkStyle))\n * @param fileName *(Optional)* A file name with the \".pdf\" extension. Default value: `\"survey_result.pdf\"`.\n */\n public async save(fileName: string = 'survey_result.pdf'): Promise<any> {\n if(!SurveyPDF.currentlySaving) {\n const controller: DocController = new DocController(this.options);\n this.onDocControllerCreated.fire(this, { controller: controller });\n SurveyPDF.currentlySaving = true;\n SurveyHelper.fixFont(controller);\n await this.renderSurvey(controller);\n const promise = controller.doc.save(fileName, { returnPromise: true });\n promise.then(() => {\n SurveyPDF.currentlySaving = false;\n const saveFunc = SurveyPDF.saveQueue.shift();\n if(!!saveFunc) {\n saveFunc();\n }\n });\n return promise;\n } else {\n SurveyPDF.saveQueue.push(() => {\n this.save(fileName);\n });\n }\n }\n /**\n * An asynchronous method that allows you to get PDF content in different formats.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/convert-pdf-form-blob-base64-raw-pdf-javascript/ (linkStyle))\n *\n * @param type *(Optional)* One of `\"blob\"`, `\"bloburl\"`, `\"dataurlstring\"`. Do not specify this parameter if you want to get raw PDF content as a string value.\n *\n */\n raw(): Promise<string>;\n raw(type: 'arraybuffer'): Promise<ArrayBuffer>;\n raw(type: 'blob'): Promise<Blob>;\n raw(type: 'bloburl'): Promise<URL>;\n raw(type: 'dataurlstring'): Promise<string>;\n public async raw(type?: string): Promise<ArrayBuffer | string | Blob | URL > {\n const controller: DocController = new DocController(this.options);\n this.onDocControllerCreated.fire(this, { controller: controller });\n SurveyHelper.fixFont(controller);\n await this.renderSurvey(controller);\n return controller.doc.output(type);\n }\n}","module.exports = __WEBPACK_EXTERNAL_MODULE_jspdf__;","module.exports = __WEBPACK_EXTERNAL_MODULE_survey_core__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/entries/pdf.ts\");\n",""],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"survey.pdf.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;ACVa;AACb;AACA;AACA;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,0DAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,yBAAyB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gCAAgC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA,kFAAkF;AAClF;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,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,mCAAmC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,kCAAkC,kCAAkC;AACpE;AACA;AACA,kCAAkC,kCAAkC;AACpE;AACA;AACA,8DAA8D,gBAAgB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;AACf;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,sCAAsC;AACtC;AACA,2BAA2B;AAC3B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;;AAEA,oCAAoC;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC,sBAAsB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B;AAC9B,kBAAkB;AAClB;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA,qDAAqD,0DAA0D;AAC/G,qDAAqD,0DAA0D;AAC/G,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,wCAAwC,+CAA+C;;AAEvF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,0DAA0D;AAClG;;AAEA,2CAA2C,mCAAmC;;AAE9E;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sFAAsF;;AAEtF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,sDAAsD;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yCAAyC;AACzF,0BAA0B;AAC1B;AACA;AACA,gDAAgD,uCAAuC;AACvF,0BAA0B;AAC1B,gDAAgD,wBAAwB;AACxE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA,qIAAqI;AACrI;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,gGAAgG;AAChG;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,sGAAsG;AACtG;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gGAAgG;AAChG;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,uDAAuD;AACvD;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,0JAA0J;AAC1J;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;;AAGT;AACA,0FAA0F;AAC1F;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA,0FAA0F;AAC1F;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gEAAgE;AAChE;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA,8RAA8R;AAC9R;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;;AAET;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;;;AAGjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd,gBAAgB;AAChB;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;;AAEA;AACA,kCAAkC;AAClC,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE,wCAAK,qDAAqD,qBAAM,oBAAoB,qBAAM,G;;;;;;;;;;;;;;;AC72F9E,SAAS,kBAAkB,CAAC,GAAQ;IAC/C,IAAM,sBAAsB,GAAa,GAAG,CAAC,kBAAkB,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC;IAC7F,G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;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF;;AAEpF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;;;AAGR;;AAEA,kBAAkB,uBAAuB;AACzC;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;;AAEA;AACA;;AAEA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B;;AAE7B,6DAA6D;;AAE7D;AACA;AACA,yCAAyC;;AAEzC,mEAAmE;AACnE;;;AAGA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA;AACA,4EAA4E;;AAE5E;AACA;AACA;AACA,wHAAwH;AACxH;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,iBAAiB,yLAAyL;AAC1M;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA,iBAAiB,gFAAgF;;AAEjG,kGAAkG;;AAElG;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,gBAAgB;AAChB;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,6DAA6D;AAC7D,iBAAiB;AACjB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;;AAGA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;;AAGd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,8CAA8C;;AAE9C,yDAAyD;;AAEzD;AACA,6EAA6E;;AAE7E,wCAAwC;;AAExC;AACA,2DAA2D;;AAE3D;;AAEA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA,cAAc;;;AAGd;AACA;AACA;AACA,YAAY;;;AAGZ,+DAA+D;;;AAG/D,2DAA2D;;AAE3D;AACA,WAAW;;;AAGX;;AAEA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA,UAAU;;;AAGV,gFAAgF;;AAEhF,wBAAwB;;AAExB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0DAA0D,kCAAkC,kDAAkD,0BAA0B,yBAAyB,4BAA4B,4BAA4B,cAAc,iBAAiB,sBAAsB;AAC9S;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;AACf;AACA;;AAEA;AACA;;AAEA,gEAAgE;;;AAGhE;AACA;AACA,0DAA0D;AAC1D,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;;AAGA;AACA;AACA;;AAEA;AACA,wBAAwB,gCAAgC;AACxD;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,QAAQ;;;AAGR;AACA,wBAAwB,kBAAkB;AAC1C,oIAAoI;;AAEpI;AACA;AACA;;AAEA;;AAEA;AACA,mDAAmD;AACnD,YAAY;AACZ,uDAAuD;AACvD,YAAY;AACZ;AACA,kEAAkE;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4LAA4L;;AAE5L;AACA;AACA;;AAEA,mFAAmF;;AAEnF;;AAEA;AACA;AACA;AACA,QAAQ;;;AAGR;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA,4HAA4H;;AAE5H;AACA;AACA;AACA,OAAO;;;AAGP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kDAAkD,EAAE;AACpD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA,gCAAgC;AAChC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sIAAsI;;AAEtI;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;;;AAGV;AACA,8BAA8B;;AAE9B;AACA;AACA;AACA;AACA;;AAEA,wFAAwF;;AAExF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA,gCAAgC;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,GAAG;;AAEd,8FAA8F;;AAE9F;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe;AACnC,iBAAiB,QAAQ;AACzB,iBAAiB,QAAQ;AACzB,wBAAwB,QAAQ;AAChC,iBAAiB,QAAQ;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EAAE,wCAAK;;;;;;;;;;;;;;;;;;ACpsCoC;AAGE;AAShD;IAAA;IA0EA,CAAC;IAzEkB,0BAAe,GAA9B,UAA+B,IAAgC,EAC3D,KAAa,EAAE,MAAc,EAAE,OAAmB;QAClD,IAAM,SAAS,GAAmB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM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CtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC,I;;;;;WCPD,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;UENA;UACA;UACA;UACA","sources":["webpack://SurveyPDF/webpack/universalModuleDefinition","webpack://SurveyPDF/./node_modules/node-interval-tree/lib/index.js","webpack://SurveyPDF/./node_modules/shallowequal/index.js","webpack://SurveyPDF/./src/doc_controller.ts","webpack://SurveyPDF/./src/entries/helpers.ts","webpack://SurveyPDF/./src/entries/pdf.ts","webpack://SurveyPDF/./src/event_handler/adorners.ts","webpack://SurveyPDF/./src/event_handler/draw_canvas.ts","webpack://SurveyPDF/./src/event_handler/event_handler.ts","webpack://SurveyPDF/./src/flat_layout/flat_boolean.ts","webpack://SurveyPDF/./src/flat_layout/flat_checkbox.ts","webpack://SurveyPDF/./src/flat_layout/flat_comment.ts","webpack://SurveyPDF/./src/flat_layout/flat_custom_model.ts","webpack://SurveyPDF/./src/flat_layout/flat_default.ts","webpack://SurveyPDF/./src/flat_layout/flat_dropdown.ts","webpack://SurveyPDF/./src/flat_layout/flat_expression.ts","webpack://SurveyPDF/./src/flat_layout/flat_file.ts","webpack://SurveyPDF/./src/flat_layout/flat_html.ts","webpack://SurveyPDF/./src/flat_layout/flat_image.ts","webpack://SurveyPDF/./src/flat_layout/flat_imagepicker.ts","webpack://SurveyPDF/./src/flat_layout/flat_matrix.ts","webpack://SurveyPDF/./src/flat_layout/flat_matrixdynamic.ts","webpack://SurveyPDF/./src/flat_layout/flat_matrixmultiple.ts","webpack://SurveyPDF/./src/flat_layout/flat_multipletext.ts","webpack://SurveyPDF/./src/flat_layout/flat_paneldynamic.ts","webpack://SurveyPDF/./src/flat_layout/flat_question.ts","webpack://SurveyPDF/./src/flat_layout/flat_radiogroup.ts","webpack://SurveyPDF/./src/flat_layout/flat_ranking.ts","webpack://SurveyPDF/./src/flat_layout/flat_rating.ts","webpack://SurveyPDF/./src/flat_layout/flat_repository.ts","webpack://SurveyPDF/./src/flat_layout/flat_selectbase.ts","webpack://SurveyPDF/./src/flat_layout/flat_signaturepad.ts","webpack://SurveyPDF/./src/flat_layout/flat_slider.ts","webpack://SurveyPDF/./src/flat_layout/flat_survey.ts","webpack://SurveyPDF/./src/flat_layout/flat_textbox.ts","webpack://SurveyPDF/./src/helper_survey.ts","webpack://SurveyPDF/./src/jspdf_plugins/acroform.js","webpack://SurveyPDF/./src/jspdf_plugins/acroform_radio.ts","webpack://SurveyPDF/./src/jspdf_plugins/from_html.js","webpack://SurveyPDF/./src/page_layout/page_packer.ts","webpack://SurveyPDF/./src/pdf_render/pdf_booleanitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_brick.ts","webpack://SurveyPDF/./src/pdf_render/pdf_checkboxitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_checkitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_coloredbrick.ts","webpack://SurveyPDF/./src/pdf_render/pdf_composite.ts","webpack://SurveyPDF/./src/pdf_render/pdf_custom.ts","webpack://SurveyPDF/./src/pdf_render/pdf_description.ts","webpack://SurveyPDF/./src/pdf_render/pdf_dropdown.ts","webpack://SurveyPDF/./src/pdf_render/pdf_empty.ts","webpack://SurveyPDF/./src/pdf_render/pdf_html.ts","webpack://SurveyPDF/./src/pdf_render/pdf_image.ts","webpack://SurveyPDF/./src/pdf_render/pdf_link.ts","webpack://SurveyPDF/./src/pdf_render/pdf_radioitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_rankingitem.ts","webpack://SurveyPDF/./src/pdf_render/pdf_rowline.ts","webpack://SurveyPDF/./src/pdf_render/pdf_text.ts","webpack://SurveyPDF/./src/pdf_render/pdf_textbold.ts","webpack://SurveyPDF/./src/pdf_render/pdf_textfield.ts","webpack://SurveyPDF/./src/pdf_render/pdf_titlepanel.ts","webpack://SurveyPDF/./src/survey.ts","webpack://SurveyPDF/external umd {\"root\":\"jspdf\",\"commonjs2\":\"jspdf\",\"commonjs\":\"jspdf\",\"amd\":\"jspdf\"}","webpack://SurveyPDF/external umd {\"root\":\"Survey\",\"commonjs2\":\"survey-core\",\"commonjs\":\"survey-core\",\"amd\":\"survey-core\"}","webpack://SurveyPDF/webpack/bootstrap","webpack://SurveyPDF/webpack/runtime/compat get default export","webpack://SurveyPDF/webpack/runtime/define property getters","webpack://SurveyPDF/webpack/runtime/global","webpack://SurveyPDF/webpack/runtime/hasOwnProperty shorthand","webpack://SurveyPDF/webpack/runtime/make namespace object","webpack://SurveyPDF/webpack/before-startup","webpack://SurveyPDF/webpack/startup","webpack://SurveyPDF/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"survey-core\"), require(\"jspdf\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"SurveyPDF\", [\"survey-core\", \"jspdf\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"SurveyPDF\"] = factory(require(\"survey-core\"), require(\"jspdf\"));\n\telse\n\t\troot[\"SurveyPDF\"] = factory(root[\"Survey\"], root[\"jspdf\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE_survey_core__, __WEBPACK_EXTERNAL_MODULE_jspdf__) => {\nreturn ","\"use strict\";\r\n// An augmented AVL Tree where each node maintains a list of records and their search intervals.\r\n// Record is composed of an interval and its underlying data, sent by a client. This allows the\r\n// interval tree to have the same interval inserted multiple times, as long its data is different.\r\n// Both insertion and deletion require O(log n) time. Searching requires O(k*logn) time, where `k`\r\n// is the number of intervals in the output list.\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar isSame = require(\"shallowequal\");\r\nfunction height(node) {\r\n if (node === undefined) {\r\n return -1;\r\n }\r\n else {\r\n return node.height;\r\n }\r\n}\r\nvar Node = /** @class */ (function () {\r\n function Node(intervalTree, record) {\r\n this.intervalTree = intervalTree;\r\n this.records = [];\r\n this.height = 0;\r\n this.key = record.low;\r\n this.max = record.high;\r\n // Save the array of all records with the same key for this node\r\n this.records.push(record);\r\n }\r\n // Gets the highest record.high value for this node\r\n Node.prototype.getNodeHigh = function () {\r\n var high = this.records[0].high;\r\n for (var i = 1; i < this.records.length; i++) {\r\n if (this.records[i].high > high) {\r\n high = this.records[i].high;\r\n }\r\n }\r\n return high;\r\n };\r\n // Updates height value of the node. Called during insertion, rebalance, removal\r\n Node.prototype.updateHeight = function () {\r\n this.height = Math.max(height(this.left), height(this.right)) + 1;\r\n };\r\n // Updates the max value of all the parents after inserting into already existing node, as well as\r\n // removing the node completely or removing the record of an already existing node. Starts with\r\n // the parent of an affected node and bubbles up to root\r\n Node.prototype.updateMaxOfParents = function () {\r\n if (this === undefined) {\r\n return;\r\n }\r\n var thisHigh = this.getNodeHigh();\r\n if (this.left !== undefined && this.right !== undefined) {\r\n this.max = Math.max(Math.max(this.left.max, this.right.max), thisHigh);\r\n }\r\n else if (this.left !== undefined && this.right === undefined) {\r\n this.max = Math.max(this.left.max, thisHigh);\r\n }\r\n else if (this.left === undefined && this.right !== undefined) {\r\n this.max = Math.max(this.right.max, thisHigh);\r\n }\r\n else {\r\n this.max = thisHigh;\r\n }\r\n if (this.parent) {\r\n this.parent.updateMaxOfParents();\r\n }\r\n };\r\n /*\r\n Left-Left case:\r\n \r\n z y\r\n / \\ / \\\r\n y T4 Right Rotate (z) x z\r\n / \\ - - - - - - - - -> / \\ / \\\r\n x T3 T1 T2 T3 T4\r\n / \\\r\n T1 T2\r\n \r\n Left-Right case:\r\n \r\n z z x\r\n / \\ / \\ / \\\r\n y T4 Left Rotate (y) x T4 Right Rotate(z) y z\r\n / \\ - - - - - - - - -> / \\ - - - - - - - -> / \\ / \\\r\n T1 x y T3 T1 T2 T3 T4\r\n / \\ / \\\r\n T2 T3 T1 T2\r\n */\r\n // Handles Left-Left case and Left-Right case after rebalancing AVL tree\r\n Node.prototype._updateMaxAfterRightRotate = function () {\r\n var parent = this.parent;\r\n var left = parent.left;\r\n // Update max of left sibling (x in first case, y in second)\r\n var thisParentLeftHigh = left.getNodeHigh();\r\n if (left.left === undefined && left.right !== undefined) {\r\n left.max = Math.max(thisParentLeftHigh, left.right.max);\r\n }\r\n else if (left.left !== undefined && left.right === undefined) {\r\n left.max = Math.max(thisParentLeftHigh, left.left.max);\r\n }\r\n else if (left.left === undefined && left.right === undefined) {\r\n left.max = thisParentLeftHigh;\r\n }\r\n else {\r\n left.max = Math.max(Math.max(left.left.max, left.right.max), thisParentLeftHigh);\r\n }\r\n // Update max of itself (z)\r\n var thisHigh = this.getNodeHigh();\r\n if (this.left === undefined && this.right !== undefined) {\r\n this.max = Math.max(thisHigh, this.right.max);\r\n }\r\n else if (this.left !== undefined && this.right === undefined) {\r\n this.max = Math.max(thisHigh, this.left.max);\r\n }\r\n else if (this.left === undefined && this.right === undefined) {\r\n this.max = thisHigh;\r\n }\r\n else {\r\n this.max = Math.max(Math.max(this.left.max, this.right.max), thisHigh);\r\n }\r\n // Update max of parent (y in first case, x in second)\r\n parent.max = Math.max(Math.max(parent.left.max, parent.right.max), parent.getNodeHigh());\r\n };\r\n /*\r\n Right-Right case:\r\n \r\n z y\r\n / \\ / \\\r\n T1 y Left Rotate(z) z x\r\n / \\ - - - - - - - -> / \\ / \\\r\n T2 x T1 T2 T3 T4\r\n / \\\r\n T3 T4\r\n \r\n Right-Left case:\r\n \r\n z z x\r\n / \\ / \\ / \\\r\n T1 y Right Rotate (y) T1 x Left Rotate(z) z y\r\n / \\ - - - - - - - - -> / \\ - - - - - - - -> / \\ / \\\r\n x T4 T2 y T1 T2 T3 T4\r\n / \\ / \\\r\n T2 T3 T3 T4\r\n */\r\n // Handles Right-Right case and Right-Left case in rebalancing AVL tree\r\n Node.prototype._updateMaxAfterLeftRotate = function () {\r\n var parent = this.parent;\r\n var right = parent.right;\r\n // Update max of right sibling (x in first case, y in second)\r\n var thisParentRightHigh = right.getNodeHigh();\r\n if (right.left === undefined && right.right !== undefined) {\r\n right.max = Math.max(thisParentRightHigh, right.right.max);\r\n }\r\n else if (right.left !== undefined && right.right === undefined) {\r\n right.max = Math.max(thisParentRightHigh, right.left.max);\r\n }\r\n else if (right.left === undefined && right.right === undefined) {\r\n right.max = thisParentRightHigh;\r\n }\r\n else {\r\n right.max = Math.max(Math.max(right.left.max, right.right.max), thisParentRightHigh);\r\n }\r\n // Update max of itself (z)\r\n var thisHigh = this.getNodeHigh();\r\n if (this.left === undefined && this.right !== undefined) {\r\n this.max = Math.max(thisHigh, this.right.max);\r\n }\r\n else if (this.left !== undefined && this.right === undefined) {\r\n this.max = Math.max(thisHigh, this.left.max);\r\n }\r\n else if (this.left === undefined && this.right === undefined) {\r\n this.max = thisHigh;\r\n }\r\n else {\r\n this.max = Math.max(Math.max(this.left.max, this.right.max), thisHigh);\r\n }\r\n // Update max of parent (y in first case, x in second)\r\n parent.max = Math.max(Math.max(parent.left.max, right.max), parent.getNodeHigh());\r\n };\r\n Node.prototype._leftRotate = function () {\r\n var rightChild = this.right;\r\n rightChild.parent = this.parent;\r\n if (rightChild.parent === undefined) {\r\n this.intervalTree.root = rightChild;\r\n }\r\n else {\r\n if (rightChild.parent.left === this) {\r\n rightChild.parent.left = rightChild;\r\n }\r\n else if (rightChild.parent.right === this) {\r\n rightChild.parent.right = rightChild;\r\n }\r\n }\r\n this.right = rightChild.left;\r\n if (this.right !== undefined) {\r\n this.right.parent = this;\r\n }\r\n rightChild.left = this;\r\n this.parent = rightChild;\r\n this.updateHeight();\r\n rightChild.updateHeight();\r\n };\r\n Node.prototype._rightRotate = function () {\r\n var leftChild = this.left;\r\n leftChild.parent = this.parent;\r\n if (leftChild.parent === undefined) {\r\n this.intervalTree.root = leftChild;\r\n }\r\n else {\r\n if (leftChild.parent.left === this) {\r\n leftChild.parent.left = leftChild;\r\n }\r\n else if (leftChild.parent.right === this) {\r\n leftChild.parent.right = leftChild;\r\n }\r\n }\r\n this.left = leftChild.right;\r\n if (this.left !== undefined) {\r\n this.left.parent = this;\r\n }\r\n leftChild.right = this;\r\n this.parent = leftChild;\r\n this.updateHeight();\r\n leftChild.updateHeight();\r\n };\r\n // Rebalances the tree if the height value between two nodes of the same parent is greater than\r\n // two. There are 4 cases that can happen which are outlined in the graphics above\r\n Node.prototype._rebalance = function () {\r\n if (height(this.left) >= 2 + height(this.right)) {\r\n var left = this.left;\r\n if (height(left.left) >= height(left.right)) {\r\n // Left-Left case\r\n this._rightRotate();\r\n this._updateMaxAfterRightRotate();\r\n }\r\n else {\r\n // Left-Right case\r\n left._leftRotate();\r\n this._rightRotate();\r\n this._updateMaxAfterRightRotate();\r\n }\r\n }\r\n else if (height(this.right) >= 2 + height(this.left)) {\r\n var right = this.right;\r\n if (height(right.right) >= height(right.left)) {\r\n // Right-Right case\r\n this._leftRotate();\r\n this._updateMaxAfterLeftRotate();\r\n }\r\n else {\r\n // Right-Left case\r\n right._rightRotate();\r\n this._leftRotate();\r\n this._updateMaxAfterLeftRotate();\r\n }\r\n }\r\n };\r\n Node.prototype.insert = function (record) {\r\n if (record.low < this.key) {\r\n // Insert into left subtree\r\n if (this.left === undefined) {\r\n this.left = new Node(this.intervalTree, record);\r\n this.left.parent = this;\r\n }\r\n else {\r\n this.left.insert(record);\r\n }\r\n }\r\n else {\r\n // Insert into right subtree\r\n if (this.right === undefined) {\r\n this.right = new Node(this.intervalTree, record);\r\n this.right.parent = this;\r\n }\r\n else {\r\n this.right.insert(record);\r\n }\r\n }\r\n // Update the max value of this ancestor if needed\r\n if (this.max < record.high) {\r\n this.max = record.high;\r\n }\r\n // Update height of each node\r\n this.updateHeight();\r\n // Rebalance the tree to ensure all operations are executed in O(logn) time. This is especially\r\n // important in searching, as the tree has a high chance of degenerating without the rebalancing\r\n this._rebalance();\r\n };\r\n Node.prototype._getOverlappingRecords = function (currentNode, low, high) {\r\n if (currentNode.key <= high && low <= currentNode.getNodeHigh()) {\r\n // Nodes are overlapping, check if individual records in the node are overlapping\r\n var tempResults = [];\r\n for (var i = 0; i < currentNode.records.length; i++) {\r\n if (currentNode.records[i].high >= low) {\r\n tempResults.push(currentNode.records[i]);\r\n }\r\n }\r\n return tempResults;\r\n }\r\n return [];\r\n };\r\n Node.prototype.search = function (low, high) {\r\n // Don't search nodes that don't exist\r\n if (this === undefined) {\r\n return [];\r\n }\r\n var leftSearch = [];\r\n var ownSearch = [];\r\n var rightSearch = [];\r\n // If interval is to the right of the rightmost point of any interval in this node and all its\r\n // children, there won't be any matches\r\n if (low > this.max) {\r\n return [];\r\n }\r\n // Search left children\r\n if (this.left !== undefined && this.left.max >= low) {\r\n leftSearch = this.left.search(low, high);\r\n }\r\n // Check this node\r\n ownSearch = this._getOverlappingRecords(this, low, high);\r\n // If interval is to the left of the start of this interval, then it can't be in any child to\r\n // the right\r\n if (high < this.key) {\r\n return leftSearch.concat(ownSearch);\r\n }\r\n // Otherwise, search right children\r\n if (this.right !== undefined) {\r\n rightSearch = this.right.search(low, high);\r\n }\r\n // Return accumulated results, if any\r\n return leftSearch.concat(ownSearch, rightSearch);\r\n };\r\n // Searches for a node by a `key` value\r\n Node.prototype.searchExisting = function (low) {\r\n if (this === undefined) {\r\n return undefined;\r\n }\r\n if (this.key === low) {\r\n return this;\r\n }\r\n else if (low < this.key) {\r\n if (this.left !== undefined) {\r\n return this.left.searchExisting(low);\r\n }\r\n }\r\n else {\r\n if (this.right !== undefined) {\r\n return this.right.searchExisting(low);\r\n }\r\n }\r\n return undefined;\r\n };\r\n // Returns the smallest node of the subtree\r\n Node.prototype._minValue = function () {\r\n if (this.left === undefined) {\r\n return this;\r\n }\r\n else {\r\n return this.left._minValue();\r\n }\r\n };\r\n Node.prototype.remove = function (node) {\r\n var parent = this.parent;\r\n if (node.key < this.key) {\r\n // Node to be removed is on the left side\r\n if (this.left !== undefined) {\r\n return this.left.remove(node);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n else if (node.key > this.key) {\r\n // Node to be removed is on the right side\r\n if (this.right !== undefined) {\r\n return this.right.remove(node);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n else {\r\n if (this.left !== undefined && this.right !== undefined) {\r\n // Node has two children\r\n var minValue = this.right._minValue();\r\n this.key = minValue.key;\r\n this.records = minValue.records;\r\n return this.right.remove(this);\r\n }\r\n else if (parent.left === this) {\r\n // One child or no child case on left side\r\n if (this.right !== undefined) {\r\n parent.left = this.right;\r\n this.right.parent = parent;\r\n }\r\n else {\r\n parent.left = this.left;\r\n if (this.left !== undefined) {\r\n this.left.parent = parent;\r\n }\r\n }\r\n parent.updateMaxOfParents();\r\n parent.updateHeight();\r\n parent._rebalance();\r\n return this;\r\n }\r\n else if (parent.right === this) {\r\n // One child or no child case on right side\r\n if (this.right !== undefined) {\r\n parent.right = this.right;\r\n this.right.parent = parent;\r\n }\r\n else {\r\n parent.right = this.left;\r\n if (this.left !== undefined) {\r\n this.left.parent = parent;\r\n }\r\n }\r\n parent.updateMaxOfParents();\r\n parent.updateHeight();\r\n parent._rebalance();\r\n return this;\r\n }\r\n }\r\n };\r\n return Node;\r\n}());\r\nexports.Node = Node;\r\nvar IntervalTree = /** @class */ (function () {\r\n function IntervalTree() {\r\n this.count = 0;\r\n }\r\n IntervalTree.prototype.insert = function (record) {\r\n if (record.low > record.high) {\r\n throw new Error('`low` value must be lower or equal to `high` value');\r\n }\r\n if (this.root === undefined) {\r\n // Base case: Tree is empty, new node becomes root\r\n this.root = new Node(this, record);\r\n this.count++;\r\n return true;\r\n }\r\n else {\r\n // Otherwise, check if node already exists with the same key\r\n var node = this.root.searchExisting(record.low);\r\n if (node !== undefined) {\r\n // Check the records in this node if there already is the one with same low, high, data\r\n for (var i = 0; i < node.records.length; i++) {\r\n if (isSame(node.records[i], record)) {\r\n // This record is same as the one we're trying to insert; return false to indicate\r\n // nothing has been inserted\r\n return false;\r\n }\r\n }\r\n // Add the record to the node\r\n node.records.push(record);\r\n // Update max of the node and its parents if necessary\r\n if (record.high > node.max) {\r\n node.max = record.high;\r\n if (node.parent) {\r\n node.parent.updateMaxOfParents();\r\n }\r\n }\r\n this.count++;\r\n return true;\r\n }\r\n else {\r\n // Node with this key doesn't already exist. Call insert function on root's node\r\n this.root.insert(record);\r\n this.count++;\r\n return true;\r\n }\r\n }\r\n };\r\n IntervalTree.prototype.search = function (low, high) {\r\n if (this.root === undefined) {\r\n // Tree is empty; return empty array\r\n return [];\r\n }\r\n else {\r\n return this.root.search(low, high);\r\n }\r\n };\r\n IntervalTree.prototype.remove = function (record) {\r\n if (this.root === undefined) {\r\n // Tree is empty; nothing to remove\r\n return false;\r\n }\r\n else {\r\n var node = this.root.searchExisting(record.low);\r\n if (node === undefined) {\r\n return false;\r\n }\r\n else if (node.records.length > 1) {\r\n var removedRecord = void 0;\r\n // Node with this key has 2 or more records. Find the one we need and remove it\r\n for (var i = 0; i < node.records.length; i++) {\r\n if (isSame(node.records[i], record)) {\r\n removedRecord = node.records[i];\r\n node.records.splice(i, 1);\r\n break;\r\n }\r\n }\r\n if (removedRecord) {\r\n removedRecord = undefined;\r\n // Update max of that node and its parents if necessary\r\n if (record.high === node.max) {\r\n var nodeHigh = node.getNodeHigh();\r\n if (node.left !== undefined && node.right !== undefined) {\r\n node.max = Math.max(Math.max(node.left.max, node.right.max), nodeHigh);\r\n }\r\n else if (node.left !== undefined && node.right === undefined) {\r\n node.max = Math.max(node.left.max, nodeHigh);\r\n }\r\n else if (node.left === undefined && node.right !== undefined) {\r\n node.max = Math.max(node.right.max, nodeHigh);\r\n }\r\n else {\r\n node.max = nodeHigh;\r\n }\r\n if (node.parent) {\r\n node.parent.updateMaxOfParents();\r\n }\r\n }\r\n this.count--;\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else if (node.records.length === 1) {\r\n // Node with this key has only 1 record. Check if the remaining record in this node is\r\n // actually the one we want to remove\r\n if (isSame(node.records[0], record)) {\r\n // The remaining record is the one we want to remove. Remove the whole node from the tree\r\n if (this.root.key === node.key) {\r\n // We're removing the root element. Create a dummy node that will temporarily take\r\n // root's parent role\r\n var rootParent = new Node(this, { low: record.low, high: record.low });\r\n rootParent.left = this.root;\r\n this.root.parent = rootParent;\r\n var removedNode = this.root.remove(node);\r\n this.root = rootParent.left;\r\n if (this.root !== undefined) {\r\n this.root.parent = undefined;\r\n }\r\n if (removedNode) {\r\n removedNode = undefined;\r\n this.count--;\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else {\r\n var removedNode = this.root.remove(node);\r\n if (removedNode) {\r\n removedNode = undefined;\r\n this.count--;\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n else {\r\n // The remaining record is not the one we want to remove\r\n return false;\r\n }\r\n }\r\n else {\r\n // No records at all in this node?! Shouldn't happen\r\n return false;\r\n }\r\n }\r\n };\r\n IntervalTree.prototype.inOrder = function () {\r\n return new InOrder(this.root);\r\n };\r\n IntervalTree.prototype.preOrder = function () {\r\n return new PreOrder(this.root);\r\n };\r\n return IntervalTree;\r\n}());\r\nexports.IntervalTree = IntervalTree;\r\nvar DataIntervalTree = /** @class */ (function () {\r\n function DataIntervalTree() {\r\n this.tree = new IntervalTree();\r\n }\r\n DataIntervalTree.prototype.insert = function (low, high, data) {\r\n return this.tree.insert({ low: low, high: high, data: data });\r\n };\r\n DataIntervalTree.prototype.remove = function (low, high, data) {\r\n return this.tree.remove({ low: low, high: high, data: data });\r\n };\r\n DataIntervalTree.prototype.search = function (low, high) {\r\n return this.tree.search(low, high).map(function (v) { return v.data; });\r\n };\r\n DataIntervalTree.prototype.inOrder = function () {\r\n return this.tree.inOrder();\r\n };\r\n DataIntervalTree.prototype.preOrder = function () {\r\n return this.tree.preOrder();\r\n };\r\n Object.defineProperty(DataIntervalTree.prototype, \"count\", {\r\n get: function () {\r\n return this.tree.count;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DataIntervalTree;\r\n}());\r\nexports.default = DataIntervalTree;\r\nvar InOrder = /** @class */ (function () {\r\n function InOrder(startNode) {\r\n this.stack = [];\r\n if (startNode !== undefined) {\r\n this.push(startNode);\r\n }\r\n }\r\n InOrder.prototype.next = function () {\r\n // Will only happen if stack is empty and pop is called\r\n if (this.currentNode === undefined) {\r\n return {\r\n done: true,\r\n value: undefined,\r\n };\r\n }\r\n // Process this node\r\n if (this.i < this.currentNode.records.length) {\r\n return {\r\n done: false,\r\n value: this.currentNode.records[this.i++],\r\n };\r\n }\r\n if (this.currentNode.right !== undefined) {\r\n this.push(this.currentNode.right);\r\n }\r\n else {\r\n // Might pop the last and set this.currentNode = undefined\r\n this.pop();\r\n }\r\n return this.next();\r\n };\r\n InOrder.prototype.push = function (node) {\r\n this.currentNode = node;\r\n this.i = 0;\r\n while (this.currentNode.left !== undefined) {\r\n this.stack.push(this.currentNode);\r\n this.currentNode = this.currentNode.left;\r\n }\r\n };\r\n InOrder.prototype.pop = function () {\r\n this.currentNode = this.stack.pop();\r\n this.i = 0;\r\n };\r\n return InOrder;\r\n}());\r\nexports.InOrder = InOrder;\r\nif (typeof Symbol === 'function') {\r\n InOrder.prototype[Symbol.iterator] = function () { return this; };\r\n}\r\nvar PreOrder = /** @class */ (function () {\r\n function PreOrder(startNode) {\r\n this.stack = [];\r\n this.i = 0;\r\n this.currentNode = startNode;\r\n }\r\n PreOrder.prototype.next = function () {\r\n // Will only happen if stack is empty and pop is called,\r\n // which only happens if there is no right node (i.e we are done)\r\n if (this.currentNode === undefined) {\r\n return {\r\n done: true,\r\n value: undefined,\r\n };\r\n }\r\n // Process this node\r\n if (this.i < this.currentNode.records.length) {\r\n return {\r\n done: false,\r\n value: this.currentNode.records[this.i++],\r\n };\r\n }\r\n if (this.currentNode.right !== undefined) {\r\n this.push(this.currentNode.right);\r\n }\r\n if (this.currentNode.left !== undefined) {\r\n this.push(this.currentNode.left);\r\n }\r\n this.pop();\r\n return this.next();\r\n };\r\n PreOrder.prototype.push = function (node) {\r\n this.stack.push(node);\r\n };\r\n PreOrder.prototype.pop = function () {\r\n this.currentNode = this.stack.pop();\r\n this.i = 0;\r\n };\r\n return PreOrder;\r\n}());\r\nexports.PreOrder = PreOrder;\r\nif (typeof Symbol === 'function') {\r\n PreOrder.prototype[Symbol.iterator] = function () { return this; };\r\n}\r\n//# sourceMappingURL=index.js.map","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","import { jsPDF, jsPDFOptions } from 'jspdf';\nimport { IHTMLRenderType } from './flat_layout/flat_html';\nimport { SurveyHelper } from './helper_survey';\nimport { LocalizableString } from 'survey-core';\n// import Fonts from './fonts';\nimport setRadioAppearance from './jspdf_plugins/acroform_radio';\nimport './jspdf_plugins/acroform.js';\nimport './jspdf_plugins/from_html.js';\n\nexport interface IPoint {\n /**\n * An X-coordinate for the left element edge.\n */\n xLeft: number;\n /**\n * A Y-coordinate for the top element edge.\n */\n yTop: number;\n}\n/**\n * An interface that describes a rectangle.\n */\nexport interface IRect extends IPoint {\n /**\n * An X-coordinate for the right element edge.\n */\n xRight: number;\n /**\n * A Y-coordinate for the bottom element edge.\n */\n yBot: number;\n}\nexport interface ISize {\n width: number;\n height: number;\n}\nexport interface IMarginLR {\n /**\n * A left margin.\n */\n left?: number;\n /**\n * A right margin.\n */\n right?: number;\n}\n/**\n * An interface that describes margins.\n */\nexport interface IMargin extends IMarginLR {\n /**\n * A top margin.\n */\n top?: number;\n /**\n * A bottom margin.\n */\n bot?: number;\n}\n/**\n * PDF document configuration. Pass it as the second argument to the `SurveyPDF` constructor:\n *\n * ```js\n * const surveyPdf = new SurveyPDF.SurveyPDF(surveyJson, pdfDocOptions);\n *\n * // In modular applications:\n * import { SurveyPDF } from \"survey-pdf\";\n * const surveyPdf = new SurveyPDF(surveyJson, pdfDocOptions);\n * ```\n */\nexport interface IDocOptions {\n /**\n * Page orientation.\n *\n * Possible values:\n *\n * - `\"p\"` (default) - Portrait orientation.\n * - `\"l\"` - Landscape orientation.\n *\n * @see format\n */\n orientation?: 'p' | 'l';\n\n /**\n * Page format.\n *\n * Possible values:\n *\n * - `\"a0\"` - `\"a10\"` (`\"a4\"` is default)\n * - `\"b0\"` - `\"b10\"`\n * - `\"c0\"` - `\"c10\"`\n * - `\"dl\"`\n * - `\"letter\"`\n * - `\"government-letter\"`\n * - `\"legal\"`\n * - `\"junior-legal\"`\n * - `\"ledger\"`\n * - `\"tabloid\"`\n * - `\"credit-card\"`\n * - `[width, height]` - Custom page size in millimeters, for example, `[210, 297]`.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/save-completed-forms-as-pdf-files/ (linkStyle))\n * @see orientation\n */\n format?: string | number[];\n\n /**\n * Font size in points.\n *\n * Default value: 14\n *\n * @see fontName\n */\n fontSize?: number;\n\n /**\n * Font name.\n *\n * Possible values:\n *\n * - `\"Helvetica\"` (default)\n * - `\"Courier\"`\n * - `\"Times\"`\n * - `\"Symbol\"`\n * - `\"ZapfDingbats\"`\n * - [Custom font name](https://surveyjs.io/pdf-generator/documentation/customize-pdf-form-settings#custom-fonts)\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/change-font-in-pdf-form/ (linkStyle))\n * @see fontSize\n */\n fontName?: string;\n\n base64Normal?: string;\n base64Bold?: string;\n /**\n * Specifies whether to apply a custom font to [HTML questions](https://surveyjs.io/form-library/examples/questiontype-html/).\n *\n * Default value: `false`\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/change-font-in-pdf-form/ (linkStyle))\n * @see htmlRenderAs\n */\n useCustomFontInHtml?: boolean;\n\n /**\n * Page margins.\n *\n * Set this property to an object with the following fields: `top`, `bot`, `left`, `right`.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/save-completed-forms-as-pdf-files/ (linkStyle))\n */\n margins?: IMargin;\n\n /**\n * Specifies how to render [HTML questions](https://surveyjs.io/Documentation/Library?id=questionhtmlmodel) into PDF.\n *\n * Possible values:\n *\n * - `\"standard\"` - Render HTML questions as selectable text.\n * - `\"image\"` - Render HTML questions as images.\n * - `\"auto\"` (default) - Select between the `\"standard\"` and `\"image\"` modes automatically based on the HTML content.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/split-html-image-across-pages/ (linkStyle))\n *\n * You can override this property for an individual HTML question. Set the question's `renderAs` property to `\"standard\"` or `\"image\"` in the survey JSON schema.\n * @see useCustomFontInHtml\n */\n htmlRenderAs?: IHTMLRenderType;\n\n /**\n * Specifies how to render [Matrix](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel), [Matrix Dropdown](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel), and [Matrix Dynamic](https://surveyjs.io/Documentation/Library?id=questionmatrixdynamicmodel) questions into PDF.\n *\n * Possible values:\n *\n * - `\"list\"` - Render matrix-like questions as lists.\n * - `\"auto\"` (default) - Render matrix-like questions as tables if they fit into the available space. Otherwise, render the questions as lists.\n *\n * You can override this property for an individual matrix-like question. Set the question's `renderAs` property to `\"list\"` in the survey JSON schema.\n */\n matrixRenderAs?: 'auto' | 'list';\n useLegacyBooleanRendering?: boolean;\n /**\n * Specifies how to render read-only questions.\n *\n * Possible values:\n *\n * - `\"text\"` - Render read-only questions as plain text and custom primitives.\n * - `\"acroform\"` - Use Adobe AcroForms to render questions that support them as interactive form elements switched to their native read-only state. Other questions are rendered in `\"text\"` mode.\n * - `\"auto\"` (default) - Prefer the `\"text\"` mode but use `\"acroform\"` for [File Upload](https://surveyjs.io/form-library/documentation/api-reference/file-model) questions and links.\n */\n readonlyRenderAs?: 'auto' | 'text' | 'acroform';\n\n textFieldRenderAs?: 'singleLine' | 'multiLine';\n\n /**\n * Specifies whether to compress the PDF document. Compressed documents do not support [custom fonts](https://surveyjs.io/Documentation/Pdf-Export?id=Customization-ChangeFonts#use-custom-font).\n *\n * Default value: `false`\n */\n compress?: boolean;\n\n /**\n * Specifies whether to apply `imageFit` settings specified in the survey JSON schema to exported images.\n *\n * Default value: `false`\n *\n * This property applies the following settings:\n *\n * - [`imageFit`](https://surveyjs.io/form-library/documentation/api-reference/add-image-to-survey#imageFit) to exported [Image](https://surveyjs.io/form-library/documentation/api-reference/add-image-to-survey) questions\n * - [`imageFit`](https://surveyjs.io/form-library/documentation/api-reference/image-picker-question-model#imageFit) to exported [Image Picker](https://surveyjs.io/form-library/documentation/api-reference/image-picker-question-model) questions\n * - [`logoFit`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#logoFit) to an exported logo in the survey header\n *\n * If you enable the `applyImageFit` property, the quality of images may be lower because they pass through several conversions. If `applyImageFit` is disabled, exported images fill the entire container and do not preserve their aspect ratio, but their quality remains the same because they are exported as is.\n */\n applyImageFit?: boolean;\n\n /**\n * Specifies whether the PDF document contains text in right-to-left languages.\n *\n * Default value: `false`\n */\n isRTL?: boolean;\n /**\n * Specifies whether to include only selected choices when PDF Generator renders a [Multi-Select Dropdown (Tag Box)](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question.\n *\n * Default value: `false` (include all choices)\n */\n tagboxSelectedChoicesOnly?: boolean;\n}\n\nexport class DocOptions implements IDocOptions {\n public static readonly MM_TO_PT = 72 / 25.4;\n public static readonly FONT_SIZE = 14;\n protected _orientation: 'l' | 'p';\n protected _format: string | number[];\n protected _fontSize: number;\n protected _fontName: string;\n public static SEGOE_NORMAL: string;\n public static SEGOE_BOLD: string;\n protected _base64Normal: string = undefined;\n protected _base64Bold: string = undefined;\n protected _useCustomFontInHtml: boolean;\n protected _margins: IMargin;\n protected _htmlRenderAs: IHTMLRenderType;\n protected _matrixRenderAs: 'auto' | 'list';\n protected _readonlyRenderAs: 'auto' | 'text' | 'acroform';\n protected _compress: boolean;\n protected _applyImageFit: boolean;\n protected _useLegacyBooleanRendering: boolean\n protected _isRTL: boolean;\n protected _tagboxSelectedChoicesOnly: boolean;\n public constructor(options: IDocOptions) {\n if (typeof options.orientation === 'undefined') {\n if (typeof options.format === 'undefined' ||\n options.format[0] < options.format[1]) {\n this._orientation = 'p';\n }\n else this._orientation = 'l';\n }\n else this._orientation = options.orientation;\n this._format = options.format || 'a4';\n if (Array.isArray(this._format)) {\n this._format = this._format.map(f => f * DocOptions.MM_TO_PT);\n }\n this._fontSize = options.fontSize || DocOptions.FONT_SIZE;\n if(!options.fontName) {\n if(!DocOptions.SEGOE_BOLD && !DocOptions.SEGOE_NORMAL) {\n this._fontName = SurveyHelper.STANDARD_FONT;\n } else {\n this._fontName = 'segoe';\n }\n } else {\n this._fontName = options.fontName;\n }\n if ((typeof options.fontName !== 'undefined' &&\n (typeof options.base64Normal !== 'undefined' ||\n typeof options.base64Bold !== 'undefined'))) {\n this._base64Normal = options.base64Normal || options.base64Bold;\n this._base64Bold = options.base64Bold || options.base64Normal;\n }\n else if (this.fontName === 'segoe') {\n // this._base64Normal = Fonts.SEGOE_NORMAL;\n // this._base64Bold = Fonts.SEGOE_BOLD;\n this._base64Normal = DocOptions.SEGOE_NORMAL;\n this._base64Bold = DocOptions.SEGOE_BOLD;\n }\n this._margins = SurveyHelper.clone(options.margins);\n if (typeof this._margins === 'undefined') {\n this._margins = {};\n }\n if (typeof this._margins.top === 'undefined') {\n this._margins.top = 10.0;\n }\n if (typeof this._margins.bot === 'undefined') {\n this._margins.bot = 10.0;\n }\n if (typeof this._margins.left === 'undefined') {\n this._margins.left = 10.0;\n }\n if (typeof this._margins.right === 'undefined') {\n this._margins.right = 10.0;\n }\n Object.keys(this._margins).forEach((name: string) => {\n (<any>this._margins)[name] = (<any>this._margins)[name] * DocOptions.MM_TO_PT;\n });\n this._htmlRenderAs = options.htmlRenderAs || 'auto';\n this._matrixRenderAs = options.matrixRenderAs || 'auto';\n this._readonlyRenderAs = options.readonlyRenderAs || 'auto';\n this._compress = options.compress || false;\n this._applyImageFit = options.applyImageFit || false;\n this._useLegacyBooleanRendering = options.useLegacyBooleanRendering || false;\n this._isRTL = options.isRTL || false;\n this._tagboxSelectedChoicesOnly = options.tagboxSelectedChoicesOnly || false;\n }\n public get leftTopPoint(): IPoint {\n return {\n xLeft: this.margins.left,\n yTop: this.margins.top\n };\n }\n public get fontSize(): number {\n return this._fontSize;\n }\n public get fontName(): string {\n return this._fontName;\n }\n public get base64Normal(): string {\n return this._base64Normal;\n }\n public get base64Bold(): string {\n return this._base64Bold;\n }\n public get useCustomFontInHtml(): boolean {\n return this._useCustomFontInHtml;\n }\n public get margins(): IMargin {\n return this._margins;\n }\n public get format(): string | number[] {\n return this._format;\n }\n public get orientation(): 'l' | 'p' {\n return this._orientation;\n }\n public get htmlRenderAs(): IHTMLRenderType {\n return this._htmlRenderAs;\n }\n public get matrixRenderAs(): 'auto' | 'list' {\n return this._matrixRenderAs;\n }\n public get readonlyRenderAs(): 'auto' | 'text' | 'acroform' {\n return this._readonlyRenderAs;\n }\n public get compress(): boolean {\n return this._compress;\n }\n public get applyImageFit(): boolean {\n return this._applyImageFit;\n }\n public get useLegacyBooleanRendering(): boolean {\n return this._useLegacyBooleanRendering;\n }\n public get isRTL(): boolean {\n return this._isRTL;\n }\n public get tagboxSelectedChoicesOnly(): boolean {\n return this._tagboxSelectedChoicesOnly;\n }\n}\n\n/**\n * The `DocController` object includes an API that allows you to configure main PDF document properties (font, margins, page width and height).\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/change-font-in-pdf-form/ (linkStyle))\n */\nexport class DocController extends DocOptions {\n private _doc: jsPDF;\n private _helperDoc: jsPDF;\n private _fontStyle: string;\n private marginsStack: IMarginLR[];\n public constructor(options: IDocOptions = {}) {\n super(options);\n const jspdfOptions: jsPDFOptions = {\n orientation: this.orientation,\n unit: 'pt',\n format: this.format,\n compress: this.compress\n };\n this._doc = new jsPDF(jspdfOptions);\n if (typeof this.base64Normal !== 'undefined' && !SurveyHelper.isFontExist(this, this.fontName)) {\n DocController.addFont(this.fontName, this.base64Normal, 'normal');\n DocController.addFont(this.fontName, this.base64Bold, 'bold');\n this._doc = new jsPDF(jspdfOptions);\n }\n setRadioAppearance(this._doc);\n this._useCustomFontInHtml = options.useCustomFontInHtml && SurveyHelper.isFontExist(this, this.fontName);\n this._helperDoc = new jsPDF(jspdfOptions);\n this._doc.setFont(this.fontName);\n this._helperDoc.setFont(this.fontName);\n this._doc.setFontSize(this.fontSize);\n this._helperDoc.setFontSize(this.fontSize);\n this._fontStyle = 'normal';\n this.marginsStack = [];\n }\n public static customFonts: { [name: string]: { normal: string, bold: string, italic: string, bolditalic: string } } = {};\n /**\n * Adds a custom font to the PDF Generator.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/change-font-in-pdf-form/ (linkStyle))\n * @param fontName A custom name that you will use to apply the custom font.\n * @param base64 The custom font as a Base64-encoded string. To encode your font to Base64, obtain it as a TTF file and use any TTF-to-Base64 online converter.\n * @param fontStyle The style of the custom font: `\"normal\"`, `\"bold\"`, `\"italic\"`, or `\"bolditalic\"`.\n */\n public static addFont(fontName: string, base64: string, fontStyle: 'normal' | 'bold' | 'italic' | 'bolditalic') {\n let font = DocController.customFonts[fontName];\n if (!font) {\n font = <any>{};\n DocController.customFonts[fontName] = font;\n }\n font[fontStyle] = base64;\n const addFontCallback: () => void = function () {\n const customFont = DocController.customFonts[fontName];\n if (!!customFont && !!customFont[fontStyle]) {\n const fontFile: string = `${fontName}-${fontStyle}.ttf`;\n this.addFileToVFS(fontFile, customFont[fontStyle]);\n this.addFont(fontFile, fontName, fontStyle);\n }\n };\n (<any>jsPDF).API.events.push(['addFonts', addFontCallback]);\n }\n public get doc(): any {\n return this._doc;\n }\n public get helperDoc(): any {\n return this._helperDoc;\n }\n public get fontName(): string {\n return this._fontName;\n }\n public set fontName(fontName: string) {\n this._fontName = fontName;\n this._doc.setFont(fontName);\n this._helperDoc.setFont(fontName);\n }\n public get fontSize(): number {\n return this._fontSize;\n }\n public set fontSize(fontSize: number) {\n this._fontSize = fontSize;\n this._doc.setFontSize(fontSize);\n this._helperDoc.setFontSize(fontSize);\n }\n public get fontStyle(): string {\n return this._fontStyle;\n }\n public set fontStyle(fontStyle: string) {\n this._fontStyle = fontStyle;\n this._doc.setFont(this._fontName, fontStyle);\n this._helperDoc.setFont(this._fontName, fontStyle);\n }\n public measureText(text: string | LocalizableString | number = 1, fontStyle: string = this._fontStyle,\n fontSize: number = this._fontSize): ISize {\n const oldFontSize: number = this._helperDoc.getFontSize();\n this._helperDoc.setFontSize(fontSize);\n this._helperDoc.setFont(this._fontName, fontStyle);\n const height: number = this._helperDoc.getLineHeight() / this._helperDoc.internal.scaleFactor;\n let width: number = 0.0;\n if (typeof text === 'number') {\n width = height * text;\n }\n else {\n text = typeof text === 'string' ? text : SurveyHelper.getLocString(text);\n width = text.split('').reduce((sm: number, cr: string) =>\n sm + this._helperDoc.getTextWidth(cr), 0.0);\n }\n this._helperDoc.setFontSize(oldFontSize);\n this._helperDoc.setFont(this._fontName, 'normal');\n return {\n width: width,\n height: height\n };\n }\n /**\n * The width of one character in pixels.\n */\n public get unitWidth(): number {\n return this.measureText().width;\n }\n /**\n * The heigth of one character in pixels.\n */\n public get unitHeight(): number {\n return this.measureText().height;\n }\n public pushMargins(left?: number, right?: number): void {\n this.marginsStack.push({ left: this.margins.left, right: this.margins.right });\n if (typeof left !== 'undefined') this.margins.left = left;\n if (typeof right !== 'undefined') this.margins.right = right;\n }\n public popMargins(): void {\n const margins: IMarginLR = this.marginsStack.pop();\n this.margins.left = margins.left;\n this.margins.right = margins.right;\n }\n /**\n * The width of a PDF page in pixels.\n */\n public get paperWidth(): number {\n return this.doc.internal.pageSize.width;\n }\n /**\n * The height of a PDF page in pixels.\n */\n public get paperHeight(): number {\n return this.doc.internal.pageSize.height;\n }\n public getNumberOfPages(): number {\n return this.doc.getNumberOfPages();\n }\n public addPage(): void {\n this.doc.addPage();\n }\n public getCurrentPageIndex(): number {\n return this.doc.getCurrentPageInfo().pageNumber - 1;\n }\n public setPage(index: number): void {\n this.doc.setPage(index + 1);\n }\n}\n","declare var Reflect: any;\n\nvar extendStatics = function(d: any, b: any): any {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d: any, b: any) {\n if (typeof b !== 'function' && b !== null)\n throw new TypeError('Class extends value ' + String(b) + ' is not a constructor or null');\n extendStatics(d, b);\n function __() { this.constructor = d; }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = (<any>Object).assign || function __assign(t: any) {\n for (var s: any, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nexport function __rest(s: any, e: any) {\n var t: any = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === 'function')\n for (var i = 0, q = Object.getOwnPropertySymbols(s); i < q.length; i++) {\n if (e.indexOf(q[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, q[i]))\n t[q[i]] = s[q[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators: any, target: any, key: any, desc: any) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);\n // eslint-disable-next-line no-cond-assign\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __awaiter(thisArg: any, _arguments: any, P: any, generator: any) {\n function adopt(value: any) { return value instanceof P ? value : new P(function (resolve: any) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve: any, reject: any) {\n function fulfilled(value: any) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value: any) { try { step(generator['throw'](value)); } catch (e) { reject(e); } }\n function step(result: any) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg: any, body: any) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: <any>[], ops: <any>[] }, f: any, y: any, t: any, g: any;\n return g = { next: verb(0), 'throw': verb(1), 'return': verb(2) }, typeof Symbol === 'function' && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n: any) { return function (v: any) { return step([n, v]); }; }\n function step(op: any) {\n if (f) throw new TypeError('Generator is already executing.');\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y['return'] : op[0] ? y['throw'] || ((t = y['return']) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { (<any>_) = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport function __spreadArray (to: any, from: any, pack: any) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar: any; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}","export { SurveyPDF } from '../survey';\nexport { SurveyHelper } from '../helper_survey';\nexport { IPoint, IRect, ISize, IMarginLR, IMargin, IDocOptions, DocOptions, DocController } from '../doc_controller';\nexport { FlatRepository } from '../flat_layout/flat_repository';\nexport { IFlatQuestion, FlatQuestion } from '../flat_layout/flat_question';\nexport { FlatQuestionDefault } from '../flat_layout/flat_default';\nexport { FlatBooleanCheckbox as FlatBoolean } from '../flat_layout/flat_boolean';\nexport { FlatCheckbox } from '../flat_layout/flat_checkbox';\nexport { FlatCustomModel } from '../flat_layout/flat_custom_model';\nexport { FlatComment } from '../flat_layout/flat_comment';\nexport { FlatDropdown } from '../flat_layout/flat_dropdown';\nexport { FlatExpression } from '../flat_layout/flat_expression';\nexport { FlatFile } from '../flat_layout/flat_file';\nexport { FlatHTML } from '../flat_layout/flat_html';\nexport { FlatImage } from '../flat_layout/flat_image';\nexport { FlatImagePicker } from '../flat_layout/flat_imagepicker';\nexport { FlatPanelDynamic } from '../flat_layout/flat_paneldynamic';\nexport { FlatRadiogroup } from '../flat_layout/flat_radiogroup';\nexport { FlatRanking } from '../flat_layout/flat_ranking';\nexport { FlatRating } from '../flat_layout/flat_rating';\nexport { FlatSlider } from '../flat_layout/flat_slider';\nexport { FlatSelectBase } from '../flat_layout/flat_selectbase';\nexport { FlatSignaturePad } from '../flat_layout/flat_signaturepad';\nexport { FlatTextbox } from '../flat_layout/flat_textbox';\nexport { FlatSurvey } from '../flat_layout/flat_survey';\nexport { FlatMatrix } from '../flat_layout/flat_matrix';\nexport { FlatMatrixMultiple } from '../flat_layout/flat_matrixmultiple';\nexport { FlatMatrixDynamic } from '../flat_layout/flat_matrixdynamic';\nexport { FlatMultipleText } from '../flat_layout/flat_multipletext';\nexport { PagePacker } from '../page_layout/page_packer';\nexport { EventHandler } from '../event_handler/event_handler';\nexport { HorizontalAlign, VerticalAlign, IDrawRectOptions, IDrawTextOptions, IDrawImageOptions, DrawCanvas } from '../event_handler/draw_canvas';\nexport { IPdfBrick, PdfBrick } from '../pdf_render/pdf_brick';\nexport { BooleanItemBrick } from '../pdf_render/pdf_booleanitem';\nexport { CheckboxItemBrick } from '../pdf_render/pdf_checkboxitem';\nexport { CheckItemBrick } from '../pdf_render/pdf_checkitem';\nexport { CompositeBrick } from '../pdf_render/pdf_composite';\nexport { CustomBrick } from '../pdf_render/pdf_custom';\nexport { DropdownBrick } from '../pdf_render/pdf_dropdown';\nexport { EmptyBrick } from '../pdf_render/pdf_empty';\nexport { HTMLBrick } from '../pdf_render/pdf_html';\nexport { ImageBrick } from '../pdf_render/pdf_image';\nexport { LinkBrick } from '../pdf_render/pdf_link';\nexport { RadioItemBrick } from '../pdf_render/pdf_radioitem';\nexport { RankingItemBrick } from '../pdf_render/pdf_rankingitem';\nexport { RowlineBrick } from '../pdf_render/pdf_rowline';\nexport { TextFieldBrick } from '../pdf_render/pdf_textfield';\nexport { TextBoldBrick } from '../pdf_render/pdf_textbold';\nexport { TextBrick } from '../pdf_render/pdf_text';\nexport { TitlePanelBrick } from '../pdf_render/pdf_titlepanel';\n\nimport { checkLibraryVersion } from 'survey-core';\ncheckLibraryVersion(`${process.env.VERSION}`, 'survey-pdf');","import { IQuestion, PanelModel, PageModel, Question } from 'survey-core';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatRepository } from '../flat_layout/flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\n\nexport class AdornersBaseOptions {\n public point: IPoint;\n public bricks: IPdfBrick[];\n public controller: DocController;\n public repository: FlatRepository;\n public module: any;\n\n public constructor(point: IPoint, bricks: IPdfBrick[],\n controller: DocController, repository: FlatRepository, module: any) {\n this.point = point;\n this.bricks = bricks;\n this.controller = controller;\n this.repository = repository;\n this.module = module;\n }\n}\nexport class AdornersOptions extends AdornersBaseOptions {\n public question: Question;\n public constructor(point: IPoint, bricks: IPdfBrick[],\n question: Question, controller: DocController,\n repository: FlatRepository, module: any) {\n super(point, bricks, controller, repository, module);\n this.question = question;\n }\n}\nexport class AdornersPanelOptions extends AdornersBaseOptions {\n public panel: PanelModel;\n public constructor(point: IPoint, bricks: IPdfBrick[],\n panel: PanelModel, controller: DocController,\n repository: FlatRepository, module: any) {\n super(point, bricks, controller, repository, module);\n this.panel = panel;\n }\n}\n\nexport class AdornersPageOptions extends AdornersBaseOptions {\n public page: PageModel;\n public constructor(point: IPoint, bricks: IPdfBrick[],\n page: PageModel, controller: DocController,\n repository: FlatRepository, module: any) {\n super(point, bricks, controller, repository, module);\n this.page = page;\n }\n}\n\n","import { IRect, IMargin, ISize, DocOptions, DocController } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { TextBoldBrick } from '../pdf_render/pdf_textbold';\nimport { SurveyHelper } from '../helper_survey';\n\n/**\n * Horizontal alignment types in onRenderHeader and onRenderFooter events\n */\nexport enum HorizontalAlign {\n NotSet = 'notset',\n Left = 'left',\n Center = 'center',\n Right = 'right'\n}\n/**\n * Vertical alignment types in onRenderHeader and onRenderFooter events\n */\nexport enum VerticalAlign {\n NotSet = 'notset',\n Top = 'top',\n Middle = 'middle',\n Bottom = 'bottom'\n}\n\nexport interface IDrawRectOptions {\n /**\n * Horizontal alignment within the rectangle that limits the drawing area.\n *\n * Possible values:\n *\n * - `\"center\"` (default)\n * - `\"left\"`\n * - `\"right\"`\n */\n horizontalAlign?: HorizontalAlign;\n /**\n * Vertical alignment within the rectangle that limits the drawing area.\n *\n * Possible values:\n *\n * - `\"middle\"` (default)\n * - `\"top\"`\n * - `\"bottom\"`\n */\n verticalAlign?: VerticalAlign;\n /**\n * The distance between the content and the borders of the rectangle. This property applies only if the content is aligned to the left/right or top/bottom.\n */\n margins?: IMargin;\n /**\n * An object with coordinates of the rectangle.\n */\n rect?: IRect;\n}\n/**\n * An object that configures rendering a piece of text.\n */\nexport interface IDrawTextOptions extends IDrawRectOptions {\n /**\n * A text string to be drawn.\n */\n text: string;\n /**\n * Font size in points.\n *\n * Default value: 14\n */\n fontSize?: number;\n /**\n * Enable this property to render the text string bold.\n *\n * Default value: `false`\n */\n isBold?: boolean;\n}\n/**\n * An object that configures rendering an image.\n */\nexport interface IDrawImageOptions extends IDrawRectOptions {\n /**\n * An image width in pixels. Defaults to the [rectangle width](https://surveyjs.io/pdf-generator/documentation/api-reference/idrawimageoptions#rect).\n */\n width?: number;\n /**\n * An image height in pixels. Defaults to the [rectangle height](https://surveyjs.io/pdf-generator/documentation/api-reference/idrawimageoptions#rect).\n */\n height?: number;\n /**\n * A string value with a base64-encoded image to be drawn.\n */\n base64: string;\n /**\n * Specifies how to resize the image to fit it into its container.\n *\n * Default value: `\"contain\"` if [`applyImageFit`](https://surveyjs.io/pdf-generator/documentation/api-reference/idocoptions#applyImageFit) is enabled or `undefined` if not.\n *\n * Refer to the [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property description for information on accepted values.\n */\n imageFit?: string;\n}\n\n/**\n * An object that describes a drawing area and enables you to draw an image or a piece of text within the area. You can access this object within functions that handle `SurveyPDF`'s [`onRenderHeader`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderHeader) and [`onRenderFooter`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderFooter) events.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n */\nexport class DrawCanvas {\n public constructor(public packs: IPdfBrick[],\n public controller: DocController,\n protected _rect: IRect,\n protected _countPages: number,\n protected _pageNumber: number) { }\n /**\n * A total number of pages in the document.\n */\n public get pageCount(): number {\n return this._countPages;\n }\n public get countPages(): number {\n return this._countPages;\n }\n /**\n * The number of the page that contains the drawing area. Enumeration starts with 1.\n */\n public get pageNumber(): number {\n return this._pageNumber;\n }\n /**\n * An object with coordinates of a rectangle that limits the drawing area. This object contain the following fields: `xLeft`, `xRight`, `yTop`, `yBot`.\n */\n public get rect(): IRect {\n return this._rect;\n }\n private alignRect(rectOptions: IDrawRectOptions, itemSize: ISize): IRect {\n if (typeof rectOptions.margins === 'undefined') {\n rectOptions.margins = { left: 0.0, right: 0.0, top: 0.0, bot: 0.0 };\n }\n else {\n if (typeof rectOptions.margins.left === 'undefined') {\n rectOptions.margins.left = 0.0;\n }\n if (typeof rectOptions.margins.right === 'undefined') {\n rectOptions.margins.right = 0.0;\n }\n if (typeof rectOptions.margins.top === 'undefined') {\n rectOptions.margins.top = 0.0;\n }\n if (typeof rectOptions.margins.bot === 'undefined') {\n rectOptions.margins.bot = 0.0;\n }\n }\n if (typeof rectOptions.rect === 'undefined') {\n if (typeof rectOptions.horizontalAlign === 'undefined' ||\n rectOptions.horizontalAlign === HorizontalAlign.NotSet) {\n rectOptions.horizontalAlign = HorizontalAlign.Center;\n }\n if (typeof rectOptions.verticalAlign === 'undefined' ||\n rectOptions.verticalAlign === VerticalAlign.NotSet) {\n rectOptions.verticalAlign = VerticalAlign.Middle;\n }\n }\n const rect: IRect = SurveyHelper.clone(this.rect);\n if (typeof rectOptions.horizontalAlign !== 'undefined') {\n switch (rectOptions.horizontalAlign) {\n case HorizontalAlign.Left:\n rect.xLeft = this.rect.xLeft + rectOptions.margins.left;\n rect.xRight = Math.min(this.rect.xRight - rectOptions.margins.right,\n this.rect.xLeft + rectOptions.margins.left + itemSize.width);\n break;\n case HorizontalAlign.Center:\n rect.xLeft = Math.max(this.rect.xLeft + rectOptions.margins.left,\n (this.rect.xLeft + this.rect.xRight - itemSize.width) / 2.0);\n rect.xRight = Math.min(this.rect.xRight - rectOptions.margins.right,\n (this.rect.xLeft + this.rect.xRight + itemSize.width) / 2.0);\n break;\n case HorizontalAlign.Right:\n rect.xLeft = Math.max(this.rect.xLeft + rectOptions.margins.left,\n this.rect.xRight - rectOptions.margins.right - itemSize.width);\n rect.xRight = this.rect.xRight - rectOptions.margins.right;\n break;\n }\n }\n else {\n rect.xLeft = rectOptions.rect.xLeft || this.rect.xLeft;\n rect.xRight = rectOptions.rect.xRight || this.rect.xRight;\n }\n if (typeof rectOptions.verticalAlign !== 'undefined') {\n switch (rectOptions.verticalAlign) {\n case VerticalAlign.Top:\n rect.yTop = this.rect.yTop + rectOptions.margins.top;\n rect.yBot = Math.min(this.rect.yBot - rectOptions.margins.bot,\n this.rect.yTop + rectOptions.margins.top + itemSize.height);\n break;\n case VerticalAlign.Middle:\n rect.yTop = Math.max(this.rect.yTop + rectOptions.margins.top,\n (this.rect.yTop + this.rect.yBot - itemSize.height) / 2.0);\n rect.yBot = Math.min(this.rect.yBot - rectOptions.margins.bot,\n (this.rect.yTop + this.rect.yBot + itemSize.height) / 2.0);\n break;\n case VerticalAlign.Bottom:\n rect.yTop = Math.max(this.rect.yTop + rectOptions.margins.top,\n this.rect.yBot - rectOptions.margins.bot - itemSize.height);\n rect.yBot = this.rect.yBot - rectOptions.margins.bot;\n break;\n }\n }\n else {\n rect.yTop = rectOptions.rect.yTop || this.rect.yTop;\n rect.yBot = rectOptions.rect.yBot || this.rect.yBot;\n }\n return rect;\n }\n /**\n * Draws a piece of text within the drawing area.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n * @param textOptions An [`IDrawTextOptions`](https://surveyjs.io/pdf-generator/documentation/api-reference/idrawtextoptions) object that configures the drawing.\n */\n public drawText(textOptions: IDrawTextOptions): void {\n textOptions = SurveyHelper.clone(textOptions);\n if (typeof textOptions.fontSize === 'undefined') {\n textOptions.fontSize = DocOptions.FONT_SIZE;\n }\n if (typeof textOptions.isBold === 'undefined') {\n textOptions.isBold = false;\n }\n const textSize: ISize = this.controller.measureText(textOptions.text,\n textOptions.isBold ? 'bold' : 'normal', textOptions.fontSize);\n const textRect: IRect = this.alignRect(textOptions, textSize);\n if (!textOptions.isBold) {\n this.packs.push(new TextBrick(null, this.controller,\n textRect, textOptions.text));\n }\n else {\n this.packs.push(new TextBoldBrick(null, this.controller,\n textRect, textOptions.text));\n }\n (<PdfBrick>this.packs[this.packs.length - 1]).fontSize = textOptions.fontSize;\n }\n /**\n * Draws an image within the drawing area.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n * @param imageOptions An [`IDrawImageOptions`](https://surveyjs.io/pdf-generator/documentation/api-reference/idrawimageoptions) object that configures drawing.\n */\n public async drawImage(imageOptions: IDrawImageOptions): Promise<void> {\n imageOptions = SurveyHelper.clone(imageOptions);\n if (typeof imageOptions.width === 'undefined') {\n imageOptions.width = this.rect.xRight - this.rect.xLeft;\n }\n if (typeof imageOptions.height === 'undefined') {\n imageOptions.height = this.rect.yBot - this.rect.yTop;\n }\n const imageSize: ISize = {\n width: imageOptions.width,\n height: imageOptions.height\n };\n const imageRect: IRect = this.alignRect(imageOptions, imageSize);\n this.controller.pushMargins(0, 0);\n this.packs.push(await SurveyHelper.createImageFlat(\n SurveyHelper.createPoint(imageRect, true, true),\n null, this.controller, { link: imageOptions.base64,\n width: imageRect.xRight - imageRect.xLeft,\n height: imageRect.yBot - imageRect.yTop, objectFit: imageOptions.imageFit }, !!imageOptions.imageFit || this.controller.applyImageFit));\n this.controller.popMargins();\n }\n}","import { Event, EventBase } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { DocController } from '../doc_controller';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { DrawCanvas } from './draw_canvas';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class EventAsync<Sender, Options> extends EventBase<Sender, Options> {\n public unshift(func: (sender: Sender, options: Options) => any) {\n if (this.hasFunc(func)) return;\n if (this.callbacks == null) {\n this.callbacks = new Array<(sender: Sender, options: Options) => any>();\n }\n this.callbacks.unshift(func);\n }\n public async fire(sender: Sender, options: Options) {\n if (this.callbacks == null) return;\n for (var i = 0; i < this.callbacks.length; i++) {\n await this.callbacks[i](sender, options);\n }\n }\n}\nexport class EventHandler {\n public static async process_header_events(survey: SurveyPDF,\n controller: DocController, packs: IPdfBrick[][]): Promise<void> {\n if (!survey.haveCommercialLicense) {\n survey.onRenderHeader.add((_, canvas) => {\n canvas.drawText({\n text: 'SurveyJS PDF | Please purchase a SurveyJS PDF developer license to use it in your app | https://surveyjs.io/Buy',\n fontSize: 10\n });\n });\n }\n for (let i: number = 0; i < packs.length; i++) {\n await survey.onRenderHeader.fire(survey, new DrawCanvas(packs[i], controller,\n SurveyHelper.createHeaderRect(controller), packs.length, i + 1));\n await survey.onRenderFooter.fire(survey, new DrawCanvas(packs[i], controller,\n SurveyHelper.createFooterRect(controller), packs.length, i + 1));\n }\n }\n}","import { IQuestion, ItemValue, LocalizableString, QuestionBooleanModel, QuestionRadiogroupModel, SurveyModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { BooleanItemBrick } from '../pdf_render/pdf_booleanitem';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { FlatRadiogroup } from './flat_radiogroup';\n\nexport class FlatBooleanCheckbox extends FlatQuestion {\n protected question: QuestionBooleanModel;\n constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionBooleanModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n const height: number = this.controller.unitHeight;\n const itemFlat: IPdfBrick = new BooleanItemBrick(this.question, this.controller,\n SurveyHelper.moveRect(\n SurveyHelper.scaleRect(SurveyHelper.createRect(point, height, height),\n SurveyHelper.SELECT_ITEM_FLAT_SCALE), point.xLeft));\n compositeFlat.addBrick(itemFlat);\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft = itemFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const locLabelText: LocalizableString = this.question.isIndeterminate ? null :\n this.question.booleanValue ? this.question.locLabelTrue : this.question.locLabelFalse;\n if (locLabelText !== null && locLabelText.renderedHtml !== null) {\n compositeFlat.addBrick(await SurveyHelper.createTextFlat(\n textPoint, this.question, this.controller, locLabelText, TextBrick));\n }\n return [compositeFlat];\n }\n}\nexport class FlatBoolean extends FlatRadiogroup {\n private items: Array<ItemValue>;\n constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.buildItems();\n }\n private buildItems() {\n const question = <QuestionBooleanModel>(<any>this.question);\n const falseChoice = new ItemValue((<QuestionBooleanModel>question).valueFalse !== undefined ? (<QuestionBooleanModel>question).valueFalse : false);\n const trueChoice = new ItemValue((<QuestionBooleanModel>question).valueTrue !== undefined ? (<QuestionBooleanModel>question).valueTrue : true);\n falseChoice.locOwner = question;\n falseChoice.setLocText((<QuestionBooleanModel>question).locLabelFalse);\n trueChoice.locOwner = question;\n trueChoice.setLocText((<QuestionBooleanModel>question).locLabelTrue);\n this.items = [falseChoice, trueChoice];\n }\n protected getVisibleChoices(): Array<ItemValue> {\n return this.items;\n }\n protected getColCount(): number {\n return 0;\n }\n}\n\nFlatRepository.getInstance().register('boolean', FlatBoolean);\nFlatRepository.getInstance().register('boolean-checkbox', FlatBooleanCheckbox);\n","import { IQuestion, ItemValue, QuestionCheckboxModel, QuestionTagboxModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IRect, DocController } from '../doc_controller';\nimport { FlatSelectBase } from './flat_selectbase';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { CheckboxItemBrick } from '../pdf_render/pdf_checkboxitem';\n\nexport class FlatCheckbox extends FlatSelectBase {\n protected question: QuestionCheckboxModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionCheckboxModel>question;\n }\n public generateFlatItem(rect: IRect, item: ItemValue, index: number): IPdfBrick {\n return new CheckboxItemBrick(this.question, this.controller, rect, item, index);\n }\n}\nexport class FlatTagbox extends FlatCheckbox {\n protected question: QuestionTagboxModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionTagboxModel>question;\n }\n protected getVisibleChoices(): Array<ItemValue> {\n if(this.controller.tagboxSelectedChoicesOnly) {\n return this.question.selectedChoices;\n } else {\n return super.getVisibleChoices();\n }\n }\n}\nFlatRepository.getInstance().register('tagbox', FlatTagbox);\nFlatRepository.getInstance().register('checkbox', FlatCheckbox);","import { IQuestion, QuestionCommentModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatComment extends FlatQuestion {\n protected question: QuestionCommentModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionCommentModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n return [await SurveyHelper.createCommentFlat(\n point, this.question, this.controller,\n {\n rows: this.question.rows,\n isReadOnly: this.question.isReadOnly,\n isMultiline: true,\n fieldName: this.question.id,\n placeholder: SurveyHelper.getLocString(this.question.locPlaceHolder),\n shouldRenderBorders: settings.readOnlyCommentRenderMode === 'textarea',\n value: this.question.value\n })];\n }\n}\n\nFlatRepository.getInstance().register('comment', FlatComment);","import { IQuestion, QuestionCustomModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\n\nexport class FlatCustomModel extends FlatQuestion {\n constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const flat = FlatRepository.getInstance().create(this.survey, this.question, this.controller, this.question.getType());\n return flat.generateFlatsContent(point);\n }\n}\n\nFlatRepository.getInstance().register('custom_model', FlatCustomModel);","import { IPoint } from '../doc_controller';\nimport { SurveyHelper } from '../helper_survey';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { FlatQuestion } from './flat_question';\n\nexport class FlatQuestionDefault extends FlatQuestion {\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const valueBrick = await SurveyHelper.createTextFlat(point, this.question, this.controller, `${this.question.displayValue}`, TextBrick);\n return [valueBrick];\n }\n}","import { IQuestion, QuestionDropdownModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { DropdownBrick } from '../pdf_render/pdf_dropdown';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatDropdown extends FlatQuestion {\n protected question: QuestionDropdownModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionDropdownModel>question;\n }\n protected async generateItemComment(point: IPoint): Promise<IPdfBrick> {\n const commentModel = this.question.getCommentTextAreaModel(this.question.selectedItem);\n return await SurveyHelper.createCommentFlat(\n point, this.question, this.controller, {\n fieldName: commentModel.id,\n rows: SurveyHelper.OTHER_ROWS_COUNT,\n value: commentModel.getTextValue(),\n shouldRenderBorders: settings.readOnlyCommentRenderMode === 'textarea',\n isReadOnly: this.question.isReadOnly,\n isMultiline: true,\n }\n );\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const valueBrick = !this.shouldRenderAsComment ? new DropdownBrick(this.question, this.controller, SurveyHelper.createTextFieldRect(point, this.controller)) : await SurveyHelper.createCommentFlat(point, this.question, this.controller,\n {\n fieldName: this.question.id,\n shouldRenderBorders: settings.readOnlyTextRenderMode === 'input',\n value: this.question.readOnlyText || '',\n isReadOnly: this.question.isReadOnly,\n placeholder: SurveyHelper.getLocString(this.question.locPlaceholder)\n });\n const compositeFlat: CompositeBrick = new CompositeBrick(valueBrick);\n if (this.question.isShowingChoiceComment) {\n const otherPoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n otherPoint.yTop += this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ROWS;\n compositeFlat.addBrick(await this.generateItemComment(otherPoint));\n }\n return [compositeFlat];\n }\n}\n\nFlatRepository.getInstance().register('dropdown', FlatDropdown);","import { IQuestion, QuestionExpressionModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatExpression extends FlatQuestion {\n protected question: QuestionExpressionModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionExpressionModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n return [await SurveyHelper.createCommentFlat(point, this.question, this.controller, {\n value: this.question.displayValue,\n isReadOnly: true,\n fieldName: this.question.id,\n shouldRenderBorders: settings.readOnlyTextRenderMode === 'input',\n })];\n }\n}\n\nFlatRepository.getInstance().register('expression', FlatExpression);","import { IQuestion, QuestionFileModel, surveyLocalization } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, ISize, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatFile extends FlatQuestion {\n public static readonly IMAGE_GAP_SCALE: number = 0.195;\n public static readonly TEXT_MIN_SCALE: number = 5.0;\n public static DEFAULT_IMAGE_FIT: string = 'contain';\n protected question: QuestionFileModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionFileModel>question;\n }\n private async generateFlatItem(point: IPoint, item: {\n name: string, type: string, content: string, imageSize?: ISize,\n }): Promise<IPdfBrick> {\n const compositeFlat: CompositeBrick = new CompositeBrick(await SurveyHelper.createLinkFlat(\n point, this.question, this.controller, item.name === undefined ? 'image' : item.name, item.content));\n if (SurveyHelper.canPreviewImage(this.question, item, item.content)) {\n const imagePoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n imagePoint.yTop += this.controller.unitHeight * FlatFile.IMAGE_GAP_SCALE;\n compositeFlat.addBrick(await SurveyHelper.createImageFlat(imagePoint, this.question, this.controller, { link: item.content, width: item.imageSize.width, height: item.imageSize.height, objectFit: FlatFile.DEFAULT_IMAGE_FIT }));\n }\n return compositeFlat;\n }\n private addLine(rowsFlats: CompositeBrick[], currPoint: IPoint, index: number, previewValue: Array<any>): void {\n if (index !== previewValue.length - 1) {\n rowsFlats[rowsFlats.length - 1].addBrick(\n SurveyHelper.createRowlineFlat(currPoint, this.controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n rowsFlats.push(new CompositeBrick());\n }\n }\n\n private async getImagePreviewContentWidth(item: { name: string, type: string, content: string, imageSize?: ISize }) {\n return Math.max(item.imageSize.width, FlatFile.TEXT_MIN_SCALE * this.controller.unitWidth);\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const previewValue = this.question.showPreview ? this.question.previewValue : this.question.value;\n if (!previewValue || previewValue.length === 0) {\n return [await SurveyHelper.createTextFlat(point, this.question,\n this.controller, this.question.noFileChosenCaption, TextBrick)];\n }\n const rowsFlats: CompositeBrick[] = [new CompositeBrick()];\n const currPoint: IPoint = SurveyHelper.clone(point);\n let yBot: number = currPoint.yTop;\n for (let i: number = 0; i < previewValue.length; i++) {\n let item: { name: string, type: string, content: string, imageSize?: ISize } = { ...previewValue[i] };\n const canPreviewImage = SurveyHelper.canPreviewImage(this.question, item, item.content);\n if (canPreviewImage) {\n item.imageSize = await SurveyHelper.getCorrectedImageSize(this.controller, { imageWidth: this.question.imageWidth, imageHeight: this.question.imageHeight, imageLink: previewValue[i].content, defaultImageWidth: 200, defaultImageHeight: 150 });\n }\n const availableWidth: number = this.controller.paperWidth -\n this.controller.margins.right - currPoint.xLeft;\n if (canPreviewImage) {\n const compositeWidth = await this.getImagePreviewContentWidth(item);\n if (availableWidth < compositeWidth) {\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = yBot;\n this.addLine(rowsFlats, currPoint, i, previewValue);\n }\n this.controller.pushMargins(currPoint.xLeft,\n this.controller.paperWidth - currPoint.xLeft - compositeWidth);\n const itemFlat: IPdfBrick = await this.generateFlatItem(currPoint, item);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n currPoint.xLeft += itemFlat.width;\n yBot = Math.max(yBot, itemFlat.yBot);\n this.controller.popMargins();\n }\n else {\n if (availableWidth < this.controller.unitWidth) {\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = yBot;\n this.addLine(rowsFlats, currPoint, i, previewValue);\n }\n const itemFlat: IPdfBrick = await this.generateFlatItem(currPoint, item);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n currPoint.xLeft += itemFlat.xRight - itemFlat.xLeft;\n yBot = Math.max(yBot, itemFlat.yBot);\n }\n currPoint.xLeft += this.controller.unitWidth;\n }\n return rowsFlats;\n }\n}\n\nFlatRepository.getInstance().register('file', FlatFile);","import { IQuestion, QuestionHtmlModel, Serializer } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\nimport { EmptyBrick } from '../pdf_render/pdf_empty';\n\nexport type IHTMLRenderType = 'auto' | 'standard' | 'image';\nexport class FlatHTML extends FlatQuestion {\n protected question: QuestionHtmlModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n }\n private chooseRender(html: string): IHTMLRenderType {\n if (/<[^>]*style[^<]*>/.test(html) ||\n /<[^>]*table[^<]*>/.test(html) ||\n /&\\w+;/.test(html)) {\n return 'image';\n }\n return 'standard';\n }\n\n private static correctHtmlRules: [{ searchRegExp: RegExp, replaceString: string }] = [\n { searchRegExp: /(<\\/?br\\s*?\\/?\\s*?>\\s*){2,}/g, replaceString: '<br>' }\n ]\n protected correctHtml(html: string): string {\n FlatHTML.correctHtmlRules.forEach((rule) => {\n html = html.replace(rule.searchRegExp, rule.replaceString);\n });\n return html;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n let renderAs: IHTMLRenderType = <IHTMLRenderType>this.question.renderAs;\n if(!SurveyHelper.hasDocument) {\n return [new EmptyBrick(SurveyHelper.createRect(point, 0, 0))];\n }\n if (renderAs === 'auto') renderAs = this.controller.htmlRenderAs;\n if (renderAs === 'auto') renderAs = this.chooseRender(SurveyHelper.getLocString(this.question.locHtml));\n const html: string = SurveyHelper.createHtmlContainerBlock(SurveyHelper.getLocString(this.question.locHtml), this.controller, renderAs);\n if (renderAs === 'image') {\n const width: number = SurveyHelper.getPageAvailableWidth(this.controller);\n const { url, aspect }: { url: string, aspect: number } =\n await SurveyHelper.htmlToImage(html, width, this.controller);\n const height: number = width / aspect;\n return [await SurveyHelper.createImageFlat(point, this.question, this.controller, { link: url, width, height })];\n }\n return [SurveyHelper.splitHtmlRect(this.controller, await SurveyHelper.createHTMLFlat(\n point, this.question, this.controller, this.correctHtml(html)))];\n }\n}\n\nSerializer.removeProperty('html', 'renderAs');\nSerializer.addProperty('html', {\n name: 'renderAs',\n default: 'auto',\n visible: false,\n choices: ['auto', 'standard', 'image']\n});\nFlatRepository.getInstance().register('html', FlatHTML);","import { IQuestion, QuestionImageModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController, ISize } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatImage extends FlatQuestion {\n protected question: QuestionImageModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionImageModel>question;\n }\n private async getCorrectImageSize(): Promise<ISize> {\n return await SurveyHelper.getCorrectedImageSize(this.controller, { imageWidth: this.question.imageWidth, imageHeight: this.question.imageHeight, imageLink: this.question.imageLink });\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const imageSize = await this.getCorrectImageSize();\n return [await SurveyHelper.createImageFlat(point, this.question,\n this.controller, { link: this.question.imageLink, width: imageSize.width, height: imageSize.height })];\n }\n}\n\nFlatRepository.getInstance().register('image', FlatImage);","import { IQuestion, ItemValue, QuestionImagePickerModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { FlatRadiogroup } from './flat_radiogroup';\nimport { CheckItemBrick } from '../pdf_render/pdf_checkitem';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatImagePicker extends FlatQuestion {\n protected question: QuestionImagePickerModel;\n protected radio: FlatRadiogroup;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionImagePickerModel>question;\n }\n private async generateFlatItem(point: IPoint, item: ItemValue, index: number): Promise<IPdfBrick> {\n const pageAvailableWidth = SurveyHelper.getPageAvailableWidth(this.controller);\n const imageFlat = await SurveyHelper.createImageFlat(point, this.question, this.controller, { link: (<any>item).imageLink, width: pageAvailableWidth, height: pageAvailableWidth / SurveyHelper.IMAGEPICKER_RATIO });\n const compositeFlat: CompositeBrick = new CompositeBrick(imageFlat);\n let buttonPoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n if (this.question.showLabel) {\n let labelFlat: IPdfBrick = await SurveyHelper.createTextFlat(buttonPoint, this.question, this.controller, item.text || item.value, TextBrick);\n compositeFlat.addBrick(labelFlat);\n buttonPoint = SurveyHelper.createPoint(labelFlat);\n }\n const height: number = this.controller.unitHeight;\n const buttonRect: IRect = SurveyHelper.createRect(buttonPoint, pageAvailableWidth, height);\n if (this.question.multiSelect) {\n compositeFlat.addBrick(new CheckItemBrick(this.controller,\n buttonRect, this.question.id + 'index' + index, { readOnly: this.question.isReadOnly || !item.isEnabled, question: this.question, item: item, checked: this.question.value.indexOf(item.value) !== -1, index: index }));\n }\n else {\n compositeFlat.addBrick(this.radio.generateFlatItem(buttonRect, item, index));\n }\n return compositeFlat;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n this.radio = this.question.multiSelect ? null :\n new FlatRadiogroup(this.survey, this.question, this.controller);\n const rowsFlats: CompositeBrick[] = [new CompositeBrick()];\n const colWidth: number = SurveyHelper.getImagePickerAvailableWidth(\n this.controller) / SurveyHelper.IMAGEPICKER_COUNT;\n let cols: number = ~~(SurveyHelper.\n getPageAvailableWidth(this.controller) / colWidth) || 1;\n const count: number = this.question.visibleChoices.length;\n cols = cols <= count ? cols : count;\n const rows: number = ~~(Math.ceil(count / cols));\n const currPoint: IPoint = SurveyHelper.clone(point);\n for (let i: number = 0; i < rows; i++) {\n let yBot: number = currPoint.yTop;\n this.controller.pushMargins();\n let currMarginLeft: number = this.controller.margins.left;\n for (let j: number = 0; j < cols; j++) {\n const index: number = i * cols + j;\n if (index == count) break;\n this.controller.margins.left = currMarginLeft;\n this.controller.margins.right = this.controller.paperWidth -\n currMarginLeft - colWidth;\n currMarginLeft = this.controller.paperWidth -\n this.controller.margins.right + this.controller.unitWidth;\n currPoint.xLeft = this.controller.margins.left;\n const itemFlat: IPdfBrick = await this.generateFlatItem(currPoint,\n this.question.visibleChoices[index], index);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n yBot = Math.max(yBot, itemFlat.yBot);\n }\n this.controller.popMargins();\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = yBot;\n if (i !== rows - 1) {\n rowsFlats[rowsFlats.length - 1].addBrick(\n SurveyHelper.createRowlineFlat(currPoint, this.controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n rowsFlats.push(new CompositeBrick());\n }\n }\n return rowsFlats;\n }\n}\n\nFlatRepository.getInstance().register('imagepicker', FlatImagePicker);","import { IQuestion, QuestionMatrixModel, MatrixRowModel,\n QuestionRadiogroupModel, ItemValue, Serializer } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { DocController, IPoint, IRect } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { RadioGroupWrap, RadioItemBrick } from '../pdf_render/pdf_radioitem';\nimport { CheckItemBrick } from '../pdf_render/pdf_checkitem';\n\nexport class FlatMatrix extends FlatQuestion {\n public static readonly GAP_BETWEEN_ROWS: number = 0.5;\n protected question: QuestionMatrixModel;\n constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, <QuestionRadiogroupModel>question, controller);\n this.question = <QuestionMatrixModel>question;\n }\n protected async generateFlatsHeader(point: IPoint): Promise<IPdfBrick[]> {\n const headers: IPdfBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n if(this.question.hasRows) {\n currPoint.xLeft += this.rowTitleWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n }\n for (let i: number = 0; i < this.question.visibleColumns.length; i++) {\n this.controller.pushMargins();\n this.controller.margins.left = currPoint.xLeft;\n this.controller.margins.right += (SurveyHelper.getPageAvailableWidth(this.controller) - this.columnWidth);\n headers.push(await SurveyHelper.createBoldTextFlat(currPoint,\n this.question, this.controller, this.question.visibleColumns[i].locText));\n currPoint.xLeft += this.columnWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.popMargins();\n }\n const compositeBrick: CompositeBrick = new CompositeBrick(...headers);\n return [compositeBrick, SurveyHelper.createRowlineFlat(SurveyHelper.createPoint(compositeBrick), this.controller)];\n }\n protected async generateFlatsRows(point: IPoint, isVertical: boolean): Promise<IPdfBrick[]> {\n const cells: IPdfBrick[] = [];\n let currPoint: IPoint = SurveyHelper.clone(point);\n for (let i: number = 0; i < this.question.visibleRows.length; i++) {\n const key: string = 'row' + i;\n const flatsRow: IPdfBrick[] = await new FlatMatrixRow(this.survey, this.question, this.controller,\n this.question.visibleRows[i], i, key, i == 0, isVertical, this.rowTitleWidth, this.columnWidth).generateFlatsContent(currPoint);\n currPoint = SurveyHelper.createPoint(SurveyHelper.mergeRects(...flatsRow));\n currPoint.yTop += this.controller.unitHeight * FlatMatrix.GAP_BETWEEN_ROWS;\n cells.push(...flatsRow);\n }\n return cells;\n }\n private rowTitleWidth: number;\n private columnWidth: number;\n private calculateColumnsWidthes() {\n const availableWidth = SurveyHelper.getPageAvailableWidth(this.controller);\n if(this.question.hasRows && this.question.rowTitleWidth) {\n this.controller.pushMargins();\n this.rowTitleWidth = SurveyHelper.parseWidth(this.question.rowTitleWidth, availableWidth);\n this.controller.margins.left += (this.rowTitleWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS);\n this.columnWidth = SurveyHelper.getColumnWidth(this.controller, this.question.visibleColumns.length);\n this.controller.popMargins();\n } else {\n this.columnWidth = this.rowTitleWidth = SurveyHelper.getColumnWidth(this.controller, this.question.visibleColumns.length + (this.question.hasRows ? 1 : 0));\n }\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n this.calculateColumnsWidthes();\n const isVertical: boolean = this.question.renderAs === 'list' || this.controller.matrixRenderAs === 'list' ||\n this.columnWidth < this.controller.measureText(SurveyHelper.MATRIX_COLUMN_WIDTH).width;\n let currPoint: IPoint = SurveyHelper.clone(point);\n const cells: IPdfBrick[] = [];\n if (!isVertical && this.question.showHeader && this.question.visibleColumns.length != 0) {\n let headers: IPdfBrick[] = await this.generateFlatsHeader(currPoint);\n currPoint = SurveyHelper.createPoint(SurveyHelper.mergeRects(...headers));\n currPoint.yTop += FlatMatrix.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n cells.push(...headers);\n }\n cells.push(...await this.generateFlatsRows(currPoint, isVertical));\n return cells;\n }\n}\n\nexport class FlatMatrixRow {\n private radioGroupWrap: RadioGroupWrap;\n public constructor(protected survey: SurveyPDF,\n protected question: QuestionMatrixModel, protected controller: DocController, private row: MatrixRowModel, private rowIndex: number,\n private key: string, protected isFirst: boolean = false, protected isVertical: boolean = false, private rowTitleWidth: number, private columnWidth: number) {\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n return this.isVertical ?\n await this.generateFlatsVerticallyCells(point) :\n await this.generateFlatsHorizontallyCells(point);\n }\n\n protected generateFlatItem(rect: IRect, item: ItemValue,\n index: number, key: string, context: any = {}) {\n const fieldName = this.question.id + key;\n const isChecked: boolean = this.row.isChecked(item);\n if(this.question.isMultiSelect) {\n return new CheckItemBrick(this.controller, rect, fieldName + 'index' + index, { question: this.question, index, checked: isChecked, item, readOnly: this.question.isReadOnly });\n } else {\n if (index === 0) {\n this.radioGroupWrap = new RadioGroupWrap(fieldName,\n this.controller, { readOnly: this.question.isReadOnly, question: this.question, ...context });\n (<any>this.question).pdfRadioGroupWrap = this.radioGroupWrap;\n }\n else if (typeof this.radioGroupWrap === 'undefined') {\n this.radioGroupWrap = (<any>this.question).pdfRadioGroupWrap;\n }\n return new RadioItemBrick(this.controller, rect,\n { question: this.question, index: index, checked: isChecked, item: item }, this.radioGroupWrap);\n }\n }\n\n protected async generateTextComposite(point: IPoint, column: ItemValue, index: number): Promise<IPdfBrick> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const itemRect = SurveyHelper.createRect(currPoint,\n SurveyHelper.getPageAvailableWidth(this.controller), this.controller.unitHeight);\n const radioFlat: IPdfBrick = this.generateFlatItem(itemRect, column, index, this.key, { row: this.row, rowIndex: this.rowIndex });\n currPoint.yTop = radioFlat.yBot + this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const cellTextFlat = await SurveyHelper.createTextFlat(currPoint, this.question, this.controller,\n this.question.getCellDisplayLocText(this.row.name, column), TextBrick);\n return new CompositeBrick(radioFlat, cellTextFlat);\n }\n protected async generateItemComposite(point: IPoint, column: ItemValue, index: number): Promise<IPdfBrick> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const itemRect: IRect = SurveyHelper.createRect(currPoint,\n this.controller.unitHeight, this.controller.unitHeight);\n const radioFlat: IPdfBrick = this.generateFlatItem(SurveyHelper.moveRect(\n SurveyHelper.scaleRect(itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE), itemRect.xLeft), column, index, this.key, { row: this.row, rowIndex: this.rowIndex });\n currPoint.xLeft = radioFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const radioText: IPdfBrick = await SurveyHelper.createTextFlat(currPoint, this.question,\n this.controller, column.locText, TextBrick);\n return new CompositeBrick(radioFlat, radioText);\n }\n protected async generateFlatsHorizontallyCells(point: IPoint) {\n const cells: IPdfBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n if (this.question.hasRows) {\n this.controller.pushMargins();\n currPoint.xLeft = this.controller.margins.left;\n this.controller.margins.right += (SurveyHelper.getPageAvailableWidth(this.controller) - this.rowTitleWidth);\n cells.push(await SurveyHelper.createTextFlat(currPoint, this.question, this.controller, this.row.locText, TextBrick));\n currPoint.xLeft += this.rowTitleWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.popMargins();\n }\n for (let i: number = 0; i < this.question.visibleColumns.length; i++) {\n const column: ItemValue = this.question.visibleColumns[i];\n const checked: boolean = this.row.value == column.value;\n this.controller.pushMargins();\n this.controller.margins.left = currPoint.xLeft;\n this.controller.margins.right += (SurveyHelper.getPageAvailableWidth(this.controller) - this.columnWidth);\n if (this.question.hasCellText) {\n cells.push(await this.generateTextComposite(currPoint, column, i));\n }\n else {\n const itemRect: IRect = SurveyHelper.createRect(currPoint, this.controller.unitHeight, this.controller.unitHeight);\n cells.push(this.generateFlatItem(SurveyHelper.moveRect(\n SurveyHelper.scaleRect(itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE), currPoint.xLeft), column, i, this.key, { row: this.row, rowIndex: this.rowIndex }));\n }\n currPoint.xLeft += this.columnWidth + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.popMargins();\n }\n const compositeBrick = new CompositeBrick(...cells);\n return [compositeBrick, SurveyHelper.createRowlineFlat(SurveyHelper.createPoint(compositeBrick), this.controller)];\n }\n protected async generateFlatsVerticallyCells(point: IPoint): Promise<IPdfBrick[]> {\n const cells: IPdfBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n if (this.question.hasRows) {\n const rowTextFlat = await SurveyHelper.createTextFlat(currPoint, this.question,\n this.controller, this.row.locText, TextBrick);\n currPoint.yTop = rowTextFlat.yBot + FlatQuestion.CONTENT_GAP_VERT_SCALE * this.controller.unitHeight;\n cells.push(rowTextFlat);\n }\n cells.push(...await this.generateVerticallyItems(currPoint, this.question.visibleColumns));\n const compositeBrick: CompositeBrick = new CompositeBrick(...cells);\n return [compositeBrick, SurveyHelper.createRowlineFlat(SurveyHelper.createPoint(compositeBrick), this.controller)];\n }\n protected async generateVerticallyItems(point: IPoint, itemValues: ItemValue[]): Promise<IPdfBrick[]> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n for (let i: number = 0; i < itemValues.length; i++) {\n const itemFlat: IPdfBrick = await ((this.question.hasCellText) ? this.generateTextComposite : this.generateItemComposite).call(this, currPoint, itemValues[i], i);\n currPoint.yTop = itemFlat.yBot + SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n flats.push(itemFlat);\n }\n return flats;\n }\n}\n\nSerializer.removeProperty('matrix', 'renderAs');\nSerializer.addProperty('matrix', {\n name: 'renderAs',\n default: 'auto',\n visible: false,\n choices: ['auto', 'list']\n});\nFlatRepository.getInstance().register('matrix', FlatMatrix);","import { IQuestion, Serializer } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { DocController } from '../doc_controller';\nimport { FlatRepository } from './flat_repository';\nimport { FlatMatrixMultiple } from './flat_matrixmultiple';\n\nexport class FlatMatrixDynamic extends FlatMatrixMultiple {\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller, false);\n }\n}\n\nSerializer.removeProperty('matrixdynamic', 'renderAs');\nSerializer.addProperty('matrixdynamic', {\n name: 'renderAs',\n default: 'auto',\n visible: false,\n choices: ['auto', 'list']\n});\nFlatRepository.getInstance().register('matrixdynamic', FlatMatrixDynamic);","import {\n IQuestion, QuestionMatrixDropdownModelBase, QuestionMatrixDropdownRenderedTable,\n QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedCell, Serializer, PanelModel, QuestionMatrixDynamicModel,\n LocalizableString\n} from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { IFlatQuestion, FlatQuestion } from './flat_question';\nimport { FlatSelectBase } from './flat_selectbase';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { FlatSurvey } from './flat_survey';\n\nexport class FlatMatrixMultiple extends FlatQuestion {\n public static readonly GAP_BETWEEN_ROWS: number = 0.5;\n protected question: QuestionMatrixDropdownModelBase;\n public constructor(protected survey: SurveyPDF, question: IQuestion, controller: DocController,\n protected isMultiple: boolean = true) {\n super(survey, question, controller);\n this.question = <QuestionMatrixDropdownModelBase>question;\n }\n private visibleRowsValue: QuestionMatrixDropdownRenderedRow[];\n private get visibleRows() {\n if(!this.visibleRowsValue) {\n this.visibleRowsValue = this.question.renderedTable.rows.filter(row => row.visible);\n }\n return this.visibleRowsValue;\n }\n private async generateFlatsCellTitle(point: IPoint, locTitle: LocalizableString): Promise<CompositeBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n composite.addBrick(await SurveyHelper.createTextFlat(point,\n this.question, this.controller, locTitle, TextBrick));\n return composite;\n }\n private async generateFlatsCell(point: IPoint, cell: QuestionMatrixDropdownRenderedCell,\n location?: 'header' | 'footer', isWide: boolean = true): Promise<CompositeBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n if (cell.hasQuestion) {\n if(location == 'footer' && !cell.question.isAnswered) {}\n else if (isWide && cell.isChoice) {\n const flatMultipleColumnsQuestion: IFlatQuestion = FlatRepository.getInstance().create(\n this.survey, cell.question, this.controller, cell.question.getType());\n const itemRect: IRect = SurveyHelper.moveRect(SurveyHelper.scaleRect(\n SurveyHelper.createRect(point, this.controller.unitHeight, this.controller.unitHeight),\n SurveyHelper.SELECT_ITEM_FLAT_SCALE), point.xLeft);\n composite.addBrick((<FlatSelectBase>flatMultipleColumnsQuestion)\n .generateFlatItem(itemRect, cell.item, cell.choiceIndex));\n }\n else {\n cell.question.titleLocation = SurveyHelper.TITLE_LOCATION_MATRIX;\n composite.addBrick(...await SurveyHelper.generateQuestionFlats(\n this.survey, this.controller, cell.question, point));\n }\n }\n else if (cell.hasTitle) {\n if (location == 'header') {\n composite.addBrick(await SurveyHelper.createBoldTextFlat(point,\n this.question, this.controller, cell.locTitle));\n }\n else {\n composite.addBrick(await SurveyHelper.createTextFlat(point,\n this.question, this.controller, cell.locTitle, TextBrick));\n }\n }\n return composite;\n }\n private get hasDetailPanel(): boolean {\n return this.visibleRows.some((renderedRow) => renderedRow.row && this.question.hasDetailPanel(renderedRow.row));\n }\n private ignoreCell(cell: QuestionMatrixDropdownRenderedCell, index: number, location?: 'header' | 'footer', isWide: boolean = true): boolean {\n if(!isWide && location == 'footer' && cell.hasQuestion && !cell.question.isAnswered) return true;\n return !(cell.hasQuestion || cell.hasTitle || (this.isMultiple && (this.hasDetailPanel ? index == 1 : index == 0)));\n }\n private getRowLocation(row: QuestionMatrixDropdownRenderedRow) {\n return row === this.question.renderedTable.headerRow ? 'header' : (this.question.renderedTable.footerRow === row ? 'footer' : undefined);\n }\n private async generateFlatsRowHorisontal(point: IPoint, row: QuestionMatrixDropdownRenderedRow, columnWidth: number[]): Promise<CompositeBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n const currPoint: IPoint = SurveyHelper.clone(point);\n let lastRightMargin: number = this.controller.paperWidth - this.controller.margins.left +\n this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.pushMargins();\n let cnt = 0;\n const rowLocation = this.getRowLocation(row);\n for (let i = 0; i < row.cells.length; i++) {\n if (this.ignoreCell(row.cells[i], i, rowLocation)) continue;\n this.controller.margins.left = this.controller.paperWidth - lastRightMargin +\n this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n this.controller.margins.right = this.controller.paperWidth -\n this.controller.margins.left - columnWidth[cnt];\n lastRightMargin = this.controller.margins.right;\n currPoint.xLeft = this.controller.margins.left;\n const cellContent: CompositeBrick = await this.generateFlatsCell(\n currPoint, row.cells[i], rowLocation);\n if (!cellContent.isEmpty) {\n composite.addBrick(cellContent);\n }\n cnt++;\n }\n this.controller.popMargins();\n return composite;\n }\n private async generateFlatsRowVertical(point: IPoint, row: QuestionMatrixDropdownRenderedRow): Promise<CompositeBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n const currPoint: IPoint = SurveyHelper.clone(point);\n const rowLocation = this.getRowLocation(row);\n for (let i: number = 0; i < row.cells.length; i++) {\n if (this.ignoreCell(row.cells[i], i, rowLocation, false)) continue;\n if (this.question.renderedTable.showHeader && (!this.isMultiple || i > 0) && row.cells[i].cell?.column?.locTitle) {\n composite.addBrick(await this.generateFlatsCellTitle(currPoint, row.cells[i].cell.column.locTitle));\n currPoint.yTop = composite.yBot + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n }\n composite.addBrick(await this.generateFlatsCell(currPoint, row.cells[i], rowLocation, false));\n currPoint.yTop = composite.yBot + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n }\n return composite;\n }\n private getAvalableWidth(colCount: number): number {\n return SurveyHelper.getPageAvailableWidth(this.controller) -\n (colCount - 1) * this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_COLUMNS;\n }\n private calculateColumnWidth(rows: QuestionMatrixDropdownRenderedRow[], colCount: number): number[] {\n const availableWidth: number = this.getAvalableWidth(colCount);\n let remainWidth: number = availableWidth;\n let remainColCount: number = colCount;\n const columnWidth: number[] = [];\n const unsetCells: QuestionMatrixDropdownRenderedCell[] = [];\n let cells = rows[0].cells.filter((cell: QuestionMatrixDropdownRenderedCell, index: number) => !this.ignoreCell(cell, index));\n for (let i: number = 0; i < colCount; i++) {\n const width: number = SurveyHelper.parseWidth(cells[i].width,\n availableWidth, colCount) || 0.0;\n remainWidth -= width;\n if (width !== 0.0) {\n remainColCount--;\n } else {\n unsetCells.push(cells[i]);\n }\n columnWidth.push(width);\n }\n if (remainColCount === 0) return columnWidth;\n const heuristicWidth: number = this.controller.measureText(SurveyHelper.MATRIX_COLUMN_WIDTH).width;\n unsetCells.sort((cell1: QuestionMatrixDropdownRenderedCell, cell2: QuestionMatrixDropdownRenderedCell) => {\n let minWidth1 = SurveyHelper.parseWidth(cell1.minWidth, availableWidth, colCount) || 0.0;\n let minWidth2 = SurveyHelper.parseWidth(cell2.minWidth, availableWidth, colCount) || 0.0;\n return minWidth2 > minWidth1 ? 1 : -1;\n }).forEach((cell: QuestionMatrixDropdownRenderedCell) => {\n const equalWidth: number = remainWidth / remainColCount;\n const columnMinWidth: number = SurveyHelper.parseWidth(cell.minWidth, availableWidth, colCount) || 0.0;\n if(columnMinWidth > equalWidth && columnMinWidth > heuristicWidth) {\n remainWidth -= columnMinWidth;\n remainColCount--;\n }\n columnWidth[cells.indexOf(cell)] = Math.max(heuristicWidth, columnMinWidth, equalWidth);\n });\n return columnWidth;\n }\n private async generateOneRow(point: IPoint, row: QuestionMatrixDropdownRenderedRow, isWide: boolean, columnWidth: number[]): Promise<CompositeBrick> {\n if (isWide) {\n return await this.generateFlatsRowHorisontal(point, row, columnWidth);\n }\n return await this.generateFlatsRowVertical(point, row);\n }\n private async generateFlatsRows(point: IPoint, rows: QuestionMatrixDropdownRenderedRow[],\n colCount: number, isWide: boolean): Promise<CompositeBrick[]> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const rowsFlats: CompositeBrick[] = [];\n for (let i: number = 0; i < rows.length; i++) {\n let rowFlat: CompositeBrick = await this.generateOneRow(currPoint, rows[i],\n isWide, this.calculateColumnWidth(rows, colCount));\n if (rowFlat.isEmpty && !(rows[i].row && rows[i].row.hasPanel)) continue;\n if(!rowFlat.isEmpty) {\n if (i !== rows.length - 1) {\n currPoint.yTop = rowFlat.yBot;\n rowFlat.addBrick(SurveyHelper.createRowlineFlat(currPoint, this.controller));\n }\n rowsFlats.push(rowFlat);\n currPoint.yTop = rowFlat.yBot + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n }\n\n if (!!rows[i].row && rows[i].row.hasPanel) {\n rows[i].row.showDetailPanel();\n const currentDetailPanel: PanelModel = rows[i].row.detailPanel;\n for (let j = 0; j < currentDetailPanel.questions.length; j++) {\n currentDetailPanel.questions[j].id += '_' + i;\n }\n const panelBricks: IPdfBrick[] = await FlatSurvey.generateFlatsPanel(\n this.survey, this.controller, currentDetailPanel, currPoint);\n\n const currComposite: CompositeBrick = new CompositeBrick();\n currComposite.addBrick(...panelBricks);\n currPoint.yTop = currComposite.yBot + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n\n rowsFlats.push(currComposite);\n if (i !== rows.length - 1 && this.question.renderedTable.showHeader && isWide) {\n const header: CompositeBrick = await this.generateOneRow(currPoint, rows[0],\n isWide, this.calculateColumnWidth(rows, colCount));\n let currYTop = currComposite.yBot;\n if(!header.isEmpty) {\n currYTop = header.yBot;\n rowsFlats.push(header);\n }\n currPoint.yTop = currYTop + FlatMatrixMultiple.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n }\n }\n }\n return rowsFlats;\n }\n private calculateIsWide(table: QuestionMatrixDropdownRenderedTable, colCount: number) {\n const rows: QuestionMatrixDropdownRenderedRow[] = [];\n if(table.showHeader) {\n rows.push(table.headerRow);\n }\n rows.push(...this.visibleRows);\n if(rows.length === 0) return true;\n const columnWidthSum = this.calculateColumnWidth(rows, colCount).reduce((widthSum: number, width: number) => widthSum += width, 0);\n return this.question.renderAs !== 'list' && this.controller.matrixRenderAs !== 'list' && Math.floor(columnWidthSum) <= Math.floor(this.getAvalableWidth(colCount));\n }\n private getRowsToRender(table: QuestionMatrixDropdownRenderedTable, isVertical: boolean, isWide: boolean) {\n const rows: QuestionMatrixDropdownRenderedRow[] = [];\n const renderedRows = this.visibleRows;\n if (table.showHeader && isWide) rows.push(table.headerRow);\n rows.push(...renderedRows);\n if (table.hasRemoveRows && isVertical) rows.pop();\n if (table.showFooter) rows.push(table.footerRow);\n return rows;\n }\n private getColCount(table: QuestionMatrixDropdownRenderedTable, renderedRows: Array<QuestionMatrixDropdownRenderedRow>): number {\n if (!!renderedRows[0]) {\n return renderedRows[0].cells.filter((cell: QuestionMatrixDropdownRenderedCell, index: number) => !this.ignoreCell(cell, index)).length;\n } else {\n return table.showHeader && table.headerRow ? table.headerRow.cells.length :\n table.showFooter && table.footerRow ? table.footerRow.cells.length : 0;\n }\n }\n\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n let table: QuestionMatrixDropdownRenderedTable = this.question.renderedTable;\n let isVertical: boolean = this.question.columnLayout === 'vertical';\n let colCount: number = this.getColCount(table, this.visibleRows);\n if (colCount === 0 && !this.hasDetailPanel) {\n return [new CompositeBrick(SurveyHelper.createRowlineFlat(point, this.controller))];\n }\n const isWide = this.calculateIsWide(table, colCount);\n if(!isWide) {\n this.question.isMobile = true;\n isVertical = false;\n table = this.question.renderedTable;\n this.visibleRowsValue = undefined;\n colCount = this.getColCount(table, this.visibleRows);\n }\n const rows = this.getRowsToRender(table, isVertical, isWide);\n return await this.generateFlatsRows(point, rows, colCount, isWide);\n }\n}\n\nSerializer.removeProperty('matrixdropdown', 'renderAs');\nSerializer.addProperty('matrixdropdown', {\n name: 'renderAs',\n default: 'auto',\n visible: false,\n choices: ['auto', 'list']\n});\nFlatRepository.getInstance().register('matrixdropdown', FlatMatrixMultiple);","import { IQuestion, QuestionMultipleTextModel, MultipleTextItemModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatQuestion, IFlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { FlatTextbox } from './flat_textbox';\n\nexport class FlatMultipleText extends FlatQuestion {\n public static readonly ROWS_GAP_SCALE: number = 0.195;\n protected question: QuestionMultipleTextModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionMultipleTextModel>question;\n }\n private getVisibleRows() {\n return this.question.getRows().filter(row => row.isVisible);\n }\n private async generateFlatItem(point: IPoint, row_index: number, col_index: number,\n item: MultipleTextItemModel): Promise<IPdfBrick> {\n const colWidth: number = SurveyHelper.getPageAvailableWidth(this.controller);\n this.controller.pushMargins();\n this.controller.margins.right = this.controller.paperWidth -\n this.controller.margins.left - colWidth * SurveyHelper.MULTIPLETEXT_TEXT_PERS;\n const compositeFlat: CompositeBrick = new CompositeBrick(await SurveyHelper.\n createBoldTextFlat(point, this.question, this.controller, item.locTitle));\n this.controller.popMargins();\n\n const flatMultipleTextItemQuestion: IFlatQuestion = FlatRepository.getInstance().create(\n this.survey, item.editor, this.controller, 'text');\n const itemPoint: IPoint = SurveyHelper.createTextFieldRect({\n xLeft: point.xLeft + colWidth * SurveyHelper.MULTIPLETEXT_TEXT_PERS, yTop: point.yTop },\n this.controller);\n compositeFlat.addBrick(...await (<FlatTextbox>flatMultipleTextItemQuestion).generateFlatsContent(itemPoint));\n\n return compositeFlat;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const rowsFlats: CompositeBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n const rows = this.getVisibleRows();\n for (let i: number = 0; i < rows.length; i++) {\n rowsFlats.push(new CompositeBrick());\n let yBot: number = currPoint.yTop;\n this.controller.pushMargins();\n for (let j: number = 0; j < rows[i].cells.length; j++) {\n this.controller.pushMargins();\n SurveyHelper.setColumnMargins(this.controller, this.question.colCount, j);\n currPoint.xLeft = this.controller.margins.left;\n const itemFlat: IPdfBrick = await this.generateFlatItem(\n currPoint, i, j, rows[i].cells[j].item);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n yBot = Math.max(yBot, itemFlat.yBot);\n this.controller.popMargins();\n }\n this.controller.popMargins();\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = yBot;\n rowsFlats[rowsFlats.length - 1].addBrick(\n SurveyHelper.createRowlineFlat(currPoint, this.controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n currPoint.yTop += this.controller.unitHeight * FlatMultipleText.ROWS_GAP_SCALE;\n }\n return rowsFlats;\n }\n}\n\nFlatRepository.getInstance().register('multipletext', FlatMultipleText);","import { IQuestion, QuestionPanelDynamicModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatSurvey } from './flat_survey';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatPanelDynamic extends FlatQuestion {\n protected question: QuestionPanelDynamicModel;\n public static readonly GAP_BETWEEN_PANELS: number = 0.75;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionPanelDynamicModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const flats: IPdfBrick[] = [];\n const currPoint: IPoint = SurveyHelper.clone(point);\n for (const panel of this.question.panels) {\n const panelFlats: IPdfBrick[] = await FlatSurvey.generateFlatsPanel(\n this.survey, this.controller, panel, currPoint);\n if (panelFlats.length !== 0) {\n currPoint.yTop = SurveyHelper.mergeRects(...panelFlats).yBot;\n currPoint.yTop += this.controller.unitHeight * FlatPanelDynamic.GAP_BETWEEN_PANELS;\n flats.push(...panelFlats);\n }\n }\n return flats;\n }\n}\n\nFlatRepository.getInstance().register('paneldynamic', FlatPanelDynamic);","import { IQuestion, Question, LocalizableString, Serializer, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { FlatSurvey } from './flat_survey';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport interface IFlatQuestion {\n generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;\n generateFlats(point: IPoint): Promise<IPdfBrick[]>;\n}\nexport class FlatQuestion implements IFlatQuestion {\n public static CONTENT_GAP_VERT_SCALE: number = 0.5;\n public static CONTENT_GAP_HOR_SCALE: number = 1.0;\n public static CONTENT_INDENT_SCALE: number = 1.0;\n public static DESC_GAP_SCALE: number = 0.0625;\n protected question: Question;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n this.question = <Question>question;\n }\n private async generateFlatTitle(point: IPoint): Promise<IPdfBrick> {\n return await SurveyHelper.createTitleFlat(point,\n this.question, this.controller);\n }\n private async generateFlatDescription(point: IPoint): Promise<IPdfBrick> {\n return await SurveyHelper.createDescFlat(point, this.question, this.controller, this.question.locDescription);\n }\n private async generateFlatHeader(point: IPoint): Promise<CompositeBrick> {\n const titleFlat: IPdfBrick = await this.generateFlatTitle(point);\n const compositeFlat: CompositeBrick = new CompositeBrick(titleFlat);\n if(this.question.hasDescriptionUnderTitle) {\n const descPoint: IPoint = SurveyHelper.createPoint(titleFlat, true, false);\n descPoint.yTop += FlatQuestion.DESC_GAP_SCALE * this.controller.unitHeight;\n descPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n compositeFlat.addBrick(await this.generateFlatDescription(descPoint));\n }\n return compositeFlat;\n }\n private async generateFlatsComment(point: IPoint): Promise<IPdfBrick> {\n const text: LocalizableString = this.question.locCommentText;\n const otherTextFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n point, this.question, this.controller, text, TextBrick);\n const otherPoint: IPoint = SurveyHelper.createPoint(otherTextFlat);\n otherPoint.yTop += this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ROWS;\n return new CompositeBrick(otherTextFlat, await SurveyHelper.createCommentFlat(\n otherPoint, this.question, this.controller, {\n fieldName: this.question.id + '_comment',\n rows: SurveyHelper.OTHER_ROWS_COUNT,\n value: this.question.comment !== undefined && this.question.comment !== null ? this.question.comment : '',\n shouldRenderBorders: settings.readOnlyCommentRenderMode === 'textarea',\n isReadOnly: this.question.isReadOnly,\n isMultiline: true,\n placeholder: ''\n }));\n }\n public async generateFlatsComposite(point: IPoint): Promise<IPdfBrick[]> {\n const contentPanel = (<any>this.question).contentPanel;\n if (!!contentPanel) {\n return await FlatSurvey.generateFlatsPanel(this.survey,\n this.controller, contentPanel, point);\n }\n this.question = SurveyHelper.getContentQuestion(this.question);\n return await this.generateFlatsContent(point);\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n return null;\n }\n public async generateFlatsContentWithOptionalElements(point: IPoint): Promise<IPdfBrick[]> {\n const flats: Array<IPdfBrick> = [];\n const contentFlats = await this.generateFlatsComposite(point);\n if(Array.isArray(contentFlats)) {\n flats.push(...contentFlats);\n }\n const getLatestPoint = (): IPoint => {\n const res = SurveyHelper.clone(point);\n if(contentFlats !== null && contentFlats.length !== 0) {\n res.yTop = SurveyHelper.mergeRects(...flats).yBot + this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ROWS;\n }\n return res;\n };\n if (this.question.hasComment) {\n flats.push(await this.generateFlatsComment(getLatestPoint()));\n }\n if (this.question.hasDescriptionUnderInput) {\n flats.push(await this.generateFlatDescription(getLatestPoint()));\n }\n\n return flats;\n }\n public async generateFlats(point: IPoint): Promise<IPdfBrick[]> {\n this.controller.pushMargins();\n this.controller.margins.left += this.controller.measureText(this.question.indent).width;\n const indentPoint: IPoint = {\n xLeft: point.xLeft + this.controller.measureText(this.question.indent).width,\n yTop: point.yTop\n };\n const flats: IPdfBrick[] = [];\n let titleLocation: string = this.question.getTitleLocation();\n titleLocation = this.question.hasTitle ? titleLocation : 'hidden';\n switch (titleLocation) {\n case 'top':\n case 'default': {\n const headerFlat = await this.generateFlatHeader(indentPoint);\n let contentPoint: IPoint = SurveyHelper.createPoint(headerFlat);\n contentPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n headerFlat.addBrick(SurveyHelper.createRowlineFlat(\n SurveyHelper.createPoint(headerFlat), this.controller));\n contentPoint.yTop += this.controller.unitHeight *\n FlatQuestion.CONTENT_GAP_VERT_SCALE + SurveyHelper.EPSILON;\n this.controller.pushMargins();\n this.controller.margins.left += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n const contentFlats: IPdfBrick[] = await this.generateFlatsContentWithOptionalElements(contentPoint);\n this.controller.popMargins();\n if(contentFlats !== null && contentFlats.length !== 0) {\n headerFlat.addBrick(contentFlats.shift());\n }\n flats.push(headerFlat);\n flats.push(...contentFlats);\n break;\n }\n case 'bottom': {\n const contentPoint: IPoint = SurveyHelper.clone(indentPoint);\n this.controller.pushMargins();\n contentPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n this.controller.margins.left += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n const contentFlats: IPdfBrick[] = await this.generateFlatsContentWithOptionalElements(contentPoint);\n this.controller.popMargins();\n flats.push(...contentFlats);\n const titlePoint: IPoint = indentPoint;\n if (flats.length !== 0) {\n titlePoint.yTop = flats[flats.length - 1].yBot;\n }\n titlePoint.yTop += this.controller.unitHeight * FlatQuestion.CONTENT_GAP_VERT_SCALE;\n flats.push(await this.generateFlatHeader(titlePoint));\n break;\n }\n case 'left': {\n this.controller.pushMargins(this.controller.margins.left,\n this.controller.paperWidth - this.controller.margins.left -\n SurveyHelper.getPageAvailableWidth(this.controller) *\n SurveyHelper.MULTIPLETEXT_TEXT_PERS);\n const headerFlat: CompositeBrick = await this.generateFlatHeader(indentPoint);\n const contentPoint: IPoint = SurveyHelper.createPoint(headerFlat, false, true);\n this.controller.popMargins();\n contentPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_GAP_HOR_SCALE;\n this.controller.margins.left = contentPoint.xLeft;\n const contentFlats: IPdfBrick[] = await this.generateFlatsContentWithOptionalElements(contentPoint);\n if(contentFlats !== null && contentFlats.length !== 0) {\n headerFlat.addBrick(contentFlats.shift());\n }\n flats.push(headerFlat);\n flats.push(...contentFlats);\n break;\n }\n case 'hidden':\n case SurveyHelper.TITLE_LOCATION_MATRIX:\n default: {\n const contentPoint: IPoint = SurveyHelper.clone(indentPoint);\n this.controller.pushMargins();\n if (titleLocation !== SurveyHelper.TITLE_LOCATION_MATRIX) {\n contentPoint.xLeft += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n this.controller.margins.left += this.controller.unitWidth * FlatQuestion.CONTENT_INDENT_SCALE;\n }\n flats.push(...await this.generateFlatsContentWithOptionalElements(contentPoint));\n this.controller.popMargins();\n break;\n }\n }\n this.controller.popMargins();\n return flats;\n }\n protected get shouldRenderAsComment(): boolean {\n return SurveyHelper.shouldRenderReadOnly(this.question, this.controller);\n }\n}\n\nSerializer.addProperty('question', {\n name: 'readonlyRenderAs',\n default: 'auto',\n choices: ['auto', 'text', 'acroform'],\n visible: false\n});","import { IQuestion, ItemValue, QuestionRadiogroupModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IRect, DocController } from '../doc_controller';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { RadioGroupWrap, RadioItemBrick } from '../pdf_render/pdf_radioitem';\nimport { FlatSelectBase } from './flat_selectbase';\n\nexport class FlatRadiogroup extends FlatSelectBase {\n protected question: QuestionRadiogroupModel;\n private radioGroupWrap: RadioGroupWrap;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionRadiogroupModel>question;\n }\n protected isItemSelected(item: ItemValue, checked?: boolean): boolean {\n return (typeof checked === 'undefined') ?\n (item === this.question.otherItem ? this.question.isOtherSelected :\n (item.value === this.question.value ||\n (typeof this.question.isItemSelected !== 'undefined' &&\n this.question.isItemSelected(item)))) : checked;\n }\n public generateFlatItem(rect: IRect, item: ItemValue,\n index: number, key?: string, checked?: boolean, context: any = {}): IPdfBrick {\n if (index === 0) {\n this.radioGroupWrap = new RadioGroupWrap(this.question.id + ((typeof key === 'undefined') ? '' : key),\n this.controller, { readOnly: this.question.isReadOnly, question: this.question, ...context });\n (<any>this.question).pdfRadioGroupWrap = this.radioGroupWrap;\n }\n else if (typeof this.radioGroupWrap === 'undefined') {\n this.radioGroupWrap = (<any>this.question).pdfRadioGroupWrap;\n }\n const isChecked: boolean = this.isItemSelected(item, checked);\n return new RadioItemBrick(this.controller, rect,\n { question: this.question, index: index, checked: isChecked, item: item }, this.radioGroupWrap);\n }\n}\n\nFlatRepository.getInstance().register('radiogroup', FlatRadiogroup);\nFlatRepository.getInstance().register('buttongroup', FlatRadiogroup);","import { IQuestion, ItemValue, QuestionRankingModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { RankingItemBrick } from '../pdf_render/pdf_rankingitem';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { ColoredBrick } from '../pdf_render/pdf_coloredbrick';\n\nexport class FlatRanking extends FlatQuestion {\n protected question: QuestionRankingModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionRankingModel>question;\n }\n protected async generateFlatComposite(point: IPoint, item: ItemValue, index: number, unrankedItem: boolean = false): Promise<IPdfBrick> {\n const itemRect: IRect = SurveyHelper.createRect(point,\n this.controller.unitWidth, this.controller.unitHeight);\n const itemScaledRect: IRect = SurveyHelper.moveRect(SurveyHelper.scaleRect(\n itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE), point.xLeft);\n const itemFlat: IPdfBrick = new RankingItemBrick(this.question, this.controller,\n itemScaledRect, unrankedItem ? '-' : this.question.getNumberByIndex(index));\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft = itemFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const textFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n textPoint, this.question, this.controller, item.locText, TextBrick);\n return new CompositeBrick(itemFlat, textFlat);\n }\n public async generateChoicesColumn(point: IPoint, choices: ItemValue[], unrankedChoices: boolean = false): Promise<IPdfBrick[]> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n for (let i: number = 0; i < choices.length; i++) {\n const itemFlat: IPdfBrick = await this.generateFlatComposite(currPoint, choices[i], i, unrankedChoices);\n currPoint.yTop = itemFlat.yBot + SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n flats.push(itemFlat);\n }\n return flats;\n }\n public async generateSelectToRankItemsVertically(point: IPoint): Promise<IPdfBrick[]> {\n const currPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n if(this.question.rankingChoices.length !== 0) {\n flats.push(...await this.generateChoicesColumn(currPoint, this.question.rankingChoices));\n currPoint.yTop = flats[flats.length - 1].yBot + 2 * (SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight);\n }\n const separatorRect = SurveyHelper.createRect({\n xLeft: currPoint.xLeft,\n yTop: currPoint.yTop - (SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight) - 0.5,\n }, this.controller.paperWidth - this.controller.margins.right - currPoint.xLeft, 1);\n flats.push(new ColoredBrick(this.controller, separatorRect, SurveyHelper.FORM_BORDER_COLOR));\n\n flats.push(...await this.generateChoicesColumn(currPoint, this.question.unRankingChoices, true));\n return flats;\n }\n public async generateSelectToRankItemsHorizontally(point: IPoint): Promise<IPdfBrick[]> {\n const colCount = 2;\n const currPoint: IPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n const rowsCount = Math.max(this.question.unRankingChoices.length, this.question.rankingChoices.length);\n let row: CompositeBrick = new CompositeBrick();\n for (let i: number = 0; i < rowsCount; i++) {\n let colIndex = 0;\n for (let item of [this.question.unRankingChoices[i], this.question.rankingChoices[i]]) {\n if(!!item) {\n this.controller.pushMargins(this.controller.margins.left, this.controller.margins.right);\n SurveyHelper.setColumnMargins(this.controller, colCount, colIndex);\n currPoint.xLeft = this.controller.margins.left;\n const itemFlat: IPdfBrick = await this.generateFlatComposite(\n currPoint, item, i, colIndex == 0);\n row.addBrick(itemFlat);\n this.controller.popMargins();\n }\n colIndex++;\n }\n const rowLineFlat: IPdfBrick = SurveyHelper.createRowlineFlat(\n SurveyHelper.createPoint(row), this.controller);\n flats.push(row, rowLineFlat);\n const separatorRect = SurveyHelper.createRect({\n xLeft: this.controller.margins.left + SurveyHelper.getPageAvailableWidth(this.controller) / 2 - 0.5,\n yTop: currPoint.yTop,\n }, 0, 0);\n row.addBrick(new ColoredBrick(this.controller, separatorRect, SurveyHelper.FORM_BORDER_COLOR, 1, rowLineFlat.yBot - currPoint.yTop + (i !== rowsCount - 1 ?\n SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight : 0)));\n\n currPoint.yTop = rowLineFlat.yBot +\n SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n row = new CompositeBrick();\n }\n return flats;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n if(!this.question.selectToRankEnabled) {\n return this.generateChoicesColumn(point, this.question.rankingChoices);\n }\n else if(this.question.selectToRankAreasLayout == 'vertical') {\n return this.generateSelectToRankItemsVertically(point);\n }\n else {\n return this.generateSelectToRankItemsHorizontally(point);\n }\n }\n}\n\nFlatRepository.getInstance().register('ranking', FlatRanking);","import { IQuestion, ItemValue, QuestionRatingModel, LocalizableString } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatRadiogroup } from './flat_radiogroup';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class FlatRating extends FlatRadiogroup {\n protected questionRating: QuestionRatingModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.questionRating = <QuestionRatingModel>question;\n }\n protected async generateFlatHorisontalComposite(point: IPoint, item: ItemValue, index: number): Promise<IPdfBrick> {\n const itemText: LocalizableString = SurveyHelper.getRatingItemText(\n this.questionRating, index, item.locText);\n this.controller.pushMargins();\n const halfWidth: number = this.controller.unitWidth / 2.0;\n this.controller.margins.left += halfWidth;\n this.controller.margins.right += halfWidth;\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft += halfWidth;\n const compositeFlat: CompositeBrick = new CompositeBrick(await SurveyHelper.\n createBoldTextFlat(textPoint, this.questionRating, this.controller, itemText));\n this.controller.popMargins();\n let textWidth: number = compositeFlat.width;\n if (textWidth < SurveyHelper.getRatingMinWidth(this.controller)) {\n compositeFlat.xLeft += (SurveyHelper.getRatingMinWidth(\n this.controller) - textWidth) / 2.0 - halfWidth;\n textWidth = SurveyHelper.getRatingMinWidth(this.controller);\n }\n else {\n textWidth += this.controller.unitWidth;\n }\n const radioPoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n radioPoint.xLeft = point.xLeft;\n compositeFlat.addBrick(this.generateFlatItem(SurveyHelper.createRect(\n radioPoint, textWidth, this.controller.unitHeight), item, index, undefined, this.question.value == item.value));\n return compositeFlat;\n }\n protected async generateFlatComposite(point: IPoint, item: ItemValue, index: number): Promise<IPdfBrick> {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n const itemRect: IRect = SurveyHelper.createRect(point,\n this.controller.unitHeight, this.controller.unitHeight);\n const itemFlat: IPdfBrick = this.generateFlatItem(SurveyHelper.moveRect(\n SurveyHelper.scaleRect(itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE),\n point.xLeft), item, index, undefined, this.question.value == item.value);\n compositeFlat.addBrick(itemFlat);\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft = itemFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n const itemText: LocalizableString = SurveyHelper.getRatingItemText(this.questionRating, index, item.locText);\n itemText == null || compositeFlat.addBrick(await SurveyHelper.createTextFlat(\n textPoint, this.question, this.controller, itemText, TextBrick));\n return compositeFlat;\n }\n protected async generateHorisontallyItems(point: IPoint) {\n const rowsFlats: CompositeBrick[] = [new CompositeBrick()];\n const currPoint: IPoint = SurveyHelper.clone(point);\n for (let i: number = 0; i < this.questionRating.visibleRateValues.length; i++) {\n const itemFlat: IPdfBrick = await this.generateFlatHorisontalComposite(currPoint,\n this.questionRating.visibleRateValues[i], i);\n rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);\n const leftWidth: number = this.controller.paperWidth -\n this.controller.margins.right - itemFlat.xRight;\n if (SurveyHelper.getRatingMinWidth(this.controller) <= leftWidth + SurveyHelper.EPSILON) {\n currPoint.xLeft = itemFlat.xRight;\n }\n else {\n currPoint.xLeft = point.xLeft;\n currPoint.yTop = itemFlat.yBot;\n if (i !== this.questionRating.visibleRateValues.length - 1) {\n rowsFlats[rowsFlats.length - 1].addBrick(\n SurveyHelper.createRowlineFlat(currPoint, this.controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n rowsFlats.push(new CompositeBrick());\n }\n }\n }\n return rowsFlats;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n let isVertical: boolean = false;\n for (let i: number = 0; i < this.questionRating.visibleRateValues.length; i++) {\n const itemText: LocalizableString = SurveyHelper.getRatingItemText(\n this.questionRating, i, this.questionRating.visibleRateValues[i].locText);\n if (this.controller.measureText(itemText).width > this.controller.measureText(SurveyHelper.RATING_COLUMN_WIDTH).width) {\n isVertical = true;\n }\n }\n return isVertical ? this.generateVerticallyItems(point, this.questionRating.visibleRateValues) : this.generateHorisontallyItems(point);\n }\n}\n\nFlatRepository.getInstance().register('rating', FlatRating);","import { IQuestion, Question } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { DocController } from '../doc_controller';\nimport { IFlatQuestion, FlatQuestion } from './flat_question';\nimport { FlatQuestionDefault } from './flat_default';\n\nexport type FlatConstructor = new (\n survey: SurveyPDF,\n question: IQuestion,\n controller: DocController\n) => IFlatQuestion;\nexport class FlatRepository {\n private questions: { [index: string]: FlatConstructor } = {};\n private static instance: FlatRepository = new FlatRepository();\n public static getInstance(): FlatRepository {\n return FlatRepository.instance;\n }\n public register(modelType: string, rendererConstructor: FlatConstructor): void {\n this.questions[modelType] = rendererConstructor;\n }\n public isTypeRegistered(type: string): boolean {\n return !!this.questions[type];\n }\n public getRenderer(type: string): FlatConstructor {\n return this.questions[type];\n }\n public create(survey: SurveyPDF, question: Question,\n docController: DocController, type?: string): IFlatQuestion {\n const questionType: string = typeof type === 'undefined' ? question.getType() : type;\n let rendererConstructor = this.getRenderer(questionType);\n if(!rendererConstructor) {\n if(!!question.customWidget?.pdfRender) {\n rendererConstructor = FlatQuestion;\n } else {\n rendererConstructor = FlatQuestionDefault;\n }\n }\n return new rendererConstructor(survey, question, docController);\n }\n public static register(type: string, rendererConstructor: FlatConstructor): void {\n this.getInstance().register(type, rendererConstructor);\n }\n public static getRenderer(type: string): FlatConstructor {\n return this.getInstance().getRenderer(type);\n }\n}","import { IQuestion, ItemValue, QuestionCheckboxBase, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { TextBrick } from '../pdf_render/pdf_text';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { SurveyHelper } from '../helper_survey';\nimport { ChoiceItem } from 'survey-core';\n\nexport abstract class FlatSelectBase extends FlatQuestion {\n protected question: QuestionCheckboxBase;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionCheckboxBase>question;\n }\n public abstract generateFlatItem(rect: IRect, item: ItemValue, index: number): IPdfBrick;\n protected async generateItemComment(point: IPoint, item: ItemValue) {\n const commentModel = this.question.getCommentTextAreaModel(item);\n return await SurveyHelper.createCommentFlat(\n point, this.question, this.controller, {\n fieldName: commentModel.id,\n rows: SurveyHelper.OTHER_ROWS_COUNT,\n value: commentModel.getTextValue(),\n shouldRenderBorders: settings.readOnlyCommentRenderMode === 'textarea',\n isReadOnly: this.question.isReadOnly,\n isMultiline: true,\n });\n }\n protected async generateFlatComposite(point: IPoint, item: ItemValue | ChoiceItem, index: number): Promise<IPdfBrick> {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n const itemRect: IRect = SurveyHelper.createRect(point,\n this.controller.unitWidth, this.controller.unitHeight);\n const itemFlat: IPdfBrick = this.generateFlatItem(SurveyHelper.moveRect(\n SurveyHelper.scaleRect(itemRect, SurveyHelper.SELECT_ITEM_FLAT_SCALE),\n point.xLeft), item, index);\n\n compositeFlat.addBrick(itemFlat);\n const textPoint: IPoint = SurveyHelper.clone(point);\n textPoint.xLeft = itemFlat.xRight + this.controller.unitWidth * SurveyHelper.GAP_BETWEEN_ITEM_TEXT;\n if (item.locText.renderedHtml !== null) {\n compositeFlat.addBrick(await SurveyHelper.createTextFlat(\n textPoint, this.question, this.controller, item.locText, TextBrick));\n }\n if(item.isCommentShowing) {\n const otherPoint: IPoint = SurveyHelper.createPoint(compositeFlat, true, false);\n otherPoint.yTop += this.controller.unitHeight * SurveyHelper.GAP_BETWEEN_ROWS;\n compositeFlat.addBrick(await this.generateItemComment(otherPoint, item));\n }\n return compositeFlat;\n }\n protected getVisibleChoices(): Array<ItemValue> {\n return this.question.visibleChoices;\n }\n protected getColCount(): number {\n return this.question.colCount;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const colCount = this.getColCount();\n const visibleChoices = this.getVisibleChoices();\n let currentColCount: number = colCount;\n if (colCount == 0) {\n currentColCount = Math.floor(SurveyHelper.getPageAvailableWidth(this.controller)\n / this.controller.measureText(SurveyHelper.MATRIX_COLUMN_WIDTH).width) || 1;\n if (visibleChoices.length < currentColCount) {\n currentColCount = visibleChoices.length;\n }\n }\n else if (colCount > 1) {\n currentColCount = (SurveyHelper.getColumnWidth(this.controller, colCount) <\n this.controller.measureText(SurveyHelper.MATRIX_COLUMN_WIDTH).width) ? 1 : colCount;\n if(currentColCount == colCount) {\n return await this.generateColumns(point);\n }\n }\n return (currentColCount == 1) ? await this.generateVerticallyItems(point, visibleChoices) :\n await this.generateHorisontallyItems(point, currentColCount);\n\n }\n\n protected async generateRows(point: IPoint, rows: Array<Array<ItemValue>>) {\n const visibleChoices = this.getVisibleChoices();\n const currPoint: IPoint = SurveyHelper.clone(point);\n const colCount = (rows[0] ?? []).length;\n const flats: IPdfBrick[] = [];\n for (let row of rows) {\n const rowFlat: CompositeBrick = new CompositeBrick();\n for (let colIndex = 0; colIndex < row.length; colIndex ++) {\n const item = row[colIndex];\n this.controller.pushMargins();\n SurveyHelper.setColumnMargins(this.controller, colCount, colIndex);\n currPoint.xLeft = this.controller.margins.left;\n const itemFlat: IPdfBrick = await this.generateFlatComposite(\n currPoint, item, visibleChoices.indexOf(item));\n rowFlat.addBrick(itemFlat);\n this.controller.popMargins();\n }\n const rowLineFlat: IPdfBrick = SurveyHelper.createRowlineFlat(\n SurveyHelper.createPoint(rowFlat), this.controller);\n currPoint.yTop = rowLineFlat.yBot +\n SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n flats.push(rowFlat, rowLineFlat);\n }\n return flats;\n }\n\n protected async generateVerticallyItems(point: IPoint, itemValues: ItemValue[]): Promise<IPdfBrick[]> {\n const currPoint: IPoint = SurveyHelper.clone(point);\n const flats: IPdfBrick[] = [];\n for (let i: number = 0; i < itemValues.length; i++) {\n const itemFlat: IPdfBrick = await this.generateFlatComposite(currPoint, itemValues[i], i);\n currPoint.yTop = itemFlat.yBot + SurveyHelper.GAP_BETWEEN_ROWS * this.controller.unitHeight;\n flats.push(itemFlat);\n }\n return flats;\n }\n\n protected async generateColumns(point: IPoint): Promise<IPdfBrick[]> {\n const columns = this.question.columns;\n const rowsCount = columns.reduce((max, column) => Math.max(max, column.length), 0);\n const rows: Array<Array<ItemValue>> = [];\n for (let i = 0; i < rowsCount; i++) {\n const row = [];\n for (let column of columns) {\n if(column[i]) {\n row.push(column[i]);\n }\n }\n rows.push(row);\n }\n return await this.generateRows(point, rows);\n }\n protected async generateHorisontallyItems(point: IPoint, colCount: number): Promise<IPdfBrick[]> {\n const rows: Array<Array<ItemValue>> = [];\n const visibleChoices = this.getVisibleChoices();\n visibleChoices.forEach((item, index) => {\n const rowIndex = Math.floor(index / colCount);\n const colIndex = index % colCount;\n if(!rows[rowIndex]) rows[rowIndex] = [];\n rows[rowIndex][colIndex] = item;\n });\n return await this.generateRows(point, rows);\n }\n}\n","import { IQuestion, QuestionSignaturePadModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPoint, DocController, IRect, ISize } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from '../pdf_render/pdf_brick';\nimport { IBorderDescription, SurveyHelper } from '../helper_survey';\nimport { EmptyBrick } from '../pdf_render/pdf_empty';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\n\nexport class FlatSignaturePad extends FlatQuestion {\n protected question: QuestionSignaturePadModel;\n public static BORDER_STYLE: 'dashed' | 'solid' | 'none' = 'dashed';\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionSignaturePadModel>question;\n }\n private _signatureSize: ISize;\n private get signatureSize(): ISize {\n if(!this._signatureSize) {\n let width = SurveyHelper.pxToPt(<any>this.question.signatureWidth);\n let height = SurveyHelper.pxToPt(<any>this.question.signatureHeight);\n const availableWidth = SurveyHelper.getPageAvailableWidth(this.controller);\n if(width > availableWidth) {\n const newWidth: number = availableWidth;\n height *= newWidth / width;\n width = newWidth;\n }\n this._signatureSize = { width, height };\n }\n return this._signatureSize;\n }\n public async generateBackgroundImage(point: IPoint): Promise<IPdfBrick> {\n return await SurveyHelper.createImageFlat(point, this.question, this.controller, { link: this.question.backgroundImage, ...this.signatureSize, objectFit: 'cover' }, true);\n }\n private getSignImageUrl() {\n return this.question.storeDataAsText || !this.question.loadedData ? this.question.value : this.question.loadedData;\n }\n public async generateSign(point: IPoint): Promise<IPdfBrick> {\n let brick: PdfBrick;\n if(this.question.value) {\n brick = await SurveyHelper.createImageFlat(point,\n this.question, this.controller, { link: this.getSignImageUrl(), ...this.signatureSize }, false\n ) as PdfBrick;\n } else {\n brick = new EmptyBrick(SurveyHelper.createRect(point, this.signatureSize.width, this.signatureSize.height));\n }\n if(FlatSignaturePad.BORDER_STYLE !== 'none') {\n brick.afterRenderCallback = () => {\n const borderOptions: IBorderDescription = {\n height: brick.width,\n width: brick.width,\n yTop: brick.yTop,\n yBot: brick.yBot,\n xLeft: brick.xLeft,\n xRight: brick.xRight,\n formBorderColor: brick.formBorderColor,\n rounded: false,\n outside: true,\n dashStyle: FlatSignaturePad.BORDER_STYLE == 'dashed' ? {\n dashArray: [5],\n dashPhase: 0\n } : undefined\n };\n SurveyHelper.renderFlatBorders(this.controller, borderOptions);\n };\n }\n\n return brick;\n }\n\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const compositeBrick = new CompositeBrick();\n if(this.question.backgroundImage) {\n compositeBrick.addBrick(await this.generateBackgroundImage(point));\n }\n compositeBrick.addBrick(await this.generateSign(point));\n return [compositeBrick];\n }\n}\n\nFlatRepository.getInstance().register('signaturepad', FlatSignaturePad);","import { IQuestion, QuestionSliderModel, QuestionTextModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\nimport { ITextFieldBrickOptions, TextFieldBrick } from '../pdf_render/pdf_textfield';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\n\nexport class FlatSlider extends FlatQuestion {\n protected question: QuestionSliderModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, protected controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionSliderModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n let currentPoint: IPoint = SurveyHelper.clone(point);\n\n if (this.question.sliderType === 'single') {\n const options = this.getOptionsByValue(this.question.value);\n const inputBrick: IPdfBrick = await this.generateInputBrick(currentPoint, options);\n return [inputBrick];\n }\n\n if (this.question.sliderType === 'range') {\n const compositeBrick: CompositeBrick = new CompositeBrick();\n for (let i = 0; i < this.question.value.length; i++) {\n const valueItem = this.question.value[i];\n const options = this.getOptionsByValue(valueItem);\n const columnInput = await this.generateColumnInput(currentPoint, options, 2, i);\n compositeBrick.addBrick(columnInput);\n }\n return [compositeBrick];\n }\n }\n private getOptionsByValue(value: string):ITextFieldBrickOptions {\n const { id, isReadOnly } = this.question;\n return {\n fieldName: id,\n inputType: 'number',\n value,\n isReadOnly,\n shouldRenderBorders: true,\n };\n }\n\n private async generateInputBrick(point: IPoint, options:ITextFieldBrickOptions): Promise<IPdfBrick> {\n if (!this.shouldRenderAsComment) {\n const rect1: IRect = SurveyHelper.createTextFieldRect(point, this.controller);\n return new TextFieldBrick(this.question, this.controller, rect1, { ...options });\n }\n else {\n return await SurveyHelper.createCommentFlat(point, this.question, this.controller, { ...options });\n }\n }\n\n private async generateColumnInput(point: IPoint, options:ITextFieldBrickOptions, colCount: number, colNumber: number): Promise<IPdfBrick> {\n this.controller.pushMargins();\n SurveyHelper.setColumnMargins(this.controller, colCount, colNumber);\n const currentPoint = SurveyHelper.clone(point);\n currentPoint.xLeft = this.controller.margins.left;\n const inputBrick = await this.generateInputBrick(currentPoint, options);\n this.controller.popMargins();\n return inputBrick;\n }\n}\n\nFlatRepository.getInstance().register('slider', FlatSlider);","import { IElement, Question, PanelModelBase, PanelModel } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, DocController } from '../doc_controller';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { CompositeBrick } from '../pdf_render/pdf_composite';\nimport { RowlineBrick } from '../pdf_render/pdf_rowline';\nimport { SurveyHelper } from '../helper_survey';\nimport { AdornersPanelOptions, AdornersPageOptions } from '../event_handler/adorners';\nimport { FlatRepository } from '../entries/pdf';\nimport * as SurveyPDFModule from '../entries/pdf';\n\nexport class FlatSurvey {\n public static QUES_GAP_VERT_SCALE: number = 1.5;\n public static PANEL_CONT_GAP_SCALE: number = 1.0;\n public static PANEL_DESC_GAP_SCALE: number = 0.25;\n public static async generateFlatsPanel(survey: SurveyPDF, controller: DocController,\n panel: PanelModel, point: IPoint): Promise<IPdfBrick[]> {\n const panelFlats: IPdfBrick[] = [];\n const panelContentPoint: IPoint = SurveyHelper.clone(point);\n controller.pushMargins();\n controller.margins.left += controller.measureText(panel.innerIndent).width;\n panelContentPoint.xLeft += controller.measureText(panel.innerIndent).width;\n panelFlats.push(...await this.generateFlatsPagePanel(survey,\n controller, panel, panelContentPoint));\n controller.popMargins();\n const adornersOptions: AdornersPanelOptions = new AdornersPanelOptions(point,\n panelFlats, panel, controller, FlatRepository.getInstance(), SurveyPDFModule);\n await survey.onRenderPanel.fire(survey, adornersOptions);\n return [...adornersOptions.bricks];\n }\n private static async generateFlatsPagePanel(survey: SurveyPDF, controller: DocController,\n pagePanel: PanelModelBase, point: IPoint): Promise<IPdfBrick[]> {\n if (!pagePanel.isVisible) return;\n pagePanel.onFirstRendering();\n const pagePanelFlats: IPdfBrick[] = [];\n let currPoint: IPoint = SurveyHelper.clone(point);\n if (pagePanel.getType() !== 'page' || survey.showPageTitles) {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n if (pagePanel.title) {\n if (pagePanel instanceof PanelModel && pagePanel.no) {\n const noFlat: IPdfBrick = await SurveyHelper.createTitlePanelFlat(\n currPoint, controller, pagePanel.no, pagePanel.getType() === 'page');\n compositeFlat.addBrick(noFlat);\n currPoint.xLeft = noFlat.xRight + controller.measureText(' ').width;\n }\n const pagelPanelTitleFlat: IPdfBrick = await SurveyHelper.createTitlePanelFlat(\n currPoint, controller, pagePanel.locTitle, pagePanel.getType() === 'page');\n compositeFlat.addBrick(pagelPanelTitleFlat);\n currPoint = SurveyHelper.createPoint(pagelPanelTitleFlat);\n }\n if (pagePanel.description) {\n if (pagePanel.title) {\n currPoint.yTop += controller.unitWidth * FlatSurvey.PANEL_DESC_GAP_SCALE;\n }\n const pagePanelDescFlat: IPdfBrick = await SurveyHelper.createDescFlat(\n currPoint, null, controller, pagePanel.locDescription);\n compositeFlat.addBrick(pagePanelDescFlat);\n currPoint = SurveyHelper.createPoint(pagePanelDescFlat);\n }\n if (!compositeFlat.isEmpty) {\n const rowLinePoint: IPoint = SurveyHelper.createPoint(compositeFlat);\n compositeFlat.addBrick(SurveyHelper.createRowlineFlat(rowLinePoint, controller));\n pagePanelFlats.push(compositeFlat);\n currPoint.yTop += controller.unitHeight * FlatSurvey.PANEL_CONT_GAP_SCALE + SurveyHelper.EPSILON;\n }\n }\n for (const row of pagePanel.rows) {\n if (!row.visible) continue;\n controller.pushMargins();\n const width: number = SurveyHelper.getPageAvailableWidth(controller);\n let nextMarginLeft: number = controller.margins.left;\n const rowFlats: IPdfBrick[] = [];\n const visibleElements = row.elements.filter(el => el.isVisible);\n for (let i: number = 0; i < visibleElements.length; i++) {\n let element: IElement = visibleElements[i];\n if (!element.isVisible) continue;\n const persWidth: number = SurveyHelper.parseWidth(element.renderWidth,\n width - (visibleElements.length - 1) * controller.unitWidth,\n visibleElements.length);\n controller.margins.left = nextMarginLeft + ((i !== 0) ? controller.unitWidth : 0);\n controller.margins.right = controller.paperWidth - controller.margins.left - persWidth;\n currPoint.xLeft = controller.margins.left;\n nextMarginLeft = controller.margins.left + persWidth;\n if (element instanceof PanelModel) {\n rowFlats.push(...await this.generateFlatsPanel(\n survey, controller, element, currPoint));\n }\n else {\n await (<Question>element).waitForQuestionIsReady();\n rowFlats.push(...await SurveyHelper.generateQuestionFlats(survey,\n controller, <Question>element, currPoint));\n }\n }\n controller.popMargins();\n currPoint.xLeft = controller.margins.left;\n if (rowFlats.length !== 0) {\n currPoint.yTop = SurveyHelper.mergeRects(...rowFlats).yBot;\n currPoint.xLeft = point.xLeft;\n currPoint.yTop += controller.unitHeight * FlatSurvey.QUES_GAP_VERT_SCALE;\n pagePanelFlats.push(...rowFlats);\n pagePanelFlats.push(SurveyHelper.createRowlineFlat(currPoint, controller));\n currPoint.yTop += SurveyHelper.EPSILON;\n }\n }\n return pagePanelFlats;\n }\n private static popRowlines(flats: IPdfBrick[]) {\n while (flats.length > 0 && flats[flats.length - 1] instanceof RowlineBrick) {\n flats.pop();\n }\n }\n private static async generateFlatTitle(survey: SurveyPDF, controller: DocController,\n point: IPoint): Promise<CompositeBrick> {\n const compositeFlat: CompositeBrick = new CompositeBrick();\n if (survey.showTitle) {\n if (survey.title) {\n const surveyTitleFlat: IPdfBrick = await SurveyHelper.createTitleSurveyFlat(\n point, controller, survey.locTitle);\n compositeFlat.addBrick(surveyTitleFlat);\n point = SurveyHelper.createPoint(surveyTitleFlat);\n }\n if (survey.description) {\n if (survey.title) {\n point.yTop += controller.unitWidth * FlatSurvey.PANEL_DESC_GAP_SCALE;\n }\n compositeFlat.addBrick(await SurveyHelper.createDescFlat(\n point, null, controller, survey.locDescription));\n }\n }\n return compositeFlat;\n }\n private static async generateFlatLogoImage(survey: SurveyPDF, controller: DocController,\n point: IPoint): Promise<IPdfBrick> {\n const logoUrl = SurveyHelper.getLocString(survey.locLogo);\n const logoSize = await SurveyHelper.getCorrectedImageSize(controller, { imageLink: logoUrl, imageHeight: survey.logoHeight, imageWidth: survey.logoWidth, defaultImageWidth: '300px', defaultImageHeight: '200px' });\n const logoFlat: IPdfBrick = await SurveyHelper.createImageFlat(\n point, null, controller, { link: logoUrl,\n width: logoSize.width, height: logoSize.height });\n let shift: number = 0;\n if (survey.logoPosition === 'right') {\n shift = SurveyHelper.getPageAvailableWidth(controller) - logoFlat.width;\n }\n else if (survey.logoPosition !== 'left') {\n shift = SurveyHelper.getPageAvailableWidth(controller) / 2.0 - logoFlat.width / 2.0;\n }\n logoFlat.xLeft += shift;\n logoFlat.xRight += shift;\n return logoFlat;\n }\n public static async generateFlats(survey: SurveyPDF, controller: DocController): Promise<IPdfBrick[][]> {\n const flats: IPdfBrick[][] = [];\n if (!survey.hasLogo) {\n const titleFlat: CompositeBrick = await this.generateFlatTitle(\n survey, controller, controller.leftTopPoint);\n if (!titleFlat.isEmpty) flats.push([titleFlat]);\n }\n else if (survey.isLogoBefore) {\n const logoFlat: IPdfBrick = await this.generateFlatLogoImage(\n survey, controller, controller.leftTopPoint);\n flats.push([logoFlat]);\n const titlePoint: IPoint = SurveyHelper.createPoint(logoFlat,\n survey.logoPosition === 'top', survey.logoPosition !== 'top');\n if (survey.logoPosition !== 'top') {\n controller.pushMargins();\n titlePoint.xLeft += controller.unitWidth;\n controller.margins.left += logoFlat.width + controller.unitWidth;\n }\n else {\n titlePoint.xLeft = controller.leftTopPoint.xLeft;\n titlePoint.yTop += controller.unitHeight / 2.0;\n }\n const titleFlat: CompositeBrick = await this.generateFlatTitle(\n survey, controller, titlePoint);\n if (survey.logoPosition !== 'top') controller.popMargins();\n if (!titleFlat.isEmpty) flats[0].push(titleFlat);\n }\n else {\n if (survey.logoPosition === 'right') {\n const logoFlat: IPdfBrick = await this.generateFlatLogoImage(\n survey, controller, controller.leftTopPoint);\n flats.push([logoFlat]);\n controller.pushMargins();\n controller.margins.right += logoFlat.width + controller.unitWidth;\n const titleFlat: CompositeBrick = await this.generateFlatTitle(\n survey, controller, controller.leftTopPoint);\n if (!titleFlat.isEmpty) flats[0].unshift(titleFlat);\n controller.popMargins();\n }\n else {\n const titleFlat: CompositeBrick = await this.generateFlatTitle(\n survey, controller, controller.leftTopPoint);\n let logoPoint: IPoint = controller.leftTopPoint;\n if (!titleFlat.isEmpty) {\n flats.push([titleFlat]);\n logoPoint = SurveyHelper.createPoint(titleFlat);\n logoPoint.yTop += controller.unitHeight / 2.0;\n }\n const logoFlat: IPdfBrick = await this.generateFlatLogoImage(\n survey, controller, logoPoint);\n if (flats.length !== 0) flats[0].push(logoFlat);\n else flats.push([logoFlat]);\n }\n }\n let point: IPoint = controller.leftTopPoint;\n if (flats.length !== 0) {\n point.yTop = SurveyHelper.createPoint(SurveyHelper.mergeRects(...flats[0])).yTop;\n flats[0].push(SurveyHelper.createRowlineFlat(point, controller));\n point.yTop += controller.unitHeight * FlatSurvey.PANEL_CONT_GAP_SCALE + SurveyHelper.EPSILON;\n }\n for (let i: number = 0; i < survey.visiblePages.length; i++) {\n survey.currentPage = survey.visiblePages[i];\n let pageFlats: IPdfBrick[] = [];\n pageFlats.push(...await this.generateFlatsPagePanel(\n survey, controller, survey.visiblePages[i], point));\n const adornersOptions: AdornersPageOptions = new AdornersPageOptions(point,\n pageFlats, survey.visiblePages[i], controller, FlatRepository.getInstance(), SurveyPDFModule);\n await survey.onRenderPage.fire(survey, adornersOptions);\n pageFlats = [...adornersOptions.bricks];\n if (i === 0 && flats.length !== 0) {\n flats[0].push(...pageFlats);\n }\n else flats.push(pageFlats);\n this.popRowlines(flats[flats.length - 1]);\n point.yTop = controller.leftTopPoint.yTop;\n }\n return flats;\n }\n}","import { IQuestion, QuestionTextModel, settings } from 'survey-core';\nimport { SurveyPDF } from '../survey';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { FlatQuestion } from './flat_question';\nimport { FlatRepository } from './flat_repository';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\nimport { ITextFieldBrickOptions, TextFieldBrick } from '../pdf_render/pdf_textfield';\n\nexport class FlatTextbox extends FlatQuestion {\n public static readonly MULTILINE_TEXT_ROWS_COUNT: number = 1;\n protected question: QuestionTextModel;\n public constructor(protected survey: SurveyPDF,\n question: IQuestion, controller: DocController) {\n super(survey, question, controller);\n this.question = <QuestionTextModel>question;\n }\n public async generateFlatsContent(point: IPoint): Promise<IPdfBrick[]> {\n const options: Omit<ITextFieldBrickOptions, 'isMultiline'> = {\n fieldName: this.question.id,\n inputType: this.question.inputType,\n value: this.question.inputValue,\n isReadOnly: this.question.isReadOnly,\n shouldRenderBorders: settings.readOnlyTextRenderMode === 'input',\n placeholder: SurveyHelper.getLocString(this.question.locPlaceHolder)\n };\n if (!this.shouldRenderAsComment) {\n const rect: IRect = SurveyHelper.createTextFieldRect(point, this.controller);\n return [new TextFieldBrick(this.question, this.controller, rect, { ...options })];\n }\n return [await SurveyHelper.createCommentFlat(point, this.question,\n this.controller, { rows: FlatTextbox.MULTILINE_TEXT_ROWS_COUNT, isMultiline: true, ...options })];\n }\n}\n\nFlatRepository.getInstance().register('text', FlatTextbox);","import { IQuestion, Question, QuestionRatingModel, QuestionFileModel, LocalizableString, QuestionSelectBase, QuestionDropdownModel, settings } from 'survey-core';\nimport * as SurveyPDFModule from './entries/pdf';\nimport { SurveyPDF } from './survey';\nimport { IPoint, IRect, ISize, DocController } from './doc_controller';\nimport { FlatRepository } from './flat_layout/flat_repository';\nimport { IFlatQuestion } from './flat_layout/flat_question';\nimport { IHTMLRenderType } from './flat_layout/flat_html';\nimport { IPdfBrick, PdfBrick } from './pdf_render/pdf_brick';\nimport { TextBrick } from './pdf_render/pdf_text';\nimport { TextBoldBrick } from './pdf_render/pdf_textbold';\nimport { TitlePanelBrick } from './pdf_render/pdf_titlepanel';\nimport { DescriptionBrick } from './pdf_render/pdf_description';\nimport { LinkBrick } from './pdf_render/pdf_link';\nimport { HTMLBrick } from './pdf_render/pdf_html';\nimport { ImageBrick } from './pdf_render/pdf_image';\nimport { EmptyBrick } from './pdf_render/pdf_empty';\nimport { RowlineBrick } from './pdf_render/pdf_rowline';\nimport { CompositeBrick } from './pdf_render/pdf_composite';\nimport { AdornersOptions } from './event_handler/adorners';\nimport { ITextFieldBrickOptions, TextFieldBrick } from './pdf_render/pdf_textfield';\n\nexport type IBorderDescription = IRect & ISize & Pick<PdfBrick, 'formBorderColor'> & { rounded?: boolean, dashStyle?: { dashArray: [number, number] | [number], dashPhase: number }, outside?: boolean };\n\nexport class SurveyHelper {\n public static EPSILON: number = 2.2204460492503130808472633361816e-15;\n public static TITLE_SURVEY_FONT_SIZE_SCALE: number = 1.7;\n public static TITLE_PAGE_FONT_SIZE_SCALE: number = 1.3;\n public static TITLE_PANEL_FONT_SIZE_SCALE: number = 1.3;\n public static DESCRIPTION_FONT_SIZE_SCALE: number = 2.0 / 3.0;\n public static OTHER_ROWS_COUNT: number = 2;\n public static RATING_MIN_WIDTH: number = 3;\n public static RATING_MIN_HEIGHT: number = 2;\n public static RATING_COLUMN_WIDTH: number = 5;\n public static MATRIX_COLUMN_WIDTH: number = 5;\n public static IMAGEPICKER_COUNT: number = 4;\n public static IMAGEPICKER_RATIO: number = 4.0 / 3.0;\n public static MULTIPLETEXT_TEXT_PERS: number = Math.E / 10.0;\n public static HTML_TAIL_TEXT_SCALE: number = 0.24;\n public static SELECT_ITEM_FLAT_SCALE: number = 0.95;\n public static GAP_BETWEEN_ROWS: number = 0.25;\n public static GAP_BETWEEN_COLUMNS: number = 1.5;\n public static GAP_BETWEEN_ITEM_TEXT: number = 0.25;\n public static FORM_BORDER_VISIBLE: boolean = true;\n public static BORDER_SCALE: number = 0.1;\n public static VISIBLE_BORDER_SCALE: number = 0.8;\n public static UNVISIBLE_BORDER_SCALE: number = 0.2;\n public static RADIUS_SCALE: number = 3.0;\n public static TITLE_FONT_SCALE: number = 1.1;\n public static VALUE_READONLY_PADDING_SCALE: number = 0.3;\n public static HTML_TO_IMAGE_QUALITY: number = 1.0;\n public static FORM_BORDER_COLOR: string = '#9f9f9f';\n public static TEXT_COLOR: string = '#404040';\n public static BACKGROUND_COLOR: string = '#FFFFFF';\n public static TITLE_LOCATION_MATRIX: string = 'matrix';\n public static STANDARD_FONT: string = 'helvetica';\n public static CUSTOM_FONT_ENCODING: string = 'Identity-H';\n\n public static parseWidth(width: string, maxWidth: number,\n columnsCount: number = 1, defaultUnit?: string): number {\n if (width.indexOf('calc') === 0) {\n return maxWidth / columnsCount;\n }\n const value: number = parseFloat(width);\n const unit: string = width.replace(/[^A-Za-z%]/g, '') || defaultUnit;\n let k: number;\n switch (unit) {\n case 'pt':\n k = 1.0;\n break;\n case 'mm':\n k = 72.0 / 25.4;\n break;\n case 'cm':\n k = 72.0 / 2.54;\n break;\n case 'in':\n k = 72.0;\n break;\n case 'px':\n k = 72.0 / 96.0;\n break;\n case 'pc':\n k = 12.0;\n break;\n case 'em':\n k = 12.0;\n break;\n case 'ex':\n k = 6.0;\n break;\n default:\n case '%':\n k = maxWidth / 100.0;\n break;\n }\n return Math.min(value * k, maxWidth);\n }\n public static pxToPt(value: number | string) {\n if (typeof value === 'string') {\n if(!isNaN(Number(value))) {\n value += 'px';\n }\n return SurveyHelper.parseWidth(value, Number.MAX_VALUE);\n }\n return value * 72.0 / 96.0;\n }\n public static mergeRects(...rects: IRect[]): IRect {\n const resultRect: IRect = {\n xLeft: rects[0].xLeft,\n xRight: rects[0].xRight,\n yTop: rects[0].yTop,\n yBot: rects[0].yBot\n };\n rects.forEach((rect: IRect) => {\n resultRect.xLeft = Math.min(resultRect.xLeft, rect.xLeft),\n resultRect.xRight = Math.max(resultRect.xRight, rect.xRight),\n resultRect.yTop = Math.min(resultRect.yTop, rect.yTop),\n resultRect.yBot = Math.max(resultRect.yBot, rect.yBot);\n });\n return resultRect;\n }\n public static createPoint(rect: IRect, isLeft: boolean = true, isTop: boolean = false): IPoint {\n return {\n xLeft: isLeft ? rect.xLeft : rect.xRight,\n yTop: isTop ? rect.yTop : rect.yBot\n };\n }\n public static createRect(point: IPoint, width: number, height: number): IRect {\n return {\n xLeft: point.xLeft,\n xRight: point.xLeft + width,\n yTop: point.yTop,\n yBot: point.yTop + height\n };\n }\n public static createHeaderRect(controller: DocController): IRect {\n return {\n xLeft: 0.0,\n xRight: controller.paperWidth,\n yTop: 0.0,\n yBot: controller.margins.top\n };\n }\n public static createFooterRect(controller: DocController): IRect {\n return {\n xLeft: 0.0,\n xRight: controller.paperWidth,\n yTop: controller.paperHeight - controller.margins.bot,\n yBot: controller.paperHeight\n };\n }\n public static chooseHtmlFont(controller: DocController): string {\n return controller.useCustomFontInHtml ? controller.fontName : this.STANDARD_FONT;\n }\n public static generateCssTextRule(fontSize: number, fontStyle: string, fontName: string): string {\n return `\"font-size: ${fontSize}pt; font-weight: ${fontStyle}; font-family: ${fontName}; color: ${this.TEXT_COLOR};\"`;\n }\n public static createHtmlContainerBlock(html: string, controller: DocController, renderAs: IHTMLRenderType): string {\n const font = this.chooseHtmlFont(controller);\n return `<div class=\"__surveypdf_html\" style=${this.generateCssTextRule(\n controller.fontSize, controller.fontStyle, font)}>` +\n `<style>.__surveypdf_html p { margin: 0; line-height: ${controller.fontSize}pt } body { margin: 0; }</style>${html}</div>`;\n }\n public static splitHtmlRect(controller: DocController, htmlBrick: IPdfBrick): IPdfBrick {\n const bricks: IPdfBrick[] = [];\n const htmlHeight: number = htmlBrick.height;\n const minHeight: number = controller.doc.getFontSize();\n htmlBrick.yBot = htmlBrick.yTop + minHeight;\n const emptyBrickCount: number = Math.floor(htmlHeight / minHeight) - 1;\n bricks.push(htmlBrick);\n const currPoint: IPoint = this.createPoint(htmlBrick);\n for (let i: number = 0; i < emptyBrickCount; i++) {\n bricks.push(new EmptyBrick(this.createRect(currPoint, htmlBrick.width, minHeight)));\n currPoint.yTop += minHeight;\n }\n const remainingHeight: number = htmlHeight - (emptyBrickCount + 1) * minHeight;\n if (remainingHeight > 0) {\n bricks.push(new EmptyBrick(this.createRect(currPoint, htmlBrick.width, remainingHeight)));\n }\n return new CompositeBrick(...bricks);\n }\n public static createPlainTextFlat<T extends IPdfBrick>(point: IPoint, question: IQuestion,\n controller: DocController, text: string, fabric: new (question: IQuestion,\n controller: DocController, rect: IRect, text: string) => T): CompositeBrick {\n const lines: string[] = controller.doc.splitTextToSize(text,\n controller.paperWidth - controller.margins.right - point.xLeft);\n const currPoint: IPoint = this.clone(point);\n const composite: CompositeBrick = new CompositeBrick();\n lines.forEach((line: string) => {\n const size: ISize = controller.measureText(line);\n composite.addBrick(new fabric(question, controller,\n this.createRect(currPoint, size.width, size.height), line));\n currPoint.yTop += size.height;\n });\n return composite;\n }\n public static async createTextFlat<T extends IPdfBrick>(point: IPoint, question: IQuestion,\n controller: DocController, text: string | LocalizableString, fabric: new (question: IQuestion,\n controller: DocController, rect: IRect, text: string) => T): Promise<IPdfBrick> {\n if (typeof text === 'string' || !this.hasHtml(text)) {\n return this.createPlainTextFlat(point, question, controller, typeof text === 'string' ?\n text : this.getLocString(<LocalizableString>text), fabric);\n }\n else {\n return this.splitHtmlRect(controller, await this.createHTMLFlat(point, <Question>question, controller,\n this.createHtmlContainerBlock(this.getLocString(text), controller, 'standard')));\n }\n }\n private static hasHtml(text: LocalizableString): boolean {\n const pattern: RegExp = /<\\/?[a-z][\\s\\S]*>/i;\n return text.hasHtml && (pattern.test((<any>text).renderedText) || pattern.test(text.renderedHtml));\n }\n private static getHtmlMargins(controller: DocController, point: IPoint): { top: number, bottom: number, width: number } {\n const width: number = controller.paperWidth - point.xLeft - controller.margins.right;\n return {\n top: controller.margins.top,\n bottom: controller.margins.bot,\n width: width > controller.unitWidth ? width : controller.unitWidth\n };\n }\n\n public static createHTMLRect(point: IPoint, controller: DocController,\n margins: { top: number, bottom: number, width: number }, resultY: number): IRect {\n const availablePageHeight: number = controller.paperHeight - controller.margins.bot - controller.margins.top;\n const height: number = (controller.helperDoc.getNumberOfPages() - 1) *\n (controller.fontSize * Math.floor(availablePageHeight / controller.fontSize))\n + resultY - margins.top + SurveyHelper.HTML_TAIL_TEXT_SCALE * controller.fontSize;\n const numberOfPages: number = controller.helperDoc.getNumberOfPages();\n controller.helperDoc.addPage();\n for (let i: number = 0; i < numberOfPages; i++) {\n controller.helperDoc.deletePage(1);\n }\n return SurveyHelper.createRect(point, margins.width, height);\n }\n\n public static async createHTMLFlat(point: IPoint, question: Question, controller: DocController, html: string): Promise<IPdfBrick> {\n const margins: { top: number, bottom: number, width: number } = this.getHtmlMargins(controller, point);\n return await new Promise<IPdfBrick>((resolve) => {\n controller.helperDoc.fromHTML(html, point.xLeft, margins.top, {\n pagesplit: true, width: margins.width\n }, function (result: any) {\n const rect: IRect = SurveyHelper.createHTMLRect(point, controller, margins, result.y);\n resolve(new HTMLBrick(question, controller, rect, html));\n }, margins);\n });\n }\n public static generateFontFace(fontName: string, fontBase64: string, fontWeight: string) {\n return `@font-face { font-family: ${fontName}; ` +\n `src: url(data:application/font-woff;charset=utf-8;base64,${fontBase64}) format('woff'); ` +\n `font-weight: ${fontWeight}; }`;\n }\n public static generateFontFaceWithItalicStyle(fontName: string, fontBase64: string, fontWeight: string) {\n return `@font-face { font-family: ${fontName}; ` +\n `src: url(data:application/font-woff;charset=utf-8;base64,${fontBase64}) format('woff'); ` +\n `font-weight: ${fontWeight}; font-style: italic}`;\n }\n public static htmlToXml(html: string): string {\n const htmlDoc: Document = document.implementation.createHTMLDocument('');\n htmlDoc.write(html.replace(/\\#/g, '%23'));\n htmlDoc.documentElement.setAttribute('xmlns', htmlDoc.documentElement.namespaceURI);\n htmlDoc.body.style.margin = 'unset';\n return (new XMLSerializer()).serializeToString(htmlDoc.body).replace(/%23/g, '#');\n }\n public static createSvgContent(html: string, width: number, controller: DocController) {\n const style: HTMLStyleElement = document.createElement('style');\n style.innerHTML = '.__surveypdf_html p { margin: unset; line-height: 22px; } body { margin: unset; }';\n document.body.appendChild(style);\n const div: HTMLDivElement = document.createElement('div');\n div.className = '__surveypdf_html';\n div.style.display = 'block';\n div.style.position = 'fixed';\n div.style.top = '-10000px';\n div.style.left = '-10000px';\n div.style.width = (width / 72.0 * 96.0) + 'px';\n div.style.boxSizing = 'initial';\n div.style.color = 'initial';\n div.style.fontFamily = 'initial';\n div.style.font = 'initial';\n div.style.lineHeight = 'initial';\n div.insertAdjacentHTML('beforeend', html);\n document.body.appendChild(div);\n const divWidth: number = div.offsetWidth;\n const divHeight: number = div.offsetHeight;\n div.remove();\n style.remove();\n let defs: string = '';\n if (controller.useCustomFontInHtml) {\n defs = `<defs><style>${this.generateFontFace(controller.fontName, controller.base64Normal, 'normal')}` +\n ` ${this.generateFontFace(controller.fontName, controller.base64Bold, 'bold')}</style></defs>`;\n } else {\n Object.keys(DocController.customFonts).forEach(fontName => {\n const font = DocController.customFonts[fontName];\n Object.keys(font).forEach((fontStyle: 'normal' | 'bold' | 'italic' | 'bolditalic') => {\n if (fontStyle === 'normal' || fontStyle === 'bold') {\n defs += `${this.generateFontFace(fontName, font[fontStyle], fontStyle)}`;\n } else {\n defs += `${this.generateFontFaceWithItalicStyle(fontName, font[fontStyle], fontStyle === 'italic' ? 'normal' : 'bold')}`;\n }\n });\n defs = '<defs><style>' + defs + '</style></defs>';\n });\n }\n const svg: string = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${divWidth}px\" height=\"${divHeight}px\">` + defs +\n '<style>.__surveypdf_html p { margin: unset; line-height: 22px; }</style>' +\n `<foreignObject width=\"${divWidth}px\" height=\"${divHeight}px\">` +\n this.htmlToXml(html) + '</foreignObject></svg>';\n return { svg, divWidth, divHeight };\n }\n private static setCanvas(canvas: HTMLCanvasElement, divWidth: number, divHeight: number, img: HTMLImageElement): void {\n canvas.width = divWidth * SurveyHelper.HTML_TO_IMAGE_QUALITY;\n canvas.height = divHeight * SurveyHelper.HTML_TO_IMAGE_QUALITY;\n const context: CanvasRenderingContext2D = canvas.getContext('2d');\n context.scale(SurveyHelper.HTML_TO_IMAGE_QUALITY, SurveyHelper.HTML_TO_IMAGE_QUALITY);\n context.fillStyle = SurveyHelper.BACKGROUND_COLOR;\n context.fillRect(0, 0, divWidth, divHeight);\n context.drawImage(img, 0, 0);\n }\n public static async htmlToImage(html: string, width: number, controller: DocController): Promise<{ url: string, aspect: number }> {\n const { svg, divWidth, divHeight } = SurveyHelper.createSvgContent(html, width, controller);\n const data: string = 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(svg)));\n const img: HTMLImageElement = new Image();\n img.crossOrigin='anonymous';\n img.src = data;\n return new Promise((resolve) => {\n img.onload = function () {\n const canvas: HTMLCanvasElement = document.createElement('canvas');\n SurveyHelper.setCanvas(canvas, divWidth, divHeight, img);\n const url: string = canvas.toDataURL('image/jpeg', SurveyHelper.HTML_TO_IMAGE_QUALITY);\n canvas.remove();\n resolve({ url: url, aspect: divWidth / divHeight });\n };\n img.onerror = function () {\n resolve({ url: 'data:,', aspect: width / this.EPSILON });\n };\n });\n }\n public static async createBoldTextFlat(point: IPoint, question: Question,\n controller: DocController, text: string | LocalizableString): Promise<IPdfBrick> {\n controller.fontStyle = 'bold';\n const composite: IPdfBrick = await this.createTextFlat(\n point, question, controller, text, TextBoldBrick);\n controller.fontStyle = 'normal';\n return composite;\n }\n public static async createTitleFlat(point: IPoint, question: Question, controller: DocController): Promise<IPdfBrick> {\n const composite: CompositeBrick = new CompositeBrick();\n let currPoint: IPoint = this.clone(point);\n const oldFontSize: number = controller.fontSize;\n controller.fontSize *= this.TITLE_FONT_SCALE;\n if (question.no) {\n const noText: string = question.no + ' ';\n let noFlat: IPdfBrick;\n if (this.hasHtml(question.locTitle)) {\n controller.fontStyle = 'bold';\n controller.pushMargins();\n controller.margins.right = controller.paperWidth -\n controller.margins.left - controller.measureText(noText, 'bold').width;\n noFlat = await this.createHTMLFlat(currPoint, question, controller,\n this.createHtmlContainerBlock(noText, controller, 'standard'));\n controller.popMargins();\n controller.fontStyle = 'normal';\n }\n else {\n noFlat = await this.createBoldTextFlat(currPoint,\n question, controller, noText);\n }\n composite.addBrick(noFlat);\n currPoint.xLeft = noFlat.xRight;\n }\n controller.pushMargins();\n controller.margins.left = currPoint.xLeft;\n const textFlat: CompositeBrick = <CompositeBrick>await this.createBoldTextFlat(\n currPoint, question, controller, question.locTitle);\n composite.addBrick(textFlat);\n controller.popMargins();\n if (question.isRequired) {\n const requiredText: string = question.requiredText;\n if (this.hasHtml(question.locTitle)) {\n currPoint = this.createPoint(textFlat.unfold()[0], false, false);\n controller.fontStyle = 'bold';\n controller.pushMargins();\n controller.margins.right = controller.paperWidth -\n controller.margins.left - controller.measureText(requiredText, 'bold').width;\n composite.addBrick(await this.createHTMLFlat(currPoint, question, controller,\n this.createHtmlContainerBlock(requiredText, controller, 'standard')));\n controller.popMargins();\n controller.fontStyle = 'normal';\n }\n else {\n currPoint = this.createPoint(textFlat.unfold().pop(), false, true);\n composite.addBrick(await this.createBoldTextFlat(currPoint,\n question, controller, requiredText));\n }\n }\n controller.fontSize = oldFontSize;\n return composite;\n }\n private static async createTitleSurveyPanelFlat(point: IPoint, controller: DocController,\n text: string | LocalizableString, fontSizeScale: number): Promise<IPdfBrick> {\n const oldFontSize: number = controller.fontSize;\n controller.fontSize = oldFontSize * fontSizeScale;\n controller.fontStyle = 'bold';\n const titleFlat: IPdfBrick = await this.createTextFlat(point, null, controller, text, TitlePanelBrick);\n controller.fontStyle = 'normal';\n controller.fontSize = oldFontSize;\n return titleFlat;\n }\n public static async createTitleSurveyFlat(point: IPoint, controller: DocController,\n text: string | LocalizableString): Promise<IPdfBrick> {\n return await this.createTitleSurveyPanelFlat(point, controller, text, this.TITLE_SURVEY_FONT_SIZE_SCALE);\n }\n public static async createTitlePanelFlat(point: IPoint, controller: DocController,\n text: string | LocalizableString, isPage: boolean = false): Promise<IPdfBrick> {\n return await this.createTitleSurveyPanelFlat(point, controller, text,\n isPage ? this.TITLE_PAGE_FONT_SIZE_SCALE : this.TITLE_PANEL_FONT_SIZE_SCALE);\n }\n public static async createDescFlat(point: IPoint, question: IQuestion,\n controller: DocController, text: string | LocalizableString): Promise<IPdfBrick> {\n const oldFontSize: number = controller.fontSize;\n controller.fontSize = oldFontSize * this.DESCRIPTION_FONT_SIZE_SCALE;\n const composite: IPdfBrick = await this.createTextFlat(\n point, question, controller, text, DescriptionBrick);\n controller.fontSize = oldFontSize;\n return composite;\n }\n public static getReadonlyRenderAs(question: Question, controller: DocController): 'auto' | 'text' | 'acroform' {\n return (<any>question).readonlyRenderAs === 'auto' ? controller.readonlyRenderAs : (<any>question).readonlyRenderAs;\n }\n public static async createCommentFlat(point: IPoint, question: Question,\n controller: DocController, options: { rows?: number } & ITextFieldBrickOptions): Promise<IPdfBrick> {\n options.rows = options.rows ?? 1;\n options.value = options.value ?? '';\n const rect: IRect = this.createTextFieldRect(point, controller, options.rows);\n let textFlat;\n if (SurveyHelper.shouldRenderReadOnly(question, controller, options.isReadOnly)) {\n textFlat = await this.createReadOnlyTextFieldTextFlat(\n point, controller, question, options.value);\n const padding: number = controller.unitHeight * this.VALUE_READONLY_PADDING_SCALE;\n if (textFlat.yBot + padding > rect.yBot) rect.yBot = textFlat.yBot + padding;\n }\n const comment = new TextFieldBrick(question, controller, rect, options);\n if(textFlat) {\n comment.textBrick = textFlat;\n }\n return comment;\n }\n public static inBrowser = typeof Image === 'function';\n\n public static get hasDocument(): boolean {\n return typeof document !== 'undefined';\n }\n\n public static async getImageBase64(imageLink: string): Promise<string> {\n const image = new Image();\n image.crossOrigin='anonymous';\n return new Promise((resolve) => {\n image.onload = () => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n canvas.height = image.naturalHeight;\n canvas.width = image.naturalWidth;\n ctx.drawImage(image, 0, 0);\n const dataUrl = canvas.toDataURL();\n resolve(dataUrl);\n };\n image.onerror = () => {\n resolve('');\n };\n image.src = imageLink;\n });\n }\n public static shouldConvertImageToPng = true;\n public static async getImageLink(controller: DocController, imageOptions: { link: string, width: number, height: number, objectFit?: string }, applyImageFit: boolean): Promise<string> {\n const ptToPx: number = 96.0 / 72.0;\n let url = this.shouldConvertImageToPng ? await SurveyHelper.getImageBase64(imageOptions.link) : imageOptions.link;\n if(typeof XMLSerializer === 'function' && applyImageFit) {\n const canvasHtml: string =\n `<div style='overflow: hidden; width: ${imageOptions.width * ptToPx}px; height: ${imageOptions.height * ptToPx}px;'>\n <img src='${url}' style='object-fit: ${imageOptions.objectFit}; width: 100%; height: 100%;'/>\n </div>`;\n url = (await SurveyHelper.htmlToImage(canvasHtml, imageOptions.width, controller)).url;\n }\n return url;\n }\n public static async createImageFlat(point: IPoint, question: any,\n controller: DocController, imageOptions: { link: string, width: number, height: number, objectFit?: string }, applyImageFit?: boolean): Promise<IPdfBrick> {\n if (SurveyHelper.inBrowser) {\n imageOptions.objectFit = !!question && !!question.imageFit ? question.imageFit : (imageOptions.objectFit || 'contain');\n if (applyImageFit ?? controller.applyImageFit) {\n if (imageOptions.width > controller.paperWidth - controller.margins.left - controller.margins.right) {\n const newWidth: number = controller.paperWidth - controller.margins.left - controller.margins.right;\n imageOptions.height *= newWidth / imageOptions.width;\n imageOptions.width = newWidth;\n }\n }\n const html: string = `<img src='${await SurveyHelper.getImageLink(controller, imageOptions, applyImageFit ?? controller.applyImageFit)}' width='${imageOptions.width}' height='${imageOptions.height}'/>`;\n return new HTMLBrick(question, controller, this.createRect(point, imageOptions.width, imageOptions.height), html, true);\n }\n return new ImageBrick(question, controller, imageOptions.link, point, imageOptions.width, imageOptions.height);\n }\n public static canPreviewImage(question: QuestionFileModel, item: { name: string, type: string, content: string }, url: string): boolean {\n return question.canPreviewImage(item);\n // && await this.getImageSize(url) !== null;\n }\n public static async getImageSize(url: string): Promise<ISize> {\n if (!SurveyHelper.inBrowser) {\n return await new Promise((resolve) => {\n return resolve({ width: undefined, height: undefined });\n });\n }\n return await new Promise((resolve) => {\n const image: any = new Image();\n image.src = url;\n image.onload = function () {\n return resolve({ width: image.width, height: image.height });\n };\n image.onerror = function () { return resolve(null); };\n });\n }\n public static createRowlineFlat(point: IPoint, controller: DocController,\n width?: number, color?: string): IPdfBrick {\n let xRight: number = typeof width === 'undefined' ?\n controller.paperWidth - controller.margins.right :\n point.xLeft + width;\n xRight = xRight > point.xLeft ? xRight : point.xLeft + this.EPSILON;\n return new RowlineBrick(controller, {\n xLeft: point.xLeft,\n xRight: xRight,\n yTop: point.yTop + this.EPSILON,\n yBot: point.yTop + this.EPSILON\n }, typeof color === 'undefined' ? null : color);\n }\n public static async createLinkFlat(point: IPoint, question: Question,\n controller: DocController, text: string, link: string): Promise<IPdfBrick> {\n const compositeText: CompositeBrick = <CompositeBrick>await this.\n createTextFlat(point, question, controller, text, TextBrick);\n const compositeLink: CompositeBrick = new CompositeBrick();\n compositeText.unfold().forEach((text: TextBrick) => {\n compositeLink.addBrick(new LinkBrick(text, link));\n const linePoint: IPoint = this.createPoint(compositeLink);\n compositeLink.addBrick(this.createRowlineFlat(linePoint,\n controller, compositeLink.width, LinkBrick.COLOR));\n });\n return compositeLink;\n }\n public static createAcroformRect(rect: IRect): number[] {\n return [\n rect.xLeft,\n rect.yTop,\n rect.xRight - rect.xLeft,\n rect.yBot - rect.yTop\n ];\n }\n public static createTextFieldRect(point: IPoint, controller: DocController, lines: number = 1): IRect {\n let width: number = controller.paperWidth - point.xLeft - controller.margins.right;\n width = Math.max(width, controller.unitWidth);\n const height: number = controller.unitHeight * lines;\n return this.createRect(point, width, height);\n }\n public static async createReadOnlyTextFieldTextFlat(point: IPoint,\n controller: DocController, question: Question, value: string): Promise<IPdfBrick> {\n const padding: number = controller.unitWidth * this.VALUE_READONLY_PADDING_SCALE;\n point.yTop += padding;\n point.xLeft += padding;\n controller.pushMargins(point.xLeft, controller.margins.right + padding);\n const textFlat: IPdfBrick = await this.createTextFlat(\n point, question, controller, value.toString(), TextBrick);\n controller.popMargins();\n return textFlat;\n }\n public static renderFlatBorders(controller: DocController, borderOptions: IBorderDescription): void {\n if (!this.FORM_BORDER_VISIBLE) return;\n borderOptions.rounded = borderOptions.rounded ?? true;\n borderOptions.outside = borderOptions.outside ?? false;\n const minSide: number = Math.min(borderOptions.width, borderOptions.height);\n const borderWidth = this.getBorderWidth(controller);\n const visibleWidth: number = controller.unitHeight * this.VISIBLE_BORDER_SCALE * this.BORDER_SCALE;\n const visibleScale: number = borderOptions.outside ? (minSide + borderWidth) / minSide - visibleWidth / minSide : (minSide - borderWidth) / minSide + visibleWidth / minSide;\n const oldDrawColor: string = controller.doc.getDrawColor();\n controller.doc.setDrawColor(borderOptions.formBorderColor);\n controller.doc.setLineWidth(visibleWidth);\n const scaledRect = this.scaleRect(borderOptions, visibleScale);\n if(borderOptions.dashStyle) {\n const dashStyle = borderOptions.dashStyle;\n const borderLength = (Math.abs(scaledRect.yTop - scaledRect.yBot) + Math.abs(scaledRect.xLeft - scaledRect.xRight)) * 2;\n const dashWithSpaceSize = dashStyle.dashArray[0] + (dashStyle.dashArray[1] ?? dashStyle.dashArray[0]);\n const dashSize = dashStyle.dashArray[0] + (borderLength % dashWithSpaceSize) / Math.floor(borderLength / dashWithSpaceSize);\n\n controller.doc.setLineDashPattern(\n [dashSize, dashStyle.dashArray[1] ?? dashStyle.dashArray[0]],\n dashStyle.dashPhase\n );\n }\n\n controller.doc.rect(...this.createAcroformRect(scaledRect));\n if(borderOptions.rounded) {\n const unvisibleWidth: number = controller.unitHeight * this.UNVISIBLE_BORDER_SCALE * this.BORDER_SCALE;\n const unvisibleScale: number = 1.0 - unvisibleWidth / minSide;\n const unvisibleRadius: number = this.RADIUS_SCALE * unvisibleWidth;\n controller.doc.setDrawColor(this.BACKGROUND_COLOR);\n controller.doc.setLineWidth(unvisibleWidth);\n controller.doc.roundedRect(...this.createAcroformRect(\n this.scaleRect(borderOptions, unvisibleScale)), unvisibleRadius, unvisibleRadius);\n }\n if(borderOptions.dashStyle) {\n controller.doc.setLineDashPattern([]);\n }\n controller.doc.setDrawColor(oldDrawColor);\n }\n public static getLocString(text: LocalizableString): string {\n if (this.hasHtml(text)) return text.renderedHtml;\n return (<any>text).renderedText || text.renderedHtml;\n }\n public static getContentQuestion(question: Question): Question {\n return !!(<any>question).contentQuestion ? (<any>question).contentQuestion : question;\n }\n public static getContentQuestionTypeRenderAs(question: Question, survey: SurveyPDF): string {\n let renderAs = question.renderAs;\n if(question.getType() === 'boolean' && survey.options.useLegacyBooleanRendering) {\n renderAs = 'checkbox';\n }\n if(renderAs !== 'default') {\n const type = `${question.getType()}-${renderAs}`;\n if(FlatRepository.getInstance().isTypeRegistered(type)) return type;\n }\n return question.getType();\n }\n public static getContentQuestionType(question: Question, survey: SurveyPDF): string {\n if(!!question.customWidget) return question.customWidget.pdfQuestionType;\n return !!(<any>question).contentQuestion ? 'custom_model' : this.getContentQuestionTypeRenderAs(question, survey);\n }\n public static getRatingMinWidth(controller: DocController): number {\n return controller.measureText(this.RATING_MIN_WIDTH).width;\n }\n public static getRatingItemText(question: QuestionRatingModel,\n index: number, locText: LocalizableString): LocalizableString {\n const ratingItemLocText: LocalizableString = new LocalizableString(locText.owner, locText.useMarkdown);\n ratingItemLocText.text = this.getLocString(locText);\n if (index === 0 && question.minRateDescription) {\n ratingItemLocText.text = question.locMinRateDescription.text + ' ' + this.getLocString(locText);\n }\n else if (index === question.visibleRateValues.length - 1 && question.maxRateDescription) {\n ratingItemLocText.text = this.getLocString(locText) + ' ' + question.locMaxRateDescription.text;\n }\n return ratingItemLocText;\n }\n public static getPageAvailableWidth(controller: DocController): number {\n return controller.paperWidth - controller.margins.left - controller.margins.right;\n }\n public static getImagePickerAvailableWidth(controller: DocController): number {\n const width: number = (this.getPageAvailableWidth(controller) -\n (this.IMAGEPICKER_COUNT - 1) * controller.unitHeight);\n return width > 0 ? width : controller.unitHeight;\n }\n public static getColumnWidth(controller: DocController, colCount: number) {\n return (this.getPageAvailableWidth(controller) - (colCount - 1) *\n controller.unitWidth * this.GAP_BETWEEN_COLUMNS) / colCount;\n }\n public static setColumnMargins(controller: DocController, colCount: number, column: number) {\n const cellWidth: number = this.getColumnWidth(controller, colCount);\n controller.margins.left = controller.margins.left + column *\n (cellWidth + controller.unitWidth * this.GAP_BETWEEN_COLUMNS);\n controller.margins.right = controller.margins.right + (colCount - column - 1) *\n (cellWidth + controller.unitWidth * this.GAP_BETWEEN_COLUMNS);\n }\n public static moveRect(rect: IRect, left: number = rect.xLeft, top: number = rect.yTop): IRect {\n return {\n xLeft: left,\n yTop: top,\n xRight: left + rect.xRight - rect.xLeft,\n yBot: top + rect.yBot - rect.yTop\n };\n }\n public static scaleRect(rect: IRect, scale: number): IRect {\n const scaleWidth: number = Math.min(rect.xRight - rect.xLeft, rect.yBot - rect.yTop) * (1.0 - scale) / 2.0;\n return {\n xLeft: rect.xLeft + scaleWidth,\n yTop: rect.yTop + scaleWidth,\n xRight: rect.xRight - scaleWidth,\n yBot: rect.yBot - scaleWidth\n };\n }\n public static getBorderWidth(controller: DocController) {\n return 2.0 * controller.unitWidth * this.BORDER_SCALE;\n }\n public static formScale(controller: DocController, flat: ISize): number {\n const minSide: number = Math.min(flat.width, flat.height);\n return (minSide - this.getBorderWidth(controller)) / minSide;\n }\n public static async generateQuestionFlats(survey: SurveyPDF,\n controller: DocController, question: Question, point: IPoint): Promise<IPdfBrick[]> {\n const questionType: string = this.getContentQuestionType(question, survey);\n const flatQuestion: IFlatQuestion = FlatRepository.getInstance().\n create(survey, question, controller, questionType);\n const questionFlats: IPdfBrick[] = await flatQuestion.generateFlats(point);\n const adornersOptions: AdornersOptions = new AdornersOptions(point,\n questionFlats, question, controller, FlatRepository.getInstance(), SurveyPDFModule);\n if (question.customWidget && question.customWidget.isFit(question) &&\n question.customWidget.pdfRender) {\n survey.onRenderQuestion.unshift(question.customWidget.pdfRender);\n }\n await survey.onRenderQuestion.fire(survey, adornersOptions);\n return [...adornersOptions.bricks];\n }\n public static isFontExist(controller: DocController, fontName: string): boolean {\n return controller.doc.internal.getFont(fontName).fontName === fontName;\n }\n public static isCustomFont(controller: DocController, fontName: string): boolean {\n return controller.doc.internal.getFont(fontName).encoding === this.CUSTOM_FONT_ENCODING;\n }\n public static fixFont(controller: DocController): void {\n if (this.isCustomFont(controller, controller.fontName)) {\n controller.doc.text('load font', 0, 0);\n controller.doc.deletePage(1);\n controller.addPage();\n }\n }\n public static clone(src: any): any {\n const target: any = {};\n for (const prop in src) {\n if (src.hasOwnProperty(prop)) {\n target[prop] = src[prop];\n }\n }\n return target;\n }\n public static shouldRenderReadOnly(question: IQuestion, controller: DocController, readOnly?: boolean): boolean {\n return ((!!question && question.isReadOnly || readOnly) && SurveyHelper.getReadonlyRenderAs(\n <Question>question, controller) !== 'acroform') || controller?.compress;\n }\n public static isSizeEmpty(val: any): boolean {\n return !val || val === 'auto';\n }\n public static isHeightEmpty(val: any): boolean {\n return this.isSizeEmpty(val) || val == '100%';\n }\n public static async getCorrectedImageSize(controller: DocController, imageOptions: { imageWidth?: any, imageHeight?: any, imageLink: string, defaultImageWidth?: any, defaultImageHeight?: any }): Promise<ISize> {\n let { imageWidth, imageLink, imageHeight, defaultImageWidth, defaultImageHeight } = imageOptions;\n imageWidth = typeof imageWidth === 'number' ? imageWidth.toString() : imageWidth;\n imageHeight = typeof imageHeight === 'number' ? imageHeight.toString() : imageHeight;\n let widthPt: number = imageWidth && SurveyHelper.parseWidth(imageWidth, SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n let heightPt: number = imageHeight && SurveyHelper.parseWidth(imageHeight, SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n defaultImageWidth = typeof defaultImageWidth === 'number' ? defaultImageWidth.toString() : defaultImageWidth;\n defaultImageHeight = typeof defaultImageHeight === 'number' ? defaultImageHeight.toString() : defaultImageHeight;\n let defaultWidthPt: number = defaultImageWidth && SurveyHelper.parseWidth(defaultImageWidth, SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n let defaultHeightPt: number = defaultImageHeight && SurveyHelper.parseWidth(defaultImageHeight, SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n\n if(SurveyHelper.isSizeEmpty(imageWidth) || SurveyHelper.isHeightEmpty(imageHeight)) {\n const imageSize = await SurveyHelper.getImageSize(imageLink);\n if(!SurveyHelper.isSizeEmpty(imageWidth)) {\n if(imageSize && imageSize.width) {\n heightPt = imageSize.height * widthPt / imageSize.width;\n }\n }\n else if(!SurveyHelper.isHeightEmpty(imageHeight)) {\n if(imageSize && imageSize.height) {\n widthPt = imageSize.width * heightPt / imageSize.height;\n }\n }\n else if(imageSize && imageSize.height && imageSize.width) {\n heightPt = SurveyHelper.parseWidth(imageSize.height.toString(), SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n widthPt = SurveyHelper.parseWidth(imageSize.width.toString(), SurveyHelper.getPageAvailableWidth(controller), 1, 'px');\n }\n }\n return { width: widthPt || defaultWidthPt || 0, height: heightPt || defaultHeightPt || 0 };\n }\n}","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n * \n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/** \n* jsPDF AcroForm Plugin\n* @module AcroForm\n*/\nimport { jsPDF } from \"jspdf\";\n\n(function (jsPDF, globalObj) {\n 'use strict';\n\n var jsPDFAPI = jsPDF.API;\n var scope;\n var scaleFactor = 1;\n function toUnicode(str) {\n var unicodeString = '';\n for (var i = 0; i < str.length; i++) {\n var theUnicode = str.charCodeAt(i).toString(16).toUpperCase();\n while (theUnicode.length < 4) {\n theUnicode = '0' + theUnicode;\n };\n unicodeString += theUnicode;\n }\n return '<FEFF' + unicodeString + '>';\n }\n var pdfEscape = function (value) { return value.replace(/\\\\/g, '\\\\\\\\').replace(/\\(/g, '\\\\(').replace(/\\)/g, '\\\\)') };\n var pdfUnescape = function (value) { return value.replace(/\\\\\\\\/g, '\\\\').replace(/\\\\\\(/g, '(').replace(/\\\\\\)/g, ')'); };\n function arrayToPdfUnicodeArray(value) {\n var result = '[ ';\n for (var i = 0; i < value.length; i++) {\n result += toUnicode(value[i]);\n }\n result += ' ]'\n return result;\n }\n var f2 = function (number) {\n return number.toFixed(2); // Ie, %.2f\n };\n\n var f5 = function (number) {\n return number.toFixed(5); // Ie, %.2f\n };\n\n jsPDFAPI.__acroform__ = {};\n var inherit = function (child, parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n };\n\n var scale = function (x) {\n return (x * scaleFactor);\n };\n var antiScale = function (x) {\n return (x / scaleFactor);\n };\n\n var createFormXObject = function (formObject) {\n var xobj = new AcroFormXObject();\n var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n return xobj;\n };\n\n /**\n * Bit-Operations\n */\n var setBit = jsPDFAPI.__acroform__.setBit = function (number, bitPosition) {\n number = number || 0;\n bitPosition = bitPosition || 0;\n\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.setBit');\n }\n var bitMask = 1 << bitPosition;\n\n number |= bitMask;\n\n return number;\n };\n\n var clearBit = jsPDFAPI.__acroform__.clearBit = function (number, bitPosition) {\n number = number || 0;\n bitPosition = bitPosition || 0;\n\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.clearBit');\n }\n var bitMask = 1 << bitPosition;\n\n number &= ~bitMask;\n\n return number;\n };\n\n var getBit = jsPDFAPI.__acroform__.getBit = function (number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.getBit');\n }\n return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n };\n\n /*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\n var getBitForPdf = jsPDFAPI.__acroform__.getBitForPdf = function (number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf');\n }\n return getBit(number, bitPosition - 1);\n };\n\n var setBitForPdf = jsPDFAPI.__acroform__.setBitForPdf = function (number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf');\n }\n return setBit(number, bitPosition - 1);\n };\n\n var clearBitForPdf = jsPDFAPI.__acroform__.clearBitForPdf = function (number, bitPosition) {\n if (isNaN(number) || isNaN(bitPosition)) {\n throw new Error('Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf');\n }\n return clearBit(number, bitPosition - 1);\n };\n\n var calculateCoordinates = jsPDFAPI.__acroform__.calculateCoordinates = function (args) {\n var getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\n var getVerticalCoordinate = this.internal.getVerticalCoordinate;\n var x = args[0];\n var y = args[1];\n var w = args[2];\n var h = args[3];\n\n var coordinates = {};\n\n coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n return [Number(f2(coordinates.lowerLeft_X)), Number(f2(coordinates.lowerLeft_Y)), Number(f2(coordinates.upperRight_X)), Number(f2(coordinates.upperRight_Y))];\n };\n\n var calculateAppearanceStream = function (formObject) {\n if (formObject.appearanceStreamContent) {\n return formObject.appearanceStreamContent;\n }\n\n if (!formObject.V && !formObject.DV) {\n return;\n }\n\n // else calculate it\n\n var stream = [];\n var text = formObject.V || formObject.DV;\n var calcRes = calculateX(formObject, text);\n var fontKey = scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;\n\n //PDF 32000-1:2008, page 444\n stream.push('/Tx BMC');\n stream.push('q');\n stream.push('BT'); // Begin Text\n stream.push(scope.__private__.encodeColorString(formObject.color));\n stream.push('/' + fontKey + ' ' + f2(calcRes.fontSize) + ' Tf');\n stream.push('1 0 0 1 0 0 Tm');// Transformation Matrix\n stream.push(calcRes.text);\n stream.push('ET'); // End Text \n stream.push('Q');\n stream.push('EMC');\n\n var appearanceStreamContent = new createFormXObject(formObject);\n appearanceStreamContent.stream = stream.join(\"\\n\");\n return appearanceStreamContent;\n };\n\n var calculateX = function (formObject, text) {\n if (formObject.isUnicode) text = formObject.trueValue;\n var maxFontSize =\n formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n var returnValue = {\n text: \"\",\n fontSize: \"\"\n };\n // Remove Brackets\n text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n text =\n text.substr(text.length - 1) == \")\"\n ? text.substr(0, text.length - 1)\n : text;\n // split into array of words\n var textSplit = text.split(\" \");\n textSplit = textSplit.map(function (word) {\n return word.split(\"\\n\");\n });\n if (!formObject.multiline) {\n textSplit = textSplit.map(function (arr) {\n return [arr.join(\" \")]\n });\n }\n\n var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n var lineSpacing = 2;\n var borderPadding = 2;\n\n var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n height = height < 0 ? -height : height;\n var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n width = width < 0 ? -width : width;\n\n var isSmallerThanWidth = function(i, lastLine, fontSize) {\n if (i + 1 < textSplit.length) {\n var tmp = lastLine + \" \" + textSplit[i + 1][0];\n var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n var FieldWidth = width - 2 * borderPadding;\n return TextWidth <= FieldWidth;\n } else {\n return false;\n }\n };\n\n fontSize++;\n FontSize: while (fontSize > 0) {\n text = \"\";\n fontSize--;\n var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n var startY = formObject.multiline\n ? height - fontSize\n : (height - textHeight) / 2;\n startY += lineSpacing;\n var startX;\n\n var lastY = startY;\n var firstWordInLine = 0,\n lastWordInLine = 0;\n var lastLength;\n var currWord = 0;\n\n if (fontSize <= 0) {\n // In case, the Text doesn't fit at all\n fontSize = 12;\n text = \"(...) Tj\\n\";\n text +=\n \"% Width of Text: \" +\n calculateFontSpace(text, formObject, fontSize).width +\n \", FieldWidth:\" +\n width +\n \"\\n\";\n break;\n }\n\n var lastLine = \"\";\n var lineCount = 0;\n Line: for (var i = 0; i < textSplit.length; i++) {\n if (textSplit.hasOwnProperty(i)) {\n var isWithNewLine = false;\n if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n if (\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n continue FontSize;\n }\n\n lastLine += textSplit[i][currWord];\n isWithNewLine = true;\n lastWordInLine = i;\n i--;\n } else {\n lastLine += textSplit[i][currWord] + \" \";\n lastLine =\n lastLine.substr(lastLine.length - 1) == \" \"\n ? lastLine.substr(0, lastLine.length - 1)\n : lastLine;\n var key = parseInt(i);\n var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n var isLastWord = i >= textSplit.length - 1;\n\n if (nextLineIsSmaller && !isLastWord) {\n lastLine += \" \";\n currWord = 0;\n continue; // Line\n } else if (!nextLineIsSmaller && !isLastWord) {\n if (!formObject.multiline) {\n continue FontSize;\n } else {\n if (\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n // If the Text is higher than the\n // FieldObject\n continue FontSize;\n }\n lastWordInLine = key;\n // go on\n }\n } else if (isLastWord) {\n lastWordInLine = key;\n } else {\n if (\n formObject.multiline &&\n (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n height\n ) {\n // If the Text is higher than the FieldObject\n continue FontSize;\n }\n }\n }\n // Remove last blank\n\n var line = \"\";\n\n for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n var currLine = textSplit[x];\n if (formObject.multiline) {\n if (x === lastWordInLine) {\n line += currLine[currWord] + \" \";\n currWord = (currWord + 1) % currLine.length;\n continue;\n }\n if (x === firstWordInLine) {\n line += currLine[currLine.length - 1] + \" \";\n continue;\n }\n }\n line += currLine[0] + \" \";\n }\n\n // Remove last blank\n line =\n line.substr(line.length - 1) == \" \"\n ? line.substr(0, line.length - 1)\n : line;\n // lastLength -= blankSpace.width;\n lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n // Calculate startX\n switch (formObject.textAlign) {\n case \"right\":\n startX = width - lastLength - borderPadding;\n break;\n case \"center\":\n startX = (width - lastLength) / 2;\n break;\n case \"left\":\n default:\n startX = borderPadding;\n break;\n }\n text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n\n if (formObject.isUnicode) {\n var fontList = {};\n fontList[scope.internal.getFont().id] = scope.internal.getFont();\n var payload = {\n text: line,\n x: null,\n y: null,\n options: {\n lang: null\n },\n mutex: {\n pdfEscape: pdfEscape,\n activeFontKey: scope.internal.getFont().id,\n fonts: fontList,\n activeFontSize: formObject.fontSize\n }\n };\n scope.internal.events.publish('postProcessText', payload);\n text += '<' + payload.text + '> Tj\\n';\n }\n else {\n text += '(' + pdfEscape(line) + ') Tj\\n';\n }\n // reset X in PDF\n text += -f2(startX) + \" 0 Td\\n\";\n\n // After a Line, adjust y position\n lastY = -(fontSize + lineSpacing);\n\n // Reset for next iteration step\n lastLength = 0;\n firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n lineCount++;\n\n lastLine = \"\";\n continue Line;\n }\n }\n break;\n }\n\n returnValue.text = text;\n returnValue.fontSize = fontSize;\n\n return returnValue;\n };\n\n /**\n * Small workaround for calculating the TextMetric approximately.\n * \n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\n var calculateFontSpace = function (text, formObject, fontSize) {\n var font = scope.internal.getFont(formObject.fontName, formObject.fontStyle);\n var width = scope.getStringUnitWidth(text, { font: font, fontSize: parseFloat(fontSize), charSpace: 0 }) * parseFloat(fontSize);\n var height = scope.getStringUnitWidth(\"3\", { font: font, fontSize: parseFloat(fontSize), charSpace: 0 }) * parseFloat(fontSize) * 1.5;\n return { height: height, width: width };\n };\n\n var acroformPluginTemplate = {\n fields: [],\n xForms: [],\n /**\n * acroFormDictionaryRoot contains information about the AcroForm\n * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n * 1: The Object ID of the Root\n */\n acroFormDictionaryRoot: null,\n /**\n * After the PDF gets evaluated, the reference to the root has to be\n * reset, this indicates, whether the root has already been printed\n * out\n */\n printedOut: false,\n internal: null,\n isInitialized: false\n };\n\n var annotReferenceCallback = function () {\n //set objId to undefined and force it to get a new objId on buildDocument\n scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n for (var i in fields) {\n if (fields.hasOwnProperty(i)) {\n var formObject = fields[i];\n //set objId to undefined and force it to get a new objId on buildDocument\n formObject.objId = undefined;\n // add Annot Reference!\n if (formObject.hasAnnotation) {\n // If theres an Annotation Widget in the Form Object, put the\n // Reference in the /Annot array\n createAnnotationReference.call(scope, formObject);\n }\n }\n }\n };\n\n var putForm = function (formObject) {\n if (scope.internal.acroformPlugin.printedOut) {\n scope.internal.acroformPlugin.printedOut = false;\n scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n }\n if (!scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n initializeAcroForm.call(scope);\n }\n scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(formObject);\n };\n /**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\n var createAnnotationReference = function (object) {\n var options = {\n type: 'reference',\n object: object\n };\n var findEntry = function (entry) { return (entry.type === options.type && entry.object === options.object); };\n if (scope.internal.getPageInfo(object.page).pageContext.annotations.find(findEntry) === undefined) {\n scope.internal.getPageInfo(object.page).pageContext.annotations.push(options);\n }\n };\n\n // Callbacks\n\n var putCatalogCallback = function () {\n // Put reference to AcroForm to DocumentCatalog\n if (typeof scope.internal.acroformPlugin.acroFormDictionaryRoot != 'undefined') {\n // for safety, shouldn't normally be the case\n scope.internal.write('/AcroForm ' + scope.internal.acroformPlugin.acroFormDictionaryRoot.objId + ' ' + 0 + ' R');\n } else {\n throw new Error('putCatalogCallback: Root missing.');\n }\n };\n\n /**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\n var AcroFormDictionaryCallback = function () {\n // Remove event\n scope.internal.events.unsubscribe(scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID);\n delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n scope.internal.acroformPlugin.printedOut = true;\n };\n\n /**\n * Creates the single Fields and writes them into the Document\n * \n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\n var createFieldCallback = function (fieldArray) {\n var standardFields = (!fieldArray);\n\n if (!fieldArray) {\n // in case there is no fieldArray specified, we want to print out\n // the Fields of the AcroForm\n // Print out Root\n scope.internal.newObjectDeferredBegin(scope.internal.acroformPlugin.acroFormDictionaryRoot.objId, true);\n scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n }\n\n fieldArray = fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n for (var i in fieldArray) {\n if (fieldArray.hasOwnProperty(i)) {\n var fieldObject = fieldArray[i];\n var keyValueList = [];\n var oldRect = fieldObject.Rect;\n\n if (fieldObject.Rect) {\n fieldObject.Rect = calculateCoordinates.call(this, fieldObject.Rect);\n }\n\n // Start Writing the Object\n scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(fieldObject);\n\n if (typeof fieldObject === \"object\" && typeof fieldObject.getKeyValueListForStream === \"function\") {\n keyValueList = fieldObject.getKeyValueListForStream();\n }\n\n fieldObject.Rect = oldRect;\n\n if (fieldObject.hasAppearanceStream && !fieldObject.appearanceStreamContent) {\n // Calculate Appearance\n var appearance = calculateAppearanceStream.call(this, fieldObject);\n keyValueList.push({ key: 'AP', value: \"<</N \" + appearance + \">>\" });\n\n scope.internal.acroformPlugin.xForms.push(appearance);\n }\n\n // Assume AppearanceStreamContent is a Array with N,R,D (at least\n // one of them!)\n if (fieldObject.appearanceStreamContent) {\n var appearanceStreamString = \"\";\n // Iterate over N,R and D\n for (var k in fieldObject.appearanceStreamContent) {\n if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n var value = fieldObject.appearanceStreamContent[k];\n appearanceStreamString += (\"/\" + k + \" \");\n appearanceStreamString += \"<<\";\n if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n // appearanceStream is an Array or Object!\n for (var i in value) {\n if (value.hasOwnProperty(i)) {\n var obj = value[i];\n if (typeof obj === 'function') {\n // if Function is referenced, call it in order\n // to get the FormXObject\n obj = obj.call(this, fieldObject);\n }\n appearanceStreamString += (\"/\" + i + \" \" + obj + \" \");\n\n // In case the XForm is already used, e.g. OffState\n // of CheckBoxes, don't add it\n if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n scope.internal.acroformPlugin.xForms.push(obj);\n\n }\n }\n } else {\n obj = value;\n if (typeof obj === 'function') {\n // if Function is referenced, call it in order to\n // get the FormXObject\n obj = obj.call(this, fieldObject);\n }\n appearanceStreamString += (\"/\" + i + \" \" + obj);\n if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n scope.internal.acroformPlugin.xForms.push(obj);\n }\n appearanceStreamString += \">>\";\n }\n }\n\n // appearance stream is a normal Object..\n keyValueList.push({ key: 'AP', value: \"<<\\n\" + appearanceStreamString + \">>\" });\n }\n\n scope.internal.putStream({ additionalKeyValues: keyValueList });\n\n scope.internal.out(\"endobj\");\n\n }\n }\n if (standardFields) {\n createXFormObjectCallback.call(this, scope.internal.acroformPlugin.xForms);\n }\n };\n\n var createXFormObjectCallback = function (fieldArray) {\n for (var i in fieldArray) {\n if (fieldArray.hasOwnProperty(i)) {\n var key = i;\n var fieldObject = fieldArray[i];\n // Start Writing the Object\n scope.internal.newObjectDeferredBegin(fieldObject && fieldObject.objId, true);\n\n if (typeof fieldObject === \"object\" && typeof fieldObject.putStream === \"function\") {\n fieldObject.putStream();\n }\n delete fieldArray[key];\n }\n }\n };\n\n var initializeAcroForm = function () {\n if (this.internal !== undefined && (this.internal.acroformPlugin === undefined || this.internal.acroformPlugin.isInitialized === false)) {\n\n scope = this;\n\n AcroFormField.FieldNum = 0;\n this.internal.acroformPlugin = JSON.parse(JSON.stringify(acroformPluginTemplate));\n if (this.internal.acroformPlugin.acroFormDictionaryRoot) {\n throw new Error(\"Exception while creating AcroformDictionary\");\n }\n scaleFactor = scope.internal.scaleFactor;\n // The Object Number of the AcroForm Dictionary\n scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n\n // add Callback for creating the AcroForm Dictionary\n scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe('postPutResources', AcroFormDictionaryCallback);\n\n scope.internal.events.subscribe('buildDocument', annotReferenceCallback); // buildDocument\n\n // Register event, that is triggered when the DocumentCatalog is\n // written, in order to add /AcroForm\n scope.internal.events.subscribe('putCatalog', putCatalogCallback);\n\n // Register event, that creates all Fields\n scope.internal.events.subscribe('postPutPages', createFieldCallback);\n\n scope.internal.acroformPlugin.isInitialized = true;\n }\n };\n\n //PDF 32000-1:2008, page 26, 7.3.6\n var arrayToPdfArray = jsPDFAPI.__acroform__.arrayToPdfArray = function (array) {\n if (Array.isArray(array)) {\n var content = '[';\n for (var i = 0; i < array.length; i++) {\n if (i !== 0) {\n content += ' ';\n }\n switch (typeof array[i]) {\n case 'boolean':\n case 'number':\n case 'object':\n content += array[i].toString();\n break;\n case 'string':\n if (array[i].substr(0, 1) !== '/') {\n content += '(' + pdfEscape(array[i].toString()) + ')';\n } else {\n content += array[i].toString();\n }\n break;\n }\n }\n content += ']';\n return content;\n }\n throw new Error('Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray');\n };\n function getMatches(string, regex, index) {\n index || (index = 1); // default to the first capturing group\n var matches = [];\n var match;\n while (match = regex.exec(string)) {\n matches.push(match[index]);\n }\n return matches;\n }\n var pdfArrayToStringArray = function (array) {\n var result = [];\n if (typeof array === \"string\") {\n result = getMatches(array, /\\((.*?)\\)/g);\n }\n return result;\n };\n\n var toPdfString = function (string) {\n string = string || \"\";\n string.toString();\n string = '(' + pdfEscape(string) + ')';\n return string;\n };\n\n // ##########################\n // Classes\n // ##########################\n\n /**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\n var AcroFormPDFObject = function () {\n var _objId;\n\n /**\n * @name AcroFormPDFObject#objId\n * @type {any}\n */\n Object.defineProperty(this, 'objId', {\n configurable: true,\n get: function () {\n if (!_objId) {\n _objId = scope.internal.newObjectDeferred();\n }\n return _objId\n },\n set: function (value) {\n _objId = value;\n }\n });\n };\n\n /**\n * @function AcroFormPDFObject.toString\n */\n AcroFormPDFObject.prototype.toString = function () {\n return this.objId + \" 0 R\";\n };\n\n AcroFormPDFObject.prototype.putStream = function () {\n var keyValueList = this.getKeyValueListForStream();\n scope.internal.putStream({ data: this.stream, additionalKeyValues: keyValueList });\n scope.internal.out(\"endobj\");\n };\n\n /**\n * Returns an key-value-List of all non-configurable Variables from the Object\n * \n * @name getKeyValueListForStream\n * @returns {string}\n */\n AcroFormPDFObject.prototype.getKeyValueListForStream = function () {\n var createKeyValueListFromFieldObject = function (fieldObject) {\n var keyValueList = [];\n var keys = Object.getOwnPropertyNames(fieldObject).filter(function (key) {\n return (key != 'content' && key != 'appearanceStreamContent' && key.substring(0, 1) != \"_\");\n });\n\n for (var i in keys) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(fieldObject, keys[i]);\n if (propertyDescriptor && propertyDescriptor.configurable === false) {\n var key = keys[i];\n var value = fieldObject[key];\n if (value) {\n if (Array.isArray(value)) {\n keyValueList.push({ key: key, value: arrayToPdfArray(value) });\n } else if (value instanceof AcroFormPDFObject) {\n // In case it is a reference to another PDFObject,\n // take the reference number\n keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n } else if (typeof value !== \"function\") {\n keyValueList.push({ key: key, value: value });\n }\n }\n }\n }\n return keyValueList;\n };\n\n return createKeyValueListFromFieldObject(this);\n };\n\n var AcroFormXObject = function () {\n AcroFormPDFObject.call(this);\n\n\n Object.defineProperty(this, 'Type', {\n value: \"/XObject\",\n configurable: false,\n writeable: true\n });\n\n Object.defineProperty(this, 'Subtype', {\n value: \"/Form\",\n configurable: false,\n writeable: true\n });\n\n Object.defineProperty(this, 'FormType', {\n value: 1,\n configurable: false,\n writeable: true\n });\n\n var _BBox = [];\n Object.defineProperty(this, 'BBox', {\n configurable: false,\n writeable: true,\n get: function () {\n return _BBox;\n },\n set: function (value) {\n _BBox = value;\n }\n });\n\n Object.defineProperty(this, 'Resources', {\n value: \"2 0 R\",\n configurable: false,\n writeable: true\n });\n\n var _stream;\n Object.defineProperty(this, 'stream', {\n enumerable: false,\n configurable: true,\n set: function (value) {\n _stream = value.trim();\n },\n get: function () {\n if (_stream) {\n return _stream;\n } else {\n return null;\n }\n }\n });\n };\n\n inherit(AcroFormXObject, AcroFormPDFObject);\n\n var AcroFormDictionary = function () {\n AcroFormPDFObject.call(this);\n\n var _Kids = [];\n\n Object.defineProperty(this, 'Kids', {\n enumerable: false,\n configurable: true,\n get: function () {\n if (_Kids.length > 0) {\n return _Kids;\n } else {\n return undefined;\n }\n }\n });\n Object.defineProperty(this, 'Fields', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _Kids;\n }\n });\n\n // Default Appearance\n var _DA;\n Object.defineProperty(this, 'DA', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (!_DA) {\n return undefined;\n }\n return '(' + _DA + ')'\n },\n set: function (value) {\n _DA = value;\n }\n });\n };\n\n inherit(AcroFormDictionary, AcroFormPDFObject);\n\n /**\n * The Field Object contains the Variables, that every Field needs\n * \n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\n var AcroFormField = function () {\n AcroFormPDFObject.call(this);\n\n //Annotation-Flag See Table 165\n var _F = 4;\n this.isUnicode = false;\n this.trueValue = '';\n Object.defineProperty(this, 'F', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _F;\n },\n set: function (value) {\n if (!isNaN(value)) {\n _F = value;\n } else {\n throw new Error('Invalid value \"' + value + '\" for attribute F supplied.');\n }\n }\n });\n\n /**\n * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen. \n * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n *\n * @name AcroFormField#showWhenPrinted\n * @default true\n * @type {boolean}\n */\n Object.defineProperty(this, 'showWhenPrinted', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(_F, 3));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.F = setBitForPdf(_F, 3);\n } else {\n this.F = clearBitForPdf(_F, 3);\n }\n }\n });\n\n var _Ff = 0;\n Object.defineProperty(this, 'Ff', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _Ff;\n },\n set: function (value) {\n if (!isNaN(value)) {\n _Ff = value;\n } else {\n throw new Error('Invalid value \"' + value + '\" for attribute Ff supplied.');\n }\n }\n });\n\n var _Rect = [];\n Object.defineProperty(this, 'Rect', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (_Rect.length === 0) {\n return undefined;\n }\n return _Rect;\n },\n set: function (value) {\n if (typeof value !== \"undefined\") {\n _Rect = value;\n } else {\n _Rect = [];\n }\n }\n });\n\n /**\n * The x-position of the field.\n *\n * @name AcroFormField#x\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, 'x', {\n enumerable: true,\n configurable: true,\n get: function () {\n if (!_Rect || isNaN(_Rect[0])) {\n return 0;\n }\n return antiScale(_Rect[0]);\n },\n set: function (value) {\n _Rect[0] = scale(value);\n }\n });\n\n /**\n * The y-position of the field.\n *\n * @name AcroFormField#y\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, 'y', {\n enumerable: true,\n configurable: true,\n get: function () {\n if (!_Rect || isNaN(_Rect[1])) {\n return 0;\n }\n return antiScale(_Rect[1]);\n },\n set: function (value) {\n _Rect[1] = scale(value);\n }\n });\n\n /**\n * The width of the field.\n *\n * @name AcroFormField#width\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, 'width', {\n enumerable: true,\n configurable: true,\n get: function () {\n if (!_Rect || isNaN(_Rect[2])) {\n return 0;\n }\n return antiScale(_Rect[2]);\n },\n set: function (value) {\n _Rect[2] = scale(value);\n }\n });\n\n /**\n * The height of the field.\n *\n * @name AcroFormField#height\n * @default null\n * @type {number}\n */\n Object.defineProperty(this, 'height', {\n enumerable: true,\n configurable: true,\n get: function () {\n if (!_Rect || isNaN(_Rect[3])) {\n return 0;\n }\n return antiScale(_Rect[3]);\n },\n set: function (value) {\n _Rect[3] = scale(value);\n }\n });\n\n var _FT = \"\";\n Object.defineProperty(this, 'FT', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _FT\n },\n set: function (value) {\n switch (value) {\n case '/Btn':\n case '/Tx':\n case '/Ch':\n case '/Sig':\n _FT = value;\n break;\n default:\n throw new Error('Invalid value \"' + value + '\" for attribute FT supplied.');\n }\n }\n });\n\n var _T = null;\n\n Object.defineProperty(this, 'T', {\n enumerable: true,\n configurable: false,\n get: function () {\n if (!_T || _T.length < 1) {\n // In case of a Child from a Radio´Group, you don't need a FieldName\n if (this instanceof AcroFormChildClass) {\n return undefined;\n }\n _T = \"FieldObject\" + (AcroFormField.FieldNum++);\n }\n return '(' + pdfEscape(_T) + ')';\n },\n set: function (value) {\n _T = value.toString();\n }\n });\n\n /**\n * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n *\n * @name AcroFormField#fieldName\n * @default null\n * @type {string}\n */\n Object.defineProperty(this, 'fieldName', {\n configurable: true,\n enumerable: true,\n get: function () {\n return _T;\n },\n set: function (value) {\n _T = value;\n }\n });\n\n var _fontName = 'helvetica';\n /**\n * The fontName of the font to be used.\n *\n * @name AcroFormField#fontName\n * @default 'helvetica'\n * @type {string}\n */\n Object.defineProperty(this, 'fontName', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _fontName;\n },\n set: function (value) {\n _fontName = value;\n }\n });\n\n var _fontStyle = 'normal';\n /**\n * The fontStyle of the font to be used.\n *\n * @name AcroFormField#fontStyle\n * @default 'normal'\n * @type {string}\n */\n Object.defineProperty(this, 'fontStyle', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _fontStyle;\n },\n set: function (value) {\n _fontStyle = value;\n }\n });\n\n var _fontSize = 0;\n /**\n * The fontSize of the font to be used.\n *\n * @name AcroFormField#fontSize\n * @default 0 (for auto)\n * @type {number}\n */\n Object.defineProperty(this, 'fontSize', {\n enumerable: true,\n configurable: true,\n get: function () {\n return antiScale(_fontSize);\n },\n set: function (value) {\n _fontSize = scale(value);\n }\n });\n\n var _maxFontSize = 50;\n /**\n * The maximum fontSize of the font to be used.\n *\n * @name AcroFormField#maxFontSize\n * @default 0 (for auto)\n * @type {number}\n */\n Object.defineProperty(this, 'maxFontSize', {\n enumerable: true,\n configurable: true,\n get: function () {\n return antiScale(_maxFontSize);\n },\n set: function (value) {\n _maxFontSize = scale(value);\n }\n });\n\n var _color = 'black';\n /**\n * The color of the text\n *\n * @name AcroFormField#color\n * @default 'black'\n * @type {string|rgba}\n */\n Object.defineProperty(this, 'color', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _color;\n },\n set: function (value) {\n _color = value;\n }\n });\n\n var _DA = '/F1 0 Tf 0 g';\n // Defines the default appearance (Needed for variable Text)\n Object.defineProperty(this, 'DA', {\n enumerable: true,\n configurable: false,\n get: function () {\n if (!_DA\n || this instanceof AcroFormChildClass\n || this instanceof AcroFormTextField) {\n return undefined;\n }\n return toPdfString(_DA);\n },\n set: function (value) {\n value = value.toString();\n _DA = value;\n }\n });\n\n\n var _DV = null;\n Object.defineProperty(this, 'DV', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (!_DV) {\n return undefined;\n }\n if ((this instanceof AcroFormButton === false)) {\n return toPdfString(_DV);\n }\n return _DV;\n },\n set: function (value) {\n value = value.toString();\n if ((this instanceof AcroFormButton === false)) {\n if (value.substr(0, 1) === '(') {\n _DV = pdfUnescape(value.substr(1, value.length - 2));\n } else {\n _DV = pdfUnescape(value);\n }\n } else {\n _DV = value;\n }\n }\n });\n\n /**\n * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value. \n *\n * @name AcroFormField#defaultValue\n * @default null\n * @type {any}\n */\n Object.defineProperty(this, 'defaultValue', {\n enumerable: true,\n configurable: true,\n get: function () {\n if ((this instanceof AcroFormButton === true)) {\n return pdfUnescape(_DV.substr(1, _DV.length - 1));\n } else {\n return _DV;\n }\n },\n set: function (value) {\n value = value.toString();\n if ((this instanceof AcroFormButton === true)) {\n _DV = '/' + value;\n } else {\n _DV = value;\n }\n }\n });\n\n var _V = null;\n Object.defineProperty(this, 'V', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (this.isUnicode) {\n return _V;\n }\n if (!_V) {\n return undefined;\n }\n if ((this instanceof AcroFormButton === false)) {\n return toPdfString(_V);\n }\n return _V;\n },\n set: function (value) {\n value = value.toString();\n if (this.isUnicode) {\n _V = toUnicode(value);\n this.trueValue = value;\n }\n else {\n if ((this instanceof AcroFormButton === false)) {\n if (value.substr(0, 1) === '(') {\n _V = pdfUnescape(value.substr(1, value.length - 2));\n } else {\n _V = pdfUnescape(value);\n }\n } else {\n _V = value;\n }\n }\n }\n });\n\n /**\n * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information. \n *\n * @name AcroFormField#value\n * @default null\n * @type {any}\n */\n Object.defineProperty(this, 'value', {\n enumerable: true,\n configurable: true,\n get: function () {\n if ((this instanceof AcroFormButton === true)) {\n return pdfUnescape(_V.substr(1, _V.length - 1));\n } else {\n return _V;\n }\n },\n set: function (value) {\n value = value.toString();\n if ((this instanceof AcroFormButton === true)) {\n _V = '/' + value;\n } else {\n _V = value;\n }\n }\n });\n\n /**\n * Check if field has annotations\n *\n * @name AcroFormField#hasAnnotation\n * @readonly\n * @type {boolean}\n */\n Object.defineProperty(this, 'hasAnnotation', {\n enumerable: true,\n configurable: true,\n get: function () {\n return (this.Rect);\n }\n });\n\n Object.defineProperty(this, 'Type', {\n enumerable: true,\n configurable: false,\n get: function () {\n return (this.hasAnnotation) ? \"/Annot\" : null;\n }\n });\n\n Object.defineProperty(this, 'Subtype', {\n enumerable: true,\n configurable: false,\n get: function () {\n return (this.hasAnnotation) ? \"/Widget\" : null;\n }\n });\n\n var _hasAppearanceStream = false;\n /**\n * true if field has an appearanceStream\n *\n * @name AcroFormField#hasAppearanceStream\n * @readonly\n * @type {boolean}\n */\n Object.defineProperty(this, 'hasAppearanceStream', {\n enumerable: true,\n configurable: true,\n writeable: true,\n get: function () {\n return _hasAppearanceStream;\n },\n set: function (value) {\n value = Boolean(value);\n _hasAppearanceStream = value;\n }\n });\n\n /**\n * The page on which the AcroFormField is placed\n *\n * @name AcroFormField#page\n * @type {number}\n */\n var _page;\n Object.defineProperty(this, 'page', {\n enumerable: true,\n configurable: true,\n writeable: true,\n get: function () {\n if (!_page) {\n return undefined;\n }\n return _page\n },\n set: function (value) {\n _page = value;\n }\n });\n\n /**\n * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database. \n *\n * @name AcroFormField#readOnly\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'readOnly', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 1));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 1);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 1);\n }\n }\n });\n\n /**\n * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”). \n *\n * @name AcroFormField#required\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'required', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 2));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 2);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 2);\n }\n }\n });\n\n /**\n * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n *\n * @name AcroFormField#noExport\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'noExport', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 3));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 3);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 3);\n }\n }\n });\n\n\n var _Q = null;\n Object.defineProperty(this, 'Q', {\n enumerable: true,\n configurable: false,\n get: function () {\n if (_Q === null) {\n return undefined;\n }\n return _Q;\n },\n set: function (value) {\n if ([0, 1, 2].indexOf(value) !== -1) {\n _Q = value;\n } else {\n throw new Error('Invalid value \"' + value + '\" for attribute Q supplied.');\n }\n }\n });\n\n /**\n * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n * 'left', 'center', 'right'\n *\n * @name AcroFormField#textAlign\n * @default 'left'\n * @type {string}\n */\n Object.defineProperty(this, 'textAlign', {\n get: function () {\n var result;\n switch (_Q) {\n case 0:\n default:\n result = 'left';\n break;\n case 1:\n result = 'center';\n break;\n case 2:\n result = 'right';\n break;\n }\n return result;\n },\n configurable: true,\n enumerable: true,\n set: function (value) {\n switch (value) {\n case 'right':\n case 2:\n _Q = 2;\n break;\n case 'center':\n case 1:\n _Q = 1;\n break;\n case 'left':\n case 0:\n default:\n _Q = 0;\n }\n }\n });\n\n };\n\n inherit(AcroFormField, AcroFormPDFObject);\n\n /**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\n var AcroFormChoiceField = function () {\n AcroFormField.call(this);\n // Field Type = Choice Field\n this.FT = \"/Ch\";\n // options\n this.V = '()';\n\n this.fontName = 'zapfdingbats';\n // Top Index\n var _TI = 0;\n\n Object.defineProperty(this, 'TI', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _TI;\n },\n set: function (value) {\n _TI = value;\n }\n });\n\n // MK fix for Acrobat\n var _MK = '<< /BG [ 0.975 0.975 0.975 ] >>';\n Object.defineProperty(this, 'MK', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _MK;\n },\n set: function (value) {\n _MK = value;\n }\n });\n\n /**\n * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n * \n * @name AcroFormChoiceField#topIndex\n * @default 0\n * @type {number}\n */\n Object.defineProperty(this, 'topIndex', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _TI;\n },\n set: function (value) {\n _TI = value;\n }\n });\n\n var _Opt = [];\n Object.defineProperty(this, 'Opt', {\n enumerable: true,\n configurable: false,\n get: function () {\n if (this.isUnicode) {\n return arrayToPdfUnicodeArray(_Opt);\n }\n return arrayToPdfArray(_Opt);\n },\n set: function (value) {\n _Opt = pdfArrayToStringArray(value);\n }\n });\n\n\n /**\n * @memberof AcroFormChoiceField\n * @name getOptions\n * @function\n * @instance\n * @returns {array} array of Options\n */\n this.getOptions = function () {\n return _Opt;\n }\n\n /**\n * @memberof AcroFormChoiceField\n * @name setOptions\n * @function\n * @instance\n * @param {array} value\n */\n this.setOptions = function (value) {\n _Opt = value;\n if (this.sort) {\n _Opt.sort();\n }\n }\n\n /**\n * @memberof AcroFormChoiceField\n * @name addOption\n * @function\n * @instance\n * @param {string} value\n */\n this.addOption = function (value) {\n value = value || \"\";\n value = value.toString();\n _Opt.push(value);\n if (this.sort) {\n _Opt.sort();\n }\n }\n\n /**\n * @memberof AcroFormChoiceField\n * @name removeOption\n * @function\n * @instance\n * @param {string} value\n * @param {boolean} allEntries (default: false)\n */\n this.removeOption = function (value, allEntries) {\n allEntries = allEntries || false\n value = value || \"\";\n value = value.toString();\n\n while (_Opt.indexOf(value) !== -1) {\n _Opt.splice(_Opt.indexOf(value), 1);\n if (allEntries === false) {\n break;\n }\n }\n };\n\n /**\n * If set, the field is a combo box; if clear, the field is a list box. \n *\n * @name AcroFormChoiceField#combo\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'combo', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 18));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 18);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 18);\n }\n }\n });\n\n /**\n * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set. \n *\n * @name AcroFormChoiceField#edit\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'edit', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 19));\n },\n set: function (value) {\n //PDF 32000-1:2008, page 444\n if (this.combo === true) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 19);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 19);\n }\n }\n }\n });\n\n /**\n * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231). \n *\n * @name AcroFormChoiceField#sort\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'sort', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 20));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 20);\n _Opt.sort();\n } else {\n this.Ff = clearBitForPdf(this.Ff, 20);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected \n *\n * @name AcroFormChoiceField#multiSelect\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'multiSelect', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 22));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 22);\n\n } else {\n this.Ff = clearBitForPdf(this.Ff, 22);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set. \n *\n * @name AcroFormChoiceField#doNotSpellCheck\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'doNotSpellCheck', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 23));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 23);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 23);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n *\n * @name AcroFormChoiceField#commitOnSelChange\n * @default false\n * @type {boolean}\n */\n Object.defineProperty(this, 'commitOnSelChange', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 27));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 27);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 27);\n }\n }\n });\n\n\n this.hasAppearanceStream = false;\n };\n inherit(AcroFormChoiceField, AcroFormField);\n\n /**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\n var AcroFormListBox = function () {\n AcroFormChoiceField.call(this);\n this.fontName = 'helvetica';\n\n //PDF 32000-1:2008, page 444\n this.combo = false;\n };\n inherit(AcroFormListBox, AcroFormChoiceField);\n\n /**\n * @class AcroFormComboBox \n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\n var AcroFormComboBox = function () {\n AcroFormListBox.call(this);\n this.combo = true;\n };\n inherit(AcroFormComboBox, AcroFormListBox);\n\n /**\n * @class AcroFormEditBox \n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\n var AcroFormEditBox = function () {\n AcroFormComboBox.call(this);\n this.edit = true;\n };\n inherit(AcroFormEditBox, AcroFormComboBox);\n\n /**\n * @class AcroFormButton\n * @extends AcroFormField\n */\n var AcroFormButton = function () {\n AcroFormField.call(this);\n this.FT = \"/Btn\";\n\n /**\n * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n * \n * @name AcroFormButton#noToggleToOff\n * @type {boolean}\n */\n Object.defineProperty(this, 'noToggleToOff', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 15));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 15);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 15);\n }\n }\n });\n\n /**\n * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear. \n * \n * @name AcroFormButton#radio\n * @type {boolean}\n */\n Object.defineProperty(this, 'radio', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 16));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 16);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 16);\n }\n }\n });\n\n /**\n * If set, the field is a pushbutton that does not retain a permanent value. \n *\n * @name AcroFormButton#pushButton\n * @type {boolean}\n */\n Object.defineProperty(this, 'pushButton', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 17));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 17);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 17);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n *\n * @name AcroFormButton#radioIsUnison\n * @type {boolean}\n */\n Object.defineProperty(this, 'radioIsUnison', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 26));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 26);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 26);\n }\n }\n });\n\n var _MK = {};\n Object.defineProperty(this, 'MK', {\n enumerable: false,\n configurable: false,\n get: function () {\n if (Object.keys(_MK).length !== 0) {\n var result = [];\n result.push('<<');\n var key;\n for (key in _MK) {\n result.push('/' + key + ' (' + _MK[key] + ')');\n }\n result.push('>>');\n return result.join('\\n');\n }\n return undefined;\n },\n set: function (value) {\n if (typeof value === \"object\") {\n _MK = value\n }\n }\n });\n\n /**\n * From the PDF reference:\n * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user. \n * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n *\n * - '8' = Cross, \n * - 'l' = Circle,\n * - '' = nothing\n * @name AcroFormButton#caption\n * @type {string}\n */\n Object.defineProperty(this, 'caption', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _MK.CA || '';\n },\n set: function (value) {\n if (typeof value === \"string\") {\n _MK.CA = value;\n }\n }\n });\n\n var _AS;\n Object.defineProperty(this, 'AS', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _AS;\n },\n set: function (value) {\n _AS = value;\n }\n });\n\n\n /**\n * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n *\n * @name AcroFormButton#appearanceState\n * @type {any}\n */\n Object.defineProperty(this, 'appearanceState', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _AS.substr(1, _AS.length - 1);\n },\n set: function (value) {\n _AS = '/' + value;\n }\n });\n\n };\n inherit(AcroFormButton, AcroFormField);\n\n /**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\n var AcroFormPushButton = function () {\n AcroFormButton.call(this);\n this.pushButton = true;\n };\n inherit(AcroFormPushButton, AcroFormButton);\n\n /**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\n var AcroFormRadioButton = function () {\n AcroFormButton.call(this);\n this.radio = true;\n this.pushButton = false;\n\n var _Kids = [];\n Object.defineProperty(this, 'Kids', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _Kids;\n },\n set: function (value) {\n if (typeof value !== \"undefined\") {\n _Kids = value;\n } else {\n _Kids = [];\n }\n }\n });\n };\n inherit(AcroFormRadioButton, AcroFormButton);\n\n /**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n * \n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\n var AcroFormChildClass = function () {\n AcroFormField.call(this);\n\n var _parent;\n Object.defineProperty(this, 'Parent', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _parent;\n },\n set: function (value) {\n _parent = value;\n }\n });\n\n var _optionName;\n Object.defineProperty(this, 'optionName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return _optionName;\n },\n set: function (value) {\n _optionName = value;\n }\n });\n\n var _MK = {};\n Object.defineProperty(this, 'MK', {\n enumerable: false,\n configurable: false,\n get: function () {\n var result = [];\n result.push('<<');\n var key;\n for (key in _MK) {\n result.push('/' + key + ' (' + _MK[key] + ')');\n }\n result.push('>>');\n return result.join('\\n');\n },\n set: function (value) {\n if (typeof value === \"object\") {\n _MK = value\n }\n }\n });\n\n /**\n * From the PDF reference:\n * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user. \n * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n *\n * - '8' = Cross, \n * - 'l' = Circle,\n * - '' = nothing\n * @name AcroFormButton#caption\n * @type {string}\n */\n Object.defineProperty(this, 'caption', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _MK.CA || '';\n },\n set: function (value) {\n if (typeof value === \"string\") {\n _MK.CA = value;\n }\n }\n });\n\n var _AS;\n Object.defineProperty(this, 'AS', {\n enumerable: false,\n configurable: false,\n get: function () {\n return _AS;\n },\n set: function (value) {\n _AS = value;\n }\n });\n\n /**\n * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n *\n * @name AcroFormButton#appearanceState\n * @type {any}\n */\n Object.defineProperty(this, 'appearanceState', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _AS.substr(1, _AS.length - 1);\n },\n set: function (value) {\n _AS = '/' + value;\n }\n });\n this.caption = 'l';\n this.appearanceState = 'Off';\n // todo: set AppearanceType as variable that can be set from the\n // outside...\n this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n // The Default appearanceType is the Circle\n this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(this.optionName);\n };\n inherit(AcroFormChildClass, AcroFormField);\n\n AcroFormRadioButton.prototype.setAppearance = function (appearance) {\n if (!('createAppearanceStream' in appearance && 'getCA' in appearance)) {\n throw new Error(\"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\");\n }\n for (var objId in this.Kids) {\n if (this.Kids.hasOwnProperty(objId)) {\n var child = this.Kids[objId];\n child.appearanceStreamContent = appearance.createAppearanceStream(child.optionName);\n child.caption = appearance.getCA();\n }\n }\n };\n\n AcroFormRadioButton.prototype.createOption = function (name) {\n // Create new Child for RadioGroup\n var child = new AcroFormChildClass();\n child.Parent = this;\n child.optionName = name;\n // Add to Parent\n this.Kids.push(child);\n\n addField.call(this, child);\n\n return child;\n };\n\n /**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\n var AcroFormCheckBox = function () {\n AcroFormButton.call(this);\n\n this.fontName = 'zapfdingbats';\n this.caption = '3';\n this.appearanceState = 'On';\n this.value = \"On\";\n this.textAlign = 'center';\n this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n };\n inherit(AcroFormCheckBox, AcroFormButton);\n\n /**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\n var AcroFormTextField = function () {\n AcroFormField.call(this);\n this.FT = '/Tx';\n\n /**\n * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line. \n *\n * @name AcroFormTextField#multiline\n * @type {boolean}\n */\n Object.defineProperty(this, 'multiline', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 13));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 13);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 13);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field. \n * \n * @name AcroFormTextField#fileSelect\n * @type {boolean}\n */\n Object.defineProperty(this, 'fileSelect', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 21));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 21);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 21);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, text entered in the field shall not be spell-checked. \n *\n * @name AcroFormTextField#doNotSpellCheck\n * @type {boolean}\n */\n Object.defineProperty(this, 'doNotSpellCheck', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 23));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 23);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 23);\n }\n }\n });\n\n /**\n * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area. \n * \n * @name AcroFormTextField#doNotScroll\n * @type {boolean}\n */\n Object.defineProperty(this, 'doNotScroll', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 24));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 24);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 24);\n }\n }\n });\n\n /**\n * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n * \n * @name AcroFormTextField#comb\n * @type {boolean}\n */\n Object.defineProperty(this, 'comb', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 25));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 25);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 25);\n }\n }\n });\n\n /**\n * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n * \n * @name AcroFormTextField#richText\n * @type {boolean}\n */\n Object.defineProperty(this, 'richText', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 26));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 26);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 26);\n }\n }\n });\n\n var _MaxLen = null;\n Object.defineProperty(this, 'MaxLen', {\n enumerable: true,\n configurable: false,\n get: function () {\n return _MaxLen;\n },\n set: function (value) {\n _MaxLen = value;\n }\n });\n\n /**\n * (Optional; inheritable) The maximum length of the field’s text, in characters. \n *\n * @name AcroFormTextField#maxLength\n * @type {number}\n */\n Object.defineProperty(this, 'maxLength', {\n enumerable: true,\n configurable: true,\n get: function () {\n return _MaxLen;\n },\n set: function (value) {\n if (Number.isInteger(value)) {\n _MaxLen = value;\n }\n }\n });\n\n\n Object.defineProperty(this, 'hasAppearanceStream', {\n enumerable: true,\n configurable: true,\n get: function () {\n return (this.V || this.DV);\n }\n });\n\n };\n inherit(AcroFormTextField, AcroFormField);\n\n /**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\n var AcroFormPasswordField = function () {\n AcroFormTextField.call(this);\n\n /**\n * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set. \n *\n * @name AcroFormTextField#password\n * @type {boolean}\n */\n Object.defineProperty(this, 'password', {\n enumerable: true,\n configurable: true,\n get: function () {\n return Boolean(getBitForPdf(this.Ff, 14));\n },\n set: function (value) {\n if (Boolean(value) === true) {\n this.Ff = setBitForPdf(this.Ff, 14);\n } else {\n this.Ff = clearBitForPdf(this.Ff, 14);\n }\n }\n });\n this.password = true;\n };\n inherit(AcroFormPasswordField, AcroFormTextField);\n\n\n // Contains Methods for creating standard appearances\n var AcroFormAppearance = {\n CheckBox: {\n createAppearanceStream: function () {\n var appearance = {\n N: {\n On: AcroFormAppearance.CheckBox.YesNormal\n },\n D: {\n On: AcroFormAppearance.CheckBox.YesPushDown,\n Off: AcroFormAppearance.CheckBox.OffPushDown\n }\n };\n\n return appearance;\n },\n /**\n * Returns the standard On Appearance for a CheckBox\n * \n * @returns {AcroFormXObject}\n */\n YesPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n var fontKey = scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;\n var encodedColor = scope.__private__.encodeColorString(formObject.color);\n var calcRes = calculateX(formObject, formObject.caption);\n stream.push(\"0.749023 g\");\n stream.push(\"0 0 \" + f2(AcroFormAppearance.internal.getWidth(formObject)) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject)) + \" re\");\n stream.push(\"f\");\n stream.push(\"BMC\");\n stream.push(\"q\");\n stream.push(\"0 0 1 rg\");\n stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor);\n stream.push(\"BT\");\n stream.push(calcRes.text);\n stream.push(\"ET\");\n stream.push(\"Q\");\n stream.push(\"EMC\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n\n YesNormal: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var fontKey = scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;\n var encodedColor = scope.__private__.encodeColorString(formObject.color);\n var stream = [];\n var height = AcroFormAppearance.internal.getHeight(formObject);\n var width = AcroFormAppearance.internal.getWidth(formObject);\n var calcRes = calculateX(formObject, formObject.caption);\n stream.push(\"1 g\");\n stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n stream.push(\"f\");\n stream.push(\"q\");\n stream.push(\"0 0 1 rg\");\n stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(\"0 g\");\n stream.push(\"BT\");\n stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor);\n stream.push(calcRes.text);\n stream.push(\"ET\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n\n /**\n * Returns the standard Off Appearance for a CheckBox\n * \n * @returns {AcroFormXObject}\n */\n OffPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\"0 0 \" + f2(AcroFormAppearance.internal.getWidth(formObject)) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject)) + \" re\");\n stream.push(\"f\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n },\n\n RadioButton: {\n Circle: {\n createAppearanceStream: function (name) {\n var appearanceStreamContent = {\n D: {\n 'Off': AcroFormAppearance.RadioButton.Circle.OffPushDown\n },\n N: {}\n };\n appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Circle.YesNormal;\n appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Circle.YesPushDown;\n return appearanceStreamContent;\n },\n getCA: function () {\n return 'l';\n },\n\n YesNormal: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n // Make the Radius of the Circle relative to min(height, width) of formObject\n var DotRadius = (AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject)) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n var c = AcroFormAppearance.internal.Bezier_C;\n var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n /*\n * The Following is a Circle created with Bezier-Curves.\n */\n stream.push(\"q\");\n stream.push(\"1 0 0 1 \" + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + \" \" + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + \" cm\");\n stream.push(DotRadius + \" 0 m\");\n stream.push(DotRadius + \" \" + DotRadiusBezier + \" \" + DotRadiusBezier + \" \" + DotRadius + \" 0 \" + DotRadius + \" c\");\n stream.push(\"-\" + DotRadiusBezier + \" \" + DotRadius + \" -\" + DotRadius + \" \" + DotRadiusBezier + \" -\" + DotRadius + \" 0 c\");\n stream.push(\"-\" + DotRadius + \" -\" + DotRadiusBezier + \" -\" + DotRadiusBezier + \" -\" + DotRadius + \" 0 -\" + DotRadius + \" c\");\n stream.push(DotRadiusBezier + \" -\" + DotRadius + \" \" + DotRadius + \" -\" + DotRadiusBezier + \" \" + DotRadius + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n YesPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n var DotRadius = (AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject)) ?\n AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n var DotRadius = Number((DotRadius * 0.9).toFixed(5));\n // Save results for later use; no need to waste\n // processor ticks on doing math\n var k = Number((DotRadius * 2).toFixed(5));\n var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n var dc = Number((DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n stream.push(\"0.749023 g\");\n stream.push(\"q\");\n stream.push(\"1 0 0 1 \" + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + \" \" + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + \" cm\");\n stream.push(k + \" 0 m\");\n stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n stream.push(\"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\");\n stream.push(\"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\");\n stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n stream.push(\"0 g\");\n stream.push(\"q\");\n stream.push(\"1 0 0 1 \" + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + \" \" + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + \" cm\");\n stream.push(DotRadius + \" 0 m\");\n stream.push(\"\" + DotRadius + \" \" + dc + \" \" + dc + \" \" + DotRadius + \" 0 \" + DotRadius + \" c\");\n stream.push(\"-\" + dc + \" \" + DotRadius + \" -\" + DotRadius + \" \" + dc + \" -\" + DotRadius + \" 0 c\");\n stream.push(\"-\" + DotRadius + \" -\" + dc + \" -\" + dc + \" -\" + DotRadius + \" 0 -\" + DotRadius + \" c\");\n stream.push(dc + \" -\" + DotRadius + \" \" + DotRadius + \" -\" + dc + \" \" + DotRadius + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n OffPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n var DotRadius = (AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject)) ?\n AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4;\n // The Borderpadding...\n DotRadius = Number((DotRadius * 0.9).toFixed(5));\n // Save results for later use; no need to waste\n // processor ticks on doing math\n var k = Number((DotRadius * 2).toFixed(5));\n var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n stream.push(\"0.749023 g\");\n stream.push(\"q\");\n stream.push(\"1 0 0 1 \" + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + \" \" + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + \" cm\");\n stream.push(k + \" 0 m\");\n stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n stream.push(\"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\");\n stream.push(\"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\");\n stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n stream.push(\"f\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n },\n\n Cross: {\n /**\n * Creates the Actual AppearanceDictionary-References\n * \n * @param {string} name\n * @returns {Object}\n * @ignore\n */\n createAppearanceStream: function (name) {\n var appearanceStreamContent = {\n D: {\n 'Off': AcroFormAppearance.RadioButton.Cross.OffPushDown\n },\n N: {}\n };\n appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Cross.YesNormal;\n appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Cross.YesPushDown;\n return appearanceStreamContent;\n },\n getCA: function () {\n return '8'\n },\n\n\n YesNormal: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n var cross = AcroFormAppearance.internal.calculateCross(formObject);\n stream.push(\"q\");\n stream.push(\"1 1 \" + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + \" re\");\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n stream.push(\"s\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n YesPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var cross = AcroFormAppearance.internal.calculateCross(formObject);\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\"0 0 \" + f2(AcroFormAppearance.internal.getWidth(formObject)) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject)) + \" re\");\n stream.push(\"f\");\n stream.push(\"q\");\n stream.push(\"1 1 \" + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + \" re\");\n stream.push(\"W\");\n stream.push(\"n\");\n stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n stream.push(\"s\");\n stream.push(\"Q\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n },\n OffPushDown: function (formObject) {\n var xobj = new createFormXObject(formObject);\n var stream = [];\n stream.push(\"0.749023 g\");\n stream.push(\"0 0 \" + f2(AcroFormAppearance.internal.getWidth(formObject)) + \" \" + f2(AcroFormAppearance.internal.getHeight(formObject)) + \" re\");\n stream.push(\"f\");\n xobj.stream = stream.join(\"\\n\");\n return xobj;\n }\n },\n },\n\n /**\n * Returns the standard Appearance\n * \n * @returns {AcroFormXObject}\n */\n createDefaultAppearanceStream: function (formObject) {\n // Set Helvetica to Standard Font (size: auto)\n // Color: Black\n var fontKey = scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;\n var encodedColor = scope.__private__.encodeColorString(formObject.color);\n var fontSize = formObject.fontSize;\n var result = '/' + fontKey + ' ' + fontSize + ' Tf ' + encodedColor;\n return result;\n }\n };\n\n AcroFormAppearance.internal = {\n Bezier_C: 0.551915024494,\n\n calculateCross: function (formObject) {\n\n var width = AcroFormAppearance.internal.getWidth(formObject);\n var height = AcroFormAppearance.internal.getHeight(formObject);\n var a = Math.min(width, height);\n\n var cross = {\n x1: { // upperLeft\n x: (width - a) / 2,\n y: ((height - a) / 2) + a,// height - borderPadding\n },\n x2: { // lowerRight\n x: ((width - a) / 2) + a,\n y: ((height - a) / 2)// borderPadding\n },\n x3: { // lowerLeft\n x: (width - a) / 2,\n y: ((height - a) / 2)// borderPadding\n },\n x4: { // upperRight\n x: ((width - a) / 2) + a,\n y: ((height - a) / 2) + a,// height - borderPadding\n }\n };\n\n return cross;\n },\n };\n AcroFormAppearance.internal.getWidth = function (formObject) {\n var result = 0;\n if (typeof formObject === \"object\") {\n result = scale(formObject.Rect[2]);\n }\n return result;\n };\n AcroFormAppearance.internal.getHeight = function (formObject) {\n var result = 0;\n if (typeof formObject === \"object\") {\n result = scale(formObject.Rect[3]);\n }\n return result;\n };\n\n // Public:\n\n /**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function \n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\n var addField = jsPDFAPI.addField = function (fieldObject) {\n initializeAcroForm.call(this);\n\n if (fieldObject instanceof AcroFormField) {\n putForm.call(this, fieldObject);\n } else {\n throw new Error('Invalid argument passed to jsPDF.addField.');\n }\n fieldObject.page = scope.internal.getCurrentPageInfo().pageNumber;\n return this;\n };\n\n /**\n * @name addButton\n * @function\n * @instance\n * @param {AcroFormButton} options\n * @returns {jsPDF}\n * @deprecated\n */\n jsPDFAPI.addButton = function (button) {\n if (button instanceof AcroFormButton === false) {\n throw new Error('Invalid argument passed to jsPDF.addButton.');\n }\n return addField.call(this, button);\n };\n\n /**\n * @name addTextField\n * @function\n * @instance\n * @param {AcroFormTextField} textField\n * @returns {jsPDF}\n * @deprecated\n */\n jsPDFAPI.addTextField = function (textField) {\n if (textField instanceof AcroFormTextField === false) {\n throw new Error('Invalid argument passed to jsPDF.addTextField.');\n }\n return addField.call(this, textField);\n };\n\n /**\n * @name addChoiceField\n * @function\n * @instance\n * @param {AcroFormChoiceField} \n * @returns {jsPDF}\n * @deprecated\n */\n jsPDFAPI.addChoiceField = function (choiceField) {\n if (choiceField instanceof AcroFormChoiceField === false) {\n throw new Error('Invalid argument passed to jsPDF.addChoiceField.');\n }\n return addField.call(this, choiceField);\n };\n\n if (typeof globalObj == \"object\" &&\n typeof (globalObj[\"ChoiceField\"]) === \"undefined\" &&\n typeof (globalObj[\"ListBox\"]) === \"undefined\" &&\n typeof (globalObj[\"ComboBox\"]) === \"undefined\" &&\n typeof (globalObj[\"EditBox\"]) === \"undefined\" &&\n typeof (globalObj[\"Button\"]) === \"undefined\" &&\n typeof (globalObj[\"PushButton\"]) === \"undefined\" &&\n typeof (globalObj[\"RadioButton\"]) === \"undefined\" &&\n typeof (globalObj[\"CheckBox\"]) === \"undefined\" &&\n typeof (globalObj[\"TextField\"]) === \"undefined\" &&\n typeof (globalObj[\"PasswordField\"]) === \"undefined\"\n ) {\n globalObj[\"ChoiceField\"] = AcroFormChoiceField;\n globalObj[\"ListBox\"] = AcroFormListBox;\n globalObj[\"ComboBox\"] = AcroFormComboBox;\n globalObj[\"EditBox\"] = AcroFormEditBox;\n globalObj[\"Button\"] = AcroFormButton;\n globalObj[\"PushButton\"] = AcroFormPushButton;\n globalObj[\"RadioButton\"] = AcroFormRadioButton;\n globalObj[\"CheckBox\"] = AcroFormCheckBox;\n globalObj[\"TextField\"] = AcroFormTextField;\n globalObj[\"PasswordField\"] = AcroFormPasswordField;\n\n // backwardsCompatibility\n globalObj[\"AcroForm\"] = { Appearance: AcroFormAppearance };\n } else {\n // eslint-disable-next-line no-console\n // console.warn(\"AcroForm-Classes are not populated into global-namespace, because the class-Names exist already. This avoids conflicts with the already used framework.\");\n }\n\n jsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\n jsPDFAPI.AcroFormListBox = AcroFormListBox;\n jsPDFAPI.AcroFormComboBox = AcroFormComboBox;\n jsPDFAPI.AcroFormEditBox = AcroFormEditBox;\n jsPDFAPI.AcroFormButton = AcroFormButton;\n jsPDFAPI.AcroFormPushButton = AcroFormPushButton;\n jsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\n jsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\n jsPDFAPI.AcroFormTextField = AcroFormTextField;\n jsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\n jsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\n jsPDFAPI.AcroForm = {\n ChoiceField: AcroFormChoiceField,\n ListBox: AcroFormListBox,\n ComboBox: AcroFormComboBox,\n EditBox: AcroFormEditBox,\n Button: AcroFormButton,\n PushButton: AcroFormPushButton,\n RadioButton: AcroFormRadioButton,\n CheckBox: AcroFormCheckBox,\n TextField: AcroFormTextField,\n PasswordField: AcroFormPasswordField,\n Appearance: AcroFormAppearance\n };\n\n jsPDF.AcroForm = {\n ChoiceField: AcroFormChoiceField,\n ListBox: AcroFormListBox,\n ComboBox: AcroFormComboBox,\n EditBox: AcroFormEditBox,\n Button: AcroFormButton,\n PushButton: AcroFormPushButton,\n RadioButton: AcroFormRadioButton,\n CheckBox: AcroFormCheckBox,\n TextField: AcroFormTextField,\n PasswordField: AcroFormPasswordField,\n Appearance: AcroFormAppearance\n };\n})(jsPDF, (typeof window !== 'undefined' && window || typeof global !== 'undefined' && global));","export default function setRadioAppearance(doc: any): any {\n const oldAppearanceFuncition: Function = doc.AcroFormAppearance.RadioButton.Circle.YesNormal;\n doc.AcroFormAppearance.RadioButton.Circle.YesNormal = function(formObject: any) {\n const xobj: any = oldAppearanceFuncition(formObject);\n const stream: string[] = xobj.stream.split('\\n');\n const encodeColor: string = doc.__private__.encodeColorString(formObject.color);\n stream[0] = stream[0] + '\\n' + encodeColor + '\\n' + encodeColor.toUpperCase();\n xobj.stream = stream.join('\\n');\n return xobj;\n };\n}"," /**\n * jsPDF fromHTML plugin. BETA stage. API subject to change. Needs browser\n * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com\n * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n * 2014 Diego Casorran, https://github.com/diegocr\n * 2014 Daniel Husar, https://github.com/danielhusar\n * 2014 Wolfgang Gassler, https://github.com/woolfg\n * 2014 Steven Spungin, https://github.com/flamenco\n *\n * @license\n * \n * ====================================================================\n */\n import { jsPDF } from \"jspdf\";\n\n (function (jsPDFAPI) {\n var clone, _DrillForContent, FontNameDB, FontStyleMap, TextAlignMap, FontWeightMap, FloatMap, ClearMap, GetCSS, PurgeWhiteSpace, Renderer, ResolveFont, ResolveUnitedNumber, UnitedNumberMap, elementHandledElsewhere, images, loadImgs, checkForFooter, process, tableToJson;\n\n clone = function () {\n return function (obj) {\n Clone.prototype = obj;\n return new Clone();\n };\n\n function Clone() {}\n }();\n\n PurgeWhiteSpace = function PurgeWhiteSpace(array) {\n var fragment, i, l, lTrimmed, r, rTrimmed, trailingSpace;\n i = 0;\n l = array.length;\n fragment = void 0;\n lTrimmed = false;\n rTrimmed = false;\n\n while (!lTrimmed && i !== l) {\n fragment = array[i] = array[i].trimLeft();\n\n if (fragment) {\n lTrimmed = true;\n }\n\n i++;\n }\n\n i = l - 1;\n\n while (l && !rTrimmed && i !== -1) {\n fragment = array[i] = array[i].trimRight();\n\n if (fragment) {\n rTrimmed = true;\n }\n\n i--;\n }\n\n r = /\\s+$/g;\n trailingSpace = true;\n i = 0;\n\n while (i !== l) {\n // Leave the line breaks intact\n if (array[i] != \"\\u2028\") {\n fragment = array[i].replace(/\\s+/g, \" \");\n\n if (trailingSpace) {\n fragment = fragment.trimLeft();\n }\n\n if (fragment) {\n trailingSpace = r.test(fragment);\n }\n\n array[i] = fragment;\n }\n\n i++;\n }\n\n return array;\n };\n\n Renderer = function Renderer(pdf, x, y, settings) {\n this.pdf = pdf;\n this.x = x;\n this.y = y;\n this.settings = settings; //list of functions which are called after each element-rendering process\n\n this.watchFunctions = [];\n this.init();\n return this;\n };\n\n ResolveFont = function ResolveFont(css_font_family_string) {\n var name, part, parts;\n name = void 0;\n parts = css_font_family_string.split(\",\");\n part = parts.shift();\n\n while (!name && part) {\n name = FontNameDB[part.trim().toLowerCase()];\n part = parts.shift();\n }\n\n return name;\n };\n\n ResolveUnitedNumber = function ResolveUnitedNumber(css_line_height_string) {\n //IE8 issues\n css_line_height_string = css_line_height_string === \"auto\" ? \"0px\" : css_line_height_string;\n\n if (css_line_height_string.indexOf(\"em\") > -1 && !isNaN(Number(css_line_height_string.replace(\"em\", \"\")))) {\n css_line_height_string = Number(css_line_height_string.replace(\"em\", \"\")) * 18.719 + \"px\";\n }\n\n if (css_line_height_string.indexOf(\"pt\") > -1 && !isNaN(Number(css_line_height_string.replace(\"pt\", \"\")))) {\n css_line_height_string = Number(css_line_height_string.replace(\"pt\", \"\")) * 1.333 + \"px\";\n }\n\n var normal, undef, value;\n undef = void 0;\n normal = 16.00;\n value = UnitedNumberMap[css_line_height_string];\n\n if (value) {\n return value;\n }\n\n value = {\n \"xx-small\": 9,\n \"x-small\": 11,\n small: 13,\n medium: 16,\n large: 19,\n \"x-large\": 23,\n \"xx-large\": 28,\n auto: 0\n }[css_line_height_string];\n\n if (value !== undef) {\n return UnitedNumberMap[css_line_height_string] = value / normal;\n }\n\n if (value = parseFloat(css_line_height_string)) {\n return UnitedNumberMap[css_line_height_string] = value / normal;\n }\n\n value = css_line_height_string.match(/([\\d\\.]+)(px)/);\n\n if (Array.isArray(value) && value.length === 3) {\n return UnitedNumberMap[css_line_height_string] = parseFloat(value[1]) / normal;\n }\n\n return UnitedNumberMap[css_line_height_string] = 1;\n };\n\n GetCSS = function GetCSS(element) {\n var css, tmp, computedCSSElement;\n\n computedCSSElement = function (el) {\n var compCSS;\n\n compCSS = function (el) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n return document.defaultView.getComputedStyle(el, null);\n } else if (el.currentStyle) {\n return el.currentStyle;\n } else {\n return el.style;\n }\n }(el);\n\n return function (prop) {\n prop = prop.replace(/-\\D/g, function (match) {\n return match.charAt(1).toUpperCase();\n });\n return compCSS[prop];\n };\n }(element);\n\n css = {};\n tmp = void 0;\n css[\"font-family\"] = ResolveFont(computedCSSElement(\"font-family\")) || \"times\";\n css[\"font-style\"] = FontStyleMap[computedCSSElement(\"font-style\")] || \"normal\";\n css[\"text-align\"] = TextAlignMap[computedCSSElement(\"text-align\")] || \"left\";\n tmp = FontWeightMap[computedCSSElement(\"font-weight\")] || \"normal\";\n\n if (tmp === \"bold\") {\n if (css[\"font-style\"] === \"normal\") {\n css[\"font-style\"] = tmp;\n } else {\n css[\"font-style\"] = tmp + css[\"font-style\"];\n }\n }\n\n css[\"font-size\"] = ResolveUnitedNumber(computedCSSElement(\"font-size\")) || 1;\n css[\"line-height\"] = ResolveUnitedNumber(computedCSSElement(\"line-height\")) || 1;\n css[\"display\"] = computedCSSElement(\"display\") === \"inline\" ? \"inline\" : \"block\";\n tmp = css[\"display\"] === \"block\";\n css[\"margin-top\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"margin-top\")) || 0;\n css[\"margin-bottom\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"margin-bottom\")) || 0;\n css[\"padding-top\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"padding-top\")) || 0;\n css[\"padding-bottom\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"padding-bottom\")) || 0;\n css[\"margin-left\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"margin-left\")) || 0;\n css[\"margin-right\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"margin-right\")) || 0;\n css[\"padding-left\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"padding-left\")) || 0;\n css[\"padding-right\"] = tmp && ResolveUnitedNumber(computedCSSElement(\"padding-right\")) || 0;\n css[\"page-break-before\"] = computedCSSElement(\"page-break-before\") || \"auto\"; //float and clearing of floats\n\n css[\"float\"] = FloatMap[computedCSSElement(\"cssFloat\")] || \"none\";\n css[\"clear\"] = ClearMap[computedCSSElement(\"clear\")] || \"none\";\n css[\"color\"] = computedCSSElement(\"color\");\n return css;\n };\n\n elementHandledElsewhere = function elementHandledElsewhere(element, renderer, elementHandlers) {\n var handlers, i, isHandledElsewhere, l, classNames;\n isHandledElsewhere = false;\n i = void 0;\n l = void 0;\n handlers = elementHandlers[\"#\" + element.id];\n\n if (handlers) {\n if (typeof handlers === \"function\") {\n isHandledElsewhere = handlers(element, renderer);\n } else {\n i = 0;\n l = handlers.length;\n\n while (!isHandledElsewhere && i !== l) {\n isHandledElsewhere = handlers[i](element, renderer);\n i++;\n }\n }\n }\n\n handlers = elementHandlers[element.nodeName];\n\n if (!isHandledElsewhere && handlers) {\n if (typeof handlers === \"function\") {\n isHandledElsewhere = handlers(element, renderer);\n } else {\n i = 0;\n l = handlers.length;\n\n while (!isHandledElsewhere && i !== l) {\n isHandledElsewhere = handlers[i](element, renderer);\n i++;\n }\n }\n } // Try class names\n\n\n classNames = typeof element.className === 'string' ? element.className.split(' ') : [];\n\n for (i = 0; i < classNames.length; i++) {\n handlers = elementHandlers['.' + classNames[i]];\n\n if (!isHandledElsewhere && handlers) {\n if (typeof handlers === \"function\") {\n isHandledElsewhere = handlers(element, renderer);\n } else {\n i = 0;\n l = handlers.length;\n\n while (!isHandledElsewhere && i !== l) {\n isHandledElsewhere = handlers[i](element, renderer);\n i++;\n }\n }\n }\n }\n\n return isHandledElsewhere;\n };\n\n tableToJson = function tableToJson(table, renderer) {\n var data, headers, i, j, rowData, tableRow, table_obj, table_with, cell, l;\n data = [];\n headers = [];\n i = 0;\n l = 0;\n for (var j = 0; j < table.rows[0].cells.length; j++) {\n l += table.rows[0].cells[j].colSpan;\n }\n table_with = table.clientWidth;\n\n while (i < l) {\n cell = table.rows[0].cells[i];\n\n for (var j = 0; j < cell.colSpan; j++) {\n headers[i + j] = {\n name: cell.textContent.toLowerCase().replace(/\\s+/g, '') + '_' + j,\n prompt: cell.textContent.replace(/\\r?\\n/g, ''),\n width: cell.clientWidth / table_with * renderer.settings.width / cell.colSpan\n };\n }\n\n i += j;\n }\n\n i = 1;\n\n while (i < table.rows.length) {\n tableRow = table.rows[i];\n rowData = {};\n j = 0;\n\n while (j < tableRow.cells.length) {\n rowData[headers[j].name] = tableRow.cells[j].textContent.replace(/\\r?\\n/g, '');\n j++;\n }\n\n data.push(rowData);\n i++;\n }\n\n return table_obj = {\n rows: data,\n headers: headers\n };\n };\n\n var SkipNode = {\n SCRIPT: 1,\n STYLE: 1,\n NOSCRIPT: 1,\n OBJECT: 1,\n EMBED: 1,\n SELECT: 1\n };\n var listCount = 1;\n\n _DrillForContent = function DrillForContent(element, renderer, elementHandlers) {\n var cn, cns, fragmentCSS, i, isBlock, l, table2json, cb;\n cns = element.childNodes;\n cn = void 0;\n fragmentCSS = GetCSS(element);\n isBlock = fragmentCSS.display === \"block\";\n\n if (isBlock) {\n renderer.setBlockBoundary();\n renderer.setBlockStyle(fragmentCSS);\n }\n i = 0;\n l = cns.length;\n\n while (i < l) {\n cn = cns[i];\n\n if (typeof(cn) === \"object\") {\n //execute all watcher functions to e.g. reset floating\n renderer.executeWatchFunctions(cn);\n /*** HEADER rendering **/\n\n if (cn.nodeType === 1 && cn.nodeName === 'HEADER') {\n var header = cn; //store old top margin\n\n var oldMarginTop = renderer.pdf.margins_doc.top; //subscribe for new page event and render header first on every page\n\n renderer.pdf.internal.events.subscribe('addPage', function (pageInfo) {\n //set current y position to old margin\n renderer.y = oldMarginTop; //render all child nodes of the header element\n\n _DrillForContent(header, renderer, elementHandlers); //set margin to old margin + rendered header + 10 space to prevent overlapping\n //important for other plugins (e.g. table) to start rendering at correct position after header\n\n\n renderer.pdf.margins_doc.top = renderer.y + 10;\n renderer.y += 10;\n }, false);\n }\n\n if (cn.nodeType === 8 && cn.nodeName === \"#comment\") {\n if (~cn.textContent.indexOf(\"ADD_PAGE\")) {\n renderer.pdf.addPage();\n renderer.y = renderer.pdf.margins_doc.top;\n }\n } else if (cn.nodeType === 1 && !SkipNode[cn.nodeName]) {\n /*** IMAGE RENDERING ***/\n var cached_image;\n\n if (cn.nodeName === \"IMG\") {\n var url = cn.getAttribute(\"src\");\n cached_image = images[(renderer.pdf.sHashCode && renderer.pdf.sHashCode(url)) || url];\n }\n\n if (cached_image) {\n if (renderer.pdf.internal.pageSize.getHeight() - renderer.pdf.margins_doc.bottom < renderer.y + cn.height && renderer.y > renderer.pdf.margins_doc.top) {\n renderer.pdf.addPage();\n renderer.y = renderer.pdf.margins_doc.top; //check if we have to set back some values due to e.g. header rendering for new page\n\n renderer.executeWatchFunctions(cn);\n }\n\n var imagesCSS = GetCSS(cn);\n var imageX = renderer.x;\n var fontToUnitRatio = 12 / renderer.pdf.internal.scaleFactor; //define additional paddings, margins which have to be taken into account for margin calculations\n\n var additionalSpaceLeft = (imagesCSS[\"margin-left\"] + imagesCSS[\"padding-left\"]) * fontToUnitRatio;\n var additionalSpaceRight = (imagesCSS[\"margin-right\"] + imagesCSS[\"padding-right\"]) * fontToUnitRatio;\n var additionalSpaceTop = (imagesCSS[\"margin-top\"] + imagesCSS[\"padding-top\"]) * fontToUnitRatio;\n var additionalSpaceBottom = (imagesCSS[\"margin-bottom\"] + imagesCSS[\"padding-bottom\"]) * fontToUnitRatio; //if float is set to right, move the image to the right border\n //add space if margin is set\n\n if (imagesCSS['float'] !== undefined && imagesCSS['float'] === 'right') {\n imageX += renderer.settings.width - cn.width - additionalSpaceRight;\n } else {\n imageX += additionalSpaceLeft;\n }\n\n renderer.pdf.addImage(cached_image, imageX, renderer.y + additionalSpaceTop, cn.width, cn.height);\n cached_image = undefined; //if the float prop is specified we have to float the text around the image\n\n if (imagesCSS['float'] === 'right' || imagesCSS['float'] === 'left') {\n //add functiont to set back coordinates after image rendering\n renderer.watchFunctions.push(function (diffX, thresholdY, diffWidth, el) {\n //undo drawing box adaptions which were set by floating\n if (renderer.y >= thresholdY) {\n renderer.x += diffX;\n renderer.settings.width += diffWidth;\n return true;\n } else if (el && el.nodeType === 1 && !SkipNode[el.nodeName] && renderer.x + el.width > renderer.pdf.margins_doc.left + renderer.pdf.margins_doc.width) {\n renderer.x += diffX;\n renderer.y = thresholdY;\n renderer.settings.width += diffWidth;\n return true;\n } else {\n return false;\n }\n }.bind(this, imagesCSS['float'] === 'left' ? -cn.width - additionalSpaceLeft - additionalSpaceRight : 0, renderer.y + cn.height + additionalSpaceTop + additionalSpaceBottom, cn.width)); //reset floating by clear:both divs\n //just set cursorY after the floating element\n\n renderer.watchFunctions.push(function (yPositionAfterFloating, pages, el) {\n if (renderer.y < yPositionAfterFloating && pages === renderer.pdf.internal.getNumberOfPages()) {\n if (el.nodeType === 1 && GetCSS(el).clear === 'both') {\n renderer.y = yPositionAfterFloating;\n return true;\n } else {\n return false;\n }\n } else {\n return true;\n }\n }.bind(this, renderer.y + cn.height, renderer.pdf.internal.getNumberOfPages())); //if floating is set we decrease the available width by the image width\n\n renderer.settings.width -= cn.width + additionalSpaceLeft + additionalSpaceRight; //if left just add the image width to the X coordinate\n\n if (imagesCSS['float'] === 'left') {\n renderer.x += cn.width + additionalSpaceLeft + additionalSpaceRight;\n }\n } else {\n //if no floating is set, move the rendering cursor after the image height\n renderer.y += cn.height + additionalSpaceTop + additionalSpaceBottom;\n }\n /*** TABLE RENDERING ***/\n\n } else if (cn.nodeName === \"TABLE\") {\n if(!renderer.pdf.autoTable) {\n table2json = tableToJson(cn, renderer);\n renderer.y += 10;\n renderer.pdf.table(renderer.x, renderer.y, table2json.rows, table2json.headers, {\n autoSize: false,\n printHeaders: elementHandlers.printHeaders,\n margins: renderer.pdf.margins_doc,\n css: GetCSS(cn)\n });\n renderer.y = renderer.pdf.internal.__cell__.lastCell.y +\n renderer.pdf.internal.__cell__.lastCell.height;\n } else {\n renderer.y += 10;\n renderer.pdf.autoTable({ theme: \"grid\", html: cn, startY: renderer.y,\n styles: {\n font: renderer.pdf.getFont().fontName,\n fontSize: renderer.pdf.getFontSize(),\n textColor: renderer.pdf.getTextColor()\n },\n margin: { \n top: renderer.pdf.margins_doc.top, \n left: renderer.x, \n right: renderer.pdf.internal.pageSize.getWidth() - (renderer.x + renderer.settings.width), \n bottom: renderer.pdf.margins_doc.bottom },\n });\n renderer.y = renderer.pdf.lastAutoTable.finalY;\n }\n } else if (cn.nodeName === \"OL\" || cn.nodeName === \"UL\") {\n listCount = 1;\n\n if (!elementHandledElsewhere(cn, renderer, elementHandlers)) {\n _DrillForContent(cn, renderer, elementHandlers);\n }\n\n renderer.y += 10;\n } else if (cn.nodeName === \"LI\") {\n var temp = renderer.x;\n renderer.x += 20 / renderer.pdf.internal.scaleFactor;\n renderer.y += 3;\n\n if (!elementHandledElsewhere(cn, renderer, elementHandlers)) {\n _DrillForContent(cn, renderer, elementHandlers);\n }\n\n renderer.x = temp;\n } else if (cn.nodeName === \"BR\") {\n renderer.y += fragmentCSS[\"font-size\"] * renderer.pdf.internal.scaleFactor;\n renderer.addText(\"\\u2028\", clone(fragmentCSS));\n } else {\n if (!elementHandledElsewhere(cn, renderer, elementHandlers)) {\n _DrillForContent(cn, renderer, elementHandlers);\n }\n }\n } else if (cn.nodeType === 3) {\n var value = cn.nodeValue;\n\n if (cn.nodeValue && cn.parentNode.nodeName === \"LI\") {\n if (cn.parentNode.parentNode.nodeName === \"OL\") {\n value = listCount++ + '. ' + value;\n } else {\n var fontSize = fragmentCSS[\"font-size\"];\n var offsetX = (3 - fontSize * 0.75) * renderer.pdf.internal.scaleFactor;\n var offsetY = fontSize * 0.75 * renderer.pdf.internal.scaleFactor;\n var radius = fontSize * 1.74 / renderer.pdf.internal.scaleFactor;\n\n cb = function cb(x, y) {\n this.pdf.circle(x + offsetX, y + offsetY, radius, 'FD');\n };\n }\n } // Only add the text if the text node is in the body element\n // Add compatibility with IE11\n\n\n if (!!(cn.ownerDocument.body.compareDocumentPosition(cn) & 16)) {\n renderer.addText(value, fragmentCSS);\n }\n } else if (typeof cn === \"string\") {\n renderer.addText(cn, fragmentCSS);\n }\n }\n\n i++;\n }\n\n elementHandlers.outY = renderer.y;\n\n if (isBlock) {\n return renderer.setBlockBoundary(cb);\n }\n };\n\n images = {};\n\n loadImgs = function loadImgs(element, renderer, elementHandlers, cb) {\n var imgs = element.getElementsByTagName('img'),\n l = imgs.length,\n found_images,\n x = 0;\n\n function done() {\n renderer.pdf.internal.events.publish('imagesLoaded');\n cb(found_images);\n }\n\n function loadImage(url, width, height) {\n if (!url) return;\n var img = new Image();\n found_images = ++x;\n img.crossOrigin = '';\n\n img.onerror = img.onload = function () {\n if (img.complete) {\n //to support data urls in images, set width and height\n //as those values are not recognized automatically\n if (img.src.indexOf('data:image/') === 0) {\n img.width = width || img.width || 0;\n img.height = height || img.height || 0;\n } //if valid image add to known images array\n\n\n if (img.width + img.height) {\n var hash = (renderer.pdf.sHashCode && renderer.pdf.sHashCode(url)) || url;\n images[hash] = images[hash] || img;\n }\n }\n\n if (! --x) {\n done();\n }\n };\n\n img.src = url;\n }\n\n while (l--) {\n loadImage(imgs[l].getAttribute(\"src\"), imgs[l].width, imgs[l].height);\n }\n\n return x || done();\n };\n\n checkForFooter = function checkForFooter(elem, renderer, elementHandlers) {\n //check if we can found a <footer> element\n var footer = elem.getElementsByTagName(\"footer\");\n\n if (footer.length > 0) {\n footer = footer[0]; //bad hack to get height of footer\n //creat dummy out and check new y after fake rendering\n\n var oldOut = renderer.pdf.internal.write;\n var oldY = renderer.y;\n\n renderer.pdf.internal.write = function () {};\n\n _DrillForContent(footer, renderer, elementHandlers);\n\n var footerHeight = Math.ceil(renderer.y - oldY) + 5;\n renderer.y = oldY;\n renderer.pdf.internal.write = oldOut; //add 20% to prevent overlapping\n\n renderer.pdf.margins_doc.bottom += footerHeight; //Create function render header on every page\n\n var renderFooter = function renderFooter(pageInfo) {\n var pageNumber = pageInfo !== undefined ? pageInfo.pageNumber : 1; //set current y position to old margin\n\n var oldPosition = renderer.y; //render all child nodes of the header element\n\n renderer.y = renderer.pdf.internal.pageSize.getHeight() - renderer.pdf.margins_doc.bottom;\n renderer.pdf.margins_doc.bottom -= footerHeight; //check if we have to add page numbers\n\n var spans = footer.getElementsByTagName('span');\n\n for (var i = 0; i < spans.length; ++i) {\n //if we find some span element with class pageCounter, set the page\n if ((\" \" + spans[i].className + \" \").replace(/[\\n\\t]/g, \" \").indexOf(\" pageCounter \") > -1) {\n spans[i].innerHTML = pageNumber;\n } //if we find some span element with class totalPages, set a variable which is replaced after rendering of all pages\n\n\n if ((\" \" + spans[i].className + \" \").replace(/[\\n\\t]/g, \" \").indexOf(\" totalPages \") > -1) {\n spans[i].innerHTML = '###jsPDFVarTotalPages###';\n }\n } //render footer content\n\n\n _DrillForContent(footer, renderer, elementHandlers); //set bottom margin to previous height including the footer height\n\n\n renderer.pdf.margins_doc.bottom += footerHeight; //important for other plugins (e.g. table) to start rendering at correct position after header\n\n renderer.y = oldPosition;\n }; //check if footer contains totalPages which should be replace at the disoposal of the document\n\n\n var spans = footer.getElementsByTagName('span');\n\n for (var i = 0; i < spans.length; ++i) {\n if ((\" \" + spans[i].className + \" \").replace(/[\\n\\t]/g, \" \").indexOf(\" totalPages \") > -1) {\n renderer.pdf.internal.events.subscribe('htmlRenderingFinished', renderer.pdf.putTotalPages.bind(renderer.pdf, '###jsPDFVarTotalPages###'), true);\n }\n } //register event to render footer on every new page\n\n\n renderer.pdf.internal.events.subscribe('addPage', renderFooter, false); //render footer on first page\n\n renderFooter(); //prevent footer rendering\n\n SkipNode['FOOTER'] = 1;\n }\n };\n\n process = function process(pdf, element, x, y, settings, callback) {\n if (!element) return false;\n if (typeof element !== \"string\" && !element.parentNode) element = '' + element.innerHTML;\n\n if (typeof element === \"string\") {\n element = function (element) {\n var $frame, $hiddendiv, framename, visuallyhidden;\n framename = \"jsPDFhtmlText\" + Date.now().toString() + (Math.random() * 1000).toFixed(0);\n visuallyhidden = \"position: absolute !important;\" + \"clip: rect(1px 1px 1px 1px); /* IE6, IE7 */\" + \"clip: rect(1px, 1px, 1px, 1px);\" + \"padding:0 !important;\" + \"border:0 !important;\" + \"height: 1px !important;\" + \"width: 1px !important; \" + \"top:auto;\" + \"left:-100px;\" + \"overflow: hidden;\";\n $hiddendiv = document.createElement('div');\n $hiddendiv.className = \"sjs-pdf-hidden-html-div\";\n $hiddendiv.style.cssText = visuallyhidden;\n $hiddendiv.innerHTML = \"<iframe style=\\\"height:1px;width:1px\\\" name=\\\"\" + framename + \"\\\" />\";\n document.body.appendChild($hiddendiv);\n $frame = window.frames[framename];\n $frame.document.open();\n $frame.document.writeln(element);\n $frame.document.close();\n return $frame.document.body;\n }(element.replace(/<\\/?script[^>]*?>/gi, ''));\n }\n\n var availableFonts = Object.keys(pdf.getFontList());\n for(var i = 0; i < availableFonts.length; ++i) {\n var fontName = availableFonts[i];\n var fontFamily = fontName.toLowerCase();\n if(!FontNameDB[fontFamily]) {\n FontNameDB[fontFamily] = fontName;\n }\n }\n\n var r = new Renderer(pdf, x, y, settings),\n out; // 1. load images\n // 2. prepare optional footer elements\n // 3. render content\n\n loadImgs.call(this, element, r, settings.elementHandlers, function (found_images) {\n checkForFooter(element, r, settings.elementHandlers);\n\n _DrillForContent(element, r, settings.elementHandlers); //send event dispose for final taks (e.g. footer totalpage replacement)\n\n\n r.pdf.internal.events.publish('htmlRenderingFinished');\n out = r.dispose();\n if (typeof callback === 'function') callback(out);else if (found_images) console.error('jsPDF Warning: rendering issues? provide a callback to fromHTML!');\n });\n return out || {\n x: r.x,\n y: r.y\n };\n };\n\n Renderer.prototype.init = function () {\n this.paragraph = {\n text: [],\n style: []\n };\n return this.pdf.internal.write(\"q\");\n };\n\n Renderer.prototype.dispose = function () {\n this.pdf.internal.write(\"Q\");\n return {\n x: this.x,\n y: this.y,\n ready: true\n };\n }; //Checks if we have to execute some watcher functions\n //e.g. to end text floating around an image\n\n\n Renderer.prototype.executeWatchFunctions = function (el) {\n var ret = false;\n var narray = [];\n\n if (this.watchFunctions.length > 0) {\n for (var i = 0; i < this.watchFunctions.length; ++i) {\n if (this.watchFunctions[i](el) === true) {\n ret = true;\n } else {\n narray.push(this.watchFunctions[i]);\n }\n }\n\n this.watchFunctions = narray;\n }\n\n return ret;\n };\n\n Renderer.prototype.splitFragmentsIntoLines = function (fragments, styles) {\n var currentLineLength, defaultFontSize, ff, fragment, fragmentChopped, fragmentLength, fragmentSpecificMetrics, fs, k, line, lines, maxLineLength, style;\n defaultFontSize = 12;\n k = this.pdf.internal.scaleFactor;\n ff = void 0;\n fs = void 0;\n fragment = void 0;\n style = void 0;\n fragmentSpecificMetrics = void 0;\n fragmentLength = void 0;\n fragmentChopped = void 0;\n line = [];\n lines = [line];\n currentLineLength = 0;\n maxLineLength = this.settings.width;\n const oldFontName = this.pdf.getFont().fontName;\n const oldFontStyle = this.pdf.getFont().fontStyle;\n while (fragments.length) {\n fragment = fragments.shift();\n style = styles.shift();\n\n if (fragment) {\n ff = style[\"font-family\"];\n fs = style[\"font-style\"];\n this.pdf.setFont(ff, fs);\n fragmentSpecificMetrics = {\n textIndent: currentLineLength,\n fontSize: style[\"font-size\"] * defaultFontSize\n };\n fragmentLength = this.pdf.getStringUnitWidth(fragment, fragmentSpecificMetrics) * fragmentSpecificMetrics.fontSize / k;\n\n if (fragment == \"\\u2028\") {\n line = [];\n lines.push(line);\n } else if (currentLineLength + fragmentLength > maxLineLength) {\n fragmentChopped = this.pdf.splitTextToSize(fragment, maxLineLength, fragmentSpecificMetrics);\n line.push([fragmentChopped.shift(), style]);\n\n while (fragmentChopped.length) {\n line = [[fragmentChopped.shift(), style]];\n lines.push(line);\n }\n\n currentLineLength = this.pdf.getStringUnitWidth(line[0][0], fragmentSpecificMetrics) * fragmentSpecificMetrics.fontSize / k;\n } else {\n line.push([fragment, style]);\n currentLineLength += fragmentLength;\n }\n }\n } //if text alignment was set, set margin/indent of each line\n\n\n if (style['text-align'] !== undefined && (style['text-align'] === 'center' || style['text-align'] === 'right' || style['text-align'] === 'justify')) {\n for (var i = 0; i < lines.length; ++i) {\n var length = this.pdf.getStringUnitWidth(lines[i][0][0], fragmentSpecificMetrics) * fragmentSpecificMetrics.fontSize / k; //if there is more than on line we have to clone the style object as all lines hold a reference on this object\n\n if (i > 0) {\n lines[i][0][1] = clone(lines[i][0][1]);\n }\n\n var space = maxLineLength - length;\n\n if (style['text-align'] === 'right') {\n lines[i][0][1]['margin-left'] = space; //if alignment is not right, it has to be center so split the space to the left and the right\n } else if (style['text-align'] === 'center') {\n lines[i][0][1]['margin-left'] = space / 2; //if justify was set, calculate the word spacing and define in by using the css property\n } else if (style['text-align'] === 'justify') {\n var countSpaces = lines[i][0][0].split(' ').length - 1;\n lines[i][0][1]['word-spacing'] = space / countSpaces; //ignore the last line in justify mode\n\n if (i === lines.length - 1) {\n lines[i][0][1]['word-spacing'] = 0;\n }\n }\n }\n }\n this.pdf.setFont(oldFontName, oldFontStyle)\n return lines;\n };\n\n Renderer.prototype.RenderTextFragment = function (text, style) {\n var defaultFontSize, font, maxLineHeight;\n maxLineHeight = 0;\n defaultFontSize = 12;\n\n if (this.pdf.internal.pageSize.getHeight() - this.pdf.margins_doc.bottom < this.y + this.pdf.internal.getFontSize()) {\n this.pdf.internal.write(\"ET\", \"Q\", \"Q\");\n const currentPageNumber = this.pdf.getCurrentPageInfo().pageNumber;\n if (this.pdf.getNumberOfPages() === currentPageNumber) this.pdf.addPage();\n else this.pdf.setPage(currentPageNumber + 1);\n this.y = this.pdf.margins_doc.top;\n this.pdf.internal.write(\"q\", \"q\", \"BT\", this.getPdfColor(style.color), this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), \"Td\"); //move cursor by one line on new page\n\n maxLineHeight = Math.max(maxLineHeight, style[\"line-height\"], style[\"font-size\"]);\n this.pdf.internal.write(0, (-1 * defaultFontSize * maxLineHeight).toFixed(2), \"Td\");\n }\n\n font = this.pdf.internal.getFont(style[\"font-family\"], style[\"font-style\"]); // text color\n\n var pdfTextColor = this.getPdfColor(style[\"color\"]);\n\n if (pdfTextColor !== this.lastTextColor) {\n this.pdf.internal.write(pdfTextColor);\n this.lastTextColor = pdfTextColor;\n } //set the word spacing for e.g. justify style\n\n\n if (style['word-spacing'] !== undefined && style['word-spacing'] > 0) {\n this.pdf.internal.write(style['word-spacing'].toFixed(2), \"Tw\");\n }\n\n\n var pdfEscape16 = function(text, font) {\n var widths = font.metadata.Unicode.widths;\n var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n var ar = [\"\"];\n for (var i = 0, l = text.length, t; i < l; ++i) {\n t = font.metadata.characterToGlyph(text.charCodeAt(i));\n font.metadata.glyIdsUsed.push(t);\n font.metadata.toUnicode[t] = text.charCodeAt(i);\n if (widths.indexOf(t) == -1) {\n widths.push(t);\n widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n }\n if (t == \"0\") {\n //Spaces are not allowed in cmap.\n return ar.join(\"\");\n } else {\n t = t.toString(16);\n ar.push(padz[4 - t.length], t);\n }\n }\n return ar.join(\"\");\n };\n\n var utf8TextFunction = function(text, font) {\n var text = text || \"\";\n \n var str = \"\",\n s = 0,\n cmapConfirm;\n var strText = \"\";\n var encoding = font.encoding;\n \n if (font.encoding !== \"Identity-H\") {\n return text;\n }\n strText = text;\n \n for (s = 0; s < strText.length; s += 1) {\n if (font.metadata.hasOwnProperty(\"cmap\")) {\n cmapConfirm = font.metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n }\n if (!cmapConfirm) {\n if (\n strText[s].charCodeAt(0) < 256 &&\n font.metadata.hasOwnProperty(\"Unicode\")\n ) {\n str += strText[s];\n } else {\n str += \"\";\n }\n } else {\n str += strText[s];\n }\n }\n var result = \"\";\n if (parseInt(font.id.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n result = this.pdf.internal.pdfEscape(str, key)\n .split(\"\")\n .map(function(cv) {\n return cv.charCodeAt(0).toString(16);\n })\n .join(\"\");\n } else if (encoding === \"Identity-H\") {\n result = pdfEscape16(str, font);\n }\n \n return result;\n }; \n\n // var escapedText = this.pdf.internal.pdfEscape(text);\n // var escapedText = utf8TextFunction(text, font);\n // if(escapedText != text) {\n // escapedText = \"<\" + escapedText + \">\";\n // } else {\n // escapedText = \"(\" + escapedText + \")\";\n // }\n\n var escapedText = \"\";\n if(font.encoding !== \"Identity-H\") {\n escapedText = \"(\" + this.pdf.internal.pdfEscape(text) + \")\";\n } else {\n escapedText = \"<\" + utf8TextFunction(text, font) + \">\";\n }\n\n this.pdf.internal.write(\"/\" + font.id, (defaultFontSize * style[\"font-size\"]).toFixed(2), \"Tf\", escapedText + \" Tj\"); //set the word spacing back to neutral => 0\n\n if (style['word-spacing'] !== undefined) {\n this.pdf.internal.write(0, \"Tw\");\n }\n }; // Accepts #FFFFFF, rgb(int,int,int), or CSS Color Name\n\n\n Renderer.prototype.getPdfColor = function (style) {\n var textColor;\n var r, g, b;\n var rx = /rgb\\s*\\(\\s*(\\d+),\\s*(\\d+),\\s*(\\d+\\s*)\\)/;\n var m = rx.exec(style);\n\n if (m != null) {\n r = parseInt(m[1]);\n g = parseInt(m[2]);\n b = parseInt(m[3]);\n } else {\n if (typeof style === \"string\" && style.charAt(0) != '#') {\n var rgbColor = new RGBColor(style);\n\n if (rgbColor.ok) {\n style = rgbColor.toHex();\n } else {\n style = '#000000';\n }\n }\n\n r = style.substring(1, 3);\n r = parseInt(r, 16);\n g = style.substring(3, 5);\n g = parseInt(g, 16);\n b = style.substring(5, 7);\n b = parseInt(b, 16);\n }\n\n if (typeof r === 'string' && /^#[0-9A-Fa-f]{6}$/.test(r)) {\n var hex = parseInt(r.substr(1), 16);\n r = hex >> 16 & 255;\n g = hex >> 8 & 255;\n b = hex & 255;\n }\n\n var f3 = this.f3;\n\n if (r === 0 && g === 0 && b === 0 || typeof g === 'undefined') {\n textColor = f3(r / 255) + ' g';\n } else {\n textColor = [f3(r / 255), f3(g / 255), f3(b / 255), 'rg'].join(' ');\n }\n\n return textColor;\n };\n\n Renderer.prototype.f3 = function (number) {\n return number.toFixed(3); // Ie, %.3f\n }, Renderer.prototype.renderParagraph = function (cb) {\n var blockstyle, defaultFontSize, fontToUnitRatio, fragments, i, l, line, lines, maxLineHeight, out, paragraphspacing_after, paragraphspacing_before, priorblockstyle, styles, fontSize;\n fragments = PurgeWhiteSpace(this.paragraph.text);\n styles = this.paragraph.style;\n blockstyle = this.paragraph.blockstyle;\n priorblockstyle = this.paragraph.priorblockstyle || {};\n this.paragraph = {\n text: [],\n style: [],\n blockstyle: {},\n priorblockstyle: blockstyle\n };\n\n if (!fragments.join(\"\").trim()) {\n return;\n }\n\n lines = this.splitFragmentsIntoLines(fragments, styles);\n line = void 0;\n maxLineHeight = void 0;\n defaultFontSize = 12;\n fontToUnitRatio = defaultFontSize / this.pdf.internal.scaleFactor;\n this.priorMarginBottom = this.priorMarginBottom || 0;\n paragraphspacing_before = (Math.max((blockstyle[\"margin-top\"] || 0) - this.priorMarginBottom, 0) + (blockstyle[\"padding-top\"] || 0)) * fontToUnitRatio;\n paragraphspacing_after = ((blockstyle[\"margin-bottom\"] || 0) + (blockstyle[\"padding-bottom\"] || 0)) * fontToUnitRatio;\n this.priorMarginBottom = blockstyle[\"margin-bottom\"] || 0;\n\n if (blockstyle['page-break-before'] === 'always') {\n this.pdf.addPage();\n this.y = 0;\n paragraphspacing_before = ((blockstyle[\"margin-top\"] || 0) + (blockstyle[\"padding-top\"] || 0)) * fontToUnitRatio;\n }\n\n out = this.pdf.internal.write;\n i = void 0;\n l = void 0;\n this.y += paragraphspacing_before;\n out(\"q\", \"BT 0 g\", this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), \"Td\"); //stores the current indent of cursor position\n\n var currentIndent = 0;\n\n while (lines.length) {\n line = lines.shift();\n maxLineHeight = 0;\n i = 0;\n l = line.length;\n\n while (i !== l) {\n if (line[i][0].trim()) {\n maxLineHeight = Math.max(maxLineHeight, line[i][1][\"line-height\"], line[i][1][\"font-size\"]);\n fontSize = line[i][1][\"font-size\"] * 7;\n }\n\n i++;\n } //if we have to move the cursor to adapt the indent\n\n\n var indentMove = 0;\n var wantedIndent = 0; //if a margin was added (by e.g. a text-alignment), move the cursor\n\n if (line[0][1][\"margin-left\"] !== undefined && line[0][1][\"margin-left\"] > 0) {\n wantedIndent = this.pdf.internal.getCoordinateString(line[0][1][\"margin-left\"]);\n indentMove = wantedIndent - currentIndent;\n currentIndent = wantedIndent;\n }\n\n var indentMore = Math.max(blockstyle[\"margin-left\"] || 0, 0) * fontToUnitRatio; //move the cursor\n\n out(indentMove + indentMore, (-1 * defaultFontSize * maxLineHeight).toFixed(2), \"Td\");\n i = 0;\n l = line.length;\n\n while (i !== l) {\n if (line[i][0]) {\n this.RenderTextFragment(line[i][0], line[i][1]);\n }\n\n i++;\n }\n\n this.y += maxLineHeight * fontToUnitRatio; //if some watcher function was executed successful, so e.g. margin and widths were changed,\n //reset line drawing and calculate position and lines again\n //e.g. to stop text floating around an image\n\n if (this.executeWatchFunctions(line[0][1]) && lines.length > 0) {\n var localFragments = [];\n var localStyles = []; //create fragment array of\n\n lines.forEach(function (localLine) {\n var i = 0;\n var l = localLine.length;\n\n while (i !== l) {\n if (localLine[i][0]) {\n localFragments.push(localLine[i][0] + ' ');\n localStyles.push(localLine[i][1]);\n }\n\n ++i;\n }\n }); //split lines again due to possible coordinate changes\n\n lines = this.splitFragmentsIntoLines(PurgeWhiteSpace(localFragments), localStyles); //reposition the current cursor\n\n out(\"ET\", \"Q\");\n out(\"q\", \"BT 0 g\", this.pdf.internal.getCoordinateString(this.x), this.pdf.internal.getVerticalCoordinateString(this.y), \"Td\");\n }\n }\n\n if (cb && typeof cb === \"function\") {\n cb.call(this, this.x - 9, this.y - fontSize / 2);\n }\n\n out(\"ET\", \"Q\");\n return this.y += paragraphspacing_after;\n };\n\n Renderer.prototype.setBlockBoundary = function (cb) {\n return this.renderParagraph(cb);\n };\n\n Renderer.prototype.setBlockStyle = function (css) {\n return this.paragraph.blockstyle = css;\n };\n\n Renderer.prototype.addText = function (text, css) {\n this.paragraph.text.push(text);\n return this.paragraph.style.push(css);\n };\n\n FontNameDB = {\n helvetica: \"helvetica\",\n \"sans-serif\": \"helvetica\",\n \"times new roman\": \"times\",\n serif: \"times\",\n times: \"times\",\n monospace: \"courier\",\n courier: \"courier\"\n };\n FontWeightMap = {\n 100: \"normal\",\n 200: \"normal\",\n 300: \"normal\",\n 400: \"normal\",\n 500: \"bold\",\n 600: \"bold\",\n 700: \"bold\",\n 800: \"bold\",\n 900: \"bold\",\n normal: \"normal\",\n bold: \"bold\",\n bolder: \"bold\",\n lighter: \"normal\"\n };\n FontStyleMap = {\n normal: \"normal\",\n italic: \"italic\",\n oblique: \"italic\"\n };\n TextAlignMap = {\n left: \"left\",\n right: \"right\",\n center: \"center\",\n justify: \"justify\"\n };\n FloatMap = {\n none: 'none',\n right: 'right',\n left: 'left'\n };\n ClearMap = {\n none: 'none',\n both: 'both'\n };\n UnitedNumberMap = {\n normal: 1\n };\n /**\n * Converts HTML-formatted text into formatted PDF text.\n *\n * Notes:\n * 2012-07-18\n * Plugin relies on having browser, DOM around. The HTML is pushed into dom and traversed.\n * Plugin relies on jQuery for CSS extraction.\n * Targeting HTML output from Markdown templating, which is a very simple\n * markup - div, span, em, strong, p. No br-based paragraph separation supported explicitly (but still may work.)\n * Images, tables are NOT supported.\n *\n * @public\n * @function\n * @param HTML {String|Object} HTML-formatted text, or pointer to DOM element that is to be rendered into PDF.\n * @param x {Number} starting X coordinate in jsPDF instance's declared units.\n * @param y {Number} starting Y coordinate in jsPDF instance's declared units.\n * @param settings {Object} Additional / optional variables controlling parsing, rendering.\n * @returns {Object} jsPDF instance\n */\n\n jsPDFAPI.fromHTML = function (HTML, x, y, settings, callback, margins) {\n\n this.margins_doc = margins || {\n top: 0,\n bottom: 0\n };\n if (!settings) settings = {};\n if (!settings.elementHandlers) settings.elementHandlers = {};\n return process(this, HTML, isNaN(x) ? 4 : x, isNaN(y) ? 4 : y, settings, callback);\n };\n })(jsPDF.API);\n","import IntervalTree from 'node-interval-tree';\nimport { DocOptions, DocController } from '../doc_controller';\nimport { IPdfBrick } from '../pdf_render/pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\ninterface PackInterval {\n pageIndex: number;\n xLeft: number;\n xRight: number;\n yBot: number;\n absBot: number;\n}\nexport class PagePacker {\n private static findBotInterval(tree: IntervalTree<PackInterval>,\n xLeft: number, xRight: number, options: DocOptions): PackInterval {\n const intervals: PackInterval[] = tree.search(xLeft, xRight);\n intervals.push({\n pageIndex: 0, xLeft:\n options.margins.left, xRight: options.margins.left,\n yBot: options.margins.top, absBot: options.margins.top\n });\n return intervals.reduce((mx, cr) => {\n if (Math.abs(cr.xRight - xLeft) < SurveyHelper.EPSILON ||\n Math.abs(cr.xLeft - xRight) < SurveyHelper.EPSILON) return mx;\n if (cr.pageIndex < mx.pageIndex) return mx;\n if (cr.pageIndex > mx.pageIndex) return cr;\n return cr.yBot > mx.yBot ? cr : mx;\n }, intervals[intervals.length - 1]);\n }\n private static addPack(packs: IPdfBrick[][], index: number, brick: IPdfBrick) {\n for (let i: number = packs.length; i <= index; i++) {\n packs.push([]);\n }\n packs[index].push(brick);\n }\n public static pack(flats: IPdfBrick[][], controller: DocController): IPdfBrick[][] {\n const pageHeight: number = controller.paperHeight -\n controller.margins.top - controller.margins.bot;\n const unfoldFlats: IPdfBrick[][] = [];\n flats.forEach((flatsPage: IPdfBrick[]) => {\n unfoldFlats.push([]);\n flatsPage.forEach((flat: IPdfBrick) => {\n if (flat.height > pageHeight + SurveyHelper.EPSILON) {\n unfoldFlats[unfoldFlats.length - 1].push(...flat.unfold());\n }\n else unfoldFlats[unfoldFlats.length - 1].push(flat);\n });\n });\n unfoldFlats.forEach((unfoldFlatsPage: IPdfBrick[]) => {\n unfoldFlatsPage.sort((a: IPdfBrick, b: IPdfBrick) => {\n if (a.yTop < b.yTop) return -1;\n if (a.yTop > b.yTop) return 1;\n if (a.xLeft > b.xLeft) return 1;\n if (a.xLeft < b.xLeft) return -1;\n return 0;\n });\n });\n let pageIndexModel: number = 0;\n const packs: IPdfBrick[][] = [];\n const pageBot: number = controller.paperHeight - controller.margins.bot;\n unfoldFlats.forEach((unfoldFlatsPage: IPdfBrick[]) => {\n const tree: IntervalTree<PackInterval> = new IntervalTree();\n let pageIndexShift: number = 0;\n unfoldFlatsPage.forEach((flat: IPdfBrick) => {\n let { pageIndex, yBot, absBot } = PagePacker.findBotInterval(\n tree, flat.xLeft, flat.xRight, controller);\n const height: number = flat.height;\n flat.yTop = yBot + flat.yTop - absBot;\n if (Math.abs(flat.yTop - controller.margins.top) > SurveyHelper.EPSILON &&\n flat.yTop + height > pageBot + SurveyHelper.EPSILON || flat.isPageBreak) {\n flat.yTop = controller.margins.top;\n pageIndex++;\n pageIndexShift = Math.max(pageIndexShift, pageIndex);\n }\n tree.insert(flat.xLeft, flat.xRight, {\n pageIndex: pageIndex,\n xLeft: flat.xLeft, xRight: flat.xRight,\n yBot: flat.yTop + height, absBot: flat.yBot\n });\n flat.yBot = flat.yTop + height;\n PagePacker.addPack(packs, pageIndexModel + pageIndex, flat);\n });\n pageIndexModel += pageIndexShift + 1;\n });\n return packs;\n }\n}","import { IQuestion, QuestionBooleanModel } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { CheckItemBrick } from './pdf_checkitem';\n\nexport class BooleanItemBrick extends CheckItemBrick {\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect) {\n super(controller, rect,\n (<QuestionBooleanModel>question).id,\n { question: question, readOnly: question.isReadOnly, checked: (<QuestionBooleanModel>question).booleanValue });\n }\n}","import { IRect, ISize, DocController } from '../doc_controller';\nimport { IQuestion, Question } from 'survey-core';\nimport { SurveyHelper } from '../helper_survey';\n\nexport type TranslateXFunction = (xLeft: number, xRight : number) => { xLeft: number, xRight: number};\nexport interface IPdfBrick extends IRect, ISize {\n render(): Promise<void>;\n unfold(): IPdfBrick[];\n translateX(func: TranslateXFunction): void;\n isPageBreak: boolean;\n}\n/**\n * An object that describes a PDF brick&mdash;a simple element with specified content, size, and location. Bricks are fundamental elements used to construct a PDF document.\n *\n * You can access `PdfBrick` objects within functions that handle `SurveyPDF`'s [`onRenderQuestion`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderQuestion), [`onRenderPanel`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderPanel), and [`onRenderPage`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderPage) events.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/add-markup-to-customize-pdf-forms/ (linkStyle))\n */\nexport class PdfBrick implements IPdfBrick {\n protected _xLeft: number;\n protected _xRight: number;\n protected _yTop: number;\n protected _yBot: number;\n\n /**\n * An X-coordinate for the left brick edge.\n */\n public get xLeft(): number {\n return this._xLeft;\n }\n public set xLeft(val: number) {\n this.setXLeft(val);\n }\n /**\n * An X-coordinate for the right brick edge.\n */\n public get xRight(): number {\n return this._xRight;\n }\n public set xRight(val: number) {\n this.setXRight(val);\n }\n /**\n * A Y-coordinate for the top brick edge.\n */\n public get yTop(): number {\n return this._yTop;\n }\n public set yTop(val: number) {\n this.setYTop(val);\n }\n /**\n * A Y-coordinate for the bottom brick edge.\n */\n public get yBot(): number {\n return this._yBot;\n }\n public set yBot(val: number) {\n this.setYBottom(val);\n }\n /**\n * Font size in points.\n *\n * Default value: 14 (inherited from the parent PDF document)\n */\n public fontSize: number;\n /**\n * The color of text within the brick.\n *\n * Default value: `\"#404040\"`\n */\n public textColor: string = SurveyHelper.TEXT_COLOR;\n public formBorderColor: string = SurveyHelper.FORM_BORDER_COLOR;\n public isPageBreak: boolean = false;\n public constructor(protected question: IQuestion,\n protected controller: DocController, rect: IRect) {\n this.xLeft = rect.xLeft;\n this.xRight = rect.xRight;\n this.yTop = rect.yTop;\n this.yBot = rect.yBot;\n this.fontSize = !!controller ?\n controller.fontSize : DocController.FONT_SIZE;\n }\n translateX(func: TranslateXFunction): void {\n const res = func(this.xLeft, this.xRight);\n this.xLeft = res.xLeft;\n this.xRight = res.xRight;\n }\n /**\n * The brick's width in pixels.\n */\n public get width(): number {\n return this.xRight - this.xLeft;\n }\n /**\n * The brick's height in pixels.\n */\n public get height(): number {\n return this.yBot - this.yTop;\n }\n protected getShouldRenderReadOnly(): boolean {\n return SurveyHelper.shouldRenderReadOnly(this.question, this.controller);\n }\n public afterRenderCallback: () => void;\n public async render(): Promise<void> {\n if (this.getShouldRenderReadOnly()) {\n await this.renderReadOnly();\n }\n else await this.renderInteractive();\n this.afterRenderCallback && this.afterRenderCallback();\n }\n public async renderInteractive(): Promise<void> { }\n public async renderReadOnly(): Promise<void> {\n await this.renderInteractive();\n }\n /**\n * Allows you to get a flat array of nested PDF bricks.\n * @returns A flat array of nested PDF bricks.\n */\n public unfold(): IPdfBrick[] {\n return [this];\n }\n protected getCorrectedText(val: string): string {\n return this.controller.isRTL ? (val || '').split('').reverse().join(''): val;\n }\n protected setXLeft(val: number): void {\n this._xLeft = val;\n }\n protected setXRight(val: number): void {\n this._xRight = val;\n }\n protected setYTop(val: number): void {\n this._yTop = val;\n }\n protected setYBottom(val: number): void {\n this._yBot = val;\n }\n}\n","import { IQuestion, QuestionCheckboxModel, ItemValue } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { CheckItemBrick } from './pdf_checkitem';\n\nexport class CheckboxItemBrick extends CheckItemBrick {\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, item: ItemValue, index: number) {\n super(controller, rect,\n (<QuestionCheckboxModel>question).id + 'index' + index,\n { question: question, readOnly: question.isReadOnly || !item.isEnabled, item: item, checked: (<QuestionCheckboxModel>question).isItemSelected(item), index: index });\n }\n}","import { IQuestion, ItemValue, QuestionCheckboxModel } from 'survey-core';\nimport { IRect, ISize, DocController, IPoint } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from './pdf_brick';\nimport { TextBrick } from './pdf_text';\nimport { SurveyHelper } from '../helper_survey';\nimport { SurveyPDF } from '../survey';\n\nexport interface ICheckItemBrickContext {\n question: IQuestion;\n readOnly: boolean;\n checked: boolean;\n item?: ItemValue;\n index?: number;\n}\nexport class CheckItemBrick extends PdfBrick {\n private static readonly FONT_SIZE_SCALE: number = 0.7;\n private static readonly CHECKMARK_READONLY_SYMBOL: string = '3';\n private static readonly CHECKMARK_READONLY_FONT: string = 'zapfdingbats';\n public static readonly CHECKMARK_READONLY_FONT_SIZE_SCALE: number = 1.0 - Math.E / 10.0;\n protected question: QuestionCheckboxModel;\n public constructor(controller: DocController,\n rect: IRect, protected fieldName: string, protected context: ICheckItemBrickContext) {\n super(context.question, controller, rect);\n this.question = <QuestionCheckboxModel>this.context.question;\n this.textColor = this.formBorderColor;\n }\n protected getShouldRenderReadOnly(): boolean {\n return this.context.readOnly && SurveyHelper.getReadonlyRenderAs(\n this.question, this.controller) !== 'acroform' || this.controller.compress;\n }\n public async renderInteractive(): Promise<void> {\n const checkBox: any = new (<any>this.controller.doc.AcroFormCheckBox)();\n const formScale: number = SurveyHelper.formScale(this.controller, this);\n const options: any = {};\n options.maxFontSize = this.height * formScale * CheckItemBrick.FONT_SIZE_SCALE;\n options.caption = CheckItemBrick.CHECKMARK_READONLY_SYMBOL;\n options.textAlign = 'center';\n options.fieldName = this.fieldName;\n options.readOnly = this.context.readOnly;\n options.color = this.formBorderColor;\n options.value = this.context.checked ? 'On' : false;\n options.AS = this.context.checked ? '/On' : '/Off';\n options.context = this.context;\n\n options.Rect = SurveyHelper.createAcroformRect(\n SurveyHelper.scaleRect(this, formScale));\n this.controller.doc.addField(checkBox);\n (<SurveyPDF>this.question.survey)?.getUpdatedCheckItemAcroformOptions(options);\n\n checkBox.maxFontSize = options.maxFontSize;\n checkBox.caption = options.caption;\n checkBox.textAlign = options.textAlign;\n checkBox.fieldName = options.fieldName;\n checkBox.readOnly = options.readOnly;\n checkBox.color = options.color;\n checkBox.value = options.value;\n checkBox.AS = options.AS;\n checkBox.Rect = options.Rect;\n\n SurveyHelper.renderFlatBorders(this.controller, this);\n }\n public async renderReadOnly(): Promise<void> {\n SurveyHelper.renderFlatBorders(this.controller, this);\n if (this.context.checked) {\n const checkmarkPoint: IPoint = SurveyHelper.createPoint(this, true, true);\n const oldFontName: string = this.controller.fontName;\n this.controller.fontName = CheckItemBrick.CHECKMARK_READONLY_FONT;\n const oldFontSize: number = this.controller.fontSize;\n this.controller.fontSize = oldFontSize *\n CheckItemBrick.CHECKMARK_READONLY_FONT_SIZE_SCALE;\n const checkmarkSize: ISize = this.controller.measureText(\n CheckItemBrick.CHECKMARK_READONLY_SYMBOL);\n checkmarkPoint.xLeft += this.width / 2.0 - checkmarkSize.width / 2.0;\n checkmarkPoint.yTop += this.height / 2.0 - checkmarkSize.height / 2.0;\n const checkmarkFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n checkmarkPoint, this.question, this.controller,\n CheckItemBrick.CHECKMARK_READONLY_SYMBOL, TextBrick);\n (<any>checkmarkFlat.unfold()[0]).textColor = this.textColor;\n this.controller.fontSize = oldFontSize;\n await checkmarkFlat.render();\n this.controller.fontName = oldFontName;\n }\n }\n}","import { IRect, DocController } from '../doc_controller';\nimport { PdfBrick } from './pdf_brick';\n\nexport class ColoredBrick extends PdfBrick {\n public constructor(controller: DocController,\n rect: IRect, private color: string, private renderWidth?: number, private renderHeight?: number) {\n super(undefined, controller, rect);\n }\n public async renderInteractive(): Promise<void> {\n let oldFillColor: string = this.controller.doc.getFillColor();\n this.controller.doc.setFillColor(this.color || 'black');\n this.controller.doc.rect(this.xLeft, this.yTop,\n this.renderWidth ?? this.width, this.renderHeight ?? this.height, 'F');\n this.controller.doc.setFillColor(oldFillColor);\n }\n}","import { IPdfBrick, TranslateXFunction } from './pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class CompositeBrick implements IPdfBrick {\n private bricks: IPdfBrick[] = [];\n private _xLeft: number;\n private _xRight: number;\n private _yTop: number;\n private _yBot: number;\n public isPageBreak: boolean = false;\n public constructor(...bricks: IPdfBrick[]) {\n this._xLeft = 0.0;\n this._xRight = 0.0;\n this._yTop = 0.0;\n this._yBot = 0.0;\n this.addBrick(...bricks);\n }\n get xLeft(): number { return this._xLeft; }\n set xLeft(xLeft: number) {\n this.shift(xLeft - this.xLeft, 0.0, 0.0, 0.0);\n this._xLeft = xLeft;\n }\n get xRight(): number { return this._xRight; }\n set xRight(xRight: number) {\n this.shift(0.0, xRight - this.xRight, 0.0, 0.0);\n this._xRight = xRight;\n }\n get yTop(): number { return this._yTop; }\n set yTop(yTop: number) {\n this.shift(0.0, 0.0, yTop - this.yTop, 0.0);\n this._yTop = yTop;\n }\n get yBot(): number { return this._yBot; }\n set yBot(yBot: number) {\n this.shift(0.0, 0.0, 0.0, yBot - this.yBot);\n this._yBot = yBot;\n }\n private shift(leftShift: number, rightShift: number,\n topShift: number, botShift: number) {\n this.bricks.forEach((brick: IPdfBrick) => {\n brick.xLeft += leftShift;\n brick.xRight += rightShift;\n brick.yTop += topShift;\n brick.yBot += botShift;\n });\n }\n public get width(): number {\n return this.xRight - this.xLeft;\n }\n public get height(): number {\n return this.yBot - this.yTop;\n }\n public async render(): Promise<void> {\n for (let i: number = 0; i < this.bricks.length; i++) {\n await this.bricks[i].render();\n }\n }\n public get isEmpty(): boolean {\n return this.bricks.length === 0;\n }\n public addBrick(...bricks: IPdfBrick[]) {\n if (bricks.length != 0) {\n this.bricks.push(...bricks);\n let mergeRect = SurveyHelper.mergeRects(...this.bricks);\n this._xLeft = mergeRect.xLeft;\n this._xRight = mergeRect.xRight;\n this._yTop = mergeRect.yTop;\n this._yBot = mergeRect.yBot;\n }\n }\n public unfold(): IPdfBrick[] {\n const unfoldBricks: IPdfBrick[] = [];\n this.bricks.forEach((brick: IPdfBrick) => {\n unfoldBricks.push(...brick.unfold());\n });\n return unfoldBricks;\n }\n translateX(func: TranslateXFunction): void {\n this.bricks.forEach(brick => brick.translateX(func));\n const res = func(this.xLeft, this.xRight);\n this._xLeft = res.xLeft;\n this._xRight = res.xRight;\n }\n}","import { PdfBrick } from './pdf_brick';\nimport { DocController, IRect } from '../doc_controller';\nimport { IQuestion } from 'survey-core';\n\nexport class CustomBrick extends PdfBrick {\n\n constructor(question: IQuestion, controller: DocController, private renderFunc: (doc: any, question: any, xLeft: number, yTop: number) => IRect) {\n super(question, controller, renderFunc(controller.helperDoc, question, 0, 0));\n }\n public async renderInteractive(): Promise<void> {\n await new Promise<void>((resolve) => {\n this.renderFunc(this.controller.doc, this.question, this.xLeft, this.yTop);\n resolve();\n });\n }\n}","import { IQuestion } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { TextBrick } from './pdf_text';\n\nexport class DescriptionBrick extends TextBrick {\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, text: string) {\n super(question, controller, rect, text);\n }\n}","import { IQuestion, QuestionDropdownModel, ItemValue } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { PdfBrick } from './pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class DropdownBrick extends PdfBrick {\n protected question: QuestionDropdownModel;\n protected isQuestion: boolean;\n protected isMultiline: boolean;\n public constructor(question: IQuestion,\n protected controller: DocController, rect: IRect) {\n super(question, controller, rect);\n this.question = <QuestionDropdownModel>question;\n }\n public async renderInteractive(): Promise<void> {\n const comboBox = new (<any>this.controller.doc.AcroFormComboBox)();\n comboBox.fieldName = this.question.id;\n comboBox.Rect = SurveyHelper.createAcroformRect(\n SurveyHelper.scaleRect(this,\n SurveyHelper.formScale(this.controller, this)));\n comboBox.edit = false;\n comboBox.color = this.textColor;\n const options: string[] = [];\n if (this.question.showOptionsCaption) {\n options.push(this.getCorrectedText(this.question.optionsCaption));\n }\n this.question.visibleChoices.forEach((item: ItemValue) => {\n options.push(this.getCorrectedText(SurveyHelper.getLocString(item.locText)));\n });\n comboBox.setOptions(options);\n comboBox.fontName = this.controller.fontName;\n comboBox.fontSize = this.fontSize;\n comboBox.readOnly = this.question.isReadOnly;\n comboBox.isUnicode = SurveyHelper.isCustomFont(\n this.controller, comboBox.fontName);\n comboBox.V = this.getCorrectedText(this.question.readOnlyText || '');\n this.controller.doc.addField(comboBox);\n SurveyHelper.renderFlatBorders(this.controller, this);\n }\n}","import { PdfBrick } from './pdf_brick';\nimport { DocController, IRect } from '../doc_controller';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class EmptyBrick extends PdfBrick {\n private isBorderVisible: boolean = false;\n\n constructor(rect: IRect,\n protected controller: DocController = null,\n isBorderVisible: boolean = false) {\n super(null, controller, rect);\n this.isBorderVisible = isBorderVisible;\n }\n\n private resizeBorder(isIncrease: boolean): void {\n const coef: number = isIncrease ? 1 : -1;\n const borderPadding: number = this.controller.doc.getFontSize() * SurveyHelper.VALUE_READONLY_PADDING_SCALE;\n this.xLeft -= coef * borderPadding;\n this.xRight += coef * borderPadding;\n this.yBot += coef * borderPadding;\n }\n\n public async renderInteractive(): Promise<void> {\n if (this.isBorderVisible) {\n this.resizeBorder(true);\n SurveyHelper.renderFlatBorders(this.controller, this);\n this.resizeBorder(false);\n }\n }\n}","import { IQuestion } from 'survey-core';\nimport { PdfBrick } from './pdf_brick';\nimport { IRect, DocController } from '../doc_controller';\n\nexport class HTMLBrick extends PdfBrick {\n private margins: { top: number, bottom: number };\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, protected html: string, isImage: boolean = false) {\n super(question, controller, rect);\n if (isImage) {\n this.margins = {\n top: 0.0,\n bottom: 0.0\n };\n }\n else {\n this.margins = {\n top: controller.margins.top,\n bottom: controller.margins.bot\n };\n }\n }\n public async renderInteractive(): Promise<void> {\n let oldFontSize: number = this.controller.fontSize;\n this.controller.fontSize = this.fontSize;\n await new Promise<void>((resolve) => {\n this.controller.doc.fromHTML(this.html, this.xLeft, this.yTop, {\n width: this.width, pagesplit: true,\n }, function () {\n [].slice.call(document.querySelectorAll('.sjs-pdf-hidden-html-div')).forEach(\n function (el: HTMLDivElement) {\n el.parentNode.removeChild(el);\n }\n );\n resolve();\n }, this.margins);\n });\n this.controller.fontSize = oldFontSize;\n }\n}","import { IQuestion } from 'survey-core';\nimport { PdfBrick } from './pdf_brick';\nimport { DocController } from '../doc_controller';\nimport { IPoint } from '../entries/pdf';\n\nexport class ImageBrick extends PdfBrick {\n public constructor(question: IQuestion, controller: DocController, protected image: string,\n point: IPoint, protected originalWidth: number, protected originalHeight: number) {\n super(question, controller, {\n xLeft: point.xLeft,\n xRight: point.xLeft + (originalWidth || 0),\n yTop: point.yTop,\n yBot: point.yTop + (originalHeight || 0)\n });\n this.isPageBreak = this.originalHeight === undefined;\n }\n public async renderInteractive(): Promise<void> {\n await new Promise<void>((resolve) => {\n try {\n this.controller.doc.addImage(this.image, 'PNG', this.xLeft, this.yTop, this.originalWidth, this.originalHeight);\n } finally {\n resolve();\n }\n });\n }\n}","import { Question } from 'survey-core';\nimport { TextBrick } from './pdf_text';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class LinkBrick extends TextBrick {\n private static readonly SCALE_FACTOR_MAGIC: number = 0.955;\n public static readonly COLOR: string = '#0000EE';\n public constructor(textFlat: TextBrick, protected link: string) {\n super((<LinkBrick>textFlat).question,\n (<LinkBrick>textFlat).controller,\n textFlat, (<LinkBrick>textFlat).text);\n this.textColor = LinkBrick.COLOR;\n }\n public async renderInteractive(): Promise<void> {\n let oldTextColor: string = this.controller.doc.getTextColor();\n this.controller.doc.setTextColor(SurveyHelper.BACKGROUND_COLOR);\n let descent: number = this.controller.unitHeight *\n (this.controller.doc.getLineHeightFactor() -\n LinkBrick.SCALE_FACTOR_MAGIC);\n let yTopLink: number = this.yTop +\n (this.yBot - this.yTop) - descent;\n this.controller.doc.textWithLink(this.text, this.xLeft,\n yTopLink, { url: this.link });\n await super.renderInteractive();\n this.controller.doc.setTextColor(oldTextColor);\n }\n public async renderReadOnly(): Promise<void> {\n if (SurveyHelper.getReadonlyRenderAs(<Question>this.question,\n this.controller) !== 'text') {\n return this.renderInteractive();\n }\n await super.renderInteractive();\n }\n}","import { IQuestion, ItemValue, Question } from 'survey-core';\nimport { IPoint, IRect, ISize, DocController } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from './pdf_brick';\nimport { TextBrick } from './pdf_text';\nimport { SurveyPDF } from '../survey';\nimport { SurveyHelper } from '../helper_survey';\n\nexport interface IRadiogroupWrapContext {\n question: IQuestion;\n readOnly: boolean;\n}\nexport class RadioGroupWrap {\n private _radioGroup: any;\n public constructor(public name: string,\n private controller: DocController,\n private context: IRadiogroupWrapContext) {\n }\n public addToPdf(color: string) {\n this._radioGroup = new this.controller.doc.AcroFormRadioButton();\n const options: any = {};\n options.fieldName = this.name;\n options.readOnly = this.readOnly;\n options.color = color;\n options.context = this.context;\n (<SurveyPDF>this.context.question.survey)?.getUpdatedRadioGroupWrapOptions(options);\n this._radioGroup.fieldName = options.fieldName;\n this._radioGroup.readOnly = options.readOnly;\n this._radioGroup.color = options.color;\n\n this._radioGroup.value = '';\n this.controller.doc.addField(this._radioGroup);\n }\n get radioGroup(): any {\n return this._radioGroup;\n }\n get readOnly(): boolean {\n return this.context.readOnly;\n }\n}\n\nexport interface IRadioGroupItemBrickContext {\n question: IQuestion;\n checked: boolean;\n index: number;\n item: ItemValue;\n}\n\nexport class RadioItemBrick extends PdfBrick {\n private static readonly RADIOMARKER_READONLY_SYMBOL: string = 'l';\n private static readonly RADIOMARKER_READONLY_FONT: string = 'zapfdingbats';\n public static readonly RADIOMARKER_READONLY_FONT_SIZE_SCALE: number = 1.0 - ((2.0 + Math.E) / 10.0);\n public constructor(controller: DocController,\n rect: IRect, private context: IRadioGroupItemBrickContext,\n private radioGroupWrap: RadioGroupWrap) {\n super(context.question, controller, rect);\n this.textColor = this.formBorderColor;\n }\n protected getShouldRenderReadOnly(): boolean {\n return this.radioGroupWrap.readOnly && SurveyHelper.getReadonlyRenderAs(\n <Question>this.question, this.controller) !== 'acroform' || this.controller.compress;\n }\n public async renderInteractive(): Promise<void> {\n if (this.context.index == 0) {\n this.radioGroupWrap.addToPdf(this.formBorderColor);\n }\n const options: any = {};\n options.fieldName = this.radioGroupWrap.name + 'index' + this.context.index;\n let formScale: number = SurveyHelper.formScale(this.controller, this);\n options.Rect = SurveyHelper.createAcroformRect(\n SurveyHelper.scaleRect(this, formScale));\n options.color = this.formBorderColor;\n options.appearance = this.controller.doc.AcroForm.Appearance.RadioButton.Circle;\n options.radioGroup = this.radioGroupWrap.radioGroup;\n options.context = this.context;\n\n (<SurveyPDF>this.context.question.survey)?.getUpdatedRadioItemAcroformOptions(options);\n let radioButton: any = this.radioGroupWrap.radioGroup.createOption(options.fieldName);\n\n if (this.context.checked) {\n if(!options.AS) {\n radioButton.AS = '/' + options.fieldName;\n }\n if(!this.radioGroupWrap.radioGroup.value) {\n this.radioGroupWrap.radioGroup.value = options.fieldName;\n }\n }\n else {\n if(!options.AS) {\n options.AS = '/Off';\n }\n }\n radioButton.Rect = options.Rect;\n radioButton.color = options.color;\n\n SurveyHelper.renderFlatBorders(this.controller, this);\n this.radioGroupWrap.radioGroup.setAppearance(\n options.appearance\n );\n }\n public async renderReadOnly(): Promise<void> {\n SurveyHelper.renderFlatBorders(this.controller, this);\n if (this.context.checked) {\n const radiomarkerPoint: IPoint = SurveyHelper.createPoint(this, true, true);\n const oldFontSize: number = this.controller.fontSize;\n const oldFontName: string = this.controller.fontName;\n this.controller.fontName = RadioItemBrick.RADIOMARKER_READONLY_FONT;\n this.controller.fontSize = oldFontSize *\n RadioItemBrick.RADIOMARKER_READONLY_FONT_SIZE_SCALE;\n let radiomarkerSize: ISize = this.controller.measureText(\n RadioItemBrick.RADIOMARKER_READONLY_SYMBOL);\n radiomarkerPoint.xLeft += this.width / 2.0 - radiomarkerSize.width / 2.0;\n radiomarkerPoint.yTop += this.height / 2.0 - radiomarkerSize.height / 2.0;\n let radiomarkerFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n radiomarkerPoint, this.question, this.controller,\n RadioItemBrick.RADIOMARKER_READONLY_SYMBOL, TextBrick);\n (<any>radiomarkerFlat.unfold()[0]).textColor = this.textColor;\n await radiomarkerFlat.render();\n this.controller.fontSize = oldFontSize;\n this.controller.fontName = oldFontName;\n }\n }\n}","import { IQuestion, QuestionRankingModel } from 'survey-core';\nimport { IRect, ISize, DocController, IPoint } from '../doc_controller';\nimport { IPdfBrick, PdfBrick } from './pdf_brick';\nimport { TextBrick } from './pdf_text';\nimport { CheckItemBrick } from './pdf_checkitem';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class RankingItemBrick extends PdfBrick {\n protected question: QuestionRankingModel;\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, protected mark: string) {\n super(question, controller, rect);\n this.question = <QuestionRankingModel>question;\n this.textColor = this.formBorderColor;\n }\n public async renderInteractive(): Promise<void> {\n SurveyHelper.renderFlatBorders(this.controller, this);\n const markPoint: IPoint = SurveyHelper.createPoint(this, true, true);\n const oldFontSize: number = this.controller.fontSize;\n this.controller.fontSize = oldFontSize *\n CheckItemBrick.CHECKMARK_READONLY_FONT_SIZE_SCALE;\n const markSize: ISize = this.controller.measureText(this.mark);\n markPoint.xLeft += this.width / 2.0 - markSize.width / 2.0;\n markPoint.yTop += this.height / 2.0 - markSize.height / 2.0;\n const markFlat: IPdfBrick = await SurveyHelper.createTextFlat(\n markPoint, this.question, this.controller, this.mark, TextBrick);\n (<any>markFlat.unfold()[0]).textColor = this.textColor;\n this.controller.fontSize = oldFontSize;\n await markFlat.render();\n }\n}","import { IRect, DocController } from '../doc_controller';\nimport { IPdfBrick, TranslateXFunction } from './pdf_brick';\n\nexport class RowlineBrick implements IPdfBrick {\n xLeft: number;\n xRight: number;\n yTop: number;\n yBot: number;\n public isPageBreak: boolean = false;\n public constructor(protected controller: DocController,\n rect: IRect, public color: string) {\n this.xLeft = rect.xLeft;\n this.xRight = rect.xRight;\n this.yTop = rect.yTop;\n this.yBot = rect.yBot;\n }\n public get width(): number {\n return this.xRight - this.xLeft;\n }\n public get height(): number {\n return this.yBot - this.yTop;\n }\n public async render(): Promise<void> {\n if (this.color !== null) {\n let oldDrawColor: string = this.controller.doc.getDrawColor();\n this.controller.doc.setDrawColor(this.color);\n this.controller.doc.line(this.xLeft, this.yTop, this.xRight, this.yTop);\n this.controller.doc.setDrawColor(oldDrawColor);\n }\n }\n public unfold(): IPdfBrick[] {\n return [this];\n }\n translateX(_: TranslateXFunction): void {}\n}","import { IQuestion, } from 'survey-core';\nimport { IPoint, IRect, DocController } from '../doc_controller';\nimport { PdfBrick } from './pdf_brick';\n\nexport class TextBrick extends PdfBrick {\n protected align: any;\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, protected text: string) {\n super(question, controller, rect);\n this.align = {\n isInputRtl: false,\n isOutputRtl: controller.isRTL,\n align: controller.isRTL ? 'right': 'left',\n baseline: 'middle'\n };\n }\n private escapeText() {\n while (this.text.indexOf('\\t') > -1) {\n this.text = this.text.replace('\\t', Array(5).join(String.fromCharCode(160)));\n }\n return this.text;\n }\n public async renderInteractive(): Promise<void> {\n let alignPoint: IPoint = this.alignPoint(this);\n let oldFontSize: number = this.controller.fontSize;\n this.controller.fontSize = this.fontSize;\n let oldTextColor: string = this.controller.doc.getTextColor();\n this.controller.doc.setTextColor(this.textColor);\n this.controller.doc.text(this.escapeText(), alignPoint.xLeft, alignPoint.yTop, this.align);\n this.controller.doc.setTextColor(oldTextColor);\n this.controller.fontSize = oldFontSize;\n }\n protected alignPoint(rect: IRect): IPoint {\n return {\n xLeft: this.controller.isRTL ? rect.xRight : rect.xLeft,\n yTop: rect.yTop + (rect.yBot - rect.yTop) / 2.0\n };\n }\n}","import { IQuestion } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { TextBrick } from './pdf_text';\n\nexport class TextBoldBrick extends TextBrick {\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, text: string) {\n super(question, controller, rect, text);\n }\n public async renderInteractive(): Promise<void> {\n this.controller.fontStyle = 'bold';\n await super.renderInteractive();\n this.controller.fontStyle = 'normal';\n }\n}","import { IQuestion, QuestionTextModel, settings } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { IPdfBrick, PdfBrick, TranslateXFunction } from './pdf_brick';\nimport { SurveyHelper } from '../helper_survey';\nimport { CompositeBrick } from './pdf_composite';\n\nexport interface ITextFieldBrickOptions {\n isReadOnly: boolean;\n fieldName: string;\n shouldRenderBorders: boolean;\n value?: string;\n placeholder?: string;\n inputType?: string;\n isMultiline?: boolean;\n}\n\nexport class TextFieldBrick extends PdfBrick {\n public constructor(protected question: IQuestion, controller: DocController,\n rect: IRect, protected options: ITextFieldBrickOptions\n ) {\n super(question, controller, rect);\n options.isMultiline = options.isMultiline ?? false;\n options.placeholder = options.placeholder ?? '';\n options.inputType = options.inputType ?? '';\n options.value = options.value ?? '';\n this.question = <QuestionTextModel>question;\n }\n private renderColorQuestion(): void {\n let oldFillColor: string = this.controller.doc.getFillColor();\n this.controller.doc.setFillColor(this.question.value || 'black');\n this.controller.doc.rect(this.xLeft, this.yTop,\n this.width, this.height, 'F');\n this.controller.doc.setFillColor(oldFillColor);\n }\n public async renderInteractive(): Promise<void> {\n if (this.options.inputType === 'color') {\n this.renderColorQuestion();\n return;\n }\n const inputField: any = this.options.inputType === 'password' ?\n new (<any>this.controller.doc.AcroFormPasswordField)() :\n new (<any>this.controller.doc.AcroFormTextField)();\n inputField.fieldName = this.options.fieldName;\n inputField.fontName = this.controller.fontName;\n inputField.fontSize = this.fontSize;\n inputField.isUnicode = SurveyHelper.isCustomFont(\n this.controller, inputField.fontName);\n if (this.options.inputType !== 'password') {\n inputField.V = ' ' + this.getCorrectedText(this.options.value);\n inputField.DV = ' ' + this.getCorrectedText(this.options.placeholder);\n }\n else inputField.value = '';\n inputField.multiline = this.options.isMultiline;\n inputField.readOnly = this.options.isReadOnly;\n inputField.color = this.textColor;\n let formScale: number = SurveyHelper.formScale(this.controller, this);\n inputField.maxFontSize = this.controller.fontSize * formScale;\n inputField.Rect = SurveyHelper.createAcroformRect(\n SurveyHelper.scaleRect(this, formScale));\n this.controller.doc.addField(inputField);\n SurveyHelper.renderFlatBorders(this.controller, this);\n }\n protected shouldRenderFlatBorders(): boolean {\n return this.options.shouldRenderBorders;\n }\n protected getShouldRenderReadOnly(): boolean {\n return SurveyHelper.shouldRenderReadOnly(this.question, this.controller, this.options.isReadOnly);\n }\n private _textBrick: IPdfBrick;\n public get textBrick(): IPdfBrick {\n return this._textBrick;\n }\n public set textBrick(val: IPdfBrick) {\n this._textBrick = val;\n const unFoldedBricks = val.unfold();\n const bricksCount = unFoldedBricks.length;\n let renderedBricksCount = 0;\n const bricksByPage: { [index: number]: Array<PdfBrick> } = {};\n const afterRenderTextBrickCallback = (brick: PdfBrick) => {\n if(this.shouldRenderFlatBorders()) {\n renderedBricksCount++;\n const currentPageNumber = this.controller.getCurrentPageIndex();\n if(!bricksByPage[currentPageNumber]) {\n bricksByPage[currentPageNumber] = [];\n }\n bricksByPage[currentPageNumber].push(brick);\n if(renderedBricksCount >= bricksCount) {\n const keys = Object.keys(bricksByPage);\n const renderedOnOnePage = keys.length == 1;\n keys.forEach((key: string) => {\n const compositeBrick = new CompositeBrick();\n bricksByPage[key as any].forEach((brick: PdfBrick) => {\n compositeBrick.addBrick(brick);\n });\n const padding = this.controller.unitHeight * SurveyHelper.VALUE_READONLY_PADDING_SCALE;\n const borderRect = {\n xLeft: this.xLeft,\n xRight: this.xRight,\n width: this.width,\n yTop: renderedOnOnePage ? this.yTop : compositeBrick.yTop - padding,\n yBot: renderedOnOnePage ? this.yBot : compositeBrick.yBot + padding,\n height: renderedOnOnePage ? this.height : compositeBrick.height + 2 * padding,\n formBorderColor: this.formBorderColor,\n };\n this.controller.setPage(Number(key));\n SurveyHelper.renderFlatBorders(this.controller, borderRect);\n this.controller.setPage(currentPageNumber);\n });\n }\n }\n };\n unFoldedBricks.forEach((brick: PdfBrick) => {\n brick.afterRenderCallback = afterRenderTextBrickCallback.bind(this, brick);\n });\n }\n public async renderReadOnly(): Promise<void> {\n this.controller.pushMargins(this.xLeft,\n this.controller.paperWidth - this.xRight);\n if (this.options.inputType === 'color') {\n this.renderColorQuestion();\n } else {\n await this.textBrick.render();\n }\n this.controller.popMargins();\n }\n public unfold(): IPdfBrick[] {\n if (this.getShouldRenderReadOnly() && this.options.inputType !== 'color') {\n return this.textBrick.unfold();\n } else {\n return super.unfold();\n }\n }\n public translateX(func: TranslateXFunction): void {\n const res = func(this.xLeft, this.xRight);\n this._xLeft = res.xLeft;\n this._xRight = res.xRight;\n if(this.textBrick) {\n this.textBrick.translateX(func);\n }\n }\n protected setXLeft(val: number): void {\n const delta = val - this._xLeft;\n super.setXLeft(val);\n if(this.textBrick) {\n this.textBrick.xLeft = this.textBrick.xLeft + delta;\n }\n }\n protected setXRight(val: number): void {\n const delta = val - this._xRight;\n super.setXRight(val);\n if(this.textBrick) {\n this.textBrick.xRight = this.textBrick.xRight + delta;\n }\n }\n protected setYTop(val: number): void {\n const delta = val - this._yTop;\n super.setYTop(val);\n if(this.textBrick) {\n this.textBrick.yTop = this.textBrick.yTop + delta;\n }\n }\n protected setYBottom(val: number): void {\n const delta = val - this._yBot;\n super.setYBottom(val);\n if(this.textBrick) {\n this.textBrick.yBot = this.textBrick.yBot + delta;\n }\n }\n}","import { IQuestion, QuestionTextModel } from 'survey-core';\nimport { IRect, DocController } from '../doc_controller';\nimport { TextBoldBrick } from './pdf_textbold';\nimport { SurveyHelper } from '../helper_survey';\n\nexport class TitlePanelBrick extends TextBoldBrick {\n protected question: QuestionTextModel;\n public constructor(question: IQuestion, controller: DocController,\n rect: IRect, text: string) {\n super(question, controller, rect, text);\n }\n public async renderInteractive(): Promise<void> {\n let oldFontSize = this.controller.fontSize;\n this.controller.fontSize = oldFontSize * SurveyHelper.TITLE_PANEL_FONT_SIZE_SCALE;\n await super.renderInteractive();\n this.controller.fontSize = oldFontSize;\n }\n}","import { SurveyModel, Question, EventBase } from 'survey-core';\nimport * as SurveyCore from 'survey-core';\nimport { IDocOptions, DocController } from './doc_controller';\nimport { FlatSurvey } from './flat_layout/flat_survey';\nimport { PagePacker } from './page_layout/page_packer';\nimport { IPdfBrick } from './pdf_render/pdf_brick';\nimport { EventAsync, EventHandler } from './event_handler/event_handler';\nimport { DrawCanvas } from './event_handler/draw_canvas';\nimport { AdornersOptions, AdornersPanelOptions, AdornersPageOptions } from './event_handler/adorners';\nimport { SurveyHelper } from './helper_survey';\n\n/**\n * The `SurveyPDF` object enables you to export your surveys and forms to PDF documents.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/ (linkStyle))\n */\nexport class SurveyPDF extends SurveyModel {\n private static currentlySaving: boolean = false;\n private static saveQueue: any[] = [];\n public options: IDocOptions;\n public constructor(jsonObject: any, options?: IDocOptions) {\n super(jsonObject);\n if (typeof options === 'undefined') {\n options = {};\n }\n if(this.questionsOnPageMode == 'inputPerPage') {\n this.questionsOnPageMode = 'standard';\n }\n this.options = SurveyHelper.clone(options);\n }\n public get haveCommercialLicense(): boolean {\n const f = SurveyCore.hasLicense;\n return !!f && f(2);\n }\n public set haveCommercialLicense(val: boolean) {\n // eslint-disable-next-line no-console\n console.error('As of v1.9.101, the haveCommercialLicense property is not supported. To activate your license, use the setLicenseKey(key) method as shown on the following page: https://surveyjs.io/remove-alert-banner');\n }\n /**\n * An event that is raised when SurveyJS PDF Generator renders a page header. Handle this event to customize the header.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `canvas`: [`DrawCanvas`](https://surveyjs.io/pdf-generator/documentation/api-reference/drawcanvas)\\\n * An object that you can use to draw text and images in the page header.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n */\n public onRenderHeader: EventAsync<SurveyPDF, DrawCanvas> =\n new EventAsync<SurveyPDF, DrawCanvas>();\n /**\n * An event that is raised when SurveyJS PDF Generator renders a page footer. Handle this event to customize the footer.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `canvas`: [`DrawCanvas`](https://surveyjs.io/pdf-generator/documentation/api-reference/drawcanvas)\\\n * An object that you can use to draw text and images in the page footer.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/customize-header-and-footer-of-pdf-form/ (linkStyle))\n */\n public onRenderFooter: EventAsync<SurveyPDF, DrawCanvas> =\n new EventAsync<SurveyPDF, DrawCanvas>();\n /**\n * An event that is raised when SurveyJS PDF Generator renders a survey question. Handle this event to customize question rendering.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\\\n * A survey question that is being rendered.\n *\n * - `options.point`: `IPoint`\\\n * An object with coordinates of the top-left corner of the element being rendered. This object contains the following properties: `{ xLeft: number, yTop: number }`.\n *\n * - `options.bricks`: [`PdfBrick[]`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfbrick)\\\n * An array of [bricks](https://surveyjs.io/pdf-generator/documentation/customize-survey-question-rendering-in-pdf-form#custom-rendering) used to render the element.\n *\n * - `options.controller`: [`DocController`](https://surveyjs.io/pdf-generator/documentation/api-reference/doccontroller)\\\n * An object that provides access to main PDF document properties (font, margins, page width and height) and allows you to modify them.\n *\n * - `options.repository`: `FlatRepository`\\\n * A repository with classes that render elements to PDF. Use its `create` method if you need to create a new instance of a rendering class.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/how-to-use-adorners-in-pdf-forms/ (linkStyle))\n */\n public onRenderQuestion: EventAsync<SurveyPDF, AdornersOptions> =\n new EventAsync<SurveyPDF, AdornersOptions>();\n /**\n * An event that is raised when SurveyJS PDF Generator renders a panel. Handle this event to customize panel rendering.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\\\n * A panel that is being rendered.\n *\n * - `options.point`: `IPoint`\\\n * An object with coordinates of the top-left corner of the element being rendered. This object contains the following properties: `{ xLeft: number, yTop: number }`.\n *\n * - `options.bricks`: [`PdfBrick[]`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfbrick)\\\n * An array of [bricks](https://surveyjs.io/pdf-generator/documentation/customize-survey-question-rendering-in-pdf-form#custom-rendering) used to render the element.\n *\n * - `options.controller`: [`DocController`](https://surveyjs.io/pdf-generator/documentation/api-reference/doccontroller)\\\n * An object that provides access to main PDF document properties (font, margins, page width and height) and allows you to modify them.\n *\n * - `options.repository`: `FlatRepository`\\\n * A repository with classes that render elements to PDF. Use its `create` method if you need to create a new instance of a rendering class.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/how-to-use-adorners-in-pdf-forms/ (linkStyle))\n */\n public onRenderPanel: EventAsync<SurveyPDF, AdornersPanelOptions> =\n new EventAsync<SurveyPDF, AdornersPanelOptions>();\n /**\n * An event that is raised when SurveyJS PDF Generator renders a page. Handle this event to customize page rendering.\n *\n * Parameters:\n *\n * - `sender`: `SurveyPDF`\\\n * A SurveyPDF instance that raised the event.\n *\n * - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\\\n * A page that is being rendered.\n *\n * - `options.point`: `IPoint`\\\n * An object with coordinates of the top-left corner of the element being rendered. This object contains the following properties: `{ xLeft: number, yTop: number }`.\n *\n * - `options.bricks`: [`PdfBrick[]`](https://surveyjs.io/pdf-generator/documentation/api-reference/pdfbrick)\\\n * An array of [bricks](https://surveyjs.io/pdf-generator/documentation/customize-survey-question-rendering-in-pdf-form#custom-rendering) used to render the element.\n *\n * - `options.controller`: [`DocController`](https://surveyjs.io/pdf-generator/documentation/api-reference/doccontroller)\\\n * An object that provides access to main PDF document properties (font, margins, page width and height) and allows you to modify them.\n *\n * - `options.repository`: `FlatRepository`\\\n * A repository with classes that render elements to PDF. Use its `create` method if you need to create a new instance of a rendering class.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/how-to-use-adorners-in-pdf-forms/ (linkStyle))\n */\n public onRenderPage: EventAsync<SurveyPDF, AdornersPageOptions> =\n new EventAsync<SurveyPDF, AdornersPageOptions>();\n\n public onDocControllerCreated: EventBase<SurveyPDF, { controller: DocController }> = new EventBase<SurveyPDF, {controller: DocController}>();\n\n public onRenderCheckItemAcroform: EventAsync<SurveyPDF, any> =\n new EventAsync<SurveyPDF, any>();\n\n public onRenderRadioGroupWrapAcroform: EventAsync<SurveyPDF, any> =\n new EventAsync<SurveyPDF, any>();\n\n public onRenderRadioItemAcroform: EventAsync<SurveyPDF, any> =\n new EventAsync<SurveyPDF, any>();\n\n public getUpdatedCheckItemAcroformOptions(options: any): void {\n this.onRenderCheckItemAcroform.fire(this, options);\n }\n public getUpdatedRadioGroupWrapOptions(options: any): void {\n this.onRenderRadioGroupWrapAcroform.fire(this, options);\n }\n public getUpdatedRadioItemAcroformOptions(options: any): void {\n this.onRenderRadioItemAcroform.fire(this, options);\n }\n private correctBricksPosition(controller: DocController, flats: IPdfBrick[][]) {\n if(controller.isRTL) {\n flats.forEach(flatsArr => {\n flatsArr.forEach(flat => {\n flat.translateX((xLeft: number, xRight: number) => {\n const shiftWidth = controller.paperWidth - xLeft - xRight;\n return { xLeft: xLeft + shiftWidth, xRight: xRight + shiftWidth };\n });\n });\n });\n }\n }\n protected async renderSurvey(controller: DocController): Promise<void> {\n this.visiblePages.forEach(page => page.onFirstRendering());\n const flats: IPdfBrick[][] = await FlatSurvey.generateFlats(this, controller);\n this.correctBricksPosition(controller, flats);\n const packs: IPdfBrick[][] = PagePacker.pack(flats, controller);\n await EventHandler.process_header_events(this, controller, packs);\n for (let i: number = 0; i < packs.length; i++) {\n for (let j: number = 0; j < packs[i].length; j++) {\n if (controller.getNumberOfPages() === i) {\n controller.addPage();\n }\n controller.setPage(i);\n //gizmos bricks borders for debug\n // packs[i][j].unfold().forEach((rect: IPdfBrick) => {\n // controller.doc.setDrawColor('green');\n // controller.doc.rect(...SurveyHelper.createAcroformRect(rect));\n // controller.doc.setDrawColor('black');\n // }\n // );\n await packs[i][j].render();\n }\n }\n }\n /**\n * An asynchronous method that starts to download the generated PDF file in the web browser.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/save-completed-forms-as-pdf-files/ (linkStyle))\n * @param fileName *(Optional)* A file name with the \".pdf\" extension. Default value: `\"survey_result.pdf\"`.\n */\n public async save(fileName: string = 'survey_result.pdf'): Promise<any> {\n if(!SurveyPDF.currentlySaving) {\n const controller: DocController = new DocController(this.options);\n this.onDocControllerCreated.fire(this, { controller: controller });\n SurveyPDF.currentlySaving = true;\n SurveyHelper.fixFont(controller);\n await this.renderSurvey(controller);\n const promise = controller.doc.save(fileName, { returnPromise: true });\n promise.then(() => {\n SurveyPDF.currentlySaving = false;\n const saveFunc = SurveyPDF.saveQueue.shift();\n if(!!saveFunc) {\n saveFunc();\n }\n });\n return promise;\n } else {\n SurveyPDF.saveQueue.push(() => {\n this.save(fileName);\n });\n }\n }\n /**\n * An asynchronous method that allows you to get PDF content in different formats.\n *\n * [View Demo](https://surveyjs.io/pdf-generator/examples/convert-pdf-form-blob-base64-raw-pdf-javascript/ (linkStyle))\n *\n * @param type *(Optional)* One of `\"blob\"`, `\"bloburl\"`, `\"dataurlstring\"`. Do not specify this parameter if you want to get raw PDF content as a string value.\n *\n */\n raw(): Promise<string>;\n raw(type: 'arraybuffer'): Promise<ArrayBuffer>;\n raw(type: 'blob'): Promise<Blob>;\n raw(type: 'bloburl'): Promise<URL>;\n raw(type: 'dataurlstring'): Promise<string>;\n public async raw(type?: string): Promise<ArrayBuffer | string | Blob | URL > {\n const controller: DocController = new DocController(this.options);\n this.onDocControllerCreated.fire(this, { controller: controller });\n SurveyHelper.fixFont(controller);\n await this.renderSurvey(controller);\n return controller.doc.output(type);\n }\n}","module.exports = __WEBPACK_EXTERNAL_MODULE_jspdf__;","module.exports = __WEBPACK_EXTERNAL_MODULE_survey_core__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/entries/pdf.ts\");\n",""],"names":[],"sourceRoot":""}